Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

providing function to play phrase of melody #11

Open
wontheone1 opened this issue Apr 9, 2018 · 0 comments
Open

providing function to play phrase of melody #11

wontheone1 opened this issue Apr 9, 2018 · 0 comments

Comments

@wontheone1
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant