Archive for the ‘arduino’ Category

Making Music!

In arduino, sounds, systems on March 17, 2010 at 3:47 pm

Configuration of sensors and what they trigger

How music is played

The dotted lines representing E/D pairs can be thought of as invisible strings. Each of the vertical E/D pairs on the inside of the big arch are coupled with a range-finder.
This means that everytime someone waves their hand in such a way that it cuts across the beam of the E/D pair, the musical note for that particular instrument is played. (guitar tones for the E/D pairs on the left, and piano tones for the ones on the right.)

How will these notes vary?

The range-finder coupled with E/D pairs on each side will measure the height at which the E/D pairs were triggered. This will directly influence the pitch/note played.

The single E/D pair on top is to enable play for a single person. Triggering this particular E/D pair would initiate a 20-second long percussion sequence which can act as a background tune while other tones are activated.

Photo-sensors on the smaller arc (red dots) will act as drum beats whenever someone taps on them. So in effect, for the player, it would be like a set of drums.

One photo-sensor will be kept on top next to the solar-panel for day-night detection and entering the module into power-save mode during night-time.

Summary document : sound-interaction-1-page-summary

Experimenting with sounds & rangefinder

In arduino, MIDI, sounds on March 10, 2010 at 5:22 pm

Yesterday, we spent some time trying to use the data stream from the range-finder to drive the interval rates of certain frequencies that were then played on a piezo-speaker.

During our attempts, we concluded that we would definitely need a richer sound stream, like a MIDI file for the aural experience to be something that people can enjoy.

In order to use the arduino board as a MIDI controller (:output), we’ll need a MIDI connector which costs ~$2. A tutorial on the ITP program’s Physical Computing lab page here shows the procedure to do this, and also mentions at the end how these different tones can be driven by an analog sensor instead of a switch. The tutorial also challenges us in the end to figure out ways to make different instruments’ sounds using the same circuit setup with differing MIDI values.

For this purpose, there are many MIDI libraries available online which we can make use of. Also, to make ‘melodious’ tones, we’ll need to stick to some grounded rules of music theory like the Octave or Chords. Since our experiment yesterday revealed that the range-finder’s linearized data-stream is noisy for slight variations in distance, we probably shouldn’t directly correlate a tune to the distance value, and rather give it in a synthesizer format whenever a change in factor of distance (say every 10th centimeter) is detected.

Some examples of making music with the Arduino and basic tutorials on creating melodies: