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

Posted: 10/14/2016 11:22:08 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Volume Hand 1 or 2 Axes - Player Opinions?

Kind of hard to believe I'm this far into the project before seriously investigating more than one axis on the volume hand - better late than never I suppose.  After doodling around in my notebook for a while I rigged up a two coil / two plate arrangement on my workbench, stimulated by a function generator, each plate response on the scope.  To get around the need for a third scope channel (someday...) I triggered the scope with the generator TTL output to make an "implied" channel among the data. This scope arrangement actually works pretty nice in terms of showing what's going on.

Not surprisingly, rather low Q (implemented via rather high resistance drive) worked best as it smoothed out the normally sharp phase response.  Surprisingly, I had to separate the plates by a foot or more to get decent differential phase response.  So this is a dynamic capacitive interaction between the plates rather than the static interaction I thought it might be.  I'm not thrilled with low Q, and this separation seems kind of wide, so I'm fundamentally rethinking the volume side.  To the point where I just rewired the volume side plate antenna PWB to be single rather than double axis (so it is now a copy of the frequency side board above).

An option for two axes here is to use separate frequencies rather than simple phase separation between them.  I looked into this a while back and if the frequencies are different enough the antennas can be right next to each other without noticeable interference.  But before I go there I'm wondering how "playable" two axes might even be?  FredM made his two axis (pitch & volume on one hand) Theremin only to discover it was essentially unplayable.  I can imagine trying to vary the volume without disturbing the pitch in this scenario would be an almost impossible task, and Theremins are already difficult enough to play.  But having volume and timbre on one hand rather than volume and pitch might be less difficult?  Or are three axes just too much to handle?  I'm no player, but when I had functional Theremins in the house it was a challenge for me to knock out the simplest thing pitchwise, and doing anything with the volume totally threw that in the crapper.  Then again, I'm no player, and maybe the whole two axis (volume and pitch) thing becomes second nature over time.

I'm curious what real players (intermediate to virtuoso) think of the idea of two axes on the left hand?

[EDIT] Sorry, didn't mean to leave anyone that felt like weighing in on this subject out.

Posted: 10/17/2016 10:33:00 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Volume Side Experiments

Since I'm seeing a range of ~2.3MHz (nominal) to 1.4MHz (hand on box) on the pitch side, I decided to set the volume side nominal to somewhat lower than this, 1MHz seems like a good target.  2.3MHz on the pitch side works out to ~14pF of antenna capacitance, and the volume antenna area will be somewhat smaller, so a ~2mH coil seems called for.  I didn't have one handy so I wound one today.  I cut an 80mm length of 1 1/2" PVC schedule 40 pipe and wound about 250 turns of AWG 32 on it, removing turns until my LC meter told me it was 2mH (thought the target is crude and this level of fussy isn't really called for).  DCR is around 22 Ohms.  Then the usual wire wrap wire leads, clear nail polish to secure the wire ends, and clear battery heatshrink on the outside to protect it against dings and such.  Hooked it up to the rewired (now single channel) volume tank driver board and hooked this to the FPGA board. Using a 1/3 license plate antenna for initial testing, the final plate should have a bit more area:

It resonates just below 1MHz, so I hit the target pretty well, at least with this plate.  Separated from the pitch antenna maybe half a meter, I'm not seeing any interference on the pitch side.  See a tiny bit on the volume side with my hand a couple inches from the pitch antenna, but it probably won't mean much in the final deal.  I'm watching this stuff on the scope via an unattached jumper wire, so the interference might not even be real.  Or there might be interactions I can't readily see on the scope that will pop out via pitch and volume playing, though I kind of doubt it.

First time I've messed with two oscillators at once via FPGA and it seems OK.  Now to make the real antenna plate and stick it all in the plastic box.

Am considering relocating the Hive vectoring address space to 0x80 in order to free up the 0x0 to 0x7F space which can be addressed via byte addressing (for efficient storage).  I want to clean up the command line interface code some as well.

Posted: 10/18/2016 11:06:15 AM
RoyP

From: Scotland

Joined: 9/27/2012

Hi dewster,

just wondering about your two-axis volume control and how practical/necessary/playable such a thing would be.

