So the number of musical tracks for the NOTES SET command will vary from 1 to 8.
In the command 'NOTES SET A$,B$,... ' the tracks 'A$,B$,...' are strings and are separated by commas.
For a variable number of tracks, these strings can be elements of an array in which only the required number of strings is present and the rest of the array is empty. An example is in the following code:
Code: Select all
' Sound tracks by Dutchman
OPTION BASE 1
PRINT "How to play tracks in parallel"
'11=vibraphone, 56=trumpet
NOTES SET "11:qcdefga","56:irhceg"
NOTES PLAY
GOSUB Play
PRINT "now 'dummy' solution for 1 to 4 tracks"
Track$(1)="11:qcdefga"
Track$(2)="56:irhceg"
NOTES SET Track$(1), Track$(2), Track$(3), Track$(4)
NOTES PLAY
GOSUB Play
END
'===== subroutines
Play:
IF NOTES_TIME() < NOTES_LENGTH() THEN play
RETURN