square_blender.py 234 B

12345678
  1. #!/usr/bin/env python
  2. from wavebender import *
  3. from math import cos
  4. channels = ((square_wave(440.0, amplitude=0.1),),)
  5. samples = compute_samples(channels, 44100 * 60 * 1)
  6. write_wavefile(stdout, samples, 44100 * 60 * 1, nchannels=1)