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

Posted: 9/30/2015 12:12:02 AM
rkram53

From: Northern NJ, USA

Joined: 7/29/2014

Ah,

I missed the video link. Yes this new link works!

Can you please review the operation. What tells me I'm in tune and how much in or out of tune?

LEDs on the left are octaves?

Thanks

 

Posted: 9/30/2015 4:30:47 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Hi Rich,

Yes, the current plan is the LEDs on the left indicate the octave number via a single numeric 7-segment display.

On the right you can see the note letters in the LEDs.  Increasing pitch is clockwise.  There is an LED for each note on the chromatic scale, in a staggered fashion around the center LED.  The center LED acts like a pivot point, sharing the indication of on-pitch with the associated outer LED.  Pulse-width modulation is used for brightness control.

From the video you might notice darkness is quite distinct, but discerning even half brightness from full brightness is difficult.  This is due to the use of a linear brightness scale as perceived by the logarithmic response of the eye.  For example, the center LED is never more than 1/2 brightness due to the indication mechanism - it gets "handed off" from one note to the next at the 1/2 brightness point - but it appears almost fully on at its brightest.  This is why I went with a negative display, where darkness indicates the pitch.  Another upside of this approach is that the whole thing can be covered with a dark filter and one can still see the locations of the full display (as in the video).  Working with the eye's log response rather than against it means that even if you are slightly off the note you will get an indication of that.  The PWM "dark" zone width may be adjustable to help with seeing which direction one is off the note (in the video it is the width of one note or 1/2 step).

My apologies to everyone for rehashing this stuff for what seems like the 1000nth time (to me too) but IMO most products these days would benefit from more effort put into the basic design up-front.  You never know when you're making a memory <Rickie Lee Jones>

Posted: 9/30/2015 6:17:27 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Left Hand Axes

I want to implement at least two axes on the left hand, the usual vertical axis and a side-to-side axis.  I intend to try two plates 90 degrees to one another.  Yesterday I had the thought that 3 axes might be implemented with three perpendicular triangular plates forming the corner of a cube:

   

Above I cut the corner of a cardboard box and placed it on my notebook (obligatory Dilbert).  Not sure which orientation might work the best, probably the first.

Three axes might be necessary to manipulate vocal formants.  The response of all three plates could be combined to give two or the classic one axis behavior when desired.  Not sure what players might make of having a point rather than a loop with a hole in it under their left hand?  Though if you cup your left hand it might be OK as the point could go there?  The point could perhaps be truncated some without significantly altering the response.

The TLC5916 driver ICs arrived today (DigiKey and USPS sure are fast!) but the LEDs are probably literally on a slow boat from China (I'm a huge cheapskate when it comes to postage).

Posted: 10/1/2015 12:06:26 AM
rkram53

From: Northern NJ, USA

Joined: 7/29/2014

This is gonna be one interesting theremin!

I have to say in all honesty however, a much simpler arrangement that will map more easily to those used to thinking about notes and octaves ascending would be LEDs arranged like this (one LED per note, One LED per octave):

C  C# D D# E  F F# G G# A A# B

1   2   3  4   5  6  7   8 

The note LED lights as it's in tune: fully in tune = fully bright, 49 cents out of tune = dark (or something like that). Will be really cool playing in the dark!

I can easily see things much better this way instead of having to relearn a mapping that may or may not work well - though of course you can test all kinds of things. Whether you are a pianist or guitarist or flute or trumpet player this will seem intuitive - notes ascending - octaves ascending.

During a portamento, not sure what will happen in any case as there is likely some hysteresis in there of some sort - or will LEDS really flow instantly from one to the other (of course in portamento they will all seem out of tune so not sure if anything will even light).

Just my 2 cents.

I'm not sure if your controller can sense it but it would be nice if up and down motion always increased or decreased volume (maybe you can have a setting for max volume away or at the antenna). Then XY position is used for whatever parameters you need to assign to them. This way any thereminist will be used to volume and they can learn how to kick in formants and other things with X-Y motion.

Rich

 

Posted: 10/1/2015 4:18:37 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"I have to say in all honesty however, a much simpler arrangement that will map more easily to those used to thinking about notes and octaves ascending would be LEDs arranged like this (one LED per note, One LED per octave):

C  C# D D# E  F F# G G# A A# B

1   2   3  4   5  6  7   8 

The note LED lights as it's in tune: fully in tune = fully bright, 49 cents out of tune = dark (or something like that). Will be really cool playing in the dark! I can easily see things much better this way instead of having to relearn a mapping that may or may not work well - though of course you can test all kinds of things. Whether you are a pianist or guitarist or flute or trumpet player this will seem intuitive - notes ascending - octaves ascending. During a portamento, not sure what will happen in any case as there is likely some hysteresis in there of some sort - or will LEDS really flow instantly from one to the other (of course in portamento they will all seem out of tune so not sure if anything will even light)."

Since notes don't really start or end on C, repeating with each octave, it's a quick mental jump to having the note display a circle or some other cyclic pattern.  But 12 things in a circle can a bit difficult to differentiate from the corner of one's eye (as can the 8 things indicating octave) and staggering yields some interesting simple patterns for common scales.  Using light rather than dark means the pattern disappears if a contrast increasing filter is placed over the display (though I suppose the display could be "always on" at some minimal brightness) and the logarithmic response of the eye to brightness means you have to use some kind of double exponential on the brightness function to make the active note pop.  Limiting the pattern to only indicating when very near a note means the player may have no guidance much of the time / when they most need it.   

I'm not sure if your controller can sense it but it would be nice if up and down motion always increased or decreased volume (maybe you can have a setting for max volume away or at the antenna). Then XY position is used for whatever parameters you need to assign to them. This way any thereminist will be used to volume and they can learn how to kick in formants and other things with X-Y motion."

I agree, the left hand and right hand operating point data should be malleable and routed however the player desires, with said info saved with the synth patch.

Posted: 10/1/2015 6:06:29 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Reciprocal Tank

In electronics, a reciprocal network is one that replicates the previous stimulus at the stimulus port if you drive the response port with the previous response.  I got to thinking last night and this morning that I should try driving a split coil in the middle, where I've generally been looking at the response, and examine the response at the end, where I've been generally been driving things.

One big problem with driving things via series R with C to ground (e.g. Vackar) is the phase shift / amplitude interaction and frequency dependence going on.  As the hand capacitively loads the antenna and shifts the LC resonance frequency down, the RC attenuation decreases, so you get a bigger amplitude where you don't want it, and you have to scale the far field amplitude response back so as not to overload things near-field, hurting far field SNR.  (Using a single RC for phase shift is problematic as you get the full 90 degrees only at zero amplitude, and you are introducing one more possibly temperature sensitive delay in the feedback loop.)  It would be better to have the amplitude response either poop out as the hand gets nearer, or best to have the amplitude response remain relatively constant.  This requires straight resistive drive on the coil end, but this produces Q losses which lower absolute sensitivity, though not by too much.  Better perhaps to drive through a tiny capacitor and examine things on the other end across a much larger capacitor (split capacitive voltage divider):

The above is running on my bench as I type, stimulated with a function generator.  There is a fair amount of (60Hz?) bobble that is largely tamed with the 100k resistor (my desk is quite noisy electrically).  Drive current is low.  Drive & sense electronics could be in the same package due to the quadrature phase (drive and sense edges are completely separated at LC resonance).  The areas above and below LC resonance appear to be quite clear of false resonances and ripple, which should facilitate a digital implementation.

I've given up on finding the perfect tank, but this one has renewed my interest in the search for good, workable tanks for Theremin use.  The antenna voltage swing could be a bit higher, but 38V p-p ain't too shabby.  Lowering the inductance to push the resonance frequency up above the FM band might help, I just used a coil I had laying around.

Posted: 10/2/2015 12:00:45 AM
rkram53

From: Northern NJ, USA

Joined: 7/29/2014

The most universal staggered pattern - especially for scales - I can think of known to a majority of the people who will likely play the theremin if they have any former musical training:

   O     O         O    O   O

O    O    O   O    O    O    O     Pitch LEDS

 

O   O   O   O   O   O   O   O    Octave LEDs (Frankly you'll be a lot more interested in pitch LED than octave)

Posted: 10/2/2015 1:02:35 AM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Rich, don't you think the pitch LEDs should be arranged in some kind of cyclic pattern?  Notes do cycle... 

The key of C is pretty much cast in stone with music notation (other keys being deltas off the key of C) so my tuner arrangement gives it a special place, but that's about as far as I can genuflect to it.

Octave is important with a wide-range Theremin setting (e.g. special effects).

[EDIT] Rich, I hope you don't think I'm bullying you.  I really appreciate your input, and probably seemingly contrary to how I'm replying your comments are making me think in different directions.  Certainly if someone strongly desires a certain kind of note / octave display they could be accommodated.

Thinking about it, the driver ICs I picked can't do all LEDs on at some minimal brightness with the LED of interest brighter without doing PWM on all of them at once, which might generate too much hash at the antennas.  Though having only a few LEDs on at a time would really lower the current draw and the heat in the control unit.  Even at 10mA per LED we're talking around 1/4 Amp across 5 volts which is 1 Watt.

 

Posted: 10/2/2015 5:49:25 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

One could bias the LED coloring towards the C major / A minor scale:

Or simply have different colors for the inner / outer ring:

I just dashed these out without too much thought as to the colors themselves, though the octave digit will almost certainly be red.

I'm kind of partial to a simple two color scheme:

The driver ICs are constant current, so putting any color anywhere is trivial.

 

Posted: 10/2/2015 10:58:05 PM
rkram53

From: Northern NJ, USA

Joined: 7/29/2014

Dewster,

But does this have any real musical function in relation to how a musician perceives music or how your hand moves when playing?

To answer the question if they should be in a circle I have to know how you intend the lights to be used and this brings up some interesting issues regarding how a person plays the theremin which anyone building one should consider. Musically speaking, there are basically three types of theremin players (applies to any instrument but special considerations when applying to the theremin).

1. People with absolutely no musical training that (kind of by definition) don't read music. They have no preconceived notion of music notation or even established musical function - though they might possess very good ears which they may realize or not (but they will very quickly find out once they start playing the theremin). For them, it likely doesn't matter what pattern the LEDs are in. They will have little use for them other than as a curiosity as they will be driving 100% by their ears (well all thereminists are), though eventually they may want to know if they are playing in tune or not – as they may well not be able to tell (in which case they picked the wrong instrument). They don’t know notes so LEDs will likely just be a pretty pattern to them or maybe eventually they will learn you new "notation" as they go. They will be totally Dewsterized.

2. Then we have people with perfect pitch who come to the theremin. Perhaps they have not been exposed to music (the least populous segment discussed here) but still intuitively they likely will have little need for your LEDs as they can hear the tones and don't need LEDs to help tell them they are in tune. Only use of LEDs I can think of for them is getting a note to come in on for pitch preview (as even if you can hear all the notes, you still don’t know exactly where that note is physically in space to begin or after a very long rest).

3. Then there are people without perfect pitch with previous musical exposure who likely read music (maybe not) and come to the theremin from diverse musical backgrounds (likely your largest "customer base"). They will use the LEDs for pitch preview functions (if no audio pitch preview is available - I forget if you are adding that) and to help them see how much in tune they are (probably more during practice). Maybe they will like seeing how their scales light up though functionally I’m not sure LEDs are a value there. They likely won't look at the LEDs much while playing. But among the three groups I think this group will use the LEDs most. So I think it's important you put the LEDs in a pattern they can easily grasp musically because speed to get the note is important. My suggestion is to put them in a keyboard pattern because that is likely going to satisfy the most musicians coming to the theremin and it’s something they will instantly be able to read without having to learn a new musical system. Guitarists might cry foul, but even many guitarists will know a piano keyboard.

So in short – the bigger question you have to ask, especially if you have audio pitch preview, is are those LEDs of much use?  In a real product are they worth the cost? And ideally if you are going to provide them, can they be movable so a user can put them in whatever position they want on a grid? I realize that is a tall order.  I would use it as a visual pitch preview, and maybe for practice if there was an easy way to see exactly how much out of tune I am - maybe the LCD screen can tell me that for practice.

Now as for C. In equal temperment, there is nothing any more special (or central) about C then G Flat or any other tone. The problem is that most people are taught music starting in the key of C because teachers think learning keys with sharps and flats is a more advanced musical study (and many people get cornered into the key of C and rarely leave it because of this). Some instruments perhaps might be more difficult to play in a lot of sharps and flats especially early instruments (transitioning from other tuning systems) but the notion that C is an easier key to play in is all artificially created by inadequate teaching, study and practice. However, the theremin being unique in that it is not touched to be played is also unique in that there is absolutely no difference to the player whether the piece being performed is in a key with no sharps or flats or in one with seven (or more - yes you can have keys with more than 7 sharps or flats for limited times using double sharps and double flats). And by the way not having perfect pitch, most times I could care less what key a piece I am playing is in if I have it memorized. All keys are created equal on the theremin.

Someone totally untrained (or self-trained) may not however intuitively center on C or keys with few sharps or flats. Irving Berlin, who was one of America’s great songwriters but not “trained”, wrote most of his music in F# major/D#minor – as he liked to stay centered on the black keys of his piano. That's how he taught himself and eventually wound up getting a device that transposed from F# to other keys. 

So arrangement of those LEDs, if anything should be according to some musical function as it’s the trained musicians just coming to the theremin that will likely use them the most, I think. If you want a circle, I would use the Circle of Fifths (C-G-D-A-E-B-F#, etc) – upon which the harmonic structure of most all Western tonal music that most people know is based (Bach to Mahler – including a ton of pop music). But this is a musical function that many will not know or care about.

Another reason I think they should be more ascending in some manner is that if you are playing a scale and you want to easily verify you are hitting the right minor or major second for that scale, seeing it on an ascending/descending matrix is the easiest way to view it mapping to the way you are playing as your hand is either moving towards or away from you.

This is just my feeling of course. I could be wrong. I’d be interested in knowing how you think those LEDs are going to be used.

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