Is Open.Theremin.UNO worth it? Cannot it be drastically simplified?

Posted: 3/4/2015 3:39:51 AM
3.14

From: Buenos Aires, Argentina

Joined: 9/14/2008

Hello,

I was sniffing around Open Theremin UNO and find it as a very nice achievement, both ideologically, aesthetically and apparently in the music realm... Thus, before jumping into building one, I humbly wonder (of course one must be humble specially in the theremin realm):

1) Is it playable enough? I mean, true thereminists out there (here) have tried it and are happy with it?

2) I was looking and the circuit and I really see overcomplicated the hetherodyning. [I do understand that D-latches are used to "digitally hetherodyne", and I´ve seen the discussion in the thread about the digital theremin but... well bear with me]:

a) First, let´s make a simple "mental" redesign and let's replace the fixed oscillators with an output from the arduino board. I don´t see any problem in generating the 460/500khz with reasonable precision. 

So if we mentally do this redesign, what are we left with? Well, a pin from arduino clocking the D-latches... and reading the result. So, we go on:

b) what is left can be seen (e.g. for pitch oscilator) simply as a sample at 500khz of pitch variable oscilator. That is, no matter how the hetherodyned frequency is measured or processed, the resolution limit of the "digital hetherodyne" is one 500khz cycle. Thus, one could skip altogether the d-latches and, instead of generating 500Kz, just "sample" the VO at 500khz. The result should be of course treated just as today is (pondered-averaging and so).

c) I feel like we don´t really need a DAC and we just could use pwm and a low pass. This, I'm not THAT sure.

So the Open.Theremin could "evolve?" to a couple of VO and the arduino (and then the output analog stage).

How wrong am I?

 

Posted: 3/4/2015 7:41:15 AM
Thierry

From: Colmar, France

Joined: 12/31/2007

I played it and found it very well playable. And what I found especially pleasing, is the fact that it does not feel like many other designs made by engineers without knowledge about the musician's needs. As a musician, I don't care about what's inside, I see how it feels when I play it. What I felt was a nice pitch range, unnoticeable latency when transitioning from one tone to another, a decent tone spacing, an acceptable volume response, and a nice tone. At no moment, I felt the potential constraints of a digital design, although I was very skeptical. It felt light years better playable than every other <100$ hardware cost design I've ever seen. Thus, why should one want to cut down or simplify it?

The heterodyning is not overcomplicated. It is (in every theremin) very important to have identical circuits for the fixed and variable oscillators because every oscillator has more or less (thermal) drift. Using identical circuits makes that they drift together and that the difference frequency obtained by heterodyning will not reflect the drift. Obtaining the audio sample rate from the fixed pitch oscillator by dividing it down and feeding it as an hardware interrupt will also contribute, not to the absolute, but the relative (and thus audible) stability.

To get the same good audio quality via PWM, you'd need to output at least a 12 bit value at a sample rate of about 32kHz. That means that the PWM timer clock had to be 4096 x 32000 which makes 128MHz. The Arduino which can do that has still to be born...

Posted: 3/4/2015 2:20:36 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"b) what is left can be seen (e.g. for pitch oscilator) simply as a sample at 500khz of pitch variable oscilator. That is, no matter how the hetherodyned frequency is measured or processed, the resolution limit of the "digital hetherodyne" is one 500khz cycle. Thus, one could skip altogether the d-latches and, instead of generating 500Kz, just "sample" the VO at 500khz. The result should be of course treated just as today is (pondered-averaging and so)."  - 3.14

I haven't looked into the new design very closely but what you are describing sounds reasonable in theory.  Make the internal heterodyning frequencies adjustable and you could get rid of those pesky (drifty?) capacitance trimmers too.  Calibration could be entirely in software, with one crystal driving the whole mess.

"c) I feel like we don´t really need a DAC and we just could use pwm and a low pass. This, I'm not THAT sure."

As Thierry points out a first order modulator would have to run pretty fast to get sufficient resolution.  A second order could run slower.  Higher order modulators need wide accumulators and start running into stability and output swing limitations.  An R2R ladder DAC hanging off of some pins might work.  You could also combine a MASH modulator with a small R2R DAC, though there might be trimming problems.  That said, if a real DAC is inexpensive, then that's probably the way to go.

"So the Open.Theremin could "evolve?" to a couple of VO and the arduino (and then the output analog stage)."

To my mind, what's holding back the Open.Theremin is the asthmatic Arduino processor - it just isn't up to much and is being taxed beyond its limits in this application.  With more horses you could do a lot more.

Posted: 3/4/2015 8:38:21 PM
elmo7sharp9

Joined: 10/11/2012

 

1) Is it playable enough?

It auto-tunes to your position on power-up. You set the sensitivity of each antenna by your positioning, 3 seconds after turning it on. The claims for Pitch Linearity are absolutely true (It's a bit TOO linear for me - I've adapted slide-guitar technique to the guitar-like exponential scale of "bad" theremins).

With sneaky positioning, I can get a 6-foot pitch field that spans zero Hz up to Ultrasonic.Sometimes I stand ultra-close at autotune-time to get the "Clicks to sub-bass" range into my normal playing field. I have added a switch (It just interrupts the positive supply line) to allow me to force a re-tuning at any time.

Volume sensitivity is also tuneable in the same way.

2) ...I don´t see any problem in generating the 460/500khz with reasonable precision. 

Stealing processor time from the scanning function may not be possible.

There's plenty of Program Memory space left (Even with the latest 8-wavetable firmware), but I don't know if there's spare processing power to do much more. and what would you be saving in hardware? A couple of crystals, a couple of SMD divider chips...  pennies !

 

c) I feel like we don´t really need a DAC and we just could use pwm and a low pass. 

Processing power is insufficient for THAT function.

 

