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

Posted: 6/5/2019 6:49:46 AM
Buggins

From: Theremin Motherland

Joined: 3/16/2017

Closer Violin
I think this is closer: [MP3]

Something is wrong with this file. Cannot play it.

Posted: 6/5/2019 2:11:57 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"Something is wrong with this file. Cannot play it."  - Buggins

Hmm.  I downloaded it to my XP desktop it plays fine with xmplay.  Here's what MediaInfo says about it:

Code:
General
Complete name                            : C:\Documents and Settings\demod\Desktop\2019-05-29_violin.mp3
Format                                   : MPEG Audio
File size                                : 963 KiB
Duration                                 : 1mn 1s
Overall bit rate mode                    : Constant
Overall bit rate                         : 128 Kbps
Genre                                    : Other

Audio
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 3
Duration                                 : 1mn 1s
Bit rate mode                            : Constant
Bit rate                                 : 128 Kbps
Channel(s)                               : 1 channel
Sampling rate                            : 44.1 KHz
Compression mode                         : Lossy
Stream size                              : 963 KiB (100%)

Maybe your player is having trouble because it's mono (not stereo)?  Anyone else having trouble playing my MP3s?

[EDIT] I think I've finally got it (not my best playing, just dashed this out as a sound demo): [MP3]

Violin is really tricky, you want a lot of HF resonances, but this can reveal the delay sound in the resonator.  The spacing of the HF resonances creates a vowel type resonance which is critical to the sound.  The phase inversion notch between HF and LF is super important for that "hollow" sound, though you don't want it to sound too hollow.  A big, wide 3kHz EQ "bump" is also quite effective at brightening it up: you also want it to suppress the bass a bit but you don't want to brighten the super high end, so shelving EQ doesn't work here.  I'm glad I added the crossfade mix to the oscillator and noise filters, as this enables many more EQ shapes / options.

Also with violin synthesis, I'm trying to fake the string resonance with a more resonant body and some envelope decay time, which isn't completely ideal.  And the bow on the string creates a noisy comb filter which I'm not addressing at all.  There's a bit of meowing / "swishing" with some note slur / vibrato that I haven't been able to completely tame, but overall it's not too bad IMO and quite playable.

Posted: 6/5/2019 8:05:59 PM
tinkeringdude

From: Germany

Joined: 8/30/2014

Foobar2000, VLC, Winamp play it, no probs.

Posted: 6/6/2019 1:30:21 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"Foobar2000, VLC, Winamp play it, no probs."  - tinkeringdude

Thanks for the sanity check!

Posted: 6/7/2019 9:55:01 AM
Buggins

From: Theremin Motherland

Joined: 3/16/2017

"Foobar2000, VLC, Winamp play it, no probs."  - tinkeringdudeThanks for the sanity check!

New version plays ok.

Din't you try adding automatic vibrato?
It could add some coloring to instrument voice.

Posted: 6/7/2019 1:47:18 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"Din't you try adding automatic vibrato?  It could add some coloring to instrument voice."  - Buggins

I did have an LFO in there for a while, but I found myself never using it.  And it complicated the modulation scheme, so I ripped it out (things have to earn their keep in the D-Lev).

One or more LFOs are pretty much essential in a highly static instrument like a keyboard, but the Theremin is such a dynamic instrument that it doesn't really benefit from auto-modulation (IMO).

The Theremin seems like a much more organic interface than a keyboard to control a synth.  I don't play keys (decades ago finished the first adult beginner Bastien method then quit - too many alternate keyboard ideas in my head made the piano layout seem too cumbersome and under optimized) but have owned several keyboards and rack synths, and none of them were nearly as fun as I imagined they would be, mainly I think due to a basic lack of controllability (coupled with my inability to play keys!).  The pitch bend and mod wheels just felt tacked on rather than integrated. 

Posted: 6/16/2019 5:31:58 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Further Adventures In Modulation

A somewhat intense couple of weeks of volunteer work plus my wife's group class and piano recital, all now in the rear-view mirror.  During that time I took yet another extended look at pitch and volume axis modulation of the various parameters, and as of yesterday I believe that's wrapped up now too.

