File: midi_synth.py

package info (click to toggle)
python-pyo 1.0.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 52,332 kB
  • sloc: python: 135,133; ansic: 127,822; javascript: 16,116; sh: 395; makefile: 388; cpp: 242
file content (10 lines) | stat: -rw-r--r-- 417 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
notein = Notein(scale=1)
modwheel = Midictl(1, maxscale=0.2)

amp = MidiAdsr(notein["velocity"], 0.001, 0.01, 0.7, 0.05)

lfo = Sine(5, mul=modwheel, add=1)
synth1 = RCOsc(freq=notein["pitch"] * lfo, sharp=0.75, mul=amp)
synth2 = RCOsc(freq=notein["pitch"] * lfo * 1.01, sharp=0.74, mul=amp)
stereo = Mix([synth1.mix(1), synth2.mix(1)], voices=2)
rev = STRev(stereo, inpos=[0, 1], revtime=2, bal=0.25, mul=0.2).out()