Some things I've discovered:

Just like all other theremins, it needs re-calibrated (by screwdriver) once it's inside a case and mounted on a microphone stand. The calibration is easy. For Showbiz reasons, I'm using ridiculously large (100cm) antennae and I can STILL tune it in. 

The Arduino accepts a 2.1mm centre-positive power jack - this is the opposite polarity to my guitar pedals, so I have swapped the wires on their journey to the 2.1mm jack I've mounted on the casing.

The Arduino is a negative-earth circuit, so I can daisy chain the Open Theremin.UNO from the same power supply as my pedals without fear of smoke and fire when their signal cables meet. There... one less wall-wart!

 

The latest "Extended" firmware reads a couple of pots with each position-scan. One pot acts as a selector for the current Wavetable (USEFUL!).The other pot is used to scale the ADC output volume - it'd be more effective to just use that same pot as a voltage divider on the output (No code overhead, and guaranteed zero noise at zero volume).

There are plenty of spare I/O lines on the Arduino - I'm planning to add a set of LEDs to indicate which wavetable is in effect (Code overhead is small, costs 8 LEDs and 8 resistors...).

Because there's plenty of Program Memory space left,

I'll be looking into developing deliberately ugly waves to supplement the tasteful examples already available

(I'm interested in seeing what can be got out of defining just one cycle of a waveform).

 

This instrument cost me far less than the inferior instruments I'll now be selling on...

 

 

Posted: 3/4/2015 8:41:57 PM
3.14

From: Buenos Aires, Argentina

Joined: 9/14/2008

Thank you for your answers!

Thierry: glad to hear that this is a playable theremin.

 

It is (in every theremin) very important to have identical circuits for the fixed and variable oscillators because every oscillator has more or less (thermal) drift. - Thierry

I guess this cannot be the design reason in open theremin, because the reference oscillators are crystal-based, and the variariable ones are LC. So very different oscillators, but I might be wrong... 

I see your point about low cost, but if it can be simplified, why not?

 Make the internal heterodyning frequencies adjustable and you could get rid of those pesky (drifty?) capacitance trimmers too.  Calibration could be entirely in software, with one crystal driving the whole mess.- dewster

This is a very nice idea, why not trying it!

On the other hand I agree with both that a cheap external DAC may be the cheapest way to go.

Also I agree Arduino might not be a very good idea for this application, and a dsPIC could be much more relaxed...

 

Posted: 3/4/2015 9:04:02 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Again without looking into things very deeply, it's my feeling that the Open.Theremin Vackar oscillators have way too much capacitive padding at the antenna, and this could be hurting voltage swing and SNR.  I'd try smaller C with a capacitive divider (to lower C and protect the inverter input) and increase the drive resistance to maximize swing and Q.  I would also put a resistor in series with the inverter input to help protect against ESD.

Posted: 3/4/2015 9:39:44 PM
gaudi

From: Switzerland (CH)

Joined: 8/6/2010

Thank you for your ideas and comments. I was almost feeling a bit lonely with the project, mainly focusing on keeping up my small production :). The basic idea of the open theremin is to build the best playing experience with least complicated circuit possible. And the open design is meant for everyone to suggest improvements or improve on it. I went through several iterations and stripped down as much as I could (without compromising or even improve quality). The heterodyning I found to be very basic to a theremin and even with a faster processor than the arduino not easy to eliminate. On version 2 I introduced the D-Flip-Flop mixer, I call it  digital mixer. This eliminated a lot of parts and works very well. The DA was added later (first I used PWM). The sound is much better and in version 2 control voltage is also generated through the DA. Some users are asking even for 16bit and a second DA converter. The fixed frequencies would be nice to generate by the arduino. Unfortunately I think there are not enough timers. I even generate the 32k sound sampling timer with the external clocks. I will definitely try again to simplify. Thanks also to elmo for the positive feedback, this keeps me going. And of course to dewster, and Thierry for your technical expertise. I definitely need to test your suggestions for improvement on the oscillators. I am in talks with Coralie from the NODE festival, maybe we can setup a temporary theremin lab there and work together on new ideas...

 

Posted: 3/5/2015 12:33:15 AM
xtheremin8

From: züriCH

Joined: 3/15/2014

hi all, i don't understand much of what you guys talk technically, but to have one button to do calibration is minimalism how i like it. it takes some approaches first time but then it's nice to play with. the basses are great. it's a bit shifting over a longer time. as it is with theremins. what drastically simplified should get is that %#*£ wave programming. that remains as a book with seven thousand seals to me. i get the basics but i miss some graphics to do that. like drawing a waveform on a x/y surface instead of typing billions of numbers into a list.

some local best wishes to urs.

Posted: 3/5/2015 7:04:11 AM
gaudi

From: Switzerland (CH)

Joined: 8/6/2010

Ha, nice comment. Yes, the software I think is the biggest potential for new functionality. Wave form editor is definitely on my list. 

Posted: 3/5/2015 8:59:07 AM
Thierry

From: Colmar, France

Joined: 12/31/2007

I see no need for a wave form editor. Every continuous and periodic wave form can be described by a function, be it trigonometric, polynomial, exponential, rational, or a combination of these, as the Misters Laplace, Fourier, Padé, and others have shown more than a century ago, so this is common knowledge.

Here's my approach: Define the function equation of your desired waveform, write a short separate sketch which outputs the needed and scaled values in a loop (all in the setup() function, let the loop() empty) and in a formatted way (adding semicolons or colons and new lines with Serial.print and Serial.println), so that you can copy and paste the wavetable values from the serial monitor of the Arduino IDE directly in the corresponding file. Then compile the open.theremin sketch again including the new wavetable(s), upload it and you are done. *sing* It's so eaaaaasyyyy *sing*

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