wave_generator/tone_maker.py
def append_sinewave(
        freq=440.0,
        duration_milliseconds=500,
        volume=1.0):
    """
    The sine wave generated here is the standard beep.  If you want something
    more aggresive you could try a square or saw tooth waveform.   Though there
    are some rather complicated issues with making high quality square and
    sawtooth waves...
    """

    global audio  # using global variables isn't cool.

    num_samples = duration_milliseconds * (sample_rate / 1000.0)

    for x in range(int(num_samples)):
        audio.append(volume * math.sin(2 * math.pi * freq * (x / sample_rate)))

    return

    The sine wave generated here is the standard beep.  If you want something
    more aggresive you could try a square or saw tooth waveform.   Though there
    are some rather complicated issues with making high quality square and
    sawtooth waves...
    
The sine wave generated here is the standard beep.  If you want something
more aggresive you could try a square or saw tooth waveform.   Though there
are some rather complicated issues with making high quality square and
sawtooth waves
The sine wave generated here is the standard beep . If you want something more aggresive you could try a square or saw tooth waveform . Though there are some rather complicated issues with making high quality square and sawtooth waves
def append_sinewave(
        freq=440.0,
        duration_milliseconds=500,
        volume=1.0):
    global audio  
    num_samples = duration_milliseconds * (sample_rate / 1000.0)
    for x in range(int(num_samples)):
        audio.append(volume * math.sin(2 * math.pi * freq * (x / sample_rate)))
    return
def append_sinewave ( freq = 440.0 , duration_milliseconds = 500 , volume = 1.0 ) : global audio num_samples = duration_milliseconds * ( sample_rate / 1000.0 ) for x in range ( int ( num_samples ) ) : audio . append ( volume * math . sin ( 2 * math . pi * freq * ( x / sample_rate ) ) ) return
The sine wave generated here is the standard beep.
The sine wave generated here is the standard beep .
"""
    The sine wave generated here is the standard beep.  If you want something
    more aggresive you could try a square or saw tooth waveform.   Though there
    are some rather complicated issues with making high quality square and
    sawtooth waves...
    """ # using global variables isn't cool.
freq
duration_milliseconds
volume