|
30 | 30 | path)) |
31 | 31 |
|
32 | 32 | (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 | + |
34 | 37 |
|
35 | 38 |
|
36 | 39 | ;; Triggered synths |
37 | 40 | (do |
38 | 41 | (without-namespace-in-synthdef |
39 | 42 |
|
40 | | - ;; your synths here |
41 | | - ) |
| 43 | + ;; your synths here |
| 44 | + ) |
42 | 45 |
|
43 | 46 | (comment |
44 | 47 | ;; (save-to-pi sonic-pi-beep) |
|
48 | 51 | (without-namespace-in-synthdef |
49 | 52 | ;; BPF designs |
50 | 53 |
|
51 | | - (defsynth sonic-pi-fx_reverb2 |
| 54 | + (defsynth sonic-pi-fx_reverb2 |
52 | 55 | [amp 1 |
53 | 56 | amp_slide 0 |
54 | 57 | amp_slide_shape 5 |
|
83 | 86 | max_room (* max_room 300) |
84 | 87 | damp (varlag damp damp_slide damp_slide_curve damp_slide_shape) |
85 | 88 | [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))] |
87 | 90 | (out out_bus snd))) |
88 | 91 |
|
89 | 92 |
|
90 | | - |
91 | | - |
92 | | - |
93 | 93 | (defsynth sonic-pi-fx_chorus |
94 | 94 | [amp 1 |
95 | 95 | amp_slide 0 |
|
145 | 145 |
|
146 | 146 | (do ;;comment |
147 | 147 | (save-to-pi sonic-pi-fx_chorus) |
148 | | - )) |
| 148 | + )) |
149 | 149 |
|
150 | 150 | ;; Experimental |
| 151 | + |
151 | 152 | (comment |
152 | 153 | (do |
153 | 154 | ;;TODO FIXME! |
|
273 | 274 |
|
274 | 275 |
|
275 | 276 | (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 |
280 | 280 | note_slide 0 |
281 | 281 | note_slide_shape 5 |
282 | 282 | note_slide_curve 0 |
283 | 283 |
|
284 | | - pan 0 |
285 | | - pan_slide 0 |
286 | | - pan_slide_shape 5 |
287 | | - pan_slide_curve 0 |
288 | | - |
289 | 284 | amp 1 |
290 | 285 | amp_slide 0 |
291 | 286 | amp_slide_shape 5 |
292 | 287 | amp_slide_curve 0 |
293 | 288 |
|
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 | | - |
337 | 289 | pan 0 |
338 | 290 | pan_slide 0 |
339 | 291 | pan_slide_shape 5 |
340 | 292 | pan_slide_curve 0 |
341 | 293 |
|
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 |
348 | 295 | decay 0 |
349 | 296 | sustain 0 |
350 | | - release 0.1 |
| 297 | + release 4 |
351 | 298 | attack_level 1 |
352 | 299 | 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 |
358 | 301 |
|
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 |
362 | 310 |
|
363 | | - (comment |
364 | | - (sonic-pi-wood) |
365 | | - (save-to-pi sonic-pi-wood)) |
| 311 | + vibrato_speed 6 |
| 312 | + vibrato_depth 4 |
366 | 313 |
|
| 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))))) |
367 | 352 |
|
368 | | - (without-namespace-in-synthdef |
369 | | - (defsynth sonic-pi-dark_sea_horn |
| 353 | + (defsynth sonic-pi-dark_sea_horn |
370 | 354 | "Dark, rough and sharp sea horn. |
371 | 355 | Note: we are purposely not using recusion using busses. Just does not have the same feel." |
372 | 356 | [out_bus 0 |
|
461 | 445 |
|
462 | 446 | env (env-gen:kr (env-adsr-ng attack decay sustain release attack_level sustain_level env_curve) :action FREE) |
463 | 447 | snd (* amp a)] |
464 | | - (out out_bus (* env (pan2 snd pan)))))) |
| 448 | + (out out_bus (* env (pan2 snd pan))))) |
465 | 449 |
|
466 | 450 | (comment |
467 | 451 | (sonic-pi-dark_sea_horn :attack 1 :release 8 :note 40) |
468 | 452 | (save-to-pi sonic-pi-dark_sea_horn) |
469 | 453 | ) |
470 | 454 |
|
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 | | - |
523 | 455 | (comment |
524 | 456 | (defn bass [] (singer :freq 100)) |
525 | 457 | (defn tenor [] (singer :freq 280)) |
|
530 | 462 | (save-to-pi sonic-pi-singer) |
531 | 463 | ) |
532 | 464 |
|
533 | | -) |
| 465 | + ) |
0 commit comments