<<

World Academy of Science, Engineering and Technology International Journal of Electronics and Communication Engineering Vol:11, No:10, 2017

Non-Contact Digital Music Instrument Using Light Sensing Technology Aishwarya Ravichandra, Kirtana Kirtivasan, Adithi Mahesh, Ashwini S.Savanth

 beams and realized that these separated beams were like a Abstract—A Non-Contact Digital Music System has been luminous instrument. He also concluded that there should be a conceptualized and implemented to create a new era of digital music. way to trigger notes while touching these beams as shown in This system replaces the strings of a traditional stringed instrument Fig. 1. This was the start of the and a gateway to the with laser beams to avoid bruising of the user’s hand. The system digital instrument world. This system comes in handy for consists of seven laser modules, detector modules and distance sensors that form the basic hardware blocks of this instrument. people who need to play the stringed instruments like the Arduino ATmega2560 microcontroller is used as the primary veena, guitar and the harp on a regular basis avoiding the interface between the hardware and the software. MIDI (Musical formation of bruises and easing the rendition. Instrument Digital Interface) is used as the protocol to establish communication between the instrument and the virtual software.

Keywords—Arduino, Detector, Laser, MIDI, NOTE ON, NOTE OFF, PITCH BEND, Sharp IR distance sensor.

I. INTRODUCTION LECTRONIC music in the recent times has been in trend Eand it is very important to incorporate new sound synthesis methods and replace the functionality of the conventional methods. Since time immemorial, analog musical instruments with strings and keys have been used and minor changes have been made with the growing technology. The first non-contact was named the , after being developed in the early 1920's by the Russian physicist and inventor Leon Theremin [1]. This Fig. 1 Laser Harp invention revolutionized the use of electronics in the world of music. II. LITERATURE SURVEY The Laser harp is a present day electronic musical Woodruff and Görmez state in their bachelor thesis that a instrument that consists of a number of laser beams laser music system can be created as a combination of laser representing strings of a real harp. To produce musical notes, modules and a sensing system [1]. The distance sensing the laser beams are blocked just like the strings are plucked on modules detect the position of the user’s hand when it a harp. The original laser harp was invented by Geoffrey Rose intersects with one or more beams. in 1975 and he coined the name laser harp, but there is very Ferenc and Popovic-bozovic state one particular realization little information of his invention. of an electronic musical instrument referred as a laser harp. A Paris based visual effects artist named Bernard Szajner The laser harp consists of an array of beams organized in a fan had been working in this field for 30 years and used lasers to arrangement [2]. This instrument uses a programmable system provide a visualization of music. In his work with lasers, he on chip PSoC5LP developed by cypress semiconductors. had used “diffraction gratings” to split a beam into many Paradiso has described that electromagnetic tagging technique can be used to develop musical interface. This International Science Index, Electronics and Communication Engineering Vol:11, No:10, 2017 waset.org/Publication/10008025 Aishwarya Ravichandra is a UG student with BNM Institute of interface was able to detect both free gesture as well as local Technology, Bangalore 560070, Karnataka, India (corresponding author, or tactile variables. It was accomplished by identifying the phone: +919243409647, e-mail: [email protected]). passive objects and tracking them in real time [3]. He had also Kirtana Kirtana is a UG student with BNM Institute of Technology, Bangalore 560070, Karnataka, India (phone: +919483381429, e-mail: described that, when the objects were placed in the vicinity of [email protected]). the user, this technique could be used in various combinations Adithi Mahesh is a UG student with BNM Institute of Technology, as a system could recognise and update the status of many Bangalore 560070, Karnataka, India (phone: +919632822045, e-mail: tags. [email protected]). Ashwini S. Savanth is Asst Professor Dept. of ECE BNM Institute of Magun et al. describe the creation of a gestural controller Technology, Bangalore 560070, Karnataka, India (phone: +919880036391, e- that is instrument inspired. The imitation is that of a harp [4]. mail: [email protected]).

International Scholarly and Scientific Research & Innovation 11(10) 2017 1024 scholar.waset.org/1307-6892/10008025 World Academy of Science, Engineering and Technology International Journal of Electronics and Communication Engineering Vol:11, No:10, 2017

In an effort to combine digital electronics and acoustics the sensors and converting it to centimeters and into a pitch goal was set to create an instrument that could produce sound level. without physical contact. The main considerations of this paper were the ability to produce a working prototype and that it had compatibility issues. Their prototype would be able to play a full octave including its semi tones resulting in a seven . But this was only a concept that could not be implemented due to the use of inefficient hardware components. Wu describes a wireless sensor network which was an adaptable, centralized and deterministic sensor deployment method [5]. DT-Score (Delaunay Triangulation-Score), aimed at maximizing the coverage of a given sensing area with obstacles. It consists of two stages. In the first stage, it uses a contour based deployment to eliminate the coverage holes near the boundary of sensing area and obstacles. In the second stage, a positioning method based on Triangulation for the uncovered regions is used.

ROPOSED YSTEM III. P S Fig. 2 Block Diagram of the proposed system The laser music system contains graceful and unique non- contact properties of a new-age musical instrument, while V. HARDWARE DETAILS providing a cognitive structure to the user. The playing area is A. Laser characterized by an array of laser beams representing one octave. This octave is realized by a set of seven individual A visual guide is important when operating this system as it lasers arranged so that the beams are parallel and function like allows the user to perceive the playing area and where to physical switches. Seven distance sensors are placed next to trigger the notes. Lasers are the practical choice as they each laser diode. These sensors constantly track the position of provide the light source for photocells and enable the system the user’s hand and send values to the microcontroller that to have fast switching speeds. To create individual direct correspond to a pitch level. beams of light, laser is a suitable source because its light is coherent; this also reduces the chances of interference with IV. PRINCIPLE OF OPERATION other channels. The laser system consists of seven individual red laser modules of visible wavelength (650nm), with a The system is broken into different modules. Each module power output of 5mw. Fig. 3 shows one such laser module. has a vital function which needs to work efficiently to pass on information to the next module, in order for the system to operate completely. The Laser modules function as the light source to the Photocells. If the direct line of sight (LOS) path of the laser is broken, it triggers the change from low to high (note off to on) providing switching action. The detector circuits read the variable analog value from the photocells, and using a comparator and voltage divider circuit, convert this value from analog to digital. A distance sensor continuously tracks the position of the user’s hand to correspond its height to the change in pitch of Fig. 3 Laser Module the note. The distance sensors output a voltage level and this B. Photo Detector

International Science Index, Electronics and Communication Engineering Vol:11, No:10, 2017 waset.org/Publication/10008025 value is input into the analog pins of the microcontroller. The heart of this system is the microcontroller which is a A photocell as shown Fig. 4 has been selected to solve the fundamental element that carries out all the main processing problem of having a fast switching sensor; this allows the user and calculations. Fig. 2 represents the block diagram of the to have a minimal when he/she is breaking a laser beam proposed system. to trigger a musical note. The microcontroller performs a number of tasks such as: A Photocell detector circuit is designed by using photocells  Reading digital values from the detector circuits. which are sensors that detect light. A photocell's resistance  Reading analog values from the distance sensors. changes as the LDR is exposed to more light. When it is dark,  Programming the MIDI channels the sensor behaves as a resistor with higher resistance,  Processing the analog voltage values from distance whereas when the intensity of light is more, the resistance drops.

International Scholarly and Scientific Research & Innovation 11(10) 2017 1025 scholar.waset.org/1307-6892/10008025 World Academy of Science, Engineering and Technology International Journal of Electronics and Communication Engineering Vol:11, No:10, 2017

the detector circuit. The photocells detect the blocking of light. In the absence of light, the resistance of the photocell increases which causes a change in voltage. This voltage change in turn causes the comparator to change from a low to high output. The response of the photocells is so fast that its lag is negligible. The detector circuit operates by using the comparator that compares two voltages; one called as the reference voltage Fig. 4 Photo detector (Vref) and the other called as the input voltage (Vin). Vin depends on the intensity of light falling on the photocell. In addition to this, they are low cost, easy to get in many Hence when Vin rises above or falls below Vref, the output sizes and are suitable for a wide range of applications. Due to changes from LOW to HIGH. A diagram of the comparator these reasons and based on the principle of the photocell’s circuit is as shown in Fig. 5. operation, they have been used as the light sensors to develop

Fig. 5 Detailed internal circuit of detector module

C. IR Distance Sensor sensors. A selection had to be made based on their To improvise the functionality of this instrument, additional characteristics as to which would be more suitable for our sensors are used. The objective is to track the position of the application. One concern of the infrared sensor was the user’s hand, along the laser beam to be able to change variable narrowness of the IR beam which caused erroneous detection parameters such as the pitch of the note. There are various of an object when it was not indicated implicitly. On the other options to solve this problem. hand, the ultrasonic sensor had a wide beam which could The methods that were considered were commercially easily detect objects. A common setback with both sensors available distance sensors either using infrared light or was cross interference which means that the pulse emitted by ultrasonic. The other method was to use a camera with object one sensor could potentially be read by the other and therefore tracking software. generates inaccurate readings. An ultrasonic sensor functions by transmitting a pulse and distance-to-object is determined by measuring the time taken International Science Index, Electronics and Communication Engineering Vol:11, No:10, 2017 waset.org/Publication/10008025 for the echo to return. Its operating range is typically within 2 cm to 3 m range, and has a wide beam which implies that it can easily detect objects. An infrared sensor emits a pulse of infrared light and distance-to-object is determined by the angle of the reflected beam. The operating range of these infrared sensors is usually around 10 cm to 150 cm. These sensors have a thin beam Fig. 6 Distance Sensor which is perfect to get high precision readings. The choice between the methods for the purpose of The infrared sensors were the most practical choice as the implementation was between the ultrasonic and infrared cross interference from the ultrasonic sensors would have

International Scholarly and Scientific Research & Innovation 11(10) 2017 1026 scholar.waset.org/1307-6892/10008025 World Academy of Science, Engineering and Technology International Journal of Electronics and Communication Engineering Vol:11, No:10, 2017

caused a major issue. Also, the narrowness of the IR beam provided as an advantage as the light from the laser formed a visual reference as to where to place the object. 1. Principle of Operation of IR Sensor The Sharp GP2Y0A02YK0F IR Range Sensor is extremely efficient and is reasonably easy to implement, very economic, good range (20 cm - 150 cm), and has low power consumption. The Sharp IR Range sensors work based on the principle of triangulation as shown in Fig. 9. A pulse of infrared light of approximate wavelength range of 850nm is emitted from the sensor and when an object is in range, the pulse of light is reflected back. When the light returns, it reflects back at an angle that is dependent on the distance of the object. Triangulation works by detecting this reflected beam angle and the distance is calculated further. The Sharp IR Range Sensor circuitry includes an oscillation circuit which applies a modulated to the emitted IR beam and this ranging method is almost immune to interference from ambient light which offers indifference to Fig. 8 Sensor Output (Voltage versus Distance to Object) the color of the object being detected. D. Microcontroller

The Arduino Mega 2560 has been chosen as the Microcontroller for various reasons: 1. The Arduino platform is an open-source project and the software/hardware is extremely accessible and very adaptable. 2. It is flexible and offers a variety of digital and analog inputs/outputs, SPI and serial interface and digital and PWM outputs 3. It is very easy to change and update program which connects to computer via USB and communicates using standard serial protocol.

