Last active
December 28, 2015 13:58
-
-
Save josephwilk/7511216 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) | |
(def harp-s (sample (freesound-path 27130))) | |
(def dub-s (sample (freesound-path 185943))) | |
(defsynth skipping-sequencer | |
"Plays a single channel audio buffer." | |
[buf 0 rate 1 out-bus 0 beat-cnt-bus 0 beat-trg-bus 0 start-point 0 bar-trg 0 loop? 0 vol 1.0] | |
(out out-bus (* vol (scaled-play-buf 1 buf rate bar-trg start-point loop?)))) | |
(def x (skipping-sequencer :buf (to-sc-id dub-s) | |
:loop? true | |
:out-bus 0)) | |
(ctl x :bar-trg 0) | |
(ctl x :start-point 0) | |
;; Start @ 4000 | |
(ctl x :start-point 4000) | |
(ctl x :bar-trg 1) | |
;;Jump playback to 20000 | |
(ctl x :start-point 2000) ;; Set time | |
(ctl x :bar-trg 0) ;; fire trigger | |
(ctl x :bar-trg 1) | |
;; This works a little bit better | |
(do | |
(ctl x :start-point 2000) ;; Set time | |
(ctl x :bar-trg 0) ;; fire trigger | |
(Thread/sleep 200) ;; Sleep... to give it time to detect change??? | |
(ctl x :bar-trg 1) ;; Fire | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment