Is anyone here interested in my FPGA based Theremin design?
I've been beavering away on this project for more than three months and it's finally bearing solid fruit. It's an extension of various projects and investigations I've worked on in the past: capacitance sensing, digital phase locked loops, averaging to trade response time for reduced noise and increased precision, etc.
The Analog Front End (AFE) is simple enough that anyone with basic electronic skills could build it. In fact mine is currently on a small plastic breadboard mounted in an alumimum project box. The LC resonance point is around 700kHz with drive and quadrature maintained by the FPGA. Antenna construction incorporates the "linearizing" coil within, and is quite a bit better IMO than the various "plumbing" solutions on professinal Theremin products. As for the digital circuitry in the FPGA: The pitch section is working almost as well as I could hope - it is smooth, responsive, reasonably stable, and surprisingly linear without correction (except for right at the antenna where it becomes a bit crampt - still thinking about this but it's less urgent than I initially thought it would be). It "sees me" out to more than a meter, and I'm getting around 10 octaves out of it with 8 of them fairly linear. I also have the LED "tuner" section up and running (though without the full complement of LEDs) - quite fun to see it work, it's also quite responsive, and after using it for an hour or so it strikes me as an essential element for the Theremin.
The FPGA demo board I'm using is an old Xilinx Spartan 3 model and I think this is where most will run into trouble. I'll need to segue over to board with more availability if this project gets to the commercial stage. I've been avoiding hardware multipliers in hopes of targeting something small and inexpensive like the Lattice MachXO for which inexpensive demo boards exist.
There is of course quite a bit more work to be done:
- Timbres other than the current simple square wave output.
- Left hand control over volume and perhaps one or more other parameters.
- Ergonomics and user interface.
- Prototype on stand with built-in amp(s) and speaker(s).
Famous last words as you never know when a design will blow up in your face, but with the AFE, pitch, and LED tuner sections operating on my bench I feel I'm over the major hump of this feasibility study.
I think that I will rather not jump in. Words like digital, FPGA, etc., are rather contradictory when it comes to my imagination of theremin technology. But that is my personal thing.
A pitch range of 10 octaves sounds interesting — but only for engineers. Linearity is only one half of the work, tone spacing is the other half, at least for the precision player. Consider an octave spacing of 4" as the minimum and you will end up with a 40" wide pitch field. I'm not sure if you will find a player who can handle that with ease. When it comes to play higher tones, the player will have to move his body at least partly into the field and then good bye linearity...
You should consider cooperating with one ore more professional theremin players of all techniques and styles and meet them often with your prototypes during theremin workshops and conventions. Only after the majority of them approved your circuit, you could present it to the grand public in order to prevent deception on both sides, yours and your future clients'.
"I think that I will rather not jump in. Words like digital, FPGA, etc., are rather contradictory when it comes to my imagination of theremin technology. But that is my personal thing."
It's just applied DSP techniques. Rather than heterodyning two oscillators, the operational point of the DPLL (a number) is subtracted from a fixed number close to it, producing the difference numerically and with a single oscillator. The NCO in the DPLL is phase dithered to make it behave like a continuous oscillator, even though it is clocked by a 50MHz crystal oscillator. Works like a champ.
"A pitch range of 10 octaves sounds interesting — but only for engineers. Linearity is only one half of the work, tone spacing is the other half, at least for the precision player. Consider an octave spacing of 4" as the minimum and you will end up with a 40" wide pitch field. I'm not sure if you will find a player who can handle that with ease. When it comes to play higher tones, the player will have to move his body at least partly into the field and then good bye linearity..."
I agree that linearity is a slippery subject, and that the position of one's body has a large effect on it. My circuit provides an approximate octave pitch change between an open hand pointed at the center of the antenna and a closed fist. I have to move my body back some to get similar octave spacing farther out. The pitches within the octaves are continuous and evenly spaced (I can see this with the tuner). Indeed, there is no reason for them to be oddly spaced as I am not currently applying any correction to the pitch in the digital section. [EDIT] Oh, I see you are talking about tone spacing in terms of how wide the octaves per hand movement are. No provision for changing that yet, though the zero calibration can be performed closer or farther from the antenna, but this profoundly affects linearity (as it does on a conventional analog Theremin).
"You should consider cooperating with one ore more professional theremin players of all techniques and styles and meet them often with your prototypes during theremin workshops and conventions. Only after the majority of them approved your circuit, you could present it to the grand public in order to prevent deception on both sides, yours and your future clients'."
Yes I have been considering this, but for now am relying on my own musical instincts.
Thierry said: "A pitch range of 10 octaves sounds interesting — but only for engineers. Linearity is only one half of the work, tone spacing is the other half, at least for the precision player. Consider an octave spacing of 4" as the minimum and you will end up with a 40" wide pitch field. I'm not sure if you will find a player who can handle that with ease. When it comes to play higher tones, the player will have to move his body at least partly into the field and then good bye linearity..."
If you have 10 linear octaves stretched out to 40" then a stand alone volume control will make this practical. Thierry the front of the pitch field moves forward with the playing hand, so dragging the human body behind has little affect unless you play with your hand next to your heart. You might!
Having 10 linear octaves determines the distance of play from the antenna, which is never touched anyway so you stand where practical, at the interval/frequency you want to play from. I can't imagine the three octaves next to the antenna would be played rather they are used to move the lower notes outward. C7 to C9 probably too high in frequency for enjoyment.
My project building is winding down so I would not be able to participate.
dewster your research and input have been very inspiring, your success is dependent upon the voice you allow the Thereminist to test drive.
Beavering? I have a backyard full of cotton tails, darn it, kill a gopher and no one cares because its life is hidden. Shoot an arrow through a rabbit and the community gets upset. Both are rodents eating the same thing. hum...
On the tuner I can see (and of course I can also hear) around 10 octaves, but only about 8 or so are "linear" and a couple of these are in the subsonic region.
I'm curious: do most Thereminist here consider open hand / close fist octaves too tightly spaced?
For the left hand I'm thinking up/down for volume, and in/out (closer/farther from the player's body) for timbre of some sort. For that I'd need a double sensor for the left hand and capacitance mixing antennas. And I know I shouldn't, but I still want to have the left hand physically anchored somehow, it would make the playing of the pitch side so much easier and more intuitive.
Christopher, I agree that voice selection is critical, am aiming for something like human, at least at first. I must say that your enthusiasm is infectious and your insights most inspiring - why are you winding your building efforts down?
I posted a quick YouTube video showing the basic linearity:
http://www.youtube.com/watch?v=orvBeJnIxCI
Comments here and/or there are welcome!
I am replying to your post from your YAEWSBM thread - this seems like a more appropriate place..
You say: "The waveform could be changed on a per-sampling clock period or even faster (the beauty of doing this in logic rather than software)."
Yes, doing this in software would be a problem... However, I do not really understand how doing this is possible, even with logic..
Discussing the issue of quantizing, you stated (on the YAEWSBM thread) “Any resolution is possible if the low pass filter can be set low enough, but response time suffers if it is set too low, so there is a tradeoff” And from this, it would seem impossible to update the audio waveform on a “per-sampling clock period” – It seems to me that any latency inherent in computing / filtering the input capacitance value must be the minimum possible update time.
The above probably doesn’t matter one iota if the (reading) update rate (or filter TC) is not too long, and if this latency is constant – a couple (IMO, up to a maximum of 10ms) of ms latency IF this latency is constant – and if one then updates the audio wave-shape at a frequency >> 20kHz you should, I think, be able to emulate a mixed signal theremin adequately.
If you get the sensing accurate enough and fast enough, you should theoretically be able to emulate any theremin and create theremins which have not existed before – You have a numeric value which you can do whatever you want with – control digital oscillators and filters, cause the harmonic content to vary with pitch in a way which can emulate oscillator syncing – whatever you want…
One day, someone will achieve this – I wish you all the best!
If I was investing time / money into a FPGA /CPLD / DSP based theremin, I think I would be looking at producing a unit which concentrated on rapid acquisition of position, and which, from this, computed the log of the acquired data to give an adjustable linearity correction and output this as a 1V/octave CV..
It is easy to make any theremin voltage controlled! (yes – it is! ;-) and it is easy to set registers, change the range (number of octaves spanned)
I am not trying to persuade you to change direction (Don’t! I have been switching direction continuously in my theremin developments, and this is probably the main reason Im broke!) – But, if while playing with your FPGA you see an easy way to provide a linearized CV, let me know! I believe the future is a hybrid : Front-end which deals with the linearity and stability issues and allows control of range etc, and this to be followed by conventional (or unconventional) heterodyning analogue / mixed signal theremin which is ‘liberated’ from the constraints imposed by the antenna and its circuitry.
Fred.
Thank you for your thoughtful comments Fred, and thank you also for addressing them here where it is more germane.
"If I was investing time / money into a FPGA /CPLD / DSP based theremin, I think I would be looking at producing a unit which concentrated on rapid acquisition of position, and which, from this, computed the log of the acquired data to give an adjustable linearity correction and output this as a 1V/octave CV.."
I agree entirely with the rapid acquisition part. This is why I spent about a month doing math and spreadsheet sims, to see if I could acquire a number with enough precision quickly enough. My current prototype uses a single pole low pass digital filter and is right on the edge in terms of resolution and response time. I will probably try a higher order filter soon to see if that improves things. One could also do adaptive or tracking filtering here, as lower frequencies don't need to change as quickly, and you could get some added precision in this region where the SNR is tanking.
The current operating point is roughly exponential with hand distance (see video above) so I'm using this directly for pitch. It would be nice to be able to offset this and fine tune the linearity and such, but for now I'm pretty happy with it.
The "tuner" has a module that converts the current operating point to the log2 of that number (using the al Kashi method) after which it is multiplied by 12 or 24 to get the individual note LEDs (with pulse width modulation for the decimal portion). One could tap into this for other purposes I suppose, but the the natural dithering from the noise and jitter would become non-linear and therefore less useful downstream.
"I believe the future is a hybrid : Front-end which deals with the linearity and stability issues and allows control of range etc..."
The AFE seems pretty darn stable to me, certainly more stable than my EWS, though that is a subjective statement. It is a quadrature locked DPLL and so is only a single oscillator, not two drifting apart or together. When I was researching LC oscillators I came to the conclusion that a single transistor was just too simple to demand very much of, the resonance point could possibly be more a matter of gain than of phase. So I abandoned that route.
dewter: Glad you mentioned the video, I missed it. Why did you not do the popping the fist open to demonstrate octaves and linearity throughout the field.
Darn do I have to set my stuff up here?
"Glad you mentioned the video, I missed it. Why did you not do the popping the fist open to demonstrate octaves and linearity throughout the field."
Next time perhaps when I have something new to show and tell. I wanted to get something out today and didn't think it entirely through I suppose.
You must be logged in to post a reply. Please log in or register for a new account.


Feeds: