Skip to content

Instantly share code, notes, and snippets.

@josephwilk
Created December 11, 2013 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josephwilk/7910853 to your computer and use it in GitHub Desktop.
Save josephwilk/7910853 to your computer and use it in GitHub Desktop.
(use '[overtone.live])
(defsynth phasor-skipping-sequencer
"Supports looping and jumping position"
[buf 0 rate 1 out-bus 0 start-point 0 bar-trg [0 :tr] loop? 0 amp 1.0 cb 0]
(let [ph (phasor:ar :trig bar-trg
:rate (* rate (buf-rate-scale:kr buf))
:start 0
:end (buf-frames:kr buf)
:reset-pos start-point)
br (buf-rd:ar 1 buf ph loop?)]
(out:kr cb (a2k ph))
(out out-bus (* amp br))))
(defonce cb (control-bus))
(defonce cb-monitor (control-bus-monitor cb))
(def phat-s (sample (freesound-path 48489)))
(def phat (phasor-skipping-sequencer :buf (to-sc-id phat-s) :loop? true :bar-trg 0 :out-bus 0 :amp 0 :cb cb))
(ctl phat :bar-trg 1 :start-point 0 :rate 1 :amp 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment