shawnlawson / The_Force

webGL live coding performance IDE
https://shawnlawson.github.io/The_Force/
MIT License
276 stars 53 forks source link

Play/stop music via keyboard #25

Open ilithya opened 4 years ago

ilithya commented 4 years ago

HI Shawn,

First of all, thank you for creating the The_Force.
It is super easy to create audio reactive shaders with it <3

I was wondering if you and others might also find useful adding a keydown event with the space bar, or any other key, to toggle the music's play/stop functions?

I thought of it as I was using this:

and I wanted to access the music without having the code on the screen, nor the pop-up, for recording purposes.

shawnlawson commented 4 years ago

That's a good idea. I need to look at the sound file part from the other looping audio request.

Also, I need to change ctrl+shift to something else, since that's a selection on windows and linux.

ilithya commented 4 years ago

Yeih, :) I'm happy to hear you liked the idea.

I saw that request — the auto-repeat audio.
I think it's also a good idea.

Btw I'm on a mac, so I wouldn't know about ctrl+shift, but sounds good for window users.