Size: 1342
Comment:
|
Size: 1720
Comment: install instructions
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
homepage: http://sndobj.sourceforge.net/#python |
Description: The Sound Object Library is an object-oriented audio processing library. It provides objects for synthesis and processing of sound that can be used to build applications for computer-generated music. See for more information the [http://sndobj.sourceforge.net/#python sndObj homepage]. |
Line 4: | Line 3: |
# | == Installation == There is no installer included, but you can move/copy (for the Windows platform) the .pyd and .dll files to your %pythondir%\DLL and the .pyc files to %pythondir%\Libs . |
Line 6: | Line 6: |
# | == Code Examples == Some examples not available in [http://downloads.sourceforge.net/sndobj/PySndObj.pdf?modtime=1169813301&big_mirror=0 the manual]. More examples are included in the download itself. |
Line 8: | Line 9: |
'''Available examples not in manual (please add):''' | === A simple synth === A simple synth with band limited noise, oscilators, and alternating L-R output. In case of any issue, contact renato.fabbri@gmail.com AND/OR contact sndObj mailing list. |
Line 10: | Line 12: |
_________________________________ 1- #simple synth with band limited noise, oscilators, [[BR]]#and alternating L-R output [[BR]]#any issue, contact renato.fabbri@gmail.com [[BR]]#AND/OR contact SndObj mailing list |
{{{#!python |
Line 21: | Line 14: |
[[BR]]import time | import time |
Line 24: | Line 17: |
[[BR]]osc = sndobj.Oscili(tab, 440, 10000) [[BR]]noise = sndobj.Randh(100000, 10000) |
osc = sndobj.Oscili(tab, 440, 10000) noise = sndobj.Randh(100000, 10000) |
Line 28: | Line 21: |
[[BR]]y=2 | y=2 |
Line 31: | Line 24: |
[[BR]]outp.SetOutput(x, osc) [[BR]]outp.SetOutput(y, noise) |
outp.SetOutput(x, osc) outp.SetOutput(y, noise) |
Line 35: | Line 28: |
[[BR]]osc.SetFreq(440,mod) | osc.SetFreq(440,mod) |
Line 38: | Line 31: |
[[BR]]mod.SetFreq(2, mod2) | mod.SetFreq(2, mod2) |
Line 41: | Line 34: |
[[BR]]mod3 = sndobj.Oscili(tab, q, 1000) [[BR]]noise.SetFreq(1000, mod3) |
mod3 = sndobj.Oscili(tab, q, 1000) noise.SetFreq(1000, mod3) |
Line 45: | Line 38: |
[[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) |
thread.AddObj(mod) thread.AddObj(mod2) thread.AddObj(mod3) thread.AddObj(osc) thread.AddObj(noise) thread.AddObj(outp, sndobj.SNDIO_OUT) |
Line 58: | Line 51: |
[[BR]]y=1 | y=1 |
Line 61: | Line 54: |
[[BR]]y=2 | y=2 |
Line 63: | Line 56: |
[[BR]]outp.SetOutput(y, noise) [[BR]]time.sleep(1) [[BR]]n +=1 |
outp.SetOutput(y, noise) time.sleep(1) n +=1 |
Line 68: | Line 61: |
________________________ 2- (Write/paste your example here) |
}}} |
Description: The Sound Object Library is an object-oriented audio processing library. It provides objects for synthesis and processing of sound that can be used to build applications for computer-generated music. See for more information the [http://sndobj.sourceforge.net/#python sndObj homepage].
Installation
There is no installer included, but you can move/copy (for the Windows platform) the .pyd and .dll files to your %pythondir%\DLL and the .pyc files to %pythondir%\Libs .
Code Examples
Some examples not available in [http://downloads.sourceforge.net/sndobj/PySndObj.pdf?modtime=1169813301&big_mirror=0 the manual]. More examples are included in the download itself.
A simple synth
A simple synth with band limited noise, oscilators, and alternating L-R output. In case of any issue, contact renato.fabbri@gmail.com AND/OR contact sndObj mailing list.
1 import sndobj
2 import time
3
4 tab = sndobj.HarmTable()
5 osc = sndobj.Oscili(tab, 440, 10000)
6 noise = sndobj.Randh(100000, 10000)
7
8 x=1
9 y=2
10
11 outp = sndobj.SndRTIO(2)
12 outp.SetOutput(x, osc)
13 outp.SetOutput(y, noise)
14
15 mod = sndobj.Oscili(tab, 2, 560)
16 osc.SetFreq(440,mod)
17
18 mod2=sndobj.Oscili(tab, 4, 50)
19 mod.SetFreq(2, mod2)
20
21 q=2
22 mod3 = sndobj.Oscili(tab, q, 1000)
23 noise.SetFreq(1000, mod3)
24
25 thread = sndobj.SndThread()
26 thread.AddObj(mod)
27 thread.AddObj(mod2)
28 thread.AddObj(mod3)
29 thread.AddObj(osc)
30 thread.AddObj(noise)
31 thread.AddObj(outp, sndobj.SNDIO_OUT)
32
33 thread.ProcOn()
34
35 n=0
36 while n < 8:
37 if x==1:
38 x=2
39 y=1
40 else:
41 x=1
42 y=2
43 outp.SetOutput(x, osc)
44 outp.SetOutput(y, noise)
45 time.sleep(1)
46 n +=1
47
48 thread.ProcOff()