File: 04-serial-proc.py

package info (click to toggle)
python-pyo 1.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 23,692 kB
  • sloc: ansic: 137,415; python: 135,293; makefile: 390; cpp: 242; sh: 163
file content (32 lines) | stat: -rw-r--r-- 708 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
22
23
24
25
26
27
28
29
30
31
32
"""
04-serial-proc.py - Chaining processes on a single source.

This example shows how to chain processes on a single source.
Every processing object (ie the ones that modify an audio source) have
a first argument called "input". This argument takes the audio object
to process.

Note the input variable given to each Harmonizer.

"""
from pyo import *

s = Server().boot()
s.amp = 0.1

# Creates a sine wave as the source to process.
a = Sine().out()

# Passes the sine wave through an harmonizer.
h1 = Harmonizer(a).out()

# Then the harmonized sound through another harmonizer.
h2 = Harmonizer(h1).out()

# And again...
h3 = Harmonizer(h2).out()

# And again...
h4 = Harmonizer(h3).out()

s.gui(locals())