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

Posted: 9/6/2014 8:00:47 PM
FredM

From: Eastleigh, Hampshire, U.K. ................................... Fred Mundell. ................................... Electronics Engineer. (Primarily Analogue) .. CV Synths 1974-1980 .. Theremin developer 2007 to present .. soon to be Developing / Trading as WaveCrafter.com . ...................................

Joined: 12/7/2007

"Not that I'm anywhere near the artisan he was, but I wonder if Stradivarius had people hectoring him to "just slap some varnish on that hunk of carved wood and get it out the door!"  The research I'm doing now is broadly applicable and so has much reuse ability for future electronic musical instruments of mine, so I'm treading slowly (and hopefully surely).  Does no one read Aesop anymore?" - Dewster

AMEN!

"The research I'm doing now is broadly applicable and so has much reuse ability for future electronic musical instruments of mine"

And not just yours! - You have shared every detail - its there for you, for me, and for any others now or in whatever future we (or those who follow /advance the art ) have.

And you know you are unlikely to get a word of thanks for this effort, and unlikely to even recover your expenses.. But you carry on - calmly, hardly (unlike me ;-) ever even raising your voice in objection at the unjustified attacks from trolls (who really dont like any "revealing" by the likes of you, of what they want kept in the dark, and long for the days of technical ignorance when they could peddle their BS to gullible thereminists .. Their motto may well be "lets hope its not true - but if it is true, lets hope its not believed"* - then, when its proved to be true, do everything they can to ensure its not believed )

Fred.

*On hearing, one June afternoon in 1860, the suggestion that mankind was descended from the apes, the wife of the Bishop of Worcester is said to have exclaimed, ‘My dear, descended from the apes! Let us hope it is not true, but if it is, let us pray that it will not become generally known.’

As it turns out, she need not have been quite so worried: we are not descended from the apes, though we do share a common ancestor with them. Even though the distinction may have been too subtle to offer her much comfort, it is nevertheless important.

Posted: 9/6/2014 9:29:04 PM
rkram53

From: Northern NJ, USA

Joined: 7/29/2014

Dewster,

I like the idea of using formants a lot. After all, the theremin is in my mind first and foremost a way to sing with your hands (you've obviously seen all those videos of the Electro-Harmonix Talking Machine controlled by a theremin - I have one and it has some interesting, though easily abused features - but it is a model in some ways of work in this area). Maybe I'll do a bit of research in formants and vocal modeling so I can contribute a bit more than just asking dumb questions when those topics come up down the road.

Somehow I suspect you'll have a way to set the thing into different control/configuration modes - and one mode maybe you can dial that format more towards a human voice or more towards an ethereal (less harmonically complicated) tone. That might be all that is needed to make your initial prototype really interesting to players. And then maybe a tone knob of some sort.

13 notes? That star-shaped note display (when you get within a specified cent threshold of a note, will the LED come on for a tone?). With two triangles I get 12 stars on edges and intersections, so there is one in the middle? Why 13 LEDs for notes? What is the 13th for?

Why not arrange those LEDs like a keyboard (most musicians will likely find that more meaningful):

   O  O      O  O  O   

O   O  O  O  O  O  O   

Do those LEDs light up if your hand is also on the volume antenna or whatever you are using for volume control when it's at zero (i.e. they also serve as pitch-preview) - that would be great - I hate that little buzzing preview in my ear - it interferes with playing - having the LED to show you where you are would be much better (though people would probably want the option for standard preview).

Yea. Who cares about MIDI. And there are ways to get MIDI and CV from a pitch output so I agree - stick to the things that count. 

I know these questions are more towards the product side (but I'm really interested in the human interface).

I bet I live no more than an hour from you,  if you are in northern NJ. I'm in North Central NJ.

Rich

Posted: 9/6/2014 10:33:39 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"Somehow I suspect you'll have a way to set the thing into different control/configuration modes - and one mode maybe you can dial that format more towards a human voice or more towards an ethereal (less harmonically complicated) tone. That might be all that is needed to make your initial prototype really interesting to players. And then maybe a tone knob of some sort."  - Rich

I'm thinking stimulus with a filter bank, a modulation matrix into the parameters of both from the antennas, and presets to save settings.

"13 notes? That star-shaped note display (when you get within a specified cent threshold of a note, will the LED come on for a tone?). With two triangles I get 12 stars on edges and intersections, so there is one in the middle? Why 13 LEDs for notes? What is the 13th for?

Why not arrange those LEDs like a keyboard (most musicians will likely find that more meaningful):

   O  O      O  O  O   

O   O  O  O  O  O  O   

Do those LEDs light up if your hand is also on the volume antenna or whatever you are using for volume control when it's at zero (i.e. they also serve as pitch-preview) - that would be great - I hate that little buzzing preview in my ear - it interferes with playing - having the LED to show you where you are would be much better (though people would probably want the option for standard preview)."

I play guitar, so I'm kind of partial to patterns that the brain sees more intuitively, even if they don't map exactly to the way we notate music.  Here is a sketch of the proposed tuner I made a couple of months ago:

All of the LEDs will be ON, with the one indicating the pitch OFF.  PWM (grayscales) will be employed to show frequencies that aren't smack dab on a particular note.  The center LED will either be on all the time, or will indicate (by its darkness) how on-pitch the frequency is.  The octave display to the left will use the same drive for the horizontal LEDs so that the octave is indicated by a dark horizontal bar of 2 LEDs OFF with the rest ON.  To indicate more than 4 octaves it will loop around on itself (like the pitch indicator does) and will probably be PWM as well so that everything is smooth, consistent, and as unbiased as possible to any particular key.  The top and bottom LEDs will be driven identically at the octave wrap.  The displays will work regardless of whatever the volume hand is doing. 

You can see the C major and A natural minor scale pattern above, there are actually two separate patterns, depending on whether the scale starts on an inner or outer LED, but that's it.  Rotate them to get the rest.  Same goes for other types of scales.  If the patterns aren't obvious enough in practice, I'll alter the LED spacing, or add more LEDs, or something.  I want it to work so that you can watch it out of the corner of your eye and still have it be an effective playing tool.

I might make audible pitch preview available via the second (stereo) output on the DAC, which would make the Theremin output monophonic.  The tone could always be augmented with an external effects processor.

Posted: 9/6/2014 11:04:32 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"lets hope its not true - but if it is true, lets hope its not believed"  - FredM

That's a terrific line!

Continuing on in a heretical manner, I didn't know the tortoise & hare tale was co-opted by idealists:

Lord Dunsany brings out another view in his "The True History of the Tortoise and the Hare" (1915). There the hare realises the stupidity of the challenge and refuses to proceed any further. The obstinate tortoise continues to the finishing line and is proclaimed the swiftest by his backers. But, continues Dunsany, the reason that this version of the race is not widely known is that very few of those that witnessed it survived the great forest-fire that happened shortly after. It came up over the weald by night with a great wind. The Hare and the Tortoise and a very few of the beasts saw it far off from a high bare hill that was at the edge of the trees, and they hurriedly called a meeting to decide what messenger they should send to warn the beasts in the forest. They sent the Tortoise.

Posted: 9/6/2014 11:40:54 PM
rkram53

From: Northern NJ, USA

Joined: 7/29/2014

Hmm,

Yes to get some indication out of the corner of your eye is nice. I wonder how musicians will take to the star idea? You might have a mode that lights up the inner LED when within a few cents of pitch, the middle ring of LEDs when it gets to some secondary threshold and the outer ones when it get to a critical out of tune setting. I can see how a kind of circular arrangement there would be nice. Then again you could just create a 4x4 matrix and light them up in any kind of pattern. That way once its out in people's hands (well almost in their hands) if you want to create some other display it will just be some firmware tweaking.

Anyway - don't worry about what anyone say in terms of time. I bet you there's five staff years worth of time in that Theremini and they'll need at least another two to work out all the kinks. Keep on trunkin'! And if you ever need software help let me know.

Rich

Posted: 9/6/2014 11:55:44 PM
FredM

From: Eastleigh, Hampshire, U.K. ................................... Fred Mundell. ................................... Electronics Engineer. (Primarily Analogue) .. CV Synths 1974-1980 .. Theremin developer 2007 to present .. soon to be Developing / Trading as WaveCrafter.com . ...................................

Joined: 12/7/2007

"I like the idea of using formants a lot. After all, the theremin is in my mind first and foremost a way to sing with your hands (you've obviously seen all those videos of the Electro-Harmonix Talking Machine controlled by a theremin - I have one and it has some interesting, though easily abused features - but it is a model in some ways of work in this area). Maybe I'll do a bit of research in formants and vocal modeling so I can contribute a bit more than just asking dumb questions when those topics come up down the road." - Rich

Hi Rich,

Get started on formants and IMO one gets started in the direction of "real" theremin "emulation" or "replication"..

Back in ~2009 I was focused on a theremin "singing machine" where formants were controlled by X-Y movement of the volume hand (Z being for volume) but never got it to work well enough, then briefly looked at using the PSoC 5 DSP engine, but I am analogue - just couldn't even scratch the surface of how to move the (minimum 2, ideally 4) formant peaks in real time.

The TM however convinced me to abandon (or at least shelf) this idea - I think that for emulation of classic theremins one does not need to move the formants - You only need to do this IF you have formants that are close enough to real vocal formants to strongly convey a human quality... I think that a fixed realistic human vocal formant is not pleasant to listen to, and I think that with the theremin its probably another case of "less is more" - As in, formants far enough away from "reality" that it doesnt sound like a voice, but close enough that it has some "vocal" qualities.

With the early theremins, I think the "sonic crafting" was done by ear - and tube theremins with bulky imperfect coupling transformers and capacitors facilitated this sort of "crafting" - but whether "intentional" or otherwise, the frequency response of these early instruments, if you include the original amplifiers and loudspeakers and possibly complex acoustic coupling through the chassis resulting in FM (intermodulation), combine to give a response which is far from flat - and which has numerous peaks on the audio spectrum, some of which can be close to the positions at which vocal formants are found.

Search here for formants and you will spend a while reading threads like this one http://www.thereminworld.com/Forums/T/29156/ah-vocal-formants ;-)

I find the EH became a bore real quickly - but the sound of a good theremin doesn't become boring .. So I am inclined to think that unless one can actually sing the theremin, and change the formants dynamically, and have the ability to control pitch and volume and formant in real time (which I concluded to be the fatal flaw in my dream of a 3D field controller - its not that technology couldnt do it, its that we couldnt do it!) then perhaps deliberately "missing the mark" on convincing vocal sound one might actually improve the theremin...

I didn't always think this though, for too long, realistic vocals were a main target of mine -

But I now think that just a hint of human is probably enough.. ;-)

Fred.

I prefer the following to canned Paverotti! ;-)

