Created
December 11, 2013 13:59
-
-
Save josephwilk/7910853 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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