Abstract – At present all the various methods present to generate music are very complex,they are either based on playing recorded samples of musical instruments thatis high priced and non creative or by synthesis which involves a large numberof components and is very complex to generate tones. Also a synthesizer can bedesigned exclusively for only a single musical instrument. This paper providesan overview of how the sound of various musical instruments can be generated usingan ARM Microcontroller and a simple binary weighted resistor DAC. This work isbased on ARM Cortex – M4F Microcontroller which has low power consumption andis economical.
Key words – Music generation,Musical Instruments, Binary weighted resistor Digital to Analog Convertor, ARMCortex M4F Microcontroller. I.INTRODUCTIONMusic is anindispensible part of life for billions of people all over the world. It is anart and the harmonious creation of voice.1 Objects used to generate sound aremusical instruments. There are primarily two ways of creating musicelectronically, Sampling and Synthesis. In Sampling the sound of the musicalinstruments are recorded into digital form and then played with modificationslike modulation, looping and phase shifts. Either one or many samples for onenote of a musical instrument are recorded.
To play songs on various instrumentsexpensive libraries of the samples need to be purchased. Music synthesis is asub-field of Music Technology. In the field of music synthesizers are theinstruments that are used to generate and record music. Music Synthesizersreplicate traditional musical instruments and can generate new tones thatcannot be played on acoustic instruments.
There are various methods by whichsynthesizers can generate sounds such as additive, subtractive, wavetable,modulation and sample based synthesis. Current synthesizer are very expensiveand are designed to play a single instrument. They are complex in operation andconsist of numerous components One of the barriers to playing music is the highcost, bulky size and regular maintenance of musical instruments. The basic motive of this work is to develop adevice that can fulfil the need of playing various musical instruments under asingle system. This device is user friendly as a user who does not knowhow to play an instrument can composenew music or play existing songs. The circuit construction and operation arevery simple and creative music can be composed.II.
RELATED WORKDigital Synthesizers use digital signal processingmethods to synthesize the sound of musical instruments. Contrary to AnalogSynthesizers that were constructed using analog circuits and samplers thatsimulated the recorded samples of the instruments, digital synthesizersgenerate a sequence of sampled numbers converted from an analog waveform. Thefirst digital synthesizer prototype developed by Yamaha2.
They constructed itbased on John Chownings FM Synthesis algorithms with many up gradations toavoid distortions. K.Balasubramanian proposed a music synthesizer which was is based on creating sound patterns ofmusical instruments by recurring occurrences of its fundamental sound signal.3The frequency of the notes could be programmed. The instrument playing was alsodisplayed on a 16-segment device.
Currently digital synthesizers are completelybased on software, “softsynth” which is a program for generating music signals.× . METHODOLOGY/IMPLEMENTATIONEach musical instrumenthas a unique waveform, a sequence of numbers that generate this waveform isstored as an array and is sent to the DAC. The DAC output produces the wave byplaying it depending on the frequency inputted. Each note of a song is playedfor a duration specified by the user. This circuit is implemented using asimple binary weighted resistor DAC. Higher order DACs can be used to improvequality of the sound produced as more number of samples for amplitude areselected. The number of various musical instruments that can be played isdetermined by the DAC.
A 4 bit binary weighted resistor DAC can play 4 differentinstruments and an 8 bit DAC can play 8 different instruments.Push buttons correspondto each musical instrument. For a given set of notes entered by the user the song starts to play when the buttonis pressed. The main program contains the complete list of notes for a particularsong. The digital numbers fed to the DAC is converted to produce a wave similarto that particular instrument and with the help of Systick Timer that wave isproduced multiple times depending on frequency of the musical note to generatemusic. The software code is executed on a microcontroller development tool/ (EmbeddedDevelopment Tool) Keil uVision4 andis written in the C programming language.Implementation of GUIGraphical Userinterface portrays a diagrammatic illustration and is easy to interact with forusers.
The work was implemented onMATLAB and a GUI(Graphical User Interface) was created to play music ofdifferent instruments. RESULTSThe Fig(1) is thecircuit of the implemented work. It consists of four switches to play fourdifferent instruments and a 4 bit binary weighted resistor DAC connected to theMicrocontroller.Fig(2), shows the waveforms with marked sample values of different musical instruments that is used to generate the tone of aparticular instrument.Fig (3) shows the GUIwhich plays a song for two different instruments using the harmonic equationsfor that particular instrument. Each note can be programmed by specifying itsfrequency and duration to be played.
Fig(4) shows the main task window of theGUI. The waveform of the song playing will be shown on the axes plot and Fig(5)shows the GUI playing violin song 2 and its corresponding waveform isgenerated. CONCLUSIONIn this paper, it isproven that by constructing a circuit with an ARM Microcontroller and DACcircuit a system could be developed to play various musical instruments in aneconomical and simple manner.Presently, theproject implemented can play one instrument at a time, this limitation can beovercome by utilization of the other timers or the ARM microcontroller to playmore than one instrument simultaneously. The implementation on MATLAB can beextended to many musical instruments by using its respective harmonicequations.