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

Posted: 6/28/2018 5:48:45 PM
tinkeringdude

From: Germany

Joined: 8/30/2014

Here apparently someone did BLEP on a small arduino with no HW divides, using tables.
https://github.com/ErroneousBosh/slttblep

Someone (mailing list) commented that there's still some aliasing, attributing it to the low resolution of the table values.
More of a proof of concept. Maybe interesting.

As for boring basic waveforms, there's stuff like modulating the waveshape, or with a modulator, adjust blending of waveforms, and such.
Oh, and, of course, using more than one oscillator per voice, and modulate them differently, can yield funky overall tone.

I'm not so much into electronic dance music with regards to synths or otherwise (sometimes it's ok), more when prog rock/metal bands are using them or fusion jazz and what have you.
Heh, or why not play a Minimoog, and an organ, in a church? (not showcase of interesting filter usage, just popped into my mind)
https://www.youtube.com/watch?v=YeHaO1bF8Ng

Posted: 6/28/2018 7:23:26 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"Here apparently someone did BLEP on a small arduino with no HW divides, using tables.

Someone (mailing list) commented that there's still some aliasing, attributing it to the low resolution of the table values.
More of a proof of concept. Maybe interesting."  - tinkeringdude

Thanks!  Overlapping tables are one way to do BLEP, though they reportedly need a certain level of precision.  And I too can hear (and see) the aliasing products in that example, as they are only 30 something dB below the fundamental.  I've been studiously avoiding tables as they gobble up the very limited memory I have in the FPGA.  Though it requires a reciprocal, Poly-BLEP is likely more efficient, and the simple poly fractions are actually shifts and multiplies.

Posted: 6/28/2018 11:24:36 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Fun With PM

Played around today with several configurations of the PM oscillator (separate phase accumulators, cross coupled accumulators, etc.) but I keep coming back to what I've been using.  One interesting thing is to make the phase multiplier panel control a fixed point decimal.  You can get a lot of different FM kinds of sounds this way, and they're fairly free of aliasing.  Here's me steadily increasing the multiplier from 0 to 4.0 (link).  0 gives sine, 1 gives ramp, 2 gives square, and higher numbers give wilder metallic sounding harmonics.  Multipliers with fractional components give fuzzier sounds due to the harsh reset of the phase modulating wave.  You can see from this humble example how the DX7 rose from the swamp.

Giving more thought to vocalization also.  Tried using filtered noise as phase modulation, but it wasn't spectacular.  I'm thinking one should put a lower limit on the oscillator frequency, and somehow statistically take out or modulate entire cycles as the pitch number approaches it.  There are many ways the voice goes from breathy to oscillating and back, I suppose I should pick one and attack it.

[EDIT] OK, I didn't like the fuzzy sound of the values in-between the integers, so I removed them and the multiplier control now just goes from 0 to 8.  It's interesting having a simple process like this dictate what the available base waveforms will be - kind of hard to argue with, and they probably aren't something I would have thought of on my own.

Just posted my version of Ave Maria over on another thread, thought I'd stick it here too (link).

Posted: 6/29/2018 12:53:07 AM
oldtemecula

From: 60 Miles North of San Diego, CA

Joined: 10/1/2014

Hello Theremin Enthusiast,

Ok, four shots of Scotch before I write this, maybe six?

dew this service you use to post sound tells me how I am all infected with virus shit.

Anyway I do enjoy when you post sound instead of all that theoretical stuff that 99.9% of all people who view your post do not understand. I have noticed plucking a sound will always sound better than continuous sound like that found in a theremin.

Sometimes you do impress me, most of the time well……….. from you I always expected more.

Christopher


Posted: 6/30/2018 3:15:21 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Another Hat to Wear (Light Under a Bushel)

It seems to me that any serious and dedicated designer / builder of Theremins, or any new / obscure musical instrument for that matter, simply must learn to play the thing at an intermediate level minimum, and whether they want to or not.  It's chicken or egg, so someone's got to get the ball rolling.  Theremin himself must have been acutely aware of this.  

I thought there was enough critical mass out there in the way of professional players demanding a "better" instrument (in terms of linearity, stability, pitch feedback, simplicity of setup, voices, etc.) that several would be beating on my door by this point, but alas that isn't the case.   I speculate the lack of spontaneously expressed interest from professional players is due to several things:

1. I don't have a nicely packaged instrument for ready sale;
2. I'm presenting my (necessarily technical) offering in an extremely technical way; 
3. I'm somewhat blind to this, but I'm doing my best not to hype it (and hype seems to be the norm);
4. There just aren't all that many players out there; 
5. With the advent of social media, TW and sites like it have unfortunately become a bit of a backwater.

