GMU:My Computer, Max, and I/Kaël Skyhawk Hauptmann: Difference between revisions

From Medien Wiki
No edit summary
No edit summary
Line 23: Line 23:
Although the knock test worked, I realized that I need to output the numerical data that the piezo sensor detects. Here is the coding  and output:
Although the knock test worked, I realized that I need to output the numerical data that the piezo sensor detects. Here is the coding  and output:


[[File:kael_arduino_piezo.jpg|400px]]
[[File:kael_arduino_output.jpg|400px]]
== Creating Max Patch ==
For the Max patch, I needed to translate the data read from the sensor into one value. By using the message box, I was able to see the values that were output when I tapped the sensor. I created a range 0 to 300 and have it bang if the value is higher than 300, because the value when tapped is usually higher than 300. The bang triggers the on/off switch for the kick bass drum. I added a 300 millisecond delay to the bang to act as an off button so once the drum is turned on and produces a sound, it will then turn off.
[[File:kael_arduino_piezo.jpg|400px]]
[[File:kael_arduino_piezo.jpg|400px]]
[[File:kael_arduino_output.jpg|400px]]
[[File:kael_arduino_output.jpg|400px]]

Revision as of 16:35, 2 June 2019

First Assignment

First Max Patch

Main Project

Project Idea

For my project I would like to create a drum set. The drum setup would be to have a kick drum, a snare, a tom and two hi-hats; one hi-hat that is open and one hi-hat that is closed. The idea would be to install piezo sensors into different cylinders. When each cylinder is struck it would produce the sound from a different piece of the drum kit.

Piezo kael.jpg Cylinder kael.jpg

Preliminary Tests

Arduino Knock Test

For the beginning test of my project I followed the knock tutorial found on Arduino [1]. The hardware setup for the example was simple enough. Unlike the example, I used a breadboard and taped my Piezo sensor to the bottom of a lid from a mixed nuts container. With this test, when I tap on the lid of the container, Arduino should output knock! and the LED light should toggle on/off.

Knock sensor.jpg Knock setup.jpg Knock output.png Knock light.jpg

Creating First Drum Piece

Setting Up Arduino to Output Sensor Data

Although the knock test worked, I realized that I need to output the numerical data that the piezo sensor detects. Here is the coding and output:

Kael arduino piezo.jpg Kael arduino output.jpg

Creating Max Patch

For the Max patch, I needed to translate the data read from the sensor into one value. By using the message box, I was able to see the values that were output when I tapped the sensor. I created a range 0 to 300 and have it bang if the value is higher than 300, because the value when tapped is usually higher than 300. The bang triggers the on/off switch for the kick bass drum. I added a 300 millisecond delay to the bang to act as an off button so once the drum is turned on and produces a sound, it will then turn off. Kael arduino piezo.jpg Kael arduino output.jpg