diff options
Diffstat (limited to 'src/unheard/theory.clj')
| -rw-r--r-- | src/unheard/theory.clj | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/unheard/theory.clj b/src/unheard/theory.clj index 5d5805b..0fbc6d5 100644 --- a/src/unheard/theory.clj +++ b/src/unheard/theory.clj @@ -4,12 +4,13 @@ (defn note [clock start duration value] (m/cp - (if (m/?< (m/latest #(<= start % (dec (+ start duration))) clock)) - #{value} - #{}))) + (let [v (m/?< clock)] + (if (<= start v (dec (+ start duration))) + #{value} + #{})))) (defn poly [& notes] - (m/ap + (m/cp (apply union (m/?< (apply m/latest vector notes))))) ;; TODO: Group could actually wrap note, rather than using explicitly |
