11-- this has to be executed at least once
22-- for compiling essential SynthDefs
3- -- require("sc.Compilesynth")
4-
3+ require (" sc.Compilesynth" )
54
5+ ---- ------------- one extra synthdef
66SynthDef (" PPongF" , {gate = 1 ,busin = 0 , busout = 0 ,ffreq = 1500 ,rq = 0.4 , fdback = 0.25 ,delaytime = 0.5 ,volumen = 2 ,bypass = 0 },function ()
77 local input , effect ;
88 input = In .ar (busin ,2 );
@@ -14,32 +14,82 @@ SynthDef("PPongF", {gate=1,busin=0, busout=0,ffreq=1500,rq=0.4, fdback=0.25,dela
1414 Out .ar (busout ,Select .ar (bypass ,{effect * volumen ,Silent .ar (2 )}))
1515end ):store ()
1616
17- bass = OscEP {inst = " plukV" ,sends = {db2amp (- 24 )}}:Bind {
17+ ---- --------- define some players, master effects
18+ -- a bass
19+ bass = OscEP {inst = " plukV" ,sends = {db2amp (- 24 )},channel = {level = db2amp (- 3 )}}
20+
21+ -- solo instrument with one insert
22+ solo = OscEP {inst = " plukV" ,sends = {db2amp (- 10 )}}
23+ solo .inserts = {{" PPongF" ,{bypass = 0 ,volumen = 0.95 ,ffreq = 1000 ,rq = 1 , fdback = 0.5 ,delaytime = BeatTime (4 )}}}
24+
25+ -- a shaker
26+ shaker = OscEP ({inst = " shaker" ,sends = {db2amp (- 20 )},channel = {level = db2amp (- 30 )}})
27+
28+ -- master effects used with sends in players
29+ Effects = {FX (" gverb" ,db2amp (0 ),nil ,{revtime = 5 ,roomsize = 100 })}
30+
31+ -- master section with two inserts
32+ MASTER {level = db2amp (3 )}
33+ Master .inserts = {
34+ {" Compander" ,{slopeAbove = 1 / 3 ,bypass = 0 }},
35+ {" Limiter" ,{thresh = 3 ,bypass = 1 }},
36+ }
37+
38+
39+ ---- ------------------ some patterns
40+ basspat = PS {
1841 escale = {modes .aeolian },
19- degree = LOOP {1 ,3 ,RS {5 ,6 }} + 7 * 3 ,
42+ degree = LOOP {1 ,3 ,RS {5 ,6 }, 1 , 3 , 5 - 7 } + 7 * 3 ,
2043 dur = LOOP {1.5 ,1.5 ,1 },
2144 coef = 0.9 ,
2245 pan = - 0.25
2346}
2447
25- solo = OscEP { inst = " plukV " , sends = { db2amp ( - 10 )}}: Bind {
48+ solopat = PS {
2649 escale = {modes .aeolian },
2750 degree = LOOP {3 ,2 ,1 ,2 ,1 ,0 ,1 ,0 ,- 1 ,- 2 } + 7 * 6 ,
28- dur = LOOP {1.5 ,1.5 ,1 }* LOOP {LS {0.5 }:rep (16 ),LS {0.25 }:rep (4 )},
51+ dur = LOOP {1.5 ,1.5 ,1 }* LS {LS {0.5 }:rep (21 ),LS {0.25 }:rep (6 )},
2952 amp = noisefStream {0.6 ,0.9 },
3053 pan = RSinf {0.5 ,- 0.5 }
3154}
32- solo .inserts = {{" PPongF" ,{bypass = 0 ,volumen = 0.95 ,ffreq = 1000 ,rq = 1 , fdback = 0.9 ,delaytime = BeatTime (4 )}}}
3355
34- Effects = {FX (" gverb" ,db2amp (0 ),nil ,{revtime = 5 ,roomsize = 100 })}
35- Master .inserts = {
36- {" Compander" ,{slopeAbove = 1 / 3 ,bypass = 0 }},
37- {" Limiter" ,{thresh = 3 ,bypass = 1 }},
38- }
39-
40- -- midi input
41- instgui = InstrumentsGUI (" plukV" )
56+ shakerpat = PS {
57+ note = 70 ,
58+ velo = LOOP {1 ,0.2 ,0.2 ,0.2 ,0.5 ,0.2 ,0.2 ,0.2 },
59+ density = LOOP {4000 ,2000 ,2000 ,2000 },
60+ attack = LOOP {0 ,0.2 ,0.05 ,0.2 ,0.05 ,0.2 ,0.05 ,0.2 },
61+ decay = 0.2 ,
62+ pan = 0 ,
63+ dur = 0.5
64+ }
65+ ---- ------------------ theme -----------------
66+ solo :Bind (LS {
67+ solopat ,
68+ DONOP (12 ), -- wait for 12 beats
69+ solopat ,
70+ SETEv " bass_start" , -- start bass setting "bass_start"
71+ solopat ,
72+ SETEv " shaker" , -- start shaker
73+ DONOP (16 ),
74+ LS {solopat }:rep (3 ), -- repeat pattern 3 times
75+ DONOP (16 ),
76+ solopat
77+ })
78+
79+ bass :Bind (LS {WAITEv " bass_start" ,basspat })
80+
81+ shaker :Bind (LS {WAITEv " shaker" ,shakerpat })
82+
83+ ---- some midi input
84+ instgui = InstrumentsGUI (" plukV" )
4285MidiToOsc .AddChannel (0 ,instgui ,{0.2 })
4386
44- FreqScope ()
87+ -- a FreqScope
88+ FScope ()
89+
90+ -- uncoment to record to file (will be in SuperCollider folder)
91+ -- DiskOutBuffer("simple_theme.wav")
4592
93+ -- set tempo and start playing
94+ theMetro :tempo (130 )
95+ theMetro :start ()
0 commit comments