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:

  1. Click the "Open Code" button below to open Arduino Create.
  2. Make sure your board and port is selected.
  3. Compile the code and upload.

 

Using the Arduino IDE:

  1. Open up an Arduino sketch and then copy the code from above into the sketch.
  2. You may need to install the MIDIUSB library. To do this, click on the "Sketch" menu, then "Include Library", then "Manage Libraries...".
    accessing the library manager in the Arduino IDE
    Then, type "MIDIUSB" in the search bar. Click the library that shows up and then click "Install".
    Arduino IDE library manager
  3. 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).

p5.js Midi note player sketch

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.

Leave a comment

Please note, comments must be approved before they are published