Making Music with Arduino

Hi! I'm completely new to Arduino and a novice programmer and have a project that for me, is rather ambitions.
I want to put together a music box made with sensors that triggers a midi signal to output to a midi synth or other device.

I have looked at the MIDI example on the Arduino.cc website and feel confident I can work with that.
My question is, how do I approach the need for multiple sensors?

So this is my question.

Let's say I want to trigger basic on/off of a midi signal, (no velocity etc.)
The arduino Uno only has 12 inputs.
How would I set something up to be able to read let's say, 20 different notes?
Do I need 20 inputs or a bigger board?

The music box will basically have either use photo resistors or switches to detect a colored peg. As the peg passes the photo resistor, it will either trigger the switch or in the case of the photo resistor, will detect a change in the resistance and as a result, trigger a midi signal to the synthesizer through the arduino.

Any ideas on how to approach this?

Thanks

Miguel

How would I set something up to be able to read let's say, 20 different notes?

Use an input multiplexer, port expander or input shift register.
Are your signals going to be analogue or digital.

This is a project I made using an analogue input multiplexer:-

http://www.thebox.myzen.co.uk/Hardware/MIDI_Footsteps.html

Wow. You hit it out the ballpark with your project.
Pretty cool.
Attached is a photo of what I'm working on.
It's still in the prototype stages but what I want to do is have a spinning wheel that senses when a black lego brick is on the wheel and as a result, it triggers a midi signal resulting in a sound coming from Garage Band on the mac. This will allow my daughters to compose music with the wheel.

Oh, I'm hoping to use a photo resistor to capture a change in color which will then trigger a midi signal output form the arduino.
Similar to this but with LEGO.

Well that idea is cool, well done.
When you finish it I hope you post it it the exhibitions section, I would like to see that going. :slight_smile:

That bean can reminded me of the modular music box I worked on last year with its creators. I made the electronics for the read head and the winding mechanism.

There are lots of other photos and videos on the net if you search for them.

Can you fly over to Norway and help me?

Sadly not, until last year my son had a Norwegian girlfriend and was always flying over there but now they have sadly split up.

Darn,
That means I have to fly all the way to England. What a great excuse to go and buy some Newplast for my stop motion animations!
I'll check out the links.
The challenge I have is the electronics part of it, sensing all the signals etc. I do not have a fundamental understanding of it but that's why I'm learning.
Thanks for your help.

I'm wondering if photo resistors will work given the speed of the turning.

Well not the quickest but you will get something, probably best with a photo transistor.

See, this is how much of a novice I am. I never heard of a photo transistor till you mentioned it.
Thanks.

In that case have you come across the reflective opto sensor?
That combines a light source and detector into one package.
http://www.rapidonline.com/Electronic-Components/Reflective-opto-switch-68082
There are lots of different types, that is just one.

So it seems I have to go with more of an ON/OFF trigger rather than a sensitivity trigger like the photo resistor. But the photo transistor probably can be used in an ON/OFF situation but isn't as quick?

but isn't as quick

I don't understand, the photo transistor responds just as quick, if you do an analogue read that takes longet to do than a digital read but not so you would notice.

Sorry. I was just confirming if the photo transistor responded as quick as the reflective opto sensor.

Yes it does.