Skip to content

Commit

Permalink
Minor rearranging.
Browse files Browse the repository at this point in the history
  • Loading branch information
ctford committed Nov 8, 2012
1 parent f0e3cae commit 88d81bd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/goldberg/variations/canone_alla_quarta.clj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

(ns goldberg.variations.canone-alla-quarta
(:use [overtone.live :exclude
[scale midi->hz note sharp flat run]]
[scale pitch midi->hz note sharp flat run]]
[quil.core :only
[smooth sketch ellipse frame-rate background
width height stroke stroke-weight fill]]))
Expand Down Expand Up @@ -118,7 +118,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defn note [timing pitch] {:time timing :pitch pitch})
(defn where [k f notes] (->> notes (map #(update-in % [k] f))))

(defn play! [notes]
(let [start (now)]
Expand All @@ -134,6 +133,9 @@
;(even-melody! (range 70 81))





;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Scale ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand Down Expand Up @@ -207,6 +209,8 @@
(defn bpm [beats] (fn [beat] (-> beat (/ beats) (* 60) (* 1000))))
;((bpm 120) 3)

(defn where [k f notes] (->> notes (map #(update-in % [k] f))))

;(->> row-row-row-your-boat
; (where :time (bpm 90))
; (where :pitch (comp C major))
Expand Down

0 comments on commit 88d81bd

Please sign in to comment.