Author Options:

Chords With An Arduino Microcontroller? Answered

Does anyone have any idea as to how I could make more than just one tone with the Arduino Uno? I would like to make chords.
I had an idea that you could make octaves with a binary counter that would half the frequency, but you still only get one key at a time (i.e. A, G#, Db, etc...)

1 Replies

orksecurity (author)2011-07-11

A few possible approaches:

1) Chords are simply the result of adding together signals at two or more frequencies, making sure that the sum doesn't go outside the range the system can handle. Write a loop which generates the three frequencies and adds their outputs together; make sure they're scaled appropriately so the total doesn't overflow.

2) A trick some programs used on the early IBMPCs: If you arpeggiate (play multiple notes in rotation) really quickly, the listener's brain will tend to ignore the fact that they aren't all playing at once and hear the chord they're spanning. The result is rather raspy, but it is another way to produce something that sounds like a chord.

3) Use a sound synth library and/or shield which has already solved this problem.

Select as Best AnswerUndo Best Answer