I wanted some sort of limits to modulation of the parameters, particularly for the cutoff frequencies of the filters associated with the oscillator, noise source, and formants.  For insight into how to do this without adding a million extra knobs, I perused the manuals of some older keyboards (why re-invent the wheel?  This has all been done before, and often done better in the past).  The Yamaha DX7 in particular has global gains / limits for the various input devices (mod wheel, breath controller, etc.) which made me think this would be a good idea for the pitch and volume axes.  I decided to use low and high set points, where the low set point is some location in the field, and the high set point is a positive delta offset to the low set point.  If low + high exceeds the max then it just saturates.  This arrangement sidesteps the ambiguities of using two absolute position set points where the high point is set lower than the low point.  It provides a "movable window" where the window position and width are independently adjustable, which seems to me to be what you want to morph vowels and such.


The top series of graphs shows how how each axis output number is manipulated to implement the modulation source.  The low limit is subtracted from the axis number, limited to eliminate the modulo component, then thresholded with the high limit.  This global signal is then locally scaled via +/- pmod & vmod knobs, combined, and used as an offset to the filter frequency.  Since the global signal is unsigned the sign of the pvmod knob sets the modulation direction, which is mentally simpler than a "teeter totter" pivoted source situation.  And separating the global from the local in this way saves some cycles and code space.

The above works so well I spent several days applying the method to the other modulated parameters (oscillator harmonic level & cross-mix, noise level, pitch preview level) but ended up backing those out.  You really want a pivoted +/- modulation source - particularly so for the volume axis because the modulation is happening along with the volume dropping, and if it drops too far before the modulation happens you won't hear it.  This exercise wasn't all for naught though, as I ended up moving the pivot point closer to full volume where the change is more obvious, and I also made the offsets signed to further push the pivot point up if desired.  The offset and mod knobs are now scaled identically as well, where the offset covers +/-1 over a [-31:31] knob range and the mod knobs cover +/-2 over a [-63:63] knob range.  This process on the global side is shown in the lower series of graphs.  7/8 corresponds to -24dB on the volume axis and ~262Hz on the pitch axis, so those are the pivot points.

With this arrangement, a realistic level of human vocal harmonic content happens when both the vmod and harm knobs are set to 16, which is nice.  I don't know why (superstition?) but when useful parameter settings happen at 1/2 way (or other simple integer fractions of full-range) knob settings, I feel a little better about the whole wacky knob scaling scheme.  Though I suppose you want some optimal thing to happen around the middle of the range so you have room to push it either way and tune it.  (Bubble: Who can say?)

[EDIT] Just added three more knobs: n_en, o_en, and f_en to toggle between the upper type of modulation and the lower type for the noise, oscillator, and formant filters, respectively.  Turning them all off makes legacy presets (i.e. those created before yesterday!) behave correctly.

[EDIT2] And of course I just realized that I didn't actually change very much with the lower modulation method (just harm and xmix scaling), I'd just futzed around with it so much I'd just assumed something significant occurred in all the activity.  Never mind.

Posted: 6/18/2019 9:54:06 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

It's Mock-Up Monday Tuesday!

So I finally got around to making some mock-ups of the D-Lev cabinetry ideas floating around in my head.  Cue the pix (someone hit the lights!):


Above is the D-Lev tour in cardboard with horizontal large diameter tube antennas.  The box is 500mm x 160mm x whatever depth is necessary to hold everything.  I think the 160mm dimension would have to increase somewhat to accommodate the cabinetry material thickness.

Turnons:
1. Naturally ambidextrous, just flick an encoder and do a recal for southpaws.
2. Coils are somewhat away from the main human body mass.
3. Arm/hand positioning feels sorta OK.

Turnoffs:
1. Player has to really crick their neck to watch the tuner.
2. Tuner is rather distant from the pitch antenna.
3. Pitch coil is really close to the encoders.
4. Player has to stand somewhat off center and to the left to address it.



Above is a vertical version with the same box, and also with horizontal large diameter tube antennas.

Turnons:
1. Tuner is fairly well positioned for viewing while playing.
2. Arm/hand positioning feels pretty good.
3. Controls feel close enough.

Turnoffs:
1. Not ambidextrous.
2. Volume coil is pretty close to the main human body mass.
3. Volume coil is pretty close to the encoders.

I like the vertical version a lot more than the horizontal as the ergonomics are better integrated, but wonder if the volume coil being so close would be a killer.  On the prototype the volume plate and coil are pretty far away from my body, but still there is some interaction and need for the application of a moderate knee to hit the noise floor.  I must say that I don't like the idea of the controls being anywhere near the coils / antennas.  

I can see why Theremin stuck his stuff in large cabinets, but I'd rather avoid that if at all possible.  The D-Lev is composed of a lot of air, and it seems that requiring standard cubic cabinetry to properly locate and support the coils and antennas ends up adding excess heavy cabinetry to hold even more air.  What to do?

One could reduce the 500mm dimension somewhat and stick the coils at the base of the tube antennas, though that of course would reduce antenna surface area and therefore sensitivity.  The coils could be wound right on the PVC antenna tubes themselves, with a layer of aluminum foil for the antenna, and maybe even put the AFE in there somehow.  Not sure what to use for interconnect & physical support though.

I still have 8 of these plastic corners that would look pretty sharp on a "travel" version:

A removable lid could store the antennas, though making that deep enough for antenna stowing would increase overall bulk and weight.

Posted: 6/19/2019 5:07:46 PM
pitts8rh

From: Minnesota USA

Joined: 11/27/2015

I was confused at first because I thought that I was looking at PVC extension arms that would hold the antennas-until I saw that you were talking about tubular antennas.  That also explains the inductor locations.  I always jump to conclusions before I read - but you already know that .

I wouldn't be too worried about the volume inductor proximity to the electronics, at least until it proves to be a problem.  My new build has that inductor surrounded by electronics (avoiding the  magnetic flux hot spots of course) with no ill effects yet apparent.

A few thoughts on the tubular antennas.  First, with a cylindrical tube you may have good sensitivity but you lose the ability to change the response from gradual to sharp by moving your hand position between the top of a plate/loop to the edge, respectively.  A plate with one edge folded to a flange works pretty well, and playing from the flanged edge is similar to the edge of a traditional loop but with a little more sensitivity.  I move between top and edge of the volume loop all the time depending on how the volume envelopes are shaped.

Second, a horizontal tubular pitch antenna would be an absolute non-starter for me, and I don't think I would be alone - not necessarily because of the fatter tube aspect, but because of the orientation.   The constant-C (and constant pitch) surface contours are more spherical than cylindrical at close ranges than those a higher aspect-ratio antenna, but this in itself is probably not a huge adjustment for a player.  But a horizontally-oriented pitch antenna is going to feel substantially different at higher pitches, and seasoned player might not like the idea of having to change a playing style to adapt to a new instrument.  I had assumed all along that when you were suggesting a tubular pitch antenna that you were thinking vertically oriented.

Finally, and this is probably a minor logistical point, but large diameter, thin-wall raw metal is not particularly cheap for the retail buyer.  I suspect that the best thing to do would be to leverage some inexpensive chromed drain pipe or other home-center material that is prefinished and cheap.

On the up side for the second layout,  there could be advantages to having the volume antenna located closer to the body than the pitch antenna.   Even with the relatively cramped pitch fields of analog theremins it seems that it would be more comfortable to have the volume antenna a little closer in.  But with the ability to expand the D-Lev pitch field to a larger and more comfortable size, reaching for the volume can be more of a stretch than necessary.  My Subscope is often positioned at an angle to keep the pitch antenna further away than the volume antenna.

How about if we consider building you an open-faced prototype "breadboard" (like I suggested in the last email) laid out vertically like your second style?  With the ball swivels you could try antennas placed horizontally, vertically, or anything in between.  I could probably have some way of moving the antennas up and down the sides so that you could try staggered or inline positions too.  Think about it.

Roger

BTW, the best part of seeing other people's photos is looking at the background junk.  I like your collection of inductors past.  I see a Harbor Freight-type rubber squeeze bulb, the same Weller soldering iron that I have, and possibly a handheld receiver or frequency counter in the upper left. And of course the exercise ball. One must be careful what one leaves lying around!!!


Posted: 6/19/2019 6:20:04 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"I wouldn't be too worried about the volume inductor proximity to the electronics, at least until it proves to be a problem.  My new build has that inductor surrounded by electronics (avoiding the  magnetic flux hot spots of course) with no ill effects yet apparent."  - pitts8rh

I'm not so concerned about the volume coil proximity to electronics, but proximity to my hand when adjusting the encoders, and even moreso to my main body mass as I stand there playing.  I see some interaction on my prototype where the volume plate and coil are located pretty far away from my body.

"A few thoughts on the tubular antennas.  First, with a cylindrical tube you may have good sensitivity but you lose the ability to change the response from gradual to sharp by moving your hand position between the top of a plate/loop to the edge, respectively.  A plate with one edge folded to a flange works pretty well, and playing from the flanged edge is similar to the edge of a traditional loop but with a little more sensitivity.  I move between top and edge of the volume loop all the time depending on how the volume envelopes are shaped.

