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