@@ -0,0 +1,1390 @@
+#!/usr/bin/env python%0A%22%22%22Act as a chirp.io beak, play shortcodes to be decoded by any listening%0Abrains.%0A%22%22%22%0A%0Aimport math%0Aimport argparse%0Aimport time%0A%0Aimport numpy%0Aimport pygame.mixer%0Aimport pygame.sndarray%0A%0Asample_rate = 44100%0Asample_size = -16%0Asample_type = numpy.int16%0Achannels = 1%0A%0Achirp_symbols = '0123456789abcdefghijklmnopqrstuv'%0Achirp_base_freq = 1760%0Anote_duration = 87.2e-3%0Asemitone = 2**(1/12.0)%0A%0Afreq = chirp_base_freq%0Achirp_freqs = %7B%7D%0Afor symbol in (chirp_symbols):%0A    chirp_freqs%5Bsymbol%5D = freq%0A    freq = int(freq * semitone)%0A%0Adef sine_sound(freq, duration):%0A    %22%22%22Return a %60pygame.mixer.Sound%60 which will play a tone at %60freq%60 Hz for%0A    %60duration%60 seconds.%0A    %22%22%22%0A    nsamples = int(duration * sample_rate)%0A    samples = %5Bint(16384 * math.sin(2.0 * math.pi * freq * t / sample_rate))%0A               for t in xrange(0, nsamples)%5D%0A    samples = numpy.array(samples, sample_type)%0A    return pygame.sndarray.make_sound(samples)%0A%0Adef beep(freq, duration):%0A    %22%22%22Play a beep for %60duration%60 seconds at %60freq%60 hertz.%0A%0A    Blocks whilst playing.%0A    %22%22%22 %0A    snd = sine_sound(freq, duration)%0A    snd.play()%0A    time.sleep(duration)%0A%0Adef chirp(symbols):%0A    for symbol in symbols:%0A        beep(chirp_freqs%5Bsymbol%5D, note_duration)%0A%0Adef main():%0A    pygame.mixer.init(sample_rate, sample_size, channels)%0A    chirp('hj' 'srg00lgbif' '4c6u07sq')%0A%0Aif __name__ == '__main__':%0A    main()%0A

Add basic chirp playback, uses pygame to play sounds