Compatible with:
DOS Maximite CMM MM150 MM170 MM+ MMX Picromite ArmiteL4 Armite F4 ArmiteH7 CMM2

PLAY MODFILE file$ [,samplerate]
PLAY EFFECT file$ [,interrupt]
PLAY MODSAMPLE sampleno, channelno [,volume] [,samplerate]


PLAY MODFILE file$ [,samplerate]
Will play a MOD file on the DAC outputs.
'file$' is the MOD file to play (the extension of .mod will be appended if missing). 
The MOD file is played in the background and will run continuously until PLAY STOP is called.
The MOD encoder supports 32 channels, 16-bit resolution (but the DACs are only 12 bit), 32 samples, no fixed maximum size.
The optional parameter samplerate specifies the number of samples per second generated by the modfile engine. 
The default is 44100. Processor overhead is reduced by decreasing this. 
Valid values are 8000, 16000, 22050, 44100, 48000
Note: wav files played using PLAY EFFECT during modfile playback must have the same sample rate as the modfile output.

PLAY EFFECT file$ [,interrupt]
This will play the WAV file ' file$' at the same time as a MOD file is playing. 
If a previous EFFECT file is playing this command will immediately terminate it and commence playing the new file.
The file is played in the background, 'interrupt' is optional and is the name of a subroutine that will be called when the file has finished playing.
Note: wav files played using PLAY EFFECT during mod file playback must  have the same sample rate as the modfile output. Files can be mono or stereo.

PLAY MODSAMPLE sampleno, channelno [,volume] [,samplerate]
Plays one of the samples in the MOD file concurrently with the main MOD file playback. 
This allows sound effects to be incorporated in the MOD file.
“sampleno” can be in the range 1 to 32.
Up to 4 samples can be played simultaneously on independent channels using the specified “channelno” which must be in the range 1 to 4.
The optional “volume” should be set in the range 0 to 64 (default 64).
The optional “samplerate” specifies the update rate for the sample. 
The default is 16000. Changing this will change the pitch of the sample and the duration of playback and it should be set to the sample's original rate for playback as recorded.


Last edited: 29 September, 2020