DOS Maximite CMM MM150 MM170 MM+ MMX Picromite ArmiteL4 Armite F4 ArmiteH7 CMM2
PLAY TONE left , right [, dur [, interrupt]]
Generates two separate sine waves on the sound output left and right channels.
The tone plays in the background (the program will continue running after this command).
'left' and 'right' are the frequencies in Hz to use for the left and right channels.
'dur' specifies the number of milliseconds that the tone will sound for.
MMBasic will round the time to the next nearest complete waveform of the first frequency specified so that the tone will always finish with the DC level in the middle and no discontinuity.
If the duration is not specified the tone will continue until explicitly stopped or the program terminates.
'interrupt' is optional and is an interrupt subroutine to call when the tone has completed.
The frequency can be from 1Hz to 20KHz and is very accurate (it is based on a crystal oscillator). The frequency can be changed at any time by issuing a new PLAY TONE command.
The output is updated at a frequency of 44.4kHz, independent to the tone frequency. This will mean that a staircase waveform appears on the output but will not be audible.
Last edited: 30 September, 2020