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

Posted: 4/23/2020 6:26:33 PM
tinkeringdude

From: Germany

Joined: 8/30/2014

Synths like the DX7 have some iconic sounds which are not e-piano or bells. I think some bass sounds, and woodwinds, strings. But yes, also other percussives, like harp-ish sounds. (Enya? Later Vangelis?)
I don't know concrete examples right now, but I'll probably recognize it as "typically digital FM" when hearing.
Oh wait, random YT hits...
https://www.youtube.com/watch?v=gxi9Le5HsQw&t=11m13s

You can hear, in the shorter-enveloped sound in the mix, that it has a stronger resemblence to typical OPL3 sounds that Yamaha would like to admit, hehe, but DX7 generally sounds of higher quality.

Oh yeah. Now that I'd calla nice mix of typical FM sounds - also with bells, yes. But there's also the bass I meant, and the strings that don't sound typically subtractive-synth strings.
https://www.youtube.com/watch?v=z9KReAQy5V0


Note that FM was also done on early MOOGs by W.Carlos, analog. That can't be easy to get working, especially given the infamous tuning instability of those things. But it worked. So apparently, where was a drive to do it to get certain sounds. They are reminiscent of sounds one could get using hard-sync on oscillators, or some of those anyway. So, some gnarlier or nastier sounds, but they can be tamed and still retain some exciting characteristic that a vanilla subtractive setup won't do.

Then there's also the OPL3 chip, on the lower end of things - which does not prevent people who e.g. played computer games in the early to mid 1990s from having a certain fondness of the soundscape created by them. While sound design sometimes tried to roughly hint at real world instruments, the overall sound of it has its own charm. To some anyway.
Is that "useful"? To some. Probably more niche than DX7


https://www.youtube.com/watch?v=RJEEzj-UT5Q

Well. I like it.
EDIT: The vid description links to time sections, which often start with different kinds of sounds, sometimes not well timed so it's after 1..3 secs or so.

Posted: 4/23/2020 7:44:30 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"Synths like the DX7 have some iconic sounds which are not e-piano or bells. I think some bass sounds, and woodwinds, strings. But yes, also other percussives, like harp-ish sounds. (Enya? Later Vangelis?)"  - tinkeringdude

I'm listening to your first video (thanks!) and most of the sounds seem to heavily benefit from envelope attack / decay modulation, which the Theremin doesn't do so well.  And (just listening, not analyzing formally) most of the voices don't seem to have much in the way of non-harmonic harmonic content, but more suppressed / emphasized harmonics, which you can approximate if you have enough in the way of tracking notch and bandpass filters.

I guess I'm trying to suss out how much of a benefit FM might be to the Theremin, in the more traditional sense of playing melodies and such.  Early synthesis was really hobbled by a dearth of processing power, so they took what they could get, and pushed the simplest stuff to the max in order to squeeze anything interesting out of it.  FM is notoriously difficult to work backwards from a sound to a patch, and the majority of the settings seem to be along the lines of "alien invasion" rather than, say, oboe, or cello, or piano-like.  When not woo-wooing (which can be fun!) it seems the fixed filter sound is more useful when synthesizing real sounds, and tracking filters / FM more useful for "alien" type sounds.  I wonder if there could be much in the way of a middle ground to be mined here (alien bassoon)?

My objection to a lot of early synthesis at this point (where they are retro) is the sounds are highly recognizable, and often tied to cheesy implementations, such as the OPL3, which makes me cringe a little when it teleports me back to my 286 AT clone days.  A few fixed, moderately resonant filters on them would have gone a long way.

Posted: 4/23/2020 8:52:20 PM
tinkeringdude

From: Germany

Joined: 8/30/2014

Well. Sometimes, cheesy is just right. Whether it fits the humor of a not too serious adventure game of the 90's.
Or 80's pop music, or even some playful jazz?
https://www.youtube.com/watch?v=F3rrjQtQe5A

Edit:
Now while there are certainly a bunch of people who would appreciate the *option* of producing sounds like that,
I guess from a marketing paranoia angle, maybe what you don't want to see is somebody posting a YT video "check out my new theremin" and demo'ing such sounds, followed by a reddit or such post "listen to another ugly, typically DIGITAL sounding digital theremin, ugh!",
and suddenly, this one option of a sound is thought to be representative, fueling the sentiment propagated by our ugly-bird-guy.

