Module tones
[hide private]
[frames] | no frames]

Module tones

source code

Utilities to generate and play tones

Functions [hide private]
 
beep(hz, length, left=50, right=50)
Plays a tone at the given hz, length, and stereo balance.
source code
Variables [hide private]
  SAMPLE_RATE = 44100
  player = None
hash(x)
Function Details [hide private]

beep(hz, length, left=50, right=50)

source code 

Plays a tone at the given hz, length, and stereo balance.

Parameters:
  • hz (float) - pitch in hz of the tone
  • length (integer) - length of the tone in ms
  • left (integer) - volume of the left channel (0 to 100)
  • right (float) - volume of the right channel (0 to 100)