Let's Design and Build a (mostly) Digital Theremin!

Posted: 3/3/2014 3:29:32 PM
livio

Joined: 2/2/2014

"I too owe you an apology...  I hope you can forgive my rudeness. - Fred"

No problem, I really appreciate your sincerity.

Your posts show passion and scientific spirit, misunderstandings can arise, but in the end we become friends. Your careful control has helped me to better explain, even to myself, and I encourage you to continue with this operation of control..

Some of your expressions were also very funny, such as when you said to a poor newbie "You'll stay newbie forever!" are milestones that will remain in the history of Thereminics and anecdotes that will brighten our team. I also enjoyed reading your stories about the Tutankhamun curse and I agree with you, having tried it by myself, your observations on the complexity of the installations and how the public perceives them. (if you have time you can read a little history of our installations here : the-theremino-history)

You've had a great insight to say that I have veiled intentions, there really is a hidden intent in my post, but it is not the action of advertizing, that you describe (if I wanted to get rich selling CapSensor, I would not come here, in the den of the best Theremin designers, to reveal to all our best Know-How)

My intention is rather to help dewster designing a great capacitive sensor which, I hope, will surpass our CapSensor, with a performance increase of approximately ten times.

In the end, our CapSensor would be the standard level and his, the spearhead of capacitive interfaces (of course more expensive, but not too much... but we'll see this in the future)

This performance increasement it's impossible for us to reach, as we have a 32 MHz clock (which is halved because each instruction, uses two clocks) Our processors are RISC, therefore not arduino-asthmatics, even with only 16 MHz, but the brute force of dewster's 160 MHz, is unobtainable for us.

My other "hidden intention" is to help dewster to revise and simplify its block diagram, so that its "time to market", it will be no more "before the next ice age" but "next month".

Posted: 3/3/2014 4:24:34 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"The South Bank Art Centre is I think the largest establisment of its kind in the world, having some of the most prestigious venues in London.."  - FredM

I'd be pooping my pants over that, no wonder at your paranoia, particularly at the beginning of your Theremin journey.

"And in truth, if I had made 16 musical barbies with limited pitch fields and stuck them on top of narrow plinths, most (99%) of the punters who visited the show would have been just as entertained"

Bring me the head of John the Baptist on a platter - so I can stick a Theremin in it!  ;-)

Posted: 3/3/2014 6:40:45 PM
livio

Joined: 2/2/2014

Dear dewster,
the following schematic is so simple, that you could complete it in a few weeks, and at the same time so much flexible that, it can connect immediately to the whole digital world (MIDI, CVGate, VST-Synths, MaxMsp, PureData, Processing, Reason, Cubase, Logic, FruityLoops, Audacity, Theremino slots, OSC, UDP and so on)

dewster_block_diagram_simple

This scheme does not preclude your future stand-alone music machine, with tuning potentiometers, heterodyning, dual display, webcam, vocal controls and automatic deambulation system. :)

But please, take also in consideration this simple version. (if the price is really low and the performances are as expected, you could start a production soon and sell them very easily)

Posted: 3/4/2014 3:39:13 AM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

livio, I really do appreciate your help and insights.  Though I guess I'm more into the whole package (can't wait to move past the sensor thing and get into synthesis).  I could certainly help you if you wanted to do sensor stuff in an FPGA.  You have accomplished a very impressive array of installations!

Posted: 3/4/2014 4:58:32 AM
FredM

From: Eastleigh, Hampshire, U.K. ................................... Fred Mundell. ................................... Electronics Engineer. (Primarily Analogue) .. CV Synths 1974-1980 .. Theremin developer 2007 to present .. soon to be Developing / Trading as WaveCrafter.com . ...................................

Joined: 12/7/2007

" (can't wait to move past the sensor thing and get into synthesis). " - Dewster

Oh yes! Thats where the real fun is!

:-)

Posted: 3/4/2014 2:00:41 PM
livio

Joined: 2/2/2014

"Can't wait to move past the sensor thing and get into  synthesis" - Dewster

"Oh yes! Thats where the real fun is!" - FredM

Yes, I understand the fun of programming an entire synth in an FPGA, but this would require a huge amount of work that, even if done with the best intentions and the greatest passion, it would have the following limits:

  • Need to provide the instrument with knobs, buttons, display and power supply, increasing the cost and decreasing the reliability.
  • Very high cost per sensor, difficult scalability, need to use MIDI or CV adapters, to connect it to a PC.
  • Voodoo impossible tuning, having to use a control on the body of the instrument, while adjusting, the hand affects the field.
  • Limited number of sensors, probably two and fixed in their function, as "Volume" and "Pitch".
  • To avoid Version problems and updates, you should make a synth  perfect from the beginning (practically impossible). I do not think it will be possible to reprogram through MIDI or CV. Maybe users will need to buy an FPGA programmer, how much does it cost?
  • Very long Time to Market.
  • Can not change the synthesizer programmed into the FPGA or replace it with another one, for example using FM synthesis or through the most recent Physical Modelling algorithms.
  • Unability to replace the synthesizer with one of the many freeware VST, which sound all great. 
    Please download these examples and try them out: VST_Theremins.zip 
    And please visit this page: http://www.vst4free.com/

- - - - - - -

The solutions that I propose you, resolve in one move all of these problems (and does not prevent you, from continuing your monumental work and having fun programming it)

I'm not going off topic, what I'm helping to design, it is exactly a "mostly-digital theremin, based on FPGA"

Here is the new version:

dewster_block_diagram_V2

The LowPassFilter and Linearization blocks, have been removed, being more flexible having them in the HAL (Hardware Abstraction Layer). HAL is a device driver, so it is the right layer for these operations, you can change algorithms without reprogramming the FPGA.

In return, there is the possibility of connecting, up to 8 modular oscillators. (if the FPGA power allows it)

The oscillators would be connected with standard 3-wire extension cords, up to several meters away (screened, if very long) see here: www.theremino.com/en/technical/connection-cables

This modular solution, splits the cost of the FPGA on multiple sensors, lowering the cost per sensor at reasonable levels. It is then possible, to build a high performance Theremin with volume, plus 3 polyphonic antennas, for less than 100 Euros.

Of course, we are always talking about DIY and open source solutions. Would be great, you were interested in this solution (please consider that Open Source, does not mean necessarily, earning less. If you work well and do interesting things, even the only donations, can be a good source of income. Anyway, very few people do everything themselves, so pre-assembled modules are sold very well)

We are proposing you this, as we are following many projects at once, and we do not have time to design this as well. As you know well your FPGA, you can do this very easily. I also hope that you can build and sell them, because we do not deal with production, we just explain "how to do".

If you do not like these ideas let me know, we will find alternative solutions.

Posted: 3/4/2014 4:08:15 PM
FredM

From: Eastleigh, Hampshire, U.K. ................................... Fred Mundell. ................................... Electronics Engineer. (Primarily Analogue) .. CV Synths 1974-1980 .. Theremin developer 2007 to present .. soon to be Developing / Trading as WaveCrafter.com . ...................................

Joined: 12/7/2007

 OT - About money

" (please consider that Open Source, does not mean necessarily, earning less. If you work well and do interesting things, even the only donations, can be a good source of income. Anyway, very few people do everything themselves, so pre-assembled modules are sold very well)" - livio

Facinating!

That was a question I wanted to ask, because I wondered how you made a living and financed your developments.. I assumed you must have some 'kickback' from sales of your modules for effectively promoting them on your site and elsewhere..  - To me, this is fine and fully legtimate even withing the "open" concept.

Donations aint something I have found to be at all fruitful - I was doing loads of small design and support jobs for people who emailed me, and I asked them to show their appreciation for my time by donating to http://www.healkids.org/ (Formerly Street Kids Rescue) - a charity I actively support ..

I got loads of promises, but Street kids never got the donations.. In the end I told people that if they wanted my help they had to make their donation first and advise Street Kids to inform me of their donation, Street kids got some money, and I got a lot less work!

With only a few exceptions, I have found that people are happy to take whatever you give, and even make "demands" - but as soon as they are asked to pay, suddenly they dont need your help anymore.. Or perhaps ive got it wrong - perhaps if I was asking them to pay me, they would - but just dont like the idea of paying a charity as the fact that I ask them to do this is interpreted as me saying "ive got plenty of money, but I dont want to give you this free".

I have a strange relationship with money, recently someone donated $1000 to me via paypal - I had ethical reasons why I couldnt accept this gift, so asked them to donate it to Heal Kids instead (donating to Heal Kids feels like a gift to me personally - my brother founded and directs this charity, and I get to see behind the scenes and witness the real horror and suffering of these children and their families, and see what a massive difference every donation makes to the lives of these people) - But Heal Kids never got the money.

Fred.

Posted: 3/4/2014 4:59:12 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Hi livio,

You have very valid points, I don't fundamentally disagree with anything you say, but let me respond to them:

Need to provide the instrument with knobs, buttons, display and power supply, increasing the cost and decreasing the reliability.

I'm thinking some kind of alpha numeric display, either 4 place 7 segment LED, or two of these, or a two line LCD display.  The tuner has to be LEDs, probably 22 of them, likely 10mm diameter types.  Controls would likely be two rotary encoders, plus volume control, mute button, and power switch.  Power supply will likely be through USB port, which will function as a serial port as well.

Very high cost per sensor, difficult scalability, need to use MIDI or CV adapters, to connect it to a PC.

Being a turn-key solution brings with it a higher cost.  And to me anyway, requiring the connection to a PC to make it work is a negative thing.  Think digital pianos, you want to just turn it on an play it, not wait for your PC to boot.  Lots of wires are eliminated in turn-key as well.

Voodoo impossible tuning, having to use a control on the body of the instrument, while adjusting, the hand affects the field.

I've played with this in my prototype, it doesn't seem like it will be a problem.  Press a button to null, tweak it with buttons or knob.

Limited number of sensors, probably two and fixed in their function, as "Volume" and "Pitch".

I'm thinking three, with two on the left hand.  I don't think traditional Theremin players will be able to handle much more than this.

To avoid Version problems and updates, you should make a synth  perfect from the beginning (practically impossible). I do not think it will be possible to reprogram through MIDI or CV. Maybe users will need to buy an FPGA programmer, how much does it cost?

I'm hoping the firm/hardware in the FPGA will be fixed, then the programming of the software in the soft processor inside the FPGA will allow me to fundamentally reconfigure things in the lab and in the field via the serial port.

Very long Time to Market.

You're telling me! ;-)  To speed things one could take a page from the Continuum playbook and have someone else do the synthesis engine, but honestly I'm looking forward to it.

Can not change the synthesizer programmed into the FPGA or replace it with another one, for example using FM synthesis or through the most recent Physical Modelling algorithms.

Hopefully "just" a software change.  But I don't anticipate changing the synthesis method much once it's in there.  My main focus will be vocal and string sounds.

Modularity restricted.

Turn-key is my first priority, modularity a distant second.

Unability to create configurations as "polyphonic", "poly-tonal" and "poly-instrumental",

That's a different kind of instrument (very nice video!).  Kind of like complaining the violin won't play bass.  My first goal is a Theremin (with a few tweaks).

Here is the new version:

The LowPassFilter and Linearization blocks, have been removed, being more flexible having them in the HAL (Hardware Abstraction Layer). HAL is a device driver, so it is the right layer for these operations, you can change algorithms without reprogramming the FPGA.

In return, there is the possibility of connecting, up to 8 modular oscillators. (if the FPGA power allows it)

The oscillators would be connected with standard 3-wire extension cords, up to several meters away (screened, if very long) see here: www.theremino.com/en/technical/connection-cables

This modular solution, splits the cost of the FPGA on multiple sensors, lowering the cost per sensor at reasonable levels. It is then possible, to build a high performance Theremin with volume, plus 3 polyphonic antennas, for less than 100 Euros.

It obviously depends on the complexity of the period measurement, but almost any FPGA would likely be able to interface to many more oscillators than that.  There's tons of I/O on an FPGA, and you could probably time multiplex the period counters as smaller counters connected to larger accumulators and utilize block RAM for the counters.

I'm probably going to use an off the shelf FGPA board like the one I'm currently using:

http://www.ebay.com/itm/EP4CE6-EP4CE6E22C8N-FPGA-ALTERA-Cyclone-IV-Development-Evaluation-Board-Core-Kit-/251194059567?pt=LH_DefaultDomain_0&hash=item3a7c552b2f

$31 gets you a lot of logic!  Half of mine will likely be taken up by my 8 thread 32 bit processor, with the other half available for oscillators and such.  You could take that board, or one that is similar, build a motherboard for it, and plug all kinds of stuff into it.

If you do not like these ideas let me know, we will find alternative solutions.

Your ideas are definitely interesting, and I like them, but I'm afraid that I've already got my hands more than full doing what I'm trying to do here, which is to understand capacitive interaction in a practical manner, and use this knowledge to construct a next generation Theremin. 

I might be able to help you with your sensors though.  Do you have any FPGA experience?  If not could help get you going in that direction, and I could certainly do some coding for you.

Posted: 3/4/2014 6:57:38 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

This is a good deal ($39) on an FPGA board as well:

http://www.ebay.com/itm/EP4CE10F17C8N-EP4CE10-FPGA-ALTERA-Cyclone-IV-Evaluation-Development-Core-Board-/251247908829?pt=LH_DefaultDomain_0&hash=item3a7f8ad7dd

The EP4CE10 has 40% more logic, but more importantly 46 Block RAMs.  If you are using my Hive processor that's 8 for the stacks and 32 for the main memory, with 6 left over for other stuff.  32k 16 bit words doesn't sound like much in this day of gigs of main memory, but it's probably fine for hand coded stuff that doesn't rely on wavetables or significant delays.

The 50MHz oscillator and two PLLs give you three clock domains right off the bat.

=============

The 160MHz period resolution was based on the assumption that the processor clock would be used for the logic - that doesn't have to be the case but it makes things a little easier / uses less logic.  One can do DDR on the FPGA pins and get crazy speeds.

Also wanted to add that the thermal management on those FPGA boards isn't the best, particularly the regulators.

=============

(I've got something of an accidental pen pal in an engineer who was interested in my processor for a while.  He's doing orbital RADAR with some heinous FPGA processing.  >400MHz DSP and power in many tens of amps going to his boards!  It's 0% fun stuff like that which rapidly hastened my exit from formal industry.  I just couldn't take the largely arbitrary yet set-in-stone time schedule nonsense, on top of all the technical rabbits that needed pulling out of magic hats.)

Posted: 3/4/2014 8:43:31 PM
livio

Joined: 2/2/2014

The problem for us is not learning how to use FPGAs but time, not many of us could develop it, so at the end is me who should do it, or perhaps Roberto. But Roberto has other things on his head, and I 'm already doing maintenance to our (over 40) applications, some of which, such as gamma spectrometry, have won a worldwide audience and require great attention. At this time I am also working on the ion chamber for radon and at the same time also to the geophones for geology and to the contactless biological sensors. (incidentally, this answers the question of FredM on as we receive donations... we do so many things that we are very well known. Anyway we are satisfied even slightly, I no longer have the car for not even pay for the insurance and not I go out almost never)

So I'm hoping a lot, the chance of having found a skilled collaborator who develop this version. Think of this for a certain time...

The idea is not to help us to learn the FPGA but to do it, if not, probably no one will do, we are already quite happy with our CapSensor and we have too many other things to do.

I am convinced that the solutions that we propose for the front-end are as good as possible and that, after having tried, you would use them even as part of your synth. The most critical point is that the oscillator must have an incredibly low noise. Instead, the frequency drift and the ferrite are absolutely not a problem. The players must retune Theremin often for each small difference of the electric field surrounding or even depending on the position of the body and these effects are (at least in our version) preponderant in relation to the frequency drift due to temperature.

I do not believe that digital ports can work with low noise like a FET, the critical point of your diagrams is too much closeness between the oscillator and the digital parts and also the detection of the phase assigned to digital inputs, incomparably more noisy then a BF862. You can also obtain a good oscillator but if you really want to work with the hand at the maximum distance, it takes a sub-microvolt noise and only a low-noise FET can do it.

I know that you also have two other questions: the oscillator that can stall and the extra sensory perceptions, but also for those things we have excellent solutions. We'll talk later, I would not get bored ... hello Livio

You must be logged in to post a reply. Please log in or register for a new account.