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

Posted: 5/23/2020 9:09:48 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Noise Modulation

Windowing (pulse width modulating, or "bursting") noise at the oscillator rate can make it more "well integrated" into acoustic voices.  Typical examples are the breath that escapes through the vibrating lips of trumpet player, the vocal chords of a singer, or the scraping of a cello bow across the string.  The phase is important, you want the start of the noise burst to coincide with the high harmonic content portion of the oscillator waveform (i.e. where the waveform has the highest slope).  Also important is the width of the active window, and to a lesser extent its envelope.

For weeks now I've been playing around with various approaches to noise modulation, and some seemed promising but all ended up dead ends until today.  What you need in order to do this sort of business is a waveform that is properly phased to the oscillator NCO with a stable amplitude, and I finally realized that the oscillator PM signal is the ideal candidate:

Above is the PM signal (post comb filter, pre harm attenuation).  When the harmonic content is zero you get a sine wave.  When the harmonic content is increased and the odd control is minimized you get a rounded sawtooth.  When the odd control is maximized you get a 2x frequency rounded sawtooth that is biased up.  I thought the -1/4 odd bias removal was important to the all/odd mixing, but now know that it isn't, and not removing the bias is necessary to obtain the above waveforms.  Notice that all waves touch the +1/2 point regardless of harm or odd setting.  If we invert the most significant bit this makes the wave unsigned and places the maximum at 1.  Inverting all the bits flips it down to the x axis, where we can apply gain to make it shrink or grow, and then use it subtractively (in the linear domain).


Above is the current noise modulation scheme.  The upper main section simply modulates the overall noise envelope with the volume and pitch axes.  The lower section is new, and uses the PM process just discussed.  We modulate the flipped PM signal with a knob that sets the static PM gain, and vary this with the volume axis number.  This is subtracted from the noise level, exponentiated, and used to finally modulate the noise level.

It's working well!  For the trumpet sound I can get that transition between just breath to breath and lips vibrating to all lips.  Will post a sample soon.

[EDIT] It can be a bit confusing switching between the linear and exponential domains, but it's nice to have that option, and you do indeed have that option when doing this stuff digitally.  Exponents and logs can be done in analog, but it tends to be a fiddly, expensive, temperature sensitive, pain in the ass.  So many things are much more straightforward to do linearly and then finally exponentiate.

Here's a trumpet sound with the new noise modulation: [MP3].  Pulsed noise is one of those "incidental sounds" that actually degrades the purity of the voice, but can add to the realism if not applied too heavily or robotically.  There are levels of usefulness to these sorts of things, guitar fret noise being somewhere near the bottom I suppose (though if you're on the fence about whether you're listening to a real or synthesized guitar, a bit of realistic fret noise might push you over to the edge, though a bit of fake sounding fret noise will definitely pull you back, and for good).

Posted: 5/28/2020 4:21:08 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Noise Modulation II

Much of this week was consumed with volunteering, but I managed to squeeze in some programming & experimenting time here and there.  When you change anything in the synth you have to try it out for a while, and if it seems like a keeper (or at least a better / closer) you usually have to go back and tweak the presets, and in doing so one gains further experience with the new normal.  With the noise scheme described in my previous post, I found myself fighting the "sizzle" sound of the very narrow pulse window, and wondered if P/V modulating the level of the window might be better, and realized this might easily integrate into the "drop" feature (where the noise level post knee is variable) when the pulse strength was set to zero.  Alas, I found myself fighting this arrangement too.  But in this whole process I noticed that the P/V modulation of the phase modulation signal itself (via P/V modulation of the oscillator "harm" value) was providing some pulse width control, and in a natural sounding kind of way that I didn't need to further axis modulate nor overly fight with in order to get it to blend in with the oscillator.  Here is this new scheme:


The only thing that changed here is the very bottom path.  Here is what is going on in that path in terms of processing:


Again, we take the PM signal from oscillator 0 and flip the most significant bit to go from signed to unsigned.  Then we invert all the bits to flip it, which puts the peak on the x axis (the x axis is point about which all multiplications "hinge").  Next we subtract the "duty" knob from it to move it down, then limit it to chop off the negative portion.  The result is multiplied by the "puls" knob value, which attenuates it as this is a fractional unsigned multiply.  Finally we multiply by 16 and limit again to chop off the overflow.  This signal is subtracted from the linear noise level, limited to remove negative values, exponentiated, with the result used to control the noise level.  The noise spectrum is then shaped via bass and treble tone controls, as well as a general 2nd / 4th order multi-mode state variable filter that follows (not shown).

Here's a very short demo of the new noise with the humming preset: [MP3].  I've got the noise turned up a bit more than normal to emphasize it.  The noise here is simulating nasal radiation.

It does a steam train pretty good too: [MP3].

Posted: 5/28/2020 10:05:05 PM
oldtemecula

From: 60 Miles North of San Diego, CA

Joined: 10/1/2014


What happened to theremin design? 

I always called your work gestural controlled sound effects. 
This is desired stuff, people want it, you are just in the wrong forum.

I mentioned the Wall-den you would hit head on long ago and my DSP knowledge is very minimal if any.

A beautiful theremin sound is a wave shape not a mixture of noise. 
I shared everything with you in public and private and you unfortunately have this huge blind spot.

Christopher

What is wrong with a photo-cell Volume Control? That is the level of most project builders. That is what that most beautiful sound byte of mine is controlled by. I will not post it in your thread, that would be just wrong.

Constructive criticism, you are just unable to hear the solutions I proposed.

Posted: 5/28/2020 11:31:18 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"I always called your work gestural controlled sound effects."  - oldtemecula

Sez the dude who pushes a photocell-based volume side...  and seemingly has nothing to do but criticize others.

Posted: 5/29/2020 4:32:26 AM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

The One True Way

I'm constantly amazed by the response and stability of the Theremin capacitance field.  Theremin's genius was in recognizing this and turning it into a new musical instrument.  Heterodyning is the simplest way to turn the C field into sound, but at the same time it is also quite confining from a design / playability / ownership standpoint.  If you only have a handful of active devices to work with (tubes, transistors) - as he did - then heterodyning is the only game in town.  But times have changed - indeed by many, many orders of magnitude - as very high speed transistors now cost literally nothing, and can be packed by the billions onto a single chip.  Analog methods to linearize the near pitch field are complex for the designer and can be particularly troublesome for the musician.  And no method exists (that I know of) that will alter the fundamental sensitivity of an analog heterodyning Theremin throughout the pitch field, without decoupling audio generation from the pitch field response.  Here we are, with the ability to improve this situation while retaining the fundamental mystery and beauty of the C field (keeping the baby while throwing out the bathwater) and some folk(s) (always with a vested interest) have the gall to holler stop.  There's room here for everyone.  If you have strong beliefs regarding what a "real" Theremin is, then great, play it, knock yourself out - I for one will be impressed if you can do it well, as I know how difficult it is to play the thing - and godspeed, live long and prosper, go in peace, I'm 100% behind you.  But for me anyway, it's all about playing the C field, and has little to do with exactly how nitpickily the audio is generated (though I very much enjoy playing basically different voices with the C field - a single simple voice, or small variations of it, can get old rather quickly IMO, and different voices encourage me to play quite differently).

"What is wrong with a photo-cell Volume Control?"  - oldtemecula

I don't recall Theremin ever using a photocell for volume control, so it's not a "real" Theremin if you do so?  (Forgive me if I've gotten this part wrong, I don't normally play this crazy game.)

Posted: 5/29/2020 5:56:45 AM
oldtemecula

From: 60 Miles North of San Diego, CA

Joined: 10/1/2014


dewster, being we are almost the only two left you must want a response.

When I created the groundwork of my research, in the beginning, I had never heard of Lev Sergeyevich Termen or Robert Moog, I was not out to copy someone. My goal was to use parts only found from Radio Shack for hobbyist to build with, this was to make something Brian Wilson demonstrated on some old TV talk show.

This is common knowledge to those that have been around for a while. I call my design the Phoenix Electrodeum, the word theremin is only used loosely so others understand the approach. Had I not found out about Leon Theremin at TW I might have thought I invented something unique. In a way I did.

My approach is completely original and yet every component Leon Theremin was very familiar.  My next eventual goal was how that Classic Sound comes about, which seems to be missing today. My engineer friend also does not understand it and calls it Voodoo. I am not imitating anyone and share what I have discovered freely with the theremin community, why? Because the work of Theremin and my stuff are so similar.

I design for the beginner, Jameco Electronics has had one of my Optical-Theremin designs posted for 15 years.

Today I am working with an engineer, had to give up on you. He has re-drawn my complete schematic, not an easy task, he needed one to think. I see it all in my head and only draw circuit boards, this is much quicker. One day you will study my work wondering how I got certain results. I think differently than an engineer and why I have accomplished something that was lost to time and computer modeling, now reintroduced in 2020. I had to join facebook a couple of months ago to find an audience and to leave my legacy. Your biggest mistake as I leave you, is you think you can change what 100 years of theremin culture wants.

Christopher

Advice: Because of facebook, TW at some point will go away. Jason has done this gift for us for more than half his life, 

- I thank Jason for his talent or my own original concept would not exist today -

If this thread of yours has value you need to start moving info to your own website. On my own website I have zip filed the best of the best so people interested can keep it on their own USB stick. When you code a webpage, do the links or jumps within your own pages so they can work outside of the internet. When possible do not use the internet protocol http://

Posted: 5/29/2020 2:34:08 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"One day you will study my work wondering how I got certain results."  - oldtemecula

I've studied your work wondering how you got "perfect linearity" results and it turns out you were just lying about it all along. 

"I had to join facebook a couple of months ago to find an audience and to leave my legacy."

God help them.  Your legacy is wasting people's time with your wild false claims and half-working voodoo circuits.

Posted: 5/29/2020 4:12:09 PM
JPascal

From: Berlin Germany

Joined: 4/27/2016

Dewster, the suitable noise-random pattern is a good task. What do you think is the mean parameter to be addressed, the loudness, the timbre or the pitch? Neither nor? Should the random value be added to the r.f. before mixing?

Posted: 5/29/2020 6:02:27 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"What do you think is the mean parameter to be addressed, the loudness, the timbre or the pitch? Neither nor? Should the random value be added to the r.f. before mixing?"  - JPascal

The main thing is: unless you are doing a steam train or angry wind type sound, noise is largely incidental.  For human vocals you don't need noise.  For breath driven instruments like clarinet, trumpet, etc. you don't need noise.  Surprisingly, even for a convincing human whistle you don't need noise.  So adding the noise is a very secondary type thing to do, and doing so realistically is difficult.  It's very easy to add noise to an otherwise good voice and have it sound less good / real (ruin it).  So the trick is to make the noise blend with the voice, and I've found having the start of the noise coincide with the highest harmonic features of the waveform to be least obtrusive:


The high harmonic content features are those which are the most vertical.  The start of the noise should be abrupt if the harmonic content of the waveform is high.  The envelope can trail off on the end, or perhaps not even fully turn off for certain types of sounds.  After the envelope and phase are correct, I still have to do a lot of filtering and amplitude modulation (with the pitch and volume axis numbers) to get the noise to blend in with the waveform.

I think the difficulty of integrating noise into otherwise pristine waveforms is why a lot of folks turn to physical models stimulated with noisy breath / noisy violin bow, etc.  It's been quite a challenge for me, and I still don't feel like I've conquered it.

Posted: 5/29/2020 9:45:59 PM
JPascal

From: Berlin Germany

Joined: 4/27/2016

I will also try something. Learning from the very old instruments, flutes without mouthpieces. There is more or less air flow that goes into and partly past the flute, making noises. Different overtones are excited at the same pitch.

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