Skip to content

Commit 9da0647

Browse files
committed
Tidy up synth incubator slightly
1 parent c15cc05 commit 9da0647

File tree

1 file changed

+67
-135
lines changed

1 file changed

+67
-135
lines changed

etc/synthdefs/synth-designs-incubator.clj

Lines changed: 67 additions & 135 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,18 @@
3030
path))
3131

3232
(defn save-to-pi [sdef]
33-
(save-synthdef sdef "/Users/josephwilk/Workspace/josephwilk/c++/sonic-pi/etc/synthdefs/"))
33+
(save-synthdef sdef "/Users/sam/Development/RPi/sonic-pi/etc/synthdefs/"))
34+
35+
36+
3437

3538

3639
;; Triggered synths
3740
(do
3841
(without-namespace-in-synthdef
3942

40-
;; your synths here
41-
)
43+
;; your synths here
44+
)
4245

4346
(comment
4447
;; (save-to-pi sonic-pi-beep)
@@ -48,7 +51,7 @@
4851
(without-namespace-in-synthdef
4952
;; BPF designs
5053

51-
(defsynth sonic-pi-fx_reverb2
54+
(defsynth sonic-pi-fx_reverb2
5255
[amp 1
5356
amp_slide 0
5457
amp_slide_shape 5
@@ -83,13 +86,10 @@
8386
max_room (* max_room 300)
8487
damp (varlag damp damp_slide damp_slide_curve damp_slide_shape)
8588
[l r] (* pre_amp (in:ar in_bus 2))
86-
snd (* amp (g-verb l r mix room damp))]
89+
snd (* amp (g-verb l r mix room damp))]
8790
(out out_bus snd)))
8891

8992

90-
91-
92-
9393
(defsynth sonic-pi-fx_chorus
9494
[amp 1
9595
amp_slide 0
@@ -145,9 +145,10 @@
145145

146146
(do ;;comment
147147
(save-to-pi sonic-pi-fx_chorus)
148-
))
148+
))
149149