Maybe that could be a reason to not "allow" sounds like that, IDK.
(unless there could be enough countering material visibly out there so one example of one least commonly liked sound would not have so much weight)

Posted: 4/24/2020 12:02:47 AM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Harmonic Rollercoaster

If you've ever looked at real-time FFT of a resonant source with changing pitch, such as the human voice or cello, you'll see the harmonics tracing out the resonant peaks - it looks a little like a roller coaster in action.  But if you look at a static FFT of a single note, the resonant peaks won't be nearly as obvious, as they are obfuscated by the harmonic peaks and dips of the source.

For the analysis of the resonant modes of real instruments, it may be possible to take a gliss or discrete run of notes and look at the FFT of all combined, and extract useful resonant frequencies and amplitudes from that.  The individual harmonic amplitudes might get smeared out enough to see the real resonances.

I did this in Audacity with some samples of a bassoon, with a 2 octave range from C3 to Bb4:

The first 8 significant peaks are at 507, 772, 905, 1186, 1318, 1993, 2957, and 3373 Hz.  The second peak is a bit below the others on the ski slope.  It's hard to know how much of the overall slope is due to actual diminished peaks, or diminished excitation, and this is a common problem with resonant analysis such as speech synthesis.

Anyway, I dialed in the frequencies and listened to the synthesized vs. real thing to approximate the amplitudes and Q's.  I adjusted the oscillator harmonic content to achieve the overall brightness, and added a bit of filtered PWM noise, as well as some envelope velocity.  It didn't need nearly as much odd harmonic content as I would have expected, on the order of that of a human voice.  Spent maybe half an hour doing everything, then recorded it to let y'all hear it.  I think it sounds fairly lifelike, and this patch might be a jumping off point for clarinet, sax, oboe, etc. [MP3]

Posted: 4/24/2020 7:55:58 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"Now while there are certainly a bunch of people who would appreciate the *option* of producing sounds like that,
I guess from a marketing paranoia angle, maybe what you don't want to see is somebody posting a YT video "check out my new theremin" and demo'ing such sounds, followed by a reddit or such post "listen to another ugly, typically DIGITAL sounding digital theremin, ugh!",
and suddenly, this one option of a sound is thought to be representative, fueling the sentiment propagated by our ugly-bird-guy."  - tinkeringdude

It's not so much a marketing or representational issue (though now that you mention it, that could be something in the back of my head) - what I'm trying to figure out how FM best fits into the overall D-Lev synth.

FM is a way to generate either fixed or tracking harmonic envelopes, but it's not super good at doing the fixed thing.  Filters perform much better here, and are much more intuitive to adjust to get the sound you want.  There's a "sameness" to the DX7 sounds that I find rather boring / fatiguing - and they are really aided by polyphony, as well as ADSR envelope modulation, which a Theremin type controller can't really be designed to handle nearly as well as, say, a keyboard type controller.

I never really got into playing electric guitar because acoustic guitars sound so much more "beautiful" and alive to me.  And I'm finding that I spend the majority of the time playing voices that are rich and "beautiful" sounding on the D-Lev (like cello, violin, muted trumpet, and human vocals).  So I'm questioning how much FM can provide the quality of sounds, or at least be the harmonic source of, the types of voices I'd like to play. 

I'm currently heavily employing simple FM (PM) technology to generate alias-suppressed harmonic content, and it's absolutely fantastic for that.  The basic PM unit can be seen as 1.5 or 2 DX7 type operators, and I'm using 3 of these (independent, non-intermodulating) to do all / odd harmonic mixing and for unison purposes.  Independent phase accumulators on all of the sine functions allows for wackier sounds, but this introduces phase locking / tracking issues when doing all / odd harmonic mixing that have to be addressed.