So I'm practicing when I can, and am slowly getting to the point where I'm able to showcase the various features without instantly giving myself (nor others, hopefully) a headache, or otherwise wincing all the way through the performance.  My wife (an often unintentional audience) has been quite encouraging, and I'm hoping we can do duets soon.

If you're on a similar long-term development path, use the feature trial times as practice time and you'll be killing two birds with one stone.  Though the danger here is becoming too accustomed to things that need fixing / attention.  Practice, practice, practice...  and then you can be the best advocate for your creation.  And the better player you are the better designer / builder you'll be.

Posted: 6/30/2018 6:37:16 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Even More Fun With PWM

After limiting the multiplier to integers, I decided to try "filling in the blanks" between the decimals with a decoupled phase accumulator.  This gives beating sounds and such which can be fun to play with.  And then I piped the volume axis over to the multiplier to make it more interactive.  With this setup lowering the volume lowers the harmonic content and lowers the harmonic multiplier frequency.  If anyone wants a diagram I'll post it.  Anyway (MP3).

And seeing as how it's nearing the 4th, a patriotic ditty (MP3).  Literally the first time I tried it, by ear, first take (sorry!).

This stuff is kinda fun and all, but there's only so much you can do with two interconnected sine waves, and I'm much more interested in real sounding things like human vocals, violins, bells, etc.

Posted: 6/30/2018 10:51:27 PM
tinkeringdude

From: Germany

Joined: 8/30/2014

Though the danger here is becoming too accustomed to things that need fixing / attention.

Oh yeah! If one has thought up something oneself, or it's something lower on the priorities list but one still comes in tough with it all the time when trying out other stuff that can't easily be separated from it, one may develop an intuition for the thing and it doesn't feel like it's all that bad, and if one has not documented this and looses awareness, then may end up with a product the developer(s) find really intuitive, but most of the target audience does not

We had this a couple times at the old place I worked at, at some point freelance testers would be hired in certain intervals, and most importantly, fresh people, and no one involved in the development was counted as tester except for blatant defects. That did help to find some things.
Also, in games development, it's a routine thing.

I have seen a couple of younger people showing their theremin playing on youtube. Some of them aren't bad. Maybe they are more curious than players with strong opinions about what a theremin should be. If they're intermediate level and your device is less difficult to play, maybe they'll write raving reviews on some more fashionable sociel network thingy or whatever.

Is your prototype hardware expensive? If not too much, perhaps one of the reputable players would be interested in having sent a clone of your setup and give some feedback.

Maybe there is a dispersed "crowd" out there of people who find the concept of touchless playing kinda cool, tried it, and found it too hard. Could those be "lured" to back you in a, say, kickstarter, gofundme or whatever crowd funding campaign for the end product, and the top level backers, which are limited in number by your choice of how many "tickets" there are for that pledge amount, might get sent a prototype somewhere in between, and the cost of that is covered by the backing?

Just letting my thoughts run wild here
Doing something like crowd funding may also add pressure to this, of course, and if that'd take the fun out of it for you...

Posted: 7/1/2018 9:40:31 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"If one has thought up something oneself, or it's something lower on the priorities list but one still comes in tough with it all the time when trying out other stuff that can't easily be separated from it, one may develop an intuition for the thing and it doesn't feel like it's all that bad, and if one has not documented this and looses awareness, then may end up with a product the developer(s) find really intuitive, but most of the target audience does not" - tinkeringdude

I like to think I'm fairly tough on UI, eliminating every knob I can, naming parameters clearly, laying out the menu pages logically, etc.  But I'm sure I need more eyes on it to point out things I'm missing.  I mean, those crazy Yamaha UI's probably make sense to someone.

"I have seen a couple of younger people showing their theremin playing on youtube. Some of them aren't bad. Maybe they are more curious than players with strong opinions about what a theremin should be. If they're intermediate level and your device is less difficult to play, maybe they'll write raving reviews on some more fashionable sociel network thingy or whatever.

Is your prototype hardware expensive? If not too much, perhaps one of the reputable players would be interested in having sent a clone of your setup and give some feedback."

That's a good point.  Maybe aim for newer, younger players rather than the establishment.  A bare-bones enclosure prototype in "tupperware" would be pretty cheap, maybe $100 or so in parts, though cheesier housings might not survive shipping so well.  Probably a bit over $200 in better cases with rubber ball joints.  Once the software settles a little more I'll start on the PCB layout.  Enclosures have been and remain a problem.

"Maybe there is a dispersed "crowd" out there of people who find the concept of touchless playing kinda cool, tried it, and found it too hard. Could those be "lured" to back you in a, say, kickstarter, gofundme or whatever crowd funding campaign for the end product, and the top level backers, which are limited in number by your choice of how many "tickets" there are for that pledge amount, might get sent a prototype somewhere in between, and the cost of that is covered by the backing?

Just letting my thoughts run wild here
Doing something like crowd funding may also add pressure to this, of course, and if that'd take the fun out of it for you..."

Yes, a real possibility I should look into more, though every time I watch one of those ultra glitzy videos I get a little nauseous (e.g. the Roli Seaboard - urp!) - too much of the budget dumped into hyping a bad idea / mediocre hardware.  I'd rather do one-offs like a guitar luthier but maybe that's not realistic.  Crowdfunding seems like a lot of pressure, it's shit or get off the pot time, which is maybe good/bad.

=================

Spent some quality time with the new oscillator, trying to figure out what waveforms are naughty / nice, and how to select them (surprise!: the nice ones are integer multiples of the fundamental).  With decoupled phase accumulators, the lowest frequency one determines the fundamental, so I'm thinking of dealing with that more directly in the design and UI.  The secondary (phase modulator) oscillator, when set below the fundamental, causes peaks in the harmonics which track (meowing).  Over a limited range (~1 octave or so) they can give "poor man's" formants, which is a little counter-intuitive to me. However, real (relatively) fixed formants easily beat it in terms of realism.

Had a visit from 2001 Hal today (MP3 - no formant filtering, just the new oscillator "in the raw").

Posted: 7/2/2018 6:17:39 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

PM Oscillator - 99% Finalized

Spent even more quality time with the PM oscillator today and think it's mostly put to bed.  It's back to a single phase accumulator as I didn't find fractional beating multiplier values all that useful musically.

As usual, the harmonic parameter controls the amount of harmonics (slope / how quickly they drop off).  I've got the multiplier parameter now going from -8 to 8 (integers).  0 gives a sine wave, positive values multiply up the phase accumulator feeding the sine PM function, negative values multiply up the phase accumulator feeding the base sine wave that gets phase modulated.  This way the register (i.e. octave being played) stays constant regardless of the multiplier setting, and similar sounding settings are grouped together.  Both of these features are quite handy and welcome.

Here's a sample: (MP3).  It starts off switching through increasingly positive multipliers, then increasingly negative.  Then I turn the harmonics down and play a bit of a tune with a rough female voice via mult = -2 and no formant filtering, then a rough male voice with mult = -3 and no formant filtering, then a proper female voice with mult = 1 and formant filtering for comparison.  Then some sweeps with increasing positive multipliers, then increasingly negative.  Notice that negative multipliers increasingly accentuate the higher harmonics, giving moving/tracking "poor man's" formants, or that classic "meow" sound.  Fixed (or nearly fixed) formants are clearly a much better way to do realistic vocals.  Note also that the multiplier values of +1 and -1 both give the same waveform and therefore identical sonic result (just the way things worked out, though this forms the basis of the two natural progressions).  On the negative side all harmonics are present, on the positive side all are present for mult = +1, but some start going missing above that (e.g mult = +2 gives only odd harmonics).

I believe synthesists used to go for this kind of thing (i.e. harmonic shaping via waveform) more when filters were prohibitively expensive in hardware or software.

Next I intend to work on the volume axis modulation of the harmonic content a little more.  The modulation code (pitch and volume axis numbers influencing performance parameters) has been significantly more tedious than I expected.

[EDIT] With mult = -5 it does a pretty realistic helicopter sound: (MP3) - so the meowing is good for something! (other than cats fighting)

Posted: 7/2/2018 9:49:06 PM
tinkeringdude

From: Germany

Joined: 8/30/2014

Hehe, nice rendition of bicycle for 2

Hah. I just remembered now... around the beginning of the new year I was playing with simple speech synthesis.
Alas, I'm no further by now than I was. New year I was temp. unemployed, but no longer, so far less time
But I did a quick hack job in stringing phonemes together, changing pitch and everything with a frickin windows gui timer, which is why it's so horribly inaccurate. Also, there is no morphing between phonemes, much less a realistic one, and some of the consonants (esp. noisy fricative ones) are really badly set up.
Nonetheless, I was having some fun the last day or so I worked at this, to hack this together:

Note: the melody was an extra bad hack - oscillating filters that my experimental app happened to provide in abundance  So it's basically a bunch of sines, which can sound really nasty, interspersed with saying from... well if you watched MTV in the 90's, you know what.
one two three...

Ok, and of course, I had to try this... The transistions are so bad that it sounds like some freakazoid steampunk robot, you can hear the valves plunging sometimes... But it gives me a vision of something to continue work on some time
not quite Maria

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