mml is complicated. especially if you don't know anything about music. I assume you do. so, what you want to start with are these 3 lines:
bgmsetd 128,@data
bgmplay 128
end
this is the beginning of your test program. next, make a label further in the prg that looks like:
@data
...
data 0
make sure you have a data 0 at the end. unlike other times when you use data, you don't need to define vars
putting data 0 at the end stops the assigning of sata to the song. now the notes have to “be in quotation marks like this” or be saved as a string(but then you have to use bgmset instead of bgmsetd). the note names are the same. some very important mml commands are saying the note and then a number. C4 or C is a quarter note, c8 is an eigth, so on and so forth. T is the tempo, so T120 is 120 bpm
O or ‹ or › can be used to define what octave you want to be in. O4 is a deginition while ‹› jusr raise/lower it by one. [] are used for loops. jusr enclose it around some mml and put 0 or blank for infinite, or a # of times to loop. : is a track definition, and you can have 8 playing at once :0-:7. @ is an instrument variable. type mml and then click on the help to find a list of available types
R signifies a rest. now when you have to put it in your program, get rid of the end and bgmplay. it should just be the bgmsetd with the other starting protocals and the data near the end of the program