Differences between revisions 1 and 2
Revision 1 as of 2006-11-25 16:32:11
Size: 991
Editor: 201-43-237-52
Comment:
Revision 2 as of 2006-11-25 16:33:42
Size: 1015
Editor: 201-43-237-52
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:


__________________

homepage: http://sndobj.sourceforge.net/#python

Available examples not in manual (please add):

#simple synth with band limited noise, oscilators, #and alternating L-R output

import sndobj import time

tab = sndobj.HarmTable() osc = sndobj.Oscili(tab, 440, 10000) noise = sndobj.Randh(100000, 10000)

x=1 y=2

outp = sndobj.SndRTIO(2) outp.SetOutput(x, osc) outp.SetOutput(y, noise)

mod = sndobj.Oscili(tab, 2, 560) osc.SetFreq(440,mod)

mod2=sndobj.Oscili(tab, 4, 50) mod.SetFreq(2, mod2)

q=2 mod3 = sndobj.Oscili(tab, q, 1000) noise.SetFreq(1000, mod3)

thread = sndobj.SndThread() thread.AddObj(mod) thread.AddObj(mod2) thread.AddObj(mod3) thread.AddObj(osc) thread.AddObj(noise) thread.AddObj(outp, sndobj.SNDIO_OUT)

thread.ProcOn()

n=0 while n < 8:

  • if x==1:
    • x=2 y=1
    else:
    • x=1 y=2

    outp.SetOutput(x, osc) outp.SetOutput(y, noise) time.sleep(1) n +=1

thread.ProcOff()

PySndObj (last edited 2008-11-15 14:00:59 by localhost)

Unable to edit the page? See the FrontPage for instructions.