Re: gtBASIC
Posted: 14 Jan 2023, 12:13
Lots of useful information here: https://github.com/at67/gigatron-rom/tr ... ols/gtmidi
Some of the documentation is a little outdated, for example gtMIDI does support the -v volume/velocity option now.
It's basically a Gigatron specific version of the miditones format, there is an extra command 0xD0 that stitches segmented midi chunks together and a one byte repeatable field for delays rather that two bytes, (this saves a lot of RAM as most delays are one byte when using a delay resolution of 16.66667ms).
P.S. ROMvX0 has one vCPU instruction to setup and then play gtMIDI's for you already if you are thinking of writing your own player, (you won't be able to beat it for efficiency in terms of RAM usage or CPU cycles), but if you want to add for example a white noise/drum channel, (which is trivial to do), there are players in "audio.i", "audio_ROMv5a.i" and "audio_ROMvX0.i" in the gbas runtime folder that you can use as a guide.
P.P.S. If you type gtMIDI at the console, it gives example command lines. There are five source code outputs, (GCL, vCPU, GBAS, CPP, Py), that you can embed into your source code and one binary output, (gtMID). gtMIDI is the format I normally use as it doesn't blow out the gbas source code with irrelevant static data declarations.
Some of the documentation is a little outdated, for example gtMIDI does support the -v volume/velocity option now.
It's basically a Gigatron specific version of the miditones format, there is an extra command 0xD0 that stitches segmented midi chunks together and a one byte repeatable field for delays rather that two bytes, (this saves a lot of RAM as most delays are one byte when using a delay resolution of 16.66667ms).
P.S. ROMvX0 has one vCPU instruction to setup and then play gtMIDI's for you already if you are thinking of writing your own player, (you won't be able to beat it for efficiency in terms of RAM usage or CPU cycles), but if you want to add for example a white noise/drum channel, (which is trivial to do), there are players in "audio.i", "audio_ROMv5a.i" and "audio_ROMvX0.i" in the gbas runtime folder that you can use as a guide.
P.P.S. If you type gtMIDI at the console, it gives example command lines. There are five source code outputs, (GCL, vCPU, GBAS, CPP, Py), that you can embed into your source code and one binary output, (gtMID). gtMIDI is the format I normally use as it doesn't blow out the gbas source code with irrelevant static data declarations.