Music Machine
Design Challenge
Create a music-making system using Arduino to connect triggers and controls and Processing to play sounds. You will need to use the Sound library for Processing. 
Start with the mode - will this be used for live performance or pre-recorded music? How will use make the noise - by triggering sampled audio files or by making synthetic sounds yourself? What kind of visuals will accompany your music? Consider the interface: Which sensors will you use and which parameters will they control? How will the controls be laid out? Make an enclosure out of cardboard to house your Arduino and attach your triggers and controls to it.
Design tools used: p5.js javascript
The prototype
Ideation and concepts
This design challenge was fun to build but frustrating to get right.
I created a box with 4 buttons that light up when pressed, and it would play a whole note, half note, quarter note and an eight note beat. As a bonus, I wanted add a delay effect that would either slow down or speed up the notes. 
I cut out the housing using a cardboard pencil box and hot-glueing the other parts together, 
Making Connections
I wired the LEDs and the button together and hooked them to pins. I couldn't quite figure out the potentiometer, but I'm sure I am overthinking this. 
Final Thoughts
I was not able to figure out how to properly set up my music machine to do what I wanted. I had issues with figuring out the wiring for all of the components  and I'm not sure that I used the right conductors. 
Ultimately, I failed to connect my machine to Processing render an animation or for it to produce a sound. It's either my hardware connection or the way it is set up on Arduino. Here's what I did 
#define RED1 27
#define RED2 33
#define RED3 15
#define RED4 32

void setup() {
pinMode(RED1, INPUT);
pinMode(RED2, INPUT);
pinMode(RED3, INPUT);
pinMode(RED4, INPUT);
Serial.begin(9600);
}

void loop() {
// Read button states (invert due to INPUT_PULLUP)
int oneValue = digitalRead(ONE);
int twoValue = digitalRead(TWO);
int threeValue = digitalRead(THREE);
int fourValue = digitalRead(FOUR);

// Send all states as a single line
Serial.print(oneValue);
Serial.print(",");
Serial.print(twoValue);
Serial.print(",");
Serial.print(threeValue);
Serial.print(",");
Serial.println(fourValue);

delay(50); // Add debounce delay
}

Back to Top