Differences between revisions 1 and 8 (spanning 7 versions)
Revision 1 as of 2006-11-25 16:32:11
Size: 991
Editor: 201-43-237-52
Comment:
Revision 8 as of 2006-11-30 18:04:12
Size: 1242
Editor: 201-93-213-26
Comment:
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
Available examples not in manual (please add): #

#

'''
Available examples not in manual (please add):'''

_________________________________

=== 1- ===;
Line 8: Line 16:
#and alternating L-R output [[BR]]#and alternating L-R output
[[BR]]#any issue, contact renato.fabbri@gmail.com
Line 11: Line 20:
import time [[BR]]import time
Line 14: Line 23:
osc = sndobj.Oscili(tab, 440, 10000)
noise = sndobj.Randh(100000, 10000)
[[BR]]osc = sndobj.Oscili(tab, 440, 10000)
[[BR]]noise = sndobj.Randh(100000, 10000)
Line 18: Line 27:
y=2 [[BR]]y=2
Line 21: Line 30:
outp.SetOutput(x, osc)
outp.SetOutput(y, noise)
[[BR]]outp.SetOutput(x, osc)
[[BR]]outp.SetOutput(y, noise)
Line 25: Line 34:
osc.SetFreq(440,mod) [[BR]]osc.SetFreq(440,mod)
Line 28: Line 37:
mod.SetFreq(2, mod2) [[BR]]mod.SetFreq(2, mod2)
Line 31: Line 40:
mod3 = sndobj.Oscili(tab, q, 1000)
noise.SetFreq(1000, mod3)
[[BR]]mod3 = sndobj.Oscili(tab, q, 1000)
[[BR]]noise.SetFreq(1000, mod3)
Line 35: Line 44:
thread.AddObj(mod)
thread.AddObj(mod2)
thread.AddObj(mod3)
thread.AddObj(osc)
thread.AddObj(noise)
thread.AddObj(outp, sndobj.SNDIO_OUT)
[[BR]]thread.AddObj(mod)
[[BR]]thread.AddObj(mod2)
[[BR]]thread.AddObj(mod3)
[[BR]]thread.AddObj(osc)
[[BR]]thread.AddObj(noise)
[[BR]]thread.AddObj(outp, sndobj.SNDIO_OUT)
Line 48: Line 57:
        y=1         [[BR]]y=1
Line 51: Line 60:
        y=2         [[BR]]y=2
Line 53: Line 62:
    outp.SetOutput(y, noise)
    time.sleep(1)
    n +=1
    [[BR]]outp.SetOutput(y, noise)
    [[BR]]time.sleep(1)
    [[BR]]n +=1

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

#

#

Available examples not in manual (please add):

_

=== 1- ===;

#simple synth with band limited noise, oscilators, BR#and alternating L-R output BR#any issue, contact renato.fabbri@gmail.com

import sndobj BRimport time

tab = sndobj.HarmTable() BRosc = sndobj.Oscili(tab, 440, 10000) BRnoise = sndobj.Randh(100000, 10000)

x=1 BRy=2

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

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

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

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

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

thread.ProcOn()

n=0 while n < 8:

thread.ProcOff()

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

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