I think, as you noted, that linking the volume with pitch on the same control but different axis would be almost impossible to play, on an instrument which is not exactly easy to begin with. Further more, what would the advantage of such a setup be?

Linking volume and timbre on the same hand with two-axes might be more useful, more subtle and less intrusive as pitch would not be effected.

As I recall, the Lost Volts LV-3 theremin (Lost Volts) has a volume-timbre thing going on where by the timbre changes the louder the volume becomes but it's not an 'axes' thing, more an artifact of the theremin design.

Just a thought.

 

Roy

Posted: 10/18/2016 7:55:38 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Thanks for weighing in on that Roy, I appreciate it. 

Timbre change with volume / pitch shouldn't be difficult - the Theremini pretty much does this - just a matter of patching numbers to filter cutoff and the like. 

Being a Thereminist yourself, how playable do you think a volume & timbre 2-axis left hand might be?  And what hand / arm positions and motions might you be inclined to desire there?  I don't see any clearly best way to make it the most playable.  The z axis should clearly control the volume (because players are used to this) but should the second axis be x or y?  Moving the hand closer to / farther from the body (y axis) seems awkward, though it would likely interfere the least with the pitch field.  Moving the hand left and right (x axis) therefore seems called for, but how would one control the volume while keeping the timbre largely constant and vice versa?  What kind of arm / hand motion could be used accomplish this / would be desirable?  What kind of antenna geometry and positioning would make this the most natural?  Nothing is jumping out at me at this point.

Perhaps when I have more antennas to play with I can mock something up and see what works best ergonomically.  The frequencies would have to be quite different, or perhaps a single frequency with a grounding plate in between antennas might offer better phase separation.  It's thorny enough that I'm shelving it for now, but I'm very interested in pursuing it further once the prototype has basic functionality up.

Posted: 10/18/2016 8:06:57 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Volume Side

I cut a piece of aluminum flashing for the volume side plastic box and affixed it via nylon screw and masking tape.  This gives a larger area antenna which is good for sensitivity, and having it curve around the side means those who are used to the volume plate on the side may find it easier to play.  The PWB was affixed with two screws on standoffs cut from a discarded ballpoint pen.  The coil was attached via friction fit to a knockout plate with a hole in it, itself attached using the same antenna screw through the middle.  A strain relief cable tie keeps things stable:

Above: Again I used a bit of masking tape to keep the coil wires from vibrating, and a nylon cable tie keeps the interconnect wires stable and away from the coil.

Above: Here it is in position on the board & mic stand.  I've since located the ball joint base to the bottom of the board in order to position the volume antenna somewhat lower, this feels more comfortable to me.  Desk is a mess as usual (I'm kind of a pig).

I'm seeing ~1.05 MHz nominal and really healthy voltage swing.  This arrangement seems to be working really well so far.  Now I suppose it's time to start stuffing the FPGA board and related circuitry into the central control box, and get the software show on the road.

Posted: 10/21/2016 10:04:07 AM
RoyP

From: Scotland

Joined: 9/27/2012

Hi dewster,

 

I think a 2-axes volume/timbre left hand would be playable and it would possibly be a benefit to the instrument overall.

Difficult to know exactly how such a system would work though but for sure the standard volume operation would have to be maintained as most thereminists would find it very difficult to divert from the normal close/quiet distant/loud system.

I guess, keeping the standard volume/expression loop, if the x/y/z axes are up-down/left-right/close to body-far away, respectively, then the timbre may be controlled by an alteration in the y axis. So imagine a movement where the hand is brought up to increase the volume but at the same time the hand is swept to the left (away from the instrument [-y direction]) as a means to change the timbre. For quiet, then the hand would be raise only a little from the loop and taken to the left, once again away from the instrument.

I think this would be the most natural way of playing a 2-axes system.

Obviously other players will have other thoughts.

Interesting idea though, 2-axes functionality :-)

R

Posted: 10/21/2016 6:03:19 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Hi Roy,

To define the axes on my prototype a bit better, I present this crude sketch:

Call anything vertical (up out of the page here) the z-axis.  For comfort and control, I'm thinking the left hand elbow will be at or near the body most of the time, with volume work done mostly by vertically pivoting the forearm at the elbow.  This makes the left hand x-axis movement perpendicular to the pitch antenna, so the volume hand x-axis is pretty much the pitch hand y-axis.  Similarly, the pitch hand x-axis is pretty much the volume hand y-axis.  This is in terms of influence on the respective antennas, not direction, if you see what I mean.

I'm thinking some kind of twisting of the left forearm (& therefore the hand) might be the most natural movement for the second axis, but I'm not sure how to make that work with two simple antennas. 

Maybe something like a half axis in the negative x direction of the left hand, where the hand would have to be somewhat to the left in order to make a difference in timbre (rather like the Roland joystick which has +/- x but only +y) ? 

In both cases, the differential antenna distances won't track with volume movements unless the hand is moved at an angle rather than vertically.  Perhaps I'm making the mistake of thinking left hand axis separation should be entirely a hardware thing, and underestimating what can be accomplished mathematically in software. 

Posted: 10/24/2016 10:01:38 AM
RoyP

From: Scotland

Joined: 9/27/2012

Maybe something like a half axis in the negative x direction of the left hand, where the hand would have to be somewhat to the left in order to make a difference in timbre (rather like the Roland joystick which has +/- x but only +y) ? -dewster

Aye, that's essentially what I thought too although my axes were different as I was looking at the scene from front on rather than above cool

Posted: 10/24/2016 10:10:22 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Thanks again for your input Roy, you're helping me get a better grip on this.  And sorry to switch the axes around on you in midstream. ;-)

If you think about it, the pitch and volume axes on a normal Theremin are half axes (in that they only work in one direction).

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

Currently rewriting the Hive command line code, and that effort is rippling back into the label scheme.  Probably the main thing that slows me down and causes the most bugs when writing Hive assembly (HAL) is the calculation of relative jumps.  This is because the label scheme is one-pass and absolute.  So I'm working on multi-pass interpretation of labels that can also produce relative addressing for the jumps, and this seems to require the generation of intermediate temporary files. 

(I remember a CS class I had in college where I was talking to the Prof about using temp files because my program kept running out of memory on the sleazy 386 in the lab, and the Prof told me "No!  Always program like you have infinite memory!" - easy for him to say.)

Posted: 11/1/2016 10:32:39 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Finally got HAL pre-processing and HAL multi-pass labels working.  My HAL parsing code started out life as MIF file parsing code, which is a considerably simpler thing to do: very few syntactical constructs, and you can do literally everything in one pass through the input file.  So I had to untangle / refactor a bunch of stuff, fix it after that broke it, etc. 

First pass generates two temp files, an end-of-line comment file and a tokenized code file.  The code file is pre-processed to replace simple fixed values like thread clearing labels and interrupt labels with physical addresses.  Also replaced here are single quoted groups of characters like 'crc' with concatenated byte ASCII equivalent values (one to four characters, as this fits in a 32 bit register).  Then three passes for the labels, each one generating a temporary output / input file.  First pass I look for explicit label assignments like "LBL[5] := 8" and remove the entire expression after sticking the value 8 in the label table at index 5.  Second I look for beginning of line labels such as "LBL[6] s0 ^= P4" and if LBL[6] isn't null I replace the label with the table entry, otherwise I place the current address in the table and delete the label.  Third I look for things like "s3 := LBL[9]" and replace the label with the table entry, and while I'm at it I also look for stuff like "pc := LBL[3]" and after doing a bit of math with the current address and the table entry, I replace the expression with a relative jump.  Finally, the third label pass file is parsed to opcodes and it and the end-of-comment file contents are placed in Hive memory.  I now have an appreciation as to why languages often expose mechanical pre-processing in their syntax.

I made a cheesy linting tool a while back that I modified to be more of a stand-alone compiler.  This lets me turn on a "verbose" option during the HAL parsing to get more info on errors and warnings spit out to the console, and it also optionally preserves the intermediate files for inspection which is quite handy.  Intermediate files seem to be the way to go for complex parsing.  Now on to beefing up the CLI code.

Since this is my self-imposed "Year of the Prototype" I need to get on the stick so as to have rudimentary functionality up by December 31!

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