Create a Synthesizer
STEP 1:
Firstly, we need to flash the firmware onto the Arduino. This will allow the button presses and joystick movement to be sent to processing for playing sound via the Serial port.
- Open up an Arduino sketch and then copy the following code into the sketch.
- Compile the code and upload.
STEP 2:
Use the p5.js sketch below to play the notes sent by your Command Center. The Joystick controls the note and duration, and pressing the Left button plays the note.
Run the code by pressing the Play button (triangle):
STEP 3:
The code above shows the frequency and velocity (duration) of the note.
Try to modify the program to draw a circle when a note is played. Then, try to modify the code so that the size of the circle changes with the duration/velocity. Finally, modify the code so that the color and position of the circle changes with the frequency of the note played.