Created
October 13, 2020 16:40
-
-
Save jgoizueta/69945fb6d2a6d95ddc2857648bfd86c7 to your computer and use it in GitHub Desktop.
Zoom MRS-1266 File conversion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Convert Zoom MRS-1266 .DAT files to .WAV | |
| FIXED_HEADER = "52 49 46 46 24 00 5E 00 57 41 56 45 66 6D 74 20 10 00 00 00 01 00 01 00 44 AC 00 00 88 58 01 00 02 00 10 00 64 61 74 61" | |
| input_file = ARGV[0] | |
| data = File.open(input_file, 'rb') { |file| file.read } | |
| data = data[65536..-1] | |
| size = data.size | |
| header = FIXED_HEADER.split.map{ |v| v.to_i(16) }.pack("C*") | |
| output = header + [size].pack("V") + data | |
| output_file = ARGV[1] | |
| File.open(output_file, 'wb') do |file| | |
| file.write output | |
| end |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A proper script
zoom2wav: