from 28th, so little time to percussion

This commit is contained in:
efim 2022-08-30 05:51:26 +00:00
parent ba4ee2767d
commit 602fc34c0a
2 changed files with 73 additions and 0 deletions

View File

@ -0,0 +1,70 @@
(in-package #:cl-collider)
(in-package #:cl-patterns)
;;; so the copied from supercollider examples is
;; {
;; var snare, bdrum, hihat;
;; var tempo = 4;
;; tempo = Impulse.ar(tempo); // for a drunk drummer replace Impulse with Dust !!!
;; snare = WhiteNoise.ar(Decay2.ar(PulseDivider.ar(tempo, 4, 2), 0.005, 0.5));
;; bdrum = SinOsc.ar(Line.ar(120,60, 1), 0, Decay2.ar(PulseDivider.ar(tempo, 4, 0), 0.005, 0.5));
;; hihat = HPF.ar(WhiteNoise.ar(1), 10000) * Decay2.ar(tempo, 0.005, 0.5);
;; Out.ar(0, (snare + bdrum + hihat) * 0.4 ! 2)
;; }.play
;; and that didn't work
;; (defsynth snare ()
;; (out.ar 0 (decay2.ar (pulse-divider.ar 4 4 2) 0.005 0.5))
;; ;; (white-noise.ar (decay2.ar (pulse-divider.ar 4 4 2) 0.005 0.5))
;; )
;; (synth :snare)
;; (stop)
;;; advice I got:
;; As for your question about the snare synthdef, pulse-divider doesn't actually generate any triggers on its own, it just outputs a trigger every div triggers. So instead you could try something like this:
(in-package #:cl-collider)
(defsynth snare ()
(out.ar 0 (white-noise.ar (decay2.ar (pulse-divider.ar (impulse.ar 4) 4 2) 0.005 0.5))))
;; (synth :snare)
;; (stop)
;;
;; yup. that works (in a loop)
;; now I want to figure out that :free thing
;;; continuation of advice
;; But if you just want to use snare in a pattern, I would write it like this:
(defsynth snare ((amp 0.5) (out 0))
(out.ar out (* amp (white-noise.ar (env-gen.ar (env (list 0 1 0) (list 0.005 0.5)) :act :free)))))
;; that's a bit longer that I'd like
(in-package #:cl-patterns)
(pb :test
:instrument :snare
:dur 1
;; :amp (pwhite 0.0 0.5)
:pfindur 4)
;; (play :test)
;; (end :test)
;;
;; ok, that works
;;
;; of the things I really should do, is go and read
;; about Envelope generators, ones that have that :act :free thing
;;
;; one other thing - is to get one or two other drums and mock up a beat
;; well, if I'm doing this in small steps, let's read about envelope
;; and make first snare synth usable in patterns
;;
;; tried to read just about EnvGen and Env
;; https://doc.sccode.org/Classes/EnvGen.html
;; https://doc.sccode.org/Classes/Env.html
;;
;; then got directed to the Tutorial, good idea to read it,
;; if not previous "first tutorial", then on concepts:
;; http://doc.sccode.org/Tutorials/Streams-Patterns-Events1.html

View File

@ -203,3 +203,6 @@ I'm not sure if that's what you were using for that recording, but it may be mor
2. try to get precussion 2. try to get precussion
3. also let's try to get defpackage and stuff 3. also let's try to get defpackage and stuff
** so, let's copy yesterdays instruments and patterns and try to join them in parallel ** so, let's copy yesterdays instruments and patterns and try to join them in parallel
* [2022-08-28 Sun]
** ok, got new responses
more about :act :free and nuances of creating with pulse-driver