Skip to content

Commit

Permalink
Need mapthen to make the melody and bass easy.
Browse files Browse the repository at this point in the history
  • Loading branch information
ctford committed May 25, 2013
1 parent ca8f3a4 commit 23a3422
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/jazz/standards/in_the_mood.clj
Expand Up @@ -13,6 +13,8 @@
(- (timing (+ start duration)) (timing start)))))
(where :time timing)))

(defn mapthen [f notes] (->> notes (map f) (reduce #(then %2 %1))))

(defmethod play-note :beat [note] ((sample (freesound-path 802))))
(defmethod play-note :default [{midi :pitch, start :time, duration :duration}]
(let [id (sampled-piano midi)]
Expand Down

0 comments on commit 23a3422

Please sign in to comment.