Here’s my P5 project
I wanted to create an ever expanding Indonesian Gamelan sounding project. I couldn’t quite get the code to do what I wanted.
I worked on finding the frequencies for the scale I wanted to use, the pelog scale, and worked off of that. I then created a scale array and plugged them into an oscillator with a random sequence.
I ran into some problems using the mousePressed function. At first, I wasn’t really getting anything that I wanted—just straight tones. I worked on simplifying my code from there and resorted to my old faithful of setting mousePress = true/false depending on whether the mouse was indeed pressed.
Nesting the subsequent action under the draw function helped me get the sequence to trigger on a mouse press. What didn’t end up happening, and where I remain a little confused, is how to compound these sequences. I want it so that each mouse click creates another performer of sorts.