Musical quest for kindergarten. Preparatory group


Touch interactive musical instrument (we play fruit, water, etc.)


Would you like to try playing a melody on bananas, tomatoes, cucumbers?
What about water or lemonade? With this device you can play a melody on almost any conductive surface. Let's watch a short video. Interesting? Now let's follow the author of this homemade product, and he will tell us how to assemble such a device. Tools and materials: -Arduino UNO R3; -Wires; -Alligator clips; -Soldering accessories; -Resistors 1 MOhm - 6 pcs; -Heat-shrink tubing; -Laptop;


Step one: theory It all works as follows. Touch sensors are connected to conductive objects. The other end of the sensors is connected to Arduino. Arduino receives the signal and transmits it to the laptop, on which the signal is processed and the note is played.


Step Two: Assembling the Touch Sensors Now you need to assemble the touch sensors. For the project you need 6 pieces.

Solders the black wire to the clamp. Solder the red wire and a 1 MΩ resistor to the black wire at one point. Solder the black wire to the other end of the resistor. Solder a pin to the end of the red wire.

The black wire is the negative pole of the sensor and it will connect to the ground pin of the Arduino, the red wire is the positive pole of the sensor and it will connect to the analog input pin of the Arduino.


The touch sensor is ready. Connections must be insulated with electrical tape or heat shrink tubing. The technician recommends using wires about 2 meters long.


This method requires assembling six sensors. Then you need to connect the negative contacts of the sensors together and extend them with a separate wire with a pin at the end.


We get the following diagram.


Step three: connecting to Arduino Next you need to connect the sensors to Arduino. Positive outputs Sensor 1 V ARDUINO Analog input 0 Sensor 2 V ARDUINO Analog input 1 Sensor 3 V ARDUINO Analog input 2 Sensor 4 V ARDUINO Analog input 3 Sensor 5 V ARDUINO Analog input 4 Sensor 6 V ARDUINO Analog input 5 Negative output to GND Arduino


Step four: housing The master designed and printed housings for the sensors and Arduino. You can download the printable files below.


For Arduino. Any of three models for sensors. Model 1 Model 2 Model 3


Step Five: Code and Software The next step is to install the programs. Arduino IDE (required software for programming the Arduino Sensor ReTouch board) Midi Library and Capacitive Sensor Library (two additional libraries for Arduino software) Hairless MID (this software is capable of converting serial data to Midi data) Any music production software or VST (Virtual Instrument) capable of receiving Midi data. The wizard recommends the following programs: Apple Logic Ableton Live Fruity Loops Audiomulch Steinberg Cubase Or simulators: Native instrument FM8 Native instrument BATTERY Native instrument KONTAKT Native instrument AKOUSTIK PIANO Unzip and install Arduino IDE. Then connect the Sensor ReTouch to your computer via USB. Double click the Arduino icon to launch the application. Once you open the software, go to the top panel and select the "Tools" tab to open a small menu, scroll down this menu until you reach "Arduino Model", select your Arduino board model.

Go to the top panel again and select "Tools", scroll down to "Serial Port", and select /dev/cu.usbmodem3d11. Now you need to install all the libraries.

Open the archives “Arduino-libraries-CapacitiveSensor.zip” and “Arduino_MIDI_Library_v4.2.zip”. Open the Arduino IDE window, and on the top tab select “Sketch“. Scroll your mouse to Include Library > Add Library and install the libraries. Using the same scheme, add the “Capacitive Sensor” and “MIDI Library” libraries.


Then installs the code on Arduino: #include #include MIDI_CREATE_DEFAULT_INSTANCE(); const int sensorPin1 = A0; int sensorValue1 = 0; int threshold1 = 100; const int sensorPin2 = A1; int sensorValue2 = 0; int threshold2 = 100; const int sensorPin3 = A2; int sensorValue3 = 0; int threshold3 = 100; const int sensorPin4 = A3; int sensorValue4 = 0; int threshold4 = 100; const int sensorPin5 = A4; int sensorValue5 = 0; int threshold5 = 100; const int sensorPin6 = A5; int sensorValue6 = 0; int threshold6 = 100; int note1 = 60; int note2 = 62; int note3 = 64; int note4 = 65; int note5 = 67; int note6 = 69; //Control 16 = general purpose int cc = 16; //Setup: void setup(){ //Start midi connection MIDI.begin(); //Serial connection 115200 for Hairless MIDI Serial.begin(115200); analogRead(sensorPin1 == 0); analogRead(sensorPin2 == 0); analogRead(sensorPin3 == 0); analogRead(sensorPin4 == 0); analogRead(sensorPin5 == 0); analogRead(sensorPin6 == 0); } //Loop: void loop(){ if ( analogRead(sensorPin1) >= threshold1) { MIDI.sendNoteOn(note1,127,1); } else{ MIDI.sendNoteOff(note1,0,1); } if ( analogRead(sensorPin2) >= threshold2) { MIDI.sendNoteOn(note2,127,2); } else{ MIDI.sendNoteOff(note2,0,2); } if ( analogRead(sensorPin3) >= threshold3) { MIDI.sendNoteOn(note3,127,3); } else{ MIDI.sendNoteOff(note3,0,3); } if ( analogRead(sensorPin4) >= threshold4) { MIDI.sendNoteOn(note4,127,4); } else{ MIDI.sendNoteOff(note4,0,4); } if ( analogRead(sensorPin5) >= threshold5) { MIDI.sendNoteOn(note5,127,5); } else{ MIDI.sendNoteOff(note5,0,5); } if ( analogRead(sensorPin6) >= threshold6) { MIDI.sendNoteOn(note6,127,6); } else{ MIDI.sendNoteOff(note6,0,6); } //50ms space delay(53); } This code is for Windows. For Apple OSX, the code can be downloaded here.


Step Six: Setup Next, you need to enable the MIDI software and Audio program. The wizard shows the setup on the Loop MIDI program. After installation, the Loop MIDI configuration panel is blank. Click PLUS at the bottom of the panel and a new Midi communication port will appear in the program list, classified as "loopMIDI Port" or "loopMIDI Port 1".


Launch Ableton LIVE. Then select LIVE > Preferences. Once the settings panel is displayed, select MIDI Sync TAB. Click "Track, Sync and Remote". The ports in the INPUT column should turn yellow.


Next we move on to the Hairless MID program. Enter t/dev/cu.usbmodem3d11 into the window. Then set "MIDI OUT" and "MIDI IN" to "Loop MIDI Bus 1". Check the Debug MIDI messages box. Next, go to Ableton Live. Open any virtual instrument and press the keys. In the Hairless MID window, the line should display a number from 0 to 127, and the corresponding note should sound in the speaker. The same numbers will be displayed when you touch the sensors.


Step seven: using the device Below are the technical specifications for each sensor. The wizard configured the default touch sensors using the MIDI protocol at 3° octave pianos as individual notes in the following order: Sensor 1; MIDI channel 1 # / MIDI Note C3 Pickup 2; MIDI Channel 2 # / MIDI Note D3 Sensor 3; MIDI channel 3 # / MIDI Note E3 Pickup 4; MIDI channel 4 # / MIDI Note F3 Pickup 5; MIDI Channel 5# / MIDI Note G3 Sensor 6; MIDI channel 6# / MIDI Note A3


To use the device, you need to connect the sensors to any conductive surface.

Here are some videos demonstrating how the device works.

Source

Become the author of the site, publish your own articles, descriptions of homemade products and pay for the text. Read more here.

Rating
( 1 rating, average 5 out of 5 )
Did you like the article? Share with friends: