Sha256: 9692cfb7221a359ebef949de1a435252088d51f8b990f324d605fd49334662ed

Contents?: true

Size: 413 Bytes

Versions: 1

Compression:

Stored size: 413 Bytes

Contents

#!/usr/bin/env ruby
fname = ARGV.shift
raise "Must specify filename." unless fname
outname = fname.gsub(/\.raw/, ".txt")

bytes   = File.read(fname).bytes.map { |x| "0x%02X" % x }
output = [bytes.shift(5).join(", ")] # SysEx vendor header...

output << bytes.shift(2).join(", ") # Apparent prefix...
while (row = bytes.shift(3).join(", ")) != ""
  output << row
end

File.write(outname, output.join("\n") + "\n")

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
surface_master-0.2.0 debug_tools/decode.rb