12.07.2015 Views

Programming Manual Elektor Proton Robot - ELEKTOR.se

Programming Manual Elektor Proton Robot - ELEKTOR.se

Programming Manual Elektor Proton Robot - ELEKTOR.se

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Play ToneDescriptionThis command plays a tone derived from the parameter. The tone is played indefinitely untilthe rMP3 receives either the Play Tone command again with no parameter, or the Stopcommand. If a file is being played when the Play Tone command is received, playback willresume if the Play Tone command is received with no parameter.Note: Tones are generated using the VS10xx decoder's “Sine Test”. The range andquantization of frequencies are pretty limited. For reference, here is an entire table offrequencies.FormatPC T [tone]Ba<strong>se</strong>FrequencyParameters• tone is a value between 0 and 255.Hexadecimalo44100 Hz 0x00 048000 Hz 0x20 3232000 Hz 0x40 6422050 Hz 0x60 96Decimal24000 Hz 0x80 12816000 Hz 0xA0 16011025 Hz 0xC0 192To calculate the tone value:• Tone Frequency = Ba<strong>se</strong> Frequency * d/128• This means that there can be more than onecombination of Ba<strong>se</strong> Frequency and d for a Tone Frequency.• tone = Ba<strong>se</strong> Frequency Index + d• d is the divider value (1 → 31), which will give arange of divider fractions (1/128 → 31/128). A divider value of 0 willproduce no sound.• Ba<strong>se</strong> Frequency Index Table:• Example:• Ba<strong>se</strong> Frequency = 48000 Hz,therefore Ba<strong>se</strong> Frequency Index = 32.• d = 16.• Tone Frequency = 48000 * 16/128 = 6000Hz.• tone = 32 + 16 = 4812000 Hz 0xE0 224Respon<strong>se</strong> FormatNULLExamplePC T 48Bart Huyskens <strong>Manual</strong> <strong>Elektor</strong> <strong>Proton</strong> V1.0 3 April 2011 111

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!