providing function to play phrase of melody
Opened this issue · 0 comments
wontheone1 commented
I am playing simple music in my web browser based game, to do that I had to write custom function that I modified slightly from
https://github.com/ctford/klangmeister/blob/master/src/klangmeister/processing.cljs#L81-L93
and klangmeister.sound.music
ns.
it would be nice if below was possible out of the box
(def melody
(melody/phrase [1 1 0.67 0.33 1 0.67 0.33 0.67 0.33 1]
[C5 C5 C5 D5 E5 E5 D5 E5 F5 G5])) ;the frequency numbers
(->> melody
(melody/wherever (comp not :instrument) :instrument (melody/is bell))
(play! context))
so what we are missing is play!
function.
I think play! function can be else where than klangmeister as it is not only useful in this particular env. but maybe cljsbach library is better place to put this function.
What do you think?