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

Posted: 2/4/2020 5:06:25 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"What is the advantage of the other two over PWM for this use case?"  - tinkeringdude

To shake up the rhythmic nature of the PWM so that it looks more like noise to the pitch and volume fields.

Along with pseudo random bus timing going to the LED tuner in the FPGA logic, I use thresholded pseudo random noise in the software to do the LED PWM itself.  This makes everything (short and long cycles associated with LED tuner operation) as stochastic as possible.  You literally can't be too careful with these tender-assed C fields.

Posted: 2/4/2020 5:16:47 PM
pitts8rh

From: Minnesota USA

Joined: 11/27/2015

1)  FWIW, I never saw any need or use for the encoder mute once the pin mute became available.  Nor have I ever used a per-preset mute.  A dedicated mute switch with a "mute active" LED is nice to have.  Maybe the encoder mute wouldn't be missed if it was ditched?

2)  How about a simple pot-controlled LCD dimmer, and keep the FPGA out of it?  It's nice to not have to spin through menus to find simple functions like this that really need to be on a knob anyway.

BTW, I'm thinking about using latching or momentary capacitive touch switches for mute, store and acal function buttons.  Either that or miniature momentary spring loaded toggles for the store and acal.  I'm finding any pushbutton to be annoying to use on a mic-stand mounted theremin.  Encoders are fine, as are toggles, because the forces don't set the theremin in motion, but I always feel that I need to grab something on the theremin with my free hand to brace it when pushing a button.  I had a touch switch for mute on my bench EW for over a year and I really liked it.  I just ordered a batch of 10 to try out on this next D-Lev.

Posted: 2/4/2020 6:21:20 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"1)  FWIW, I never saw any need or use for the encoder mute once the pin mute became available.  Nor have I ever used a per-preset mute.  A dedicated mute switch with a "mute active" LED is nice to have.  Maybe the encoder mute wouldn't be missed if it was ditched?"  - pitts8rh

Yes, mute is such a fundamental thing it really should have it's own dedicated control, like analog volume.  If there is an analog volume knob then one could also deal with mute in the analog domain, but that is complicated by having 4 channels to mute.

I guess I'm still operating under the much earlier principle of "no extra controls if they can be avoided!" and that really isn't such an overriding concern anymore.  I'll go ahead and make the encoder mute global rather than per-preset, with an eye towards perhaps removing it altogether at some point.

"2)  How about a simple pot-controlled LCD dimmer, and keep the FPGA out of it?  It's nice to not have to spin through menus to find simple functions like this that really need to be on a knob anyway."

Well, there's an encoder free on the "TUNER" page, and that's where you would go to adjust the tuner LED brightness...

"BTW, I'm thinking about using latching or momentary capacitive touch switches for mute, store and acal function buttons.  Either that or miniature momentary spring loaded toggles for the store and acal.  I'm finding any pushbutton to be annoying to use on a mic-stand mounted theremin.  Encoders are fine, as are toggles, because the forces don't set the theremin in motion, but I always feel that I need to grab something on the theremin with my free hand to brace it when pushing a button.  I had a touch switch for mute on my bench EW for over a year and I really liked it.  I just ordered a batch of 10 to try out on this next D-Lev."

Yes, the encoder pushbuttons are quite stiff, requiring a fair amount of force to actuate, so replacing / doubling their functionality with lighter touch switches makes sense.  The junk RS pushbuttons I just installed are pretty light touch, though I put the heaver to press one on the preset write so as not so easily accidentally initiate that.  I'm not sure you would want a touch switch on the preset write?

[EDIT] So here is the mute logic I'll implement, where the GPIO pin is the dominant state, and mute follows the encoder state:
1. If the GPIO state is mute: set encoder state to mute and do mute (encoder state and mute follow GPIO current state for mute).
2. If the GPIO state is changed to unmute: set encoder state to unmute and do unmute (encoder state and mute follow GPIO delta state for unmute).
3. If the GPIO state is unmute and encoder state is changed to mute: do mute.
4. If the GPIO state is unmute and encoder state is changed to unmute: do unmute.

Posted: 2/7/2020 12:42:45 AM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Flammable Warm-Blooded Egg-Laying Vertebrates Characterized By Feathers And Forelimbs Modified As Wings

Here's the D-Lev violin patch doing the snippet of George Gershwin' "My Beloved" that Valery plays in his recent Phoenix video, with no accompaniment, in 3 descending registers, raw output with no processing or reverb or anything (though the resonator is in pseudo stereo mode): [MP3]

I've heard this piece before so it is somewhat familiar, though I've never played it on anything until just now.  The first register is the one used in the video.  I believe the third register goes a bit below that of a real violin.  I'm smearing the notes all over the place, they would sound better if they were hit more quickly and articulated with some volume hand.

I think my violin patch is a bit too resonant sounding, the locations of the resonant peaks are a little too obvious when stimulated with strong harmonics.  I worked for quite a while on a previous violin patch and got that ironed out, but I didn't record the details sufficiently in my notebook and unfortunately lost the patch during experimentation and development of the preset system.  (I still remember the sinking feeling I got immediately after rashly pressing the Stor encoder.)  A lot of it is how the inharmonic resonator is set, and the resonator itself has changed somewhat since then.  It was a tricky bop-the-gopher kind of thing, fix one region of notes and the region immediately above or below would go sour, etc.  And the overall tone and "hollowness" was in play during those adjustments too.  It's probably highly analogous to "tuning" the delays in a reverb by ear.

Posted: 2/7/2020 9:06:43 AM
pitts8rh

From: Minnesota USA

Joined: 11/27/2015

Okay, I want stereo now.  For unprocessed audio it sounds much better and hopefully will make pitch identification easier on strings. 

Posted: 2/7/2020 3:42:57 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"Okay, I want stereo now.  For unprocessed audio it sounds much better and hopefully will make pitch identification easier on strings."  - pitts8rh

Oh yes, you do!  It adds a ton of realism to the airplane and helicopter presets, and with it vocals are less boring to listen to.

Though it's a bit of a cheat for the string sounds as the inharmonic resonances in one ear are presented as dips in the other, and the intersecting phase (at the frequency in which the inharmonic resonator kicks in) is also opposite for each ear.  But I still prefer pseudo stereo for strings as it adds more liveliness than it takes away.

Presenting the Pitch Preview to both ears (though in mono) also seems like a big improvement to me.

Posted: 2/9/2020 6:47:19 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Monkey Business

(I don't know what song this is, it's not mine, found it floating around in my head.)

Posted: 2/9/2020 8:58:47 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Little Rascals

Started learning this just now, played it through maybe 10 times total. 

The theme to the show, done with muted trumpet voice, pseudo stereo, and a tad of Audacity room reverb: [MP3].

Posted: 2/10/2020 7:10:31 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"Perfect" Linearity - Does It Exist?

It seems there are many differing concepts / opinions of what might constitute "perfect" linearity.  I'm interested, what are yours?  I think we're all familiar with analog Theremins, where the pitch field tends to cramp up near the antenna, and again in the far field as it dives towards zero beat.  The middle zone of even a cheap analog can feel pretty linear, and the far field can be made more tractable for playing via oscillator decoupling (ESPE01 or YAEWSBM modules).  The addition of a series EQ inductor can help with near field cramping, but only so much.

My idea of "perfect" linearity is (obviously?):

1. one that corrects the above issues, and
2. specifically excludes body movement in the correction.  That is, I don't want to be required to move my body around in order to make one section of the field "feel" the same as some other section to my pitch hand.  I've seen this used as a playing technique and I don't want anything to do with it. 
3. I address the pitch plate directly or head-on, and not obliquely, so my ideal linearity would function in that scenario, but perhaps not others (though I have a hard time imagining how other scenarios are all that different, which is probably a lack on my part). 

But I believe that's about it in terms of playing technique and conditions.

Early on in my research I thought absolute response to hand position was critical, and I still think that.  Moreover, I've convinced myself (at least) that relative hand movements, such as the bulk open and closed hand, or the finer movements that make up an aerial fingering technique, should produce the same note intervals regardless of where they are played in a "perfect" field.  If you accept that premise (you might not!), then these relative movements form a way to directly test for non-linearity.  Does that make sense?

Here's a video where I demonstrate (yet again) the open / closed hand movement at various locations in the D-Lev pitch field:


I darkened it and removed the color so you can better see the pitch display. It starts out with an auto-calibration, with my right thumb pressing the new right pushbutton.  The sensitivity is set so that the open / closed hand gesture gives 4 half steps change in pitch, three of which cover an octave.  As I've stated (too) many times, this is also the sensitivity at which I choose to play the D-Lev musically.

Linearity is essentially constant all the way from touching the (insulated) plate antenna to my hand right next to my body. I'm bracing my hip against a table, trying to keep my body as immobile as possible, to keep it out of the equation.  The distance change from my hand to the pitch plate is greater than 0.6 meters.  Note that there isn't any squealing or abrupt non-linearity as I touch the plate antenna, if you couldn't see me touching it you wouldn't know that I was.

You can cheat in this sort of demo if you are so inclined.  Minor adjustments of the openness / closedness of your hand can improve the look of the accuracy, as can moving your body around slightly.  So I guess you'll just have to trust me when I state that I wasn't doing anything untoward (at least consciously!).

It's probably blindness on my part, but I can't see much wiggle room here.  If we all agree that analog near-field cramping exists, and that the null can be set so that the mid-field feels mostly linear, then it seems to me that we're all pretty much on the same page, and the rest is just nuance / personal preference / etc.  Please note that I haven't mentioned anything about antenna geometry here, which is a separate (though related!) subject.  And some people may actually prefer a non-linear pitch field, but I'm not talking about that either.  I'm talking about identical sensitivity to relative hand movements, and whether that is your concept of linearity.  Or not.  And if not, why not?

Posted: 2/10/2020 9:05:31 PM
tinkeringdude

From: Germany

Joined: 8/30/2014

What's that crackling on the audio? E.g. between 40..50 secs (and other places).

Is the presence of the monkey essential for optimal operation of the device?

I briefly thought about whether it could make sense to input a "hand stepped through the field" curve and make some kind of more finely tuned correction curve from that to even stuff out. But then it seemed surrounding conditions vary too much for that to be of long usefulness, and no good relation to the laboriousness. But what I thouhg is... if there was a remote-readable ToF laser range finder thingy, stationary, to point at the hand with 90° angled down pointing fingers, and the hand moves straight enough towards the antenna, and a foot switch triggers to store a {distance; pitch} pair...
https://www.amazon.com/Gowoops-VL53L0X-Breakout-GY-VL53L0XV2-Distance/dp/B07F3RH7TC

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