Second, a horizontal tubular pitch antenna would be an absolute non-starter for me, and I don't think I would be alone - not necessarily because of the fatter tube aspect, but because of the orientation.  The constant-C (and constant pitch) surface contours are more spherical than cylindrical at close ranges than those a higher aspect-ratio antenna, but this in itself is probably not a huge adjustment for a player.  But a horizontally-oriented pitch antenna is going to feel substantially different at higher pitches, and seasoned player might not like the idea of having to change a playing style to adapt to a new instrument.  I had assumed all along that when you were suggesting a tubular pitch antenna that you were thinking vertically oriented."

The horizontal pitch tube is for me, I assume most others would want a vertical pitch tube here for the pitch, and perhaps something different as well for the volume.  The antennas should be removable for travel anyway, so anything goes.

"Finally, and this is probably a minor logistical point, but large diameter, thin-wall raw metal is not particularly cheap for the retail buyer.  I suspect that the best thing to do would be to leverage some inexpensive chromed drain pipe or other home-center material that is prefinished and cheap."

I was thinking aluminum tape or some other conductive coating over plastic.

"On the up side for the second layout,  there could be advantages to having the volume antenna located closer to the body than the pitch antenna.  Even with the relatively cramped pitch fields of analog theremins it seems that it would be more comfortable to have the volume antenna a little closer in.  But with the ability to expand the D-Lev pitch field to a larger and more comfortable size, reaching for the volume can be more of a stretch than necessary.  My Subscope is often positioned at an angle to keep the pitch antenna further away than the volume antenna."

Yes, I prefer the antenna location ergonomics of the vertical mock-up for that reason.

"How about if we consider building you an open-faced prototype "breadboard" (like I suggested in the last email) laid out vertically like your second style?  With the ball swivels you could try antennas placed horizontally, vertically, or anything in between.  I could probably have some way of moving the antennas up and down the sides so that you could try staggered or inline positions too.  Think about it."

Thank you!  And that sounds very intriguing!  But I guess for ESD reasons I'm fairly against exposed bare conductors as antennas, which would seem to rule out conducting ball joints?  Even the mock-up tubes above would (in my mind) be covered in heat shrink, or located on the inside of an outer plastic tube.

As my musical and ergonomic instincts haven't been carefully trained on a conventional analog Theremin, I've been fairly free to experiment with these things for myself.  But of course this makes me somewhat blind to the needs of those who have developed their skills that way.  I'm certainly not interested in driving anyone away from the D-Lev by foisting my layout constraints on them with an iron fist.  But at the same time, if various things can be address and improved for those who are coming to the Theremin for the first time, well why not.  As long as there are enclosure build / SW options to satisfy most.  It seems like as good time as any to address these legacy aspects, which have fairly strong engineering reasons to be addressed on a digital Theremin anyway, particularly if one is trying to make it the best it can be. 

There's something in me that feels like I'm failing if I'm not making something that I'm personally enthused to play.  I'm fighting with this internally when legacy issues start taking over various aspects of the design, to the exclusion of what I feel are genuine improvements.  It makes finding an optimal middle ground for me really difficult.  Ideally there is one simple cabinet design that I can build or have manufactured for not too much, that will satisfy everyone, but everything so far except my prototype, with the separate articulated plate & coil boxes, comes up short for me personally.  It makes me feel kinda lost as to how to proceed.

"BTW, the best part of seeing other people's photos is looking at the background junk."

You said it!  Junk!  The whole downstairs needs a massive cleaning...

"I like your collection of inductors past.  I see a Harbor Freight-type rubber squeeze bulb, the same Weller soldering iron that I have, and possibly a handheld receiver or frequency counter in the upper left. And of course the exercise ball. One must be careful what one leaves lying around!!!"

Yes, that's a hand held frequency counter and a super cheap but nice Bowfeng walkie-talkie.  Dad gave me the squeeze bulb.  The Weller ain't a Metcal, but I really like the analog knob temperature control - don't have to set some digital thing with buttons every time you turn it on, the memory is the pot position.  And blinking an LED with the PWM signal going to the iron itself (I presume) is genius feedback.

People can infer, probably correctly, all sorts of stuff from one's living arrangements.  My DVD collection is right there, probably a good thing my book library isn't!

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