1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
02-sine-tone.py - The "hello world" of audio programming!
============================================================================================================================================
This script simply plays a 1000 Hz sine tone.
.. code-block:: python
from pyo import *
# Creates and boots the server.
# The user should send the "start" command from the GUI.
s = Server().boot()
# Drops the gain by 20 dB.
s.amp = 0.1
# Creates a sine wave player.
# The out() method starts the processing
# and sends the signal to the output.
a = Sine().out()
# Opens the server graphical interface.
s.gui(locals())
|