Lindy Mayfield wrote: > Or take it a step further. If you are using a microcontroller in the equation then why not let it do some of the work for you. Uhh, that's exactly what I was suggesting. Measure hand distance. You want it linear since most instruments have linear spacing of their keys. Compute note number. Do math. N * 1.059463094....(12th root of 2) * base frequency = note frequency. Simplest is to compute offline in spreadsheet and use a lookup table with some interpolation to get smooth note gliding. > I cannot remember but I think the distances between the antenna and the hand relative to the pitch is ... I don't know what the word is or how to explain what I mean... logarithmic is it? Logbut with a fairly low slope (log vs linear graph paper). > > For example, from 110Hz to 220Hz, A to A, is one octave or 12 steps on a piano. From 220Hz to 440Hz is still another A to A octave and 12 steps on a piano or any other instrument. But the difference between the two has gone from 220-110=110 to 220-440=220. Logarithmic is that? > > But the difference between the steps on a piano are based on distance and therefore equal. Every key is the same width, of course. (-: > > I'm not sure how the pitch goes on a Theremin but I think it is logarithmic rather than linear. It's actually 1/X because of the inverse square law. Close enough since the human corrects the pitch. > My idea is what would a Theremin be like to play if it were linear like a piano with each step being x number of millimeters distance to the antenna? Sure. See above comments about how to compute the needed frequency. > A PIC could do the math to make that happen. No hard math needed. Just use a lookup table and interpolate. > I think for me at least I would have to try each one to see which is easier. Easier how? To play or to code? >But this is a cool topic, for me at least. (-: > What do you think? Do it step by step. Since measuring the hand position is going to be the hardest part (IMO), start with that. Use it to directly compute a pitch value for the PIC timers. Then change the shape of the transfer function (log vs linear). Have fun. But somehow I think it's more 'real' to use RF sensing. Robert > -Lindy > > -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of Robert Rolf > Sent: 2. joulukuuta 2005 0:05 > To: Microcontroller discussion list - Public. > Subject: Re: [OT] Theremins > > > I rather like the idea of an optical thermin. > They'd be just as hard to play, but would be easier for the > digital geek to build. > > Ranging could be as simple as a modulated IR source with > a tuned amplifier on the photodetector so that you get a linearish > response to intensity vs hand distance. (1/R^2). Then simple math > to scale to a linear note number times 12th root of 2 note intervals. > > You could even cheat and have the PIC 'fix' your bad pitch just > as modern DSPs do for today's not so good singers. > > > Robert -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist