Bytestream as Note Frequency in Hex format
flamendless opened this issue · 5 comments
Hi, im wondering if it's possible to produce output as note frequency that is all in hex format?
There is, in a way; the -b option will create a binary file of the Playtune bytestream, which contains just the sequence of MIDI note numbers (not frequencies) and timing information.
If by "hex format" you mean an ASCII file that uses the characters 0-9 and A-F, there are all sorts of ways to create that from the binary file. From Windows PowerShell, for example, you can say "format-hex filename.bin". I don't know what "decoration" you would want, in terms of spaces, line breaks, etc.
If you really want the note frequencies instead of note numbers (which isn't very space efficient because it would take more than one byte per note), you would have to write a program to create that from the .bin file. It wouldn't be too hard.
@LenShustek im kinda running out of time for our assembly project :/ there is this one java program ive used as reference to create such note frequencies in hex format from a .midi file, but it fails to properly play in the accompanying .asm
Sent from my HUAWEI GR5 2017 using FastHub
You’re going to have to explain what you mean by “hex format”
Like the one here https://github.com/leonardo-ono/Assembly8086MarioMusicOnPCSpeakerTest/blob/master/mario.asm at line 147
- That encoding is not of "note frequencies", it is of MIDI note numbers, just like Miditones generates.
- It is in 8086 source code format, which Miditones doesn't generate. Miditones generates C code.
- The bytestream is a much simpler single-channel constant-time format, instead of the multi-channel variable-time format that Miditones generates. You could write a program to convert the Miditones output to that, but you can't use it directly.
Sorry this wasn't right for immediate use in your "assembly project".