Why oh why oh - ghost and theremin

Posted: 9/7/2014 12:22:55 AM
RS Theremin

From: 60 mi. N of San Diego CA

Joined: 2/15/2005

When ever I want a newbie to the theremin to experience it for the first time I direct them to the Hoffman and  its Master, then oddly enough to the Talking Machine which at first is remarkable. Then it became "Pavarotti in a Can" so anyone with common sense abandoned it.

What if I got the two guys in N. NJ mixed up, naw... I don't think so and I do think they will be a complement to one another, but that dewster is a bit of a hermit. Did he put the water back in the pool?

Christopher

Posted: 9/7/2014 3:24:22 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

Got the SPDIF TX verilog code fairly ship-shape yesterday and simulated it but haven't tested it in the real world yet.  Looked briefly at a design over at opencores but didn't use it.  The state in mine is entirely dictated by a free running counter - something I generally avoid doing but it made the most sense here.

With testing on my mind, I was very curious as to what was in that small SPDIF DAC box I got from China, so I cracked it open and took a picture:

WYSIWYG here, there are no components on the back of the board.  The Cirrus 8416 in the center converts SPDIF to SPI/I2C and does clock recovery and conditioning.  The tiny ES7144LV at upper left in the shadows is an I2S 24-bit 192kHz delta-sigma stereo DAC.  A dual op-amp and a 3.3V regulator round out the ICs.

With the 50MHz XTAL on the FPGA board I'm using, even with (1:512)/(1:512) frequency conversion available in the Cyclone 3 PLLs, I was worried that I had to supply an exact 128*48kHz=6.144MHz to my SPDIF code.  With the apparent absence of a crystal on the DAC board, and after consulting the 8416 datasheet, it seems the sampling frequency isn't very critical.  50MHz/8=6.25MHz is pretty simple and may do for testing, though getting closer in the final design would be desirable for other reasons. 

With a DMM the SPDIF input measures 75 ohms, and the datasheet claims you can blast it with logic levels if you want to, which should make testing easier.

Posted: 9/7/2014 4:51:30 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"I wonder how musicians will take to the star idea? ... I can see how a kind of circular arrangement there would be nice. Then again you could just create a 4x4 matrix and light them up in any kind of pattern. That way once its out in people's hands (well almost in their hands) if you want to create some other display it will just be some firmware tweaking."  - Rich

A circle of some sort makes the most sense due to the way we sense octaves, though differentiating 1 in 12 is difficult for us, so staggering the LEDs is an attempt to make it more of a pattern that we can easily sense. 

Sticking on an amorphous UI and letting god sort it out is indeed a flexible approach, but I've seen it fall on its face too many times to believe there is inherent beauty / practicality in doing so.  Screens, soft buttons, arrow key pads, etc. may be fine for prototypes, but a good UI is hand crafted for the product IMO.

Posted: 9/7/2014 7:11:17 PM
rkram53

From: Northern NJ, USA

Joined: 7/29/2014

I Agree. Fewer controls the better. UI should be intuitive.

One thing I can say as I practice trying to keep in tune is that I'm not really concerned with seeing what note I'm playing as much as easily seeing that whatever note I'm playing is creeping out of tune (though the ear is a pretty darned good indicator there). However the ear can accept some drift especially with vibrato and then presto! before you realize it you've gone too far and you are sunk.

So the easier I can see some sort of pitch shifting out of tune (as you say out of the corner of my eye) the better it will be. The value of the pitch LEDs (at least for me) is to be able to get a preview function without an earbud.

Rich

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