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

Posted: 11/24/2022 4:33:52 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

D-Lev Imitates Art

TW member (and D-Lev kit owner) RoyP kindly sent me audio samples of his Arthur Harrison 145 Theremin.  It took me several hours to mimic the sound with the D-Lev synth, but I think it turned out pretty close to the original, and I'm learning how to better approach these activities with every attempt.

Above is the librarian view of the preset.  The main trick can be seen on the FLT_OSC page, where a 2nd order semi-tracking notch filter places a double hump in the harmonics.  Fixed (pmod[0]) and perfectly tracking (pmod[32]) filter settings are generally pretty easy to figure out, but those in-between can take a lot of trial and error to get right.  I added a bit of volume hand harmonic modulation (0_OSC:vmod[8]) - it's my belief that timbre variation with volume is the main thing that makes a voice feel particularly expressive.

This is a mono preset, to make it stereo one would set RESON:mode[2] and RESON:xmix[8] or so.

As usual, for static analysis I used the spectral view in Audacity and Sonic Visualizer, and for real-time analysis I used Jaaa.  And ran into the usual audio weirdness in Linux, but finally figured out how to record without random tick sounds ruining it: open Audacity, then open Sound Settings (from the system tray) | Input | and move the volume slider a little.  Whew!

You can listen to the preset here: https://d-lev.com/audio/2022-11-24_since_i_fell.mp3

It's really interesting making D-Lev presets of other Theremins, and it's helped me appreciate the finer points of their sonic makeup.

Posted: 11/26/2022 6:19:01 PM
JPascal

From: Berlin Germany

Joined: 4/27/2016

It sounds clear and is a good clone, imho. Can you explain a bit that: "2nd order semi-tracking notch filter places a double hump in the harmonics".
 

Posted: 11/27/2022 11:53:59 AM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"Can you explain a bit that: "2nd order semi-tracking notch filter places a double hump in the harmonics"  - JPascal

Sure!  Here are the spectra of Harrison samples C4 and C6:

For C4 the dip is around 1kHz, for C6 it's somewhat higher, maybe 2kHz or so.  The fundamental has changed 4x, but the dip only about 2x, hence the "semi-tracking" behavior of the notch.  The D-Lev filter notch mode is kinda tricky anyway, as it's a combination of high and low pass, and the high pass isn't super well behaved in an analytical sense.

Posted: 12/3/2022 8:50:38 AM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Anti-Resonance

While researching violin resonance, I ran across the mention of "anti-resonances" in stringed instruments.  Seems there are deep troughs between some of the modes.  On the D-Lev I ran some noise thorough two bandpass filters in the formant bank and noticed some unexpected behavior.


Above: When the two formants are close in frequency they form what appears to be an anti-resonance between them.


Above: When the two formants are at the same frequency they seem to act like a single formant.

Curious, I modified the software to provide control over individual formant phase.


Above: When two out of phase formants are close in frequency the trough gap isn't nearly so deep.


Above: When two out of phase formants are at almost the same frequency the skirt is amazingly steep.

Overlapping out of phase formants produce what one might expect overlapping in-phase formants to produce, and vice versa.  Quite counter-intuitive, though I suppose it has to do with the phase of the combined skirts adding and cancelling.

You can listen to this effect here: https://d-lev.com/audio/2022-12-02_anti-reso.mp3.  In-phase first, out of phase second.

I'm hoping that this software addition might enable somewhat more realistic string presets.

Posted: 12/3/2022 3:43:38 PM
ILYA

From: Theremin Motherland

Joined: 11/13/2005

"noticed some unexpected behavior."

If you have two filters in parallel (in signal path) this is quite predictable. Beyond of resonance one filter produces the phase shift +90, the other does  the -90. Difference is 180 deg. which means  an annihilation.

The last case surprized me too.

Posted: 12/4/2022 11:07:43 AM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"The last case surprized me too."  - ILYA

It all kind of surprised me!  But, as you say, it makes sense when one considers the sign change of the phase on either side of the resonance.  I wonder if the ~simultaneous out of phase case has a practical filtering use case (outside of a formant bank)?  When the resonances are very close there is a definite attenuation going on, you can see this in the image and hear it in the audio, but it's a fairly narrow thing to hit right on, and any difference in gain will side step full cancellation, whereas the skirts being pushed way down is obvious when the resonances are fairly far apart.

I've played with the formant phases of a cello preset a little and need to investigate it more, but it seems to maybe ease some of the annoying "zing" during gliss and vibrato.  Some of this is due to the resonator fill though, where I believe the troughs are unavoidably equal to the peaks.

Posted: 12/5/2022 2:37:44 AM
ekahn

Joined: 11/2/2022

And ran into the usual audio weirdness in Linux, but finally figured out how to record without random tick sounds ruining it: open Audacity, then open Sound Settings (from the system tray) | Input | and move the volume slider a little.  Whew!

Q: Why did NASA put Linux on the Perseverence rover?
A: There's no sound in space!

/s But seriously, you might benefit from upgrading to some variant of Linux that bundles PipeWire; I've heard good things.

Posted: 12/5/2022 1:26:18 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"But seriously, you might benefit from upgrading to some variant of Linux that bundles PipeWire; I've heard good things."  - ekahn

Thanks!  Reminds me of this:

/s  It looks like Ubuntu picked it up, so it should be coming to Linux Mint soon (v21).  I was thinking I needed to switch to a real-time kernel, but the slider wiggle stopped it (I think the spiking might be samples going modulo and switching signs).

Posted: 12/18/2022 10:04:37 PM
ekahn

Joined: 11/2/2022

I assume folks have run into this before with other theremins, but if you're trying to record through an audio interface using a recent version of Windows with a new PC: it's worth going into the control panels - not Microsoft's Settings, but "Dell Control Panel", or the equivalent for the manufacturer of your computer, and if there is any sort of "AI Noise Cancellation Technology" enabled, make sure it's turned off. It basically filters out all theremin sounds.

Posted: 12/19/2022 4:55:35 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"...if there is any sort of "AI Noise Cancellation Technology" enabled, make sure it's turned off"  - ekahn

Wow, but typical.  My PC audio path could use a lot less in the way of AI, the dumber the better.  It seems all audio software have to do some kind of end run around the nonsense operating systems foist on us.

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