Multiple tone outputs

Hi guys-

I'd like to set something up, let's say, keyboard style... if I have 4 buttons for inputs I'd like to have 4 tones for outputs.
I just read on the tutorials that you can only have 1 tone at a time and you have to stop each one before starting the next and I'm curious what the limitation is, so that I can throw money at it by buying more components, which is my solution to just about everything. (Let's call it "object oriented" design.)
Is it because there is only 1 timer?
How would I fix that? Timer ICs?

Hi,

kaneshadow:
I'm curious what the limitation is

Timers. One tone per timer.

so that I can throw money at it by buying more components

Yes.

Is it because there is only 1 timer?

There are three timers on the Uno. One timer is used for millis, micros, delay, and delayMicroseconds. The other two timers can be used to generate tones. This will allow you to use more timers for generating tones...
http://code.google.com/p/rogue-code/wiki/ToneLibraryDocumentation

How would I fix that? Timer ICs?

http://arduino.cc/en/Main/ArduinoBoardMega
http://arduino.cc/en/Main/ArduinoBoardMega2560
https://www.google.com/search?hl=en&q=i2c+tone+generator
https://www.google.com/search?hl=en&q=spi+tone+generator

You can get lots of tones, you just need to do some programming.
For example, middle has a frequency of 440 Hz, or a period of 1/440 = 2272 microseconds. So every 1136uS it changes from high to low.
You can do the math for other notes.
Thus you can capture the time using micros() when a button is pressed, and every 1136 uS change an output from high to low, or low to high.
Write a loop that checks if a key is being held down and turn an output on/off accordingly.
So something like this:

byte noteA = 0;
unsigned long noteAmicros;
unsigned long noteAduration = 1136;
keyA = 2;
noteApin =3 
// etc for other notes


void loop(){
if (keyA==0 & micros() >=noteAmicros){
noteAmicros = micros() +noteAduration; // set for next on/off
digitalWrite (noteApin, 1-noteA); // result is 0,1,0,1...
}
if (keyB==0 & micros() >=noteBmicros){
noteBmicros = micros() +noteBduration; // set for next on/off
digitalWrite (noteBpin, 1-noteB); // result is 0,1,0,1...
}
if (keyC==0 & micros() >=noteCmicros){
noteCmicros = micros +noteCduration; // set for next on/off
digitalWrite (noteCpin, 1-noteC); // result is 0,1,0,1...
}
if (keyD==0 & micros() >=noteDmicros){
noteDmicros = micros +noteDduration; // set for next on/off
digitalWrite (noteDpin,1-noteD); // result is 0,1,0,1...
}
} // end void loop