150150
;; Experimental
151+
151152
(comment
152153
(do
153154
;;TODO FIXME!
@@ -273,100 +274,83 @@
273274

274275

275276
(without-namespace-in-synthdef
276-
(defsynth sonic-pi-growl
277-
[out_bus 0
278-
279-
note 52
277+
(defsynth sonic-pi-singer
278+
"TODO: support vowel changes"
279+
[note 52
280280
note_slide 0
281281
note_slide_shape 5
282282
note_slide_curve 0
283283

284-
pan 0
285-
pan_slide 0
286-
pan_slide_shape 5
287-
pan_slide_curve 0
288-
289284
amp 1
290285
amp_slide 0
291286
amp_slide_shape 5
292287
amp_slide_curve 0
293288

294-
attack 0.1
295-
decay 0
296-
sustain 0
297-
release 1
298-
attack_level 1
299-
sustain_level 1
300-
env_curve 2]
301-
(let [note (varlag note note_slide note_slide_curve note_slide_shape)
302-
amp (varlag amp amp_slide amp_slide_curve amp_slide_shape)
303-
pan (varlag pan pan_slide pan_slide_curve pan_slide_shape)
304-
freq (midicps note)
305-
306-
snd (lpf (mix [(saw (* 0.25 freq)) (sin-osc (* 1.01 freq))]))
307-
snd (pitch-shift snd 0.4 1 0 0.01)
308-
snd (* amp snd)
309-
env (env-gen:kr (env-adsr-ng attack decay sustain release attack_level sustain_level env_curve) :action FREE)]
310-
(out out_bus (* env (pan2 snd pan))))))
311-
312-
(comment
313-
(save-to-pi sonic-pi-growl))
314-
315-
(without-namespace-in-synthdef
316-
317-
318-
319-
320-
(save-to-pi prophet)
321-
322-
)
323-
324-
(comment
325-
(sonic-pi-dark_ambience)
326-
(save-to-pi sonic-pi-dark_ambience))
327-
328-
(without-namespace-in-synthdef
329-
(defsynth sonic-pi-wood
330-
[out_bus 0
331-
332-
note 52
333-
note_slide 0
334-
note_slide_shape 5
335-
note_slide_curve 0
336-
337289
pan 0
338290
pan_slide 0
339291
pan_slide_shape 5
340292
pan_slide_curve 0
341293

342-
amp 1
343-
amp_slide 0
344-
amp_slide_shape 5
345-
amp_slide_curve 0
346-
347-
attack 0.01
294+
attack 0
348295
decay 0
349296
sustain 0
350-
release 0.1
297+
release 4
351298
attack_level 1
352299
sustain_level 1
353-
env_curve 2]
354-
(let [note (varlag note note_slide note_slide_curve note_slide_shape)
355-
amp (varlag amp amp_slide amp_slide_curve amp_slide_shape)
356-
pan (varlag pan pan_slide pan_slide_curve pan_slide_shape)
357-
freq (midicps note)
300+
env_curve 2
358301

359-
snd (bpf:ar (* (white-noise:ar) (line:kr 5 0 0.02)) freq 0.02)
360-
env (env-gen:kr (env-adsr-ng attack decay sustain release attack_level sustain_level env_curve) :action FREE)]
361-
(out out_bus (* env (pan2 snd pan))))))
302+
cutoff 110
303+
cutoff_slide 0
304+
cutoff_slide_shape 5
305+
cutoff_slide_curve 0
306+
res 0.3
307+
res_slide 0
308+
res_slide_shape 5
309+
res_slide_curve 0
362310

363-
(comment
364-
(sonic-pi-wood)
365-
(save-to-pi sonic-pi-wood))
311+
vibrato_speed 6
312+
vibrato_depth 4
366313

314+
freq0 400
315+
freq1 750
316+
freq2 2400
317+
freq3 2600
318+
freq4 2900
319+
amp0 1
320+
amp1 0.28
321+
amp2 0.08
322+
amp3 0.1
323+
amp4 0.01
324+
qs0 0.1
325+
qs1 0.1
326+
qs2 0.04
327+
qs3 0.04
328+
qs4 0.04
329+
lag-val 0.5
330+
331+
out_bus 0
332+
]
333+
(let [pan (varlag pan pan_slide pan_slide_curve pan_slide_shape)
334+
note (varlag note note_slide note_slide_curve note_slide_shape)
335+
amp (varlag amp amp_slide amp_slide_curve amp_slide_shape)
336+
cutoff (varlag cutoff cutoff_slide cutoff_slide_curve cutoff_slide_shape)
337+
res (varlag res res_slide res_slide_curve res_slide_shape)
338+
freq (midicps note)
339+
340+
freqs-list (map #(lag:kr % lag-val) [freq0 freq1 freq2 freq3 freq4])
341+
amps-list (map #(lag:kr (dbamp %) lag-val) [amp0 amp1 amp2 amp3 amp4])
342+
qs-list (map #(lag:kr % lag-val) [qs0 qs1 qs2 qs3 qs4])
343+
cutoff-freq (midicps cutoff)
344+
vibrato (* vibrato_depth (sin-osc:kr vibrato_speed))
345+
in (saw:ar (lag:kr (+ freq vibrato) 0.2))
346+
347+
env (env-gen:kr (env-adsr-ng attack decay sustain release attack_level sustain_level env_curve) :action FREE)
348+
snd (mix (* amps-list (bpf:ar in freqs-list qs-list)))
349+
snd (rlpf snd cutoff-freq res)
350+
snd (* snd amp)]
351+
(out out_bus (* (pan2 snd pan) env)))))
367352

368-
(without-namespace-in-synthdef
369-
(defsynth sonic-pi-dark_sea_horn
353+
(defsynth sonic-pi-dark_sea_horn
370354
"Dark, rough and sharp sea horn.
371355
Note: we are purposely not using recusion using busses. Just does not have the same feel."
372356
[out_bus 0
@@ -461,65 +445,13 @@
461445

462446
env (env-gen:kr (env-adsr-ng attack decay sustain release attack_level sustain_level env_curve) :action FREE)
463447
snd (* amp a)]
464-
(out out_bus (* env (pan2 snd pan))))))
448+
(out out_bus (* env (pan2 snd pan)))))
465449

466450
(comment
467451
(sonic-pi-dark_sea_horn :attack 1 :release 8 :note 40)
468452
(save-to-pi sonic-pi-dark_sea_horn)
469453
)
470454

471-
(without-namespace-in-synthdef
472-
(defsynth sonic-pi-singer
473-
"TODO: support vowel changes"
474-
[out_bus 0
475-
476-
vibrato_speed 6
477-
vibrato_depth 4
478-
479-
pan 0
480-
pan_slide 0
481-
pan_slide_shape 5
482-
pan_slide_curve 0
483-
484-
amp 1
485-
amp_slide 0
486-
amp_slide_shape 5
487-
amp_slide_curve 0
488-
489-
attack 1
490-
decay 0
491-
sustain 0
492-
release 4.0
493-
attack_level 1
494-
sustain_level 1
495-
env_curve 2
496-
497-
note 52
498-
note_slide 0
499-
note_slide_shape 5
500-
note_slide_curve 0
501-
502-
freq0 400 freq1 750 freq2 2400 freq3 2600 freq4 2900
503-
amps0 1 amps1 0.28 amps2 0.08 amps3 0.1 amps4 0.01
504-
qs0 0.1 qs1 0.1 qs2 0.04 qs3 0.04 qs4 0.04
505-
lag-val 0.5]
506-
(let [pan (varlag pan pan_slide pan_slide_curve pan_slide_shape)
507-
note (varlag note note_slide note_slide_curve note_slide_shape)
508-
amp (varlag amp amp_slide amp_slide_curve amp_slide_shape)
509-
freq (midicps note)
510-
511-
freqs-list (map #(lag:kr % lag-val) [freq0 freq1 freq2 freq3 freq4])
512-
amps-list (map #(lag:kr (dbamp %) lag-val) [amps0 amps1 amps2 amps3 amps4])
513-
qs-list (map #(lag:kr % lag-val) [qs0 qs1 qs2 qs3 qs4])
514-
515-
vibrato (* vibrato_depth (sin-osc:kr vibrato_speed))
516-
in (saw:ar (lag:kr (+ freq vibrato) 0.2))
517-
518-
env (env-gen:kr (env-adsr-ng attack decay sustain release attack_level sustain_level env_curve) :action FREE)
519-
snd (mix (* amps-list (bpf:ar in freqs-list qs-list)))
520-
snd (* snd amp)]
521-
(out out_bus (* (pan2 snd pan) env)))))
522-
523455
(comment
524456
(defn bass [] (singer :freq 100))
525457
(defn tenor [] (singer :freq 280))
@@ -530,4 +462,4 @@
530462
(save-to-pi sonic-pi-singer)
531463
)
532464

533-
)
465+
)

0 commit comments

Comments
 (0)