############################################################################### # # $Id$ # ############################################################################### # Include the Nsound headers from Nsound import * sr = 44100.0 # Create a new instance of the Sine Generator sine = Sine(sr) pan = Buffer() pan << sine.generate(1.0, 3.0) # Create a stereo AudioStream. as = AudioStream(sr, 2) # Fill it with a 220 Hz sine wave. as << 0.5 * sine.generate(4.9, 220) # Execute the pan method. as.pan(pan) # Write the AudioStream to a wave file as >> "example2.wav";