Thread:Toodles78/@comment-13209194-20140226223023

Personally, this is my favorite thing to program. You'll need one simple command: BGMSETD. This reads MML from DATA. MML is easy enough on it's own. Here's an example:

@SONG DATA ":0@0O5T500" DATA "[GCDRE1]" DATA 0

@SONG is the label of your DATA. It's crucial. DATA is pretty self-explanatory. ":0" is, in simplest terms, one part of the song. You can have 8 parts in all, 0-7. "@0" is the instrument (please refer to help guide for instrument list.) 0 is just a piano. "O5" is the octave. It controls how high or low the pitch is. It can be changed throughout the song. You can change it by restating it, or using a > or <. "T500" is the tempo. This can be 1-500. It is how fast the music is. "[] tell the song to repeat the bracketed area. You need two brackets (one on each side) or you will get an error. "G", "C", and "D" are quarter notes. "R" is a rest. "E1" is a whole notes. Having a note ending with 2 makes it a half, 8 a quarter, so on. DATA 0 means end of song. Don't forget it.

Now, that you have a song, use BGMSETD.

BGMSETD 128,@SONG (or whatever label name you have) BGMPLAY 0,128,127

BGMPLAY plays the song. 0 is the track number, 128 is the song, and 127 is the maximum volume.

Try experimenting! 