We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi Everyone, I'm trying to a sketch where, when I tap a screen (or key), there is some one shot sound that plays, and there is some brief visual. The visual can be timed, and doesn't have to actually read the audio.
I've been looking at examples, and watching tutorials, but I'm still kinda slow with this. If anyone has any suggestions, I'd love to hear it.
aS p.s. I know this is rookie stuff, so my apologies ;)
Answers
Howdy @ArtStudent
You want to look at the Events section in the p5js reference: https://p5js.org/reference/#group-Events
Here there are loads of ways of triggering things off on user input. You might want to do something like this, which will generate random colours on key press:
To play sounds, you'll want the p5js sound library: https://p5js.org/reference/#/libraries/p5.sound
With both these things you should be able to easily achieve what you want to.
Thanks
G
@georgehenryrowe Thank you very, very much for the quick reply! I'm in class today and your link helps me out quite a bit!