File: 02-sine-tone.py

package info (click to toggle)
python-pyo 1.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 23,692 kB
  • sloc: ansic: 137,415; python: 135,293; makefile: 390; cpp: 242; sh: 163
file content (21 lines) | stat: -rw-r--r-- 465 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""
02-sine-tone.py - The "hello world" of audio programming!

This script simply plays a 1000 Hz sine tone.

"""
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())