Anyway, from the 14 oscillator knobs, the volume, octave, harmonic level (+ vmod & pmod of this), and odd mix (+ vmod & pmod of this) seem most useful, and this is 8 knobs (though I don't actually use vmod & pmod of the odd mix for normal voices).  The next most useful 2 are the pitch spread and offset knobs (to do unison stuff).  Finally there are two harmonic multipliers, with common vmod & pmod, or 4 knobs to mainly do "UFO" type stuff.  It's all fine and everything, but maybe I'm missing some underlying generation opportunities to use the knob real estate better.  I mean, wacky sounds are fun, but are there some additional basic waveforms (from an accoustic instrument standpoint) that aren't being well covered?  (e.g. I would like to have a string sound with dispersion (increasingly sharp harmonics, like piano & guitar), but I believe that requires a tuned delay).

Posted: 4/26/2020 1:06:53 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

That Hammond Sound With 3 Oscillators

Semi-curious, so I'm looking at the technology behind the Hammond tonewheel organ, specifically the drawbar harmonics:


The numbers on them correspond to organ pipe lengths, which are proportional to the inverse of the frequency.  If you can't read them in the above pic, they are: 16', 5 1/3', 8', 4', 2 2/3', 2', 1 3/5', 1 1/3', 1'. 

If we think of 8' as the fundamental, and play an A2, or 110Hz, on the keyboard, then the drawbar frequencies are: 55, 165, 110, 220, 330, 440, 550, 660, 880 Hz. 

Of these, clearly 55, 110, 220, 440, and 880 Hz are octaves.  As are 165, 330, and 660 Hz, which are 5th type intervals of the fundamental.  Odd man out is 550Hz, which is a 3rd type interval of the fundamental.  Since these are sine waves, we can do octaves by simply squaring (with offset and gain).  So we could use three oscillators to do this: 55, 165, 550 Hz, and avoid a lot of sine polynomial calculations.  And we could use a second set to do chorus effects.

Not saying I'm going to do this for the D-Lev, but if I were, that would be my first stab at it.  One difficulty that I can see would be those high octave harmonics aliasing down once they pass Nyquist.  Another might possibly be granularity / distortion from repeated squaring, one might have to use something better than the 16 bit precision sine polynomial that I'm currently using for tone generation on the D-Lev.  A 16 bit sine takes 16 cycles to compute, a full 32 bit sine takes 26 cycles (the sine polynomial is really efficient!).

Before I did the above calculations, I was thinking one could do 9 sine oscillators via infinite Q filters.  Each filter would take 8 cycles, but would also require a 7 cycle second order polynomial for frequency correction.  So, if your processor has a hardware multiplier, you're probably better off going the direct sine polynomial route, followed by squaring to get the other harmonics.

Posted: 4/26/2020 4:17:09 PM
JPascal

From: Berlin Germany

Joined: 4/27/2016

These approaches to a complex matter are very interesting! It's good to see what your thoughts and skills are like realizing natural timbres. On a simpler technical base, with which I am dealing, the heterodyne theremin is also yet far from the end of the possibilities.

The Hammond organ has extrem manyfold timbres. The most common used is certainly 888 000 000. 83 4211 100 is the closest approximation available to a '1/n' harmonic series, while the second is 00 8030 200, an approximation to a '1/n' series with all the even harmonics missing, see this link: https://www.soundonsound.com/techniques/synthesizing-tonewheel-organs-part-1. Beginning with the sub-octave are there no 5, 7, 9, 11, 13-15th overtones.  

Posted: 4/26/2020 4:44:34 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

JPascal, thanks for that very informative article! 

The Hammond interests me more from a historical perspective, where necessity was the mother of invention.  Similar to the DX-7, the voices are dramatically spiced-up and made more lush via polyphony, envelopes, chorus, rotating speakers, distortion, etc.  They made some pretty wild claims about it replicating pipe organs that they (rightfully, IMO) got sued over.

Posted: 4/27/2020 10:21:05 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

The troll wonders why it's quiet around here after he ran everyone off.

Posted: 5/1/2020 9:10:55 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

FM (PM, actually) = PHAT!

OK, I've got a new multi-oscillator topology based on a somewhat modified phase modulation (PM) unit.  Each PM unit uses a single poly-sine, with squaring to get the octave above, and crossfading between these for internal phase modulation gives all / odd harmonic blends.  I implemented a new crossfade gain function to even the blend out (just a 3 opcode poly!) and cranked the gain on the lookup table (LUT) PM scaling to compensate.  Three PM units have their sine outputs and PM outputs all crossfaded, with the PM sum feeding another sine oscillator to give FM, and a final crossfade between the sine sum and PM sine.  Just 4 sine functions, with 3 squared gives 7 sines total, ~300 cycles (out of 450 or so max per thread).

The crossfade between PM sine and sine sum is the kind of thing I was searching for, mixing in the PM can give more harmonics and a big low end, and with some settings it can sound overloaded and compressed (though it isn't).  It can do an abbreviated Hammond sound too, but that's pretty boring sounding.

There may be a bit of tweaking, but I think the oscillator is now finished.  All knob functions are obvious, intuitive, and don't interact strangely.  I'll post some sound clips and diagrams shortly.

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