Command Center - Music Synth
NOTE: This project does not work on all browsers. Chrome, Edge, Opera, and a few others will work - to find out if your browser will work, click here.
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. This can be done with Arduino Create or the Arduino IDE - the first step is a little different depending on which software you are using to load firmware onto your Command Center's Arduino.
Using Arduino Create - scroll down if you are using the Arduino IDE:
- Click the "Open Code" button below to open Arduino Create.
- Make sure your board and port is selected.
- Compile the code and upload.
Using the Arduino IDE:
- Open up an Arduino sketch and then copy the code from above into the sketch.
- You may need to install the MIDIUSB library. To do this, click on the "Sketch" menu, then "Include Library", then "Manage Libraries...".
Then, type "MIDIUSB" in the search bar. Click the library that shows up and then click "Install".
- Compile the code and upload.
STEP 2:
Click this link or the image below to open the p5.js sketch that plays the notes sent by your Command Center (it will open in a new tab).
Run the code by pressing the Play button (triangle).
Once it is running, move your Command Center's Joystick up and down to controls the note, and move it left and right to control the note's duration. To play the note, press the Left button.
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.