Play Tone

Description

This command plays a tone derived from the parameter. The tone is played indefinitely until the rMP3 receives either the Play Tone command again with no parameter, or the Stop command. If a file is being played when the Play Tone command is received, playback will resume if the Play Tone command is received with no parameter.

Note: Tones are generated using the VS10xx decoder’s “Sine Test”. The range and quantization of frequencies are pretty limited. For reference, here is an entire table of frequencies.

Format

PC T [tone]

Parameters

  • tone is a value between 0 and 255.
    • To calculate the tone value:
      • Tone Frequency = Base Frequency * d/128
        • This means that there can be more than one combination of Base Frequency and d for a Tone Frequency.
      • tone = Base Frequency Index + d
      • d is the divider value (1 → 31), which will give a range of divider fractions (1/128 → 31/128). A divider value of 0 will produce no sound.
      • Base Frequency Index Table:
Base FrequencyHexadecimalDecimal
44100 Hz0x000
48000 Hz0x2032
32000 Hz0x4064
22050 Hz0x6096
24000 Hz0x80128
16000 Hz0xA0160
11025 Hz0xC0192
12000 Hz0xE0224

Example, to play a 6000 Hz tone:

  • Base Frequency = 48000 Hz, therefore Base Frequency Index = 32.
  • d = 16.
  • Tone Frequency = 48000 * 16/128 = 6000 Hz.
  • tone = 32 + 16 = 48
    • PC T 48

Response Format

NULL

Example

PC T 48