Skip to content

Instantly share code, notes, and snippets.

@pelagisk
Created October 13, 2015 20:46
Show Gist options
  • Select an option

  • Save pelagisk/4eaadcb373bd2d670a8e to your computer and use it in GitHub Desktop.

Select an option

Save pelagisk/4eaadcb373bd2d670a8e to your computer and use it in GitHub Desktop.
;; This is enough to compose some simple techno track and get input of
;; what needs done! Slow transitions is one thing....
(def kick-2 (sample "/Users/axelgagge/sound/Roland_TR-909/TR-909Kick12.wav"))
(def open-hat (sample "/Users/axelgagge/sound/Roland_TR-909/TR-909HatO03.wav"))
(def clap (sample "/Users/axelgagge/sound/Roland_TR-909/TR-909Clap.wav"))
(def cajon5 (sample "/Users/axelgagge/sound/ETHNIC_PERCUSSION/Cajon5.wav"))
(def congas5 (sample "/Users/axelgagge/sound/ETHNIC_PERCUSSION/Congas5.wav"))
(def congas19 (sample "/Users/axelgagge/sound/ETHNIC_PERCUSSION/Congas19.wav"))
(def cwblck8 (sample "/Users/axelgagge/sound/ETHNIC_PERCUSSION/cwblck8.wav"))
(def open-hat-track (map-seq-periodic #(+ 1/8 %1) identity 1 four-by-four))
(def kick-2-track [[1/4 []] [9/16 []] [2/4 []] [3/4 []] [4/4 []] [15/16 []]])
(def clap-track [[2/4 []] [4/4 []]])
(def clap-track-2 (map-seq-periodic #(- %1 1/16) identity 1 clap-track))
(def cwblck8-track [[1/8 []]])
(def congas5-track [[1/16 []] [9/16 []]])
(def bass-track [[3/8 [70]] [2/4 [57]] [7/8 [70]]])
(def bass-track-2 (map-seq-periodic-scalar identity #(- %1 (* 2 16)) 1 bass-track))
(def seqs-4 [
[kick-2-track kick-2]
;[open-hat-track open-hat]
[clap-track-2 clap]
;[cwblck8-track cwblck8]
;[congas5-track congas5]
[bass-track-2 beep-note]
])
(play-inst-seqs-loop metro27 1 seqs-4)
;; What we want is a way to apply a series of transformations to a
;; track [identity reverse-time identity ...]
(defn sequential-transforms [t seq]
(apply into ((apply juxt t) seq)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment