Musical Instruments

From Adam Colton
Revision as of 15:16, 23 August 2018 by Adamcolton (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Both robots to play real instruments as well and invented electronic instruments

A hand held instrument, movement like a concertina, but rather than driving bellows, it charges the caps. One set of controls plays individual notes, another set of controls plays chords.

For individual notes, I'll follow a one octave piano layout on the right hand, and put an octave select on the thumb. On the left, it will also be a piano layout, but two buttons for each; major \minor. The thumb will select a modifier (7th, dim, sus).

Generating compound signals is called polyphonic sound. This cannot be done easily with a circuit, there used to be dedicated chips, now it's done with microprocessors. I'll use an AVR. The code is a little complex. We need a waveform or wave table. For each voice, we look up the value at the current time in the wave table. Sum all that up. Then do one of those digital to analog tricks; easiest is to have a counter, increment it from 1 to 16, scale the wave output onto the 1 to 16, if the output is greater than the counter, turn the out pin on, other wise turn it off. Then have a cap in the output to smooth out the wave form.

What's cool about this is that I can build a wave function that takes some number of inputs to produce an adjustable waveform. Probably one for curve (.5=sin, 0=saw, 1=square), one for tilt (0= rapid rise, .5=even, 1=rapid fall), then probably two sets of two knobs. For each set, one adjusts the harmonic (2 to 20) and the other adjusts the amplitude (0 to .3).