4. It is an inexpensive microcontroller and the software is Fig. 7 Triangulation freely available. 5. Arduino has a large online community and many Both the advantage and disadvantage of the Sharp IR range references, for example source code and libraries to refer sensors is that its beam width is very thin. To detect an object, to. the sensor must directly point at that object. It is the best suited sensor for this application as it will be placed beside the E. MIDI Interface laser which will give a visual reference as to where to place MIDI is a protocol that allows electronic instruments to one’s hand. communicate with digital musical tools. MIDI itself does not One main concern of the Sharp IR Range sensors is when make sound, it is a protocol with series of messages like "note an object comes so close that the sensor cannot get a precise on," "note off," "note/pitch," "pitchbend". These messages are reading. The output of the Sharp IR sensor is non-linear with interpreted by a MIDI equipment to produce sound. The respect to the distance being measured. Fig. 8 is a typical MIDI instrument can be a piece of hardware like electronic output from these range sensors. keyboard, synthesizer or part of a software environment like a International Science Index, Electronics and Communication Engineering Vol:11, No:10, 2017 waset.org/Publication/10008025 There are two main aspects to investigate in this graph; the virtual synthesizer. first being that the output of these sensors range from 20cm to The messages may be sent to a MIDI instrument, like a PC 150 cm. This range is non-linear but rather inversely or may be forwarded to a digital synthesizer inside the proportional as given in the formula below. The second aspect keyboard. When a key is pressed the keyboard generates a is that once the object’s distance falls below the stated range, "note on" message. This message consists of two parts of (that is less than 20cm), the output becomes erroneous. information: that is the key which was pressed (called "note") ଵ Formula: D= ݂ and how fast it was pressed (called "velocity"). ௫ "Note" describes the pitch of the key pressed which can have a value between 0 and 127. Velocity is a number that ranges from 0 and 127 which is

International Scholarly and Scientific Research & Innovation 11(10) 2017 1027 scholar.waset.org/1307-6892/10008025 World Academy of Science, Engineering and Technology International Journal of Electronics and Communication Engineering Vol:11, No:10, 2017

used to describe the volume or gain of a MIDI note (higher fundamentals of this system are formed, but the overall design, velocity = louder). precision and effectiveness may be improved. With further Different velocities can create different tones in an adaptations and improvements, the possibilities of this device instrument. For example a MIDI instrument may sound are endless. It opens up a whole new era to the electronic rougher at a higher velocity and cleaner at lower velocities. musical industry. Higher velocities may also limit the attack of a MIDI instrument where attack is a measurement of how long it takes REFERENCES for a sound to increase from zero to maximum loudness. [1] Astra Woodruff, Burak Görmez, “Laser Music System”, Bachelor thesis The advantages of MIDI are: June 2012.  It is compact since an entire song can be stored within a [2] Goran Ferenc and Jelena Popovic-bozovic, “Infinite Beam Laser Harp”, IEEE 2015 few hundred MIDI messages. This is advantageous over [3] Joseph A. Paradiso “ Interfaces: New Ways to Play”, traditional audio data which is sampled thousands of IEEE Spectrum. ISSN 0018-9235 times a second. [4] Ilai Magun Felix E. Guerrero, Eduardo J. Jimenez “Gestural Control using Laser Harp”, IEEE 2006  It is easy to modify/manipulate notes - change in pitch, [5] Chun Hsein Wu, Kuo Chaun Lee & Yeh Ching Chung, “Delanay duration, and other parameters without having to rerecord. Triangulation based method for sensor network”, IEEE 2007.  It is compatible to switch between multiple instruments as MIDI only describes which notes to play. The user can send these notes to any instrument to change the overall sound of the composition.

VI. SOFTWARE DETAILS An Embedded C program has been written on the open source Arduino IDE to operate and control the Laser Music System functions. The program starts with the initialization of the variables. These variables monitor the status of each of the control that are received by the microcontroller. The beam is detected by the detector and if broken triggers a change in value and in turn causes change in pitch bend. This change is mapped to a particular frequency using the values inputted from the distance sensor and the MIDI values. These values are sent to the virtual synthesizer software on the PC and a corresponding musical note is generated.

International Science Index, Electronics and Communication Engineering Vol:11, No:10, 2017 waset.org/Publication/10008025 Fig. 9 Flowchart of the program control

VII. CONCLUSION In this paper, the implementation of a new kind of electronic musical device was explored. Hence it is evident that this kind of device is both practical and relatively cost effective to construct and operate. The result is a new age hybrid non-contact digital musical instrument. The

International Scholarly and Scientific Research & Innovation 11(10) 2017 1028 scholar.waset.org/1307-6892/10008025