Idea for Theremin Staccato Pedal

Posted: 5/5/2014 8:19:16 AM
GordonC

From: Croxley Green, Hertfordshire, UK

Joined: 10/5/2005

Hi Christopher,

I would call that more of a tremolo than a staccato. It's also something I have experimented with.

This piece ("Hyperbarbaric Chamber") was recorded using a custom built tremolo pedal - it modulates the amplitude of the sound with a sine wave, the rate of the LFO is controlled with an expression pedal. 

https://soundcloud.com/beat-frequency/hyperbarbaric-chamber

That is not the only way to modulate a sound. In the next example ("The New Consonance") I used a pitch shifter (Boss PS5) to create a second sound, five cents higher in pitch than the original, and then ring-modulated the original sound with the shifted sound. This creates a low frequency modulation that is related to the pitch of the sound - the higher the frequency the faster the modulation (from the difference of the two frequencies) - and also adds to the harmonics of the sound (from the sum of the two frequencies, i.e. an octave up) giving it a more violin-y timbre. 

http://youtu.be/Zsk42dPm0cw

One point about pitch shifting and theremins - you probably want your pitch shifter to have a very low latency indeed, as during a gliss any latency will mean that the shifted sound will be related to the pitch you were playing a few milliseconds ago, not the pitch you are playing now. This can sound rather discordant. In this example ("In The Potting Shed") I used an older pitch shifter (Boss PS2) which has longer latency than the PS5, and shifted by a tritone (the so-called Devil's Interval, again bordering on dissonance) - the overall effect is rather creepy - it makes me feel a little queasy listening to it. (The idea was that the listener really doesn't want to know what is happening "in the potting shed", but it is certainly something unpleasant.) No beats are apparent in this as I simply added the original and the shifted sounds, rather than ring-modding them. 

http://youtu.be/I16fitj1zP0

You asked how your example might be done. Well, to my ears it is somewhere between The New Consonance and In The Potting Shed, so I would try something like an octave up shift with long latency and ring-modulation to approximate it.

Fred and Christopher - is a foot fast enough? I don't know either. I still think the first step would be to build a prototype that, by whatever means, activates an attack and a release, the durations of which are determined by a couple of potentiometers, so that we I can find out (1) what the useful range of times is (3 to 50 ms sounds like a reasonable guesstimate to me) and (2) if that is good enough, or if we want to derive more information from the player's foot. 

<sigh> At the moment finances are complicated, but imagine I have Schrödinger's bank account - it does and does not have money in it. At some point in the future it will resolve itself, hopefully favourably, and I may (or may not) know in a couple of weeks. If not, then more patience will be in order. Until then, talk is cheap. ;-)

Posted: 5/5/2014 7:17:39 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

Hi Gordon,

This has replaced my last (now deleted) post..

I have been looking at some old notes of mine, regarding the transit time for keyboard contacts.. These were the old Kimber Allen keyboards which had a wire contact operated by the key as a changeover, and although I never measured the gap distance, I think they were about 1 to 2mm.

I recorded the fastest transition I could manage as 800us, and the slowest I could reliably manage was without double-bounce on the upper contact was 10ms.

I suspect that the pedal would have numbers of similar magnitude.

If the above assumption is accurate (or close) then this is too fast for direct use.. The time would need to be measured and used to control an envelope generator.

 

The above shows a diagram of the (proposed) pedal response. Attack time would be derived from time B to C, "Down" time would be from C to F, Release time would be determined by t F -> G.

The Attack would start at C, and the Release would start at G. Once the attack is completed, the "sustain" would continue until G.

In order for the stretched attack phase to complete (most instruments have an attack time of longer than 10ms) the player will need to 'extend' the period D-E (in fact, C-F) for this duration - If a long attack is in action (due to a slow tap of the pedal) and the Release phase is started prior to the attack phase completing, then a "shallow" envelope will be produced.

In terms of numbers, 1ms "pedal time" probably needs to equate to something like 10ms Attack or Release time, and 10ms pedal time equate to perhaps 100ms Attack or Release time.. Or at absolute minimum, 1ms should perhaps be 'extended' to 2ms.. I think that a small processor (PIC or PSoC) would be the simplest and lowest cost way of implementing the pedal - I am thinking PSoC because one could have the VCA (DCA) in the chip, and everything would be greatly simplified - I would go for a PSoC 4 if the CapSense turned out to be up to the job, as then everything would be in the chip.. But would probably start with the non-SMD PSoC 1 and external capacitance sensing.

I would suggest having two control knobs, one to independently adjust the Attack "multiplier" one to independently adjust the Release "multiplier"- And one switch to select envelope 'direction' or 'polarity'.

Fred.

 

ps - "in the potting shed" is the only piece you have ever done which I really didnt like at all !

Posted: 5/7/2014 11:16:33 AM
GordonC

From: Croxley Green, Hertfordshire, UK

Joined: 10/5/2005

That makes a lot of sense to me. (Including the bit about Potting Shed - perhaps not my most successful experiment. There are times when I like it, but it requires me to be in just the right mood.)

I'll be off air for a week (going to a Sonic Weekend) so talk more on my return. 

Posted: 5/7/2014 8:24:51 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

Hope you have a great time at Sonic Weekend!

I think for me the biggest 'problem' is that I am in the "potting shed" mood! - Music rarely causes me near panic - but this piece does - the tension (rhythm) builds up in almost exactly the way my life is at present... Then the theremin tone rather than a musical comfort, is like the sound of a female tormenter.

Technically its probably brilliant - if I had tried to produce a piece of music to describe my present feelings / situation, I could not have managed it more perfectly. But I really wouldnt want to share these feelings - I want to escape them and forget them.

Fred.

Posted: 7/20/2014 6:38:14 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

I'm not a PSoC guy (yet) but stumbled across this the other day:

http://www.cypress.com/?rID=92146

$4!  I wonder if that might make a good basis for the staccato pedal?  Lash a dual FET VCA to it?

If I haven't mentioned it previously (tl;dr) it might be interesting to have two capacitive footplates, and have them work opposite of each other.  That is, have one reduce the volume as the foot approaches, and have the other increase the volume as the foot approaches.  Or maybe use one footplate to switch the modes of a second footplate?

Posted: 7/20/2014 11:04:55 PM
GordonC

From: Croxley Green, Hertfordshire, UK

Joined: 10/5/2005

Well, Dewster, Fred's the PSoC guy around here, so let's see what he says. 

I would have thought a standard effects pedal style stamp switch would be fine for mode change. 

And, uh, bad news - I had another thought. If were controlling a VCA with a microprocessor it wouldn't be that hard to give the envelope a decay phase too? It would have to be preset with a pot or whatever, but ADSR has to be better than ASR, yes? 

Actually, two thoughts. How nifty is a PSoC? Could we use it to do some AM synthesis on the audio signal via the VCA? This is my line of thinking - one of the ways that the "magic" of the theremin is described is that it has the qualities of an acoustic instrument. So, let's think about what happens when an acoustic instrument is plucked or bowed or blown. There is a very brief period of chaotic behaviour at the start - during the attack phase - before a resonant wave forms in the string or the column of air. It's a subtle thing but you would notice if it wasn't there, and it is part of the character of the instrument. Can we emulate that by introducing some pseudo-randomness to the way we ramp up the VCA - instead of having a very smooth curve, can it be kind of white-noise jittery at audio frequencies (if that makes sense to you) at the start, and decreasingly randomised until the ramp is quite smooth at the peak?

 

Posted: 7/21/2014 2:42:57 AM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

With that 32 bit, 48MHz ARM I'd think you could do a lot of envelope stuff, even given the rather limited memory (32k Flash, 4k RAM, one wait state for executing out of Flash).  Interesting how 32 bit processors are entering gumball machine trinket territory.

The 4200 family datasheet yacks it up re. the ADC, not so much the DACs. 

Seems the DACs are current types and integral to Capsense - one is 8 bit, the other 7 bit, but the family datasheet doesn't seem to mention the speed.  I'm kind of wondering if the DACs would be good enough for this kind of application?

Like you say, Fred should know, let's let him weigh in.

[EDIT] I looked at the technical reference manual (TRM) for PSoC 4 and it seems the IDAC settling time is 10us.  If it can indeed run at 100kHz I'd say 8 bits might barely do it.

I'm not sure why there are ADCs seemingly everywhere and so few worthy DACs.  I'm dealing with this as well in the FPGA domain.

Posted: 7/21/2014 10:29:33 AM
GordonC

From: Croxley Green, Hertfordshire, UK

Joined: 10/5/2005

4k RAM? Luxury! When I were a lad we had 1k RAM and half of that were occupied by t'operating system.

Posted: 7/21/2014 9:23:53 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

Hi Dewster and Gordon,

Re: PSoC 4 board (thanks for bringing this to my attention Dewster ;-)

I have played hardly at all with the PSoC 4 (its the baby of their recent family - first there was PSoC 1 which was slow, then 3 [8051] and 5 [ARM] and then 4. Mostly I have used PSoC 1)

And I hadnt seen this $4 breakout board! - Now this really has the potential to change the whole picture I think, its quite a powerful little part - The DAC's and MDAC's on PSoC 1 were one of its biggest problems, because although technically they met their specification (speed wise) Cypress failed to mention that in order to do so, the entire ALU would be fully occupied and unable to do anything else. The M8 (in the PSoC 1) however was only capable of 4 MIPS - And I think Cypress will have learned their lesson from their misleading claims re the PSoC 1 DACs (it caused a lot of protest and lost business) so suspect 8 bits at 100kHz is at least close to the true specification.

I have the full DK for the PSoC 4 but have never run it (the DK has a PSoC 5 on board as well, and I only played with this - other than just looking briefly at the '4s code and demo).

PSoCs are the kind of part that can almost always be made to do a lot more than application notes or "in-your-face" stuff shows - I managed to get the PSoC 1 DACs to run at twice the speed the supplied UM's achieved (I had to - a major project was utterly dependent on this) but I needed to delve deep into the configuration registers and entirely re-write the API's.

What I am saying I suppose is this - I am reasonably confident that the PSoC 4 could do "the job" called for by this pedal application, including full ADSR - Also, MDACs (effectively DACs with access to the 'reference' voltage - as in, you can modulate the DAC either from an external or internal analogue signal, or tie the reference to a voltage which defines the full-scale output) should allow other interesting things to be done.

The price of these boards completely changes the situation for me - even at £4 a board, being able to deal with a small DIL module as opposed to buying a SMD (at about £2) and producing the required PCB for it and its essential components makes it possible to prototype and go into production. Even if more than 1 module was required (which I doubt) it would still possibly be the cheapest and best solution.

"Actually, two thoughts. How nifty is a PSoC? Could we use it to do some AM synthesis on the audio signal via the VCA? This is my line of thinking - one of the ways that the "magic" of the theremin is described is that it has the qualities of an acoustic instrument. So, let's think about what happens when..." - GordonC

The points you make about the attack on acoustic instruments (struck / plucked) is valid and important for those type of instruments (and of high importance when replicating pipe organs and the like) and I agree there may be added acoustic qualities available for your proposed application (which is effectively providing a percussive envelope to the theremin signal) However I do not think *this mechanism is  responsible for the acoustic qualities of conventional theremins (even the most rapid movements on the volume rod / loop would not "need" these attributes) - *The only related mechanism I could see would be if rapid volume movements subliminally modulated the pitch - something thereminists would deliberately try to avoid and/or correct, but nonetheless may be "important" and must to some extent happen (even if the pitch rod did not "pick up" the volume hands movement, movement of this hand will change player capacitance due to coupling to the theremin or other grounded objects - the degree of this capacitance change will have complex variables in the equation, but the most important will probably be the players bulk coupling to ground).

Its a really interesting idea you have thrown into the theremin 'matrix' here - I have been (and still believe it a big part of the picture, but now wonder if its the full picture) convinced that it was audio modulation of variable frequency oscillator (which effectively produces the audio) that provides the bulk of the acoustic qualities from a theremin - particularly when this feedback is non-linear (as in, you cannot simply tap the audio [difference] frequency and feed it to the VFO as a modulating signal, it needs to go through filters at least, is better via "formant" bandpass filters, and is best if it also has a mechanical transducer and physical resonator [block of wood or whatever] in its path).

My only (little) experience I have regarding the 'chaotic' first few cycles of the attack phase has been with attempts to emulate pipe organ "chiff" and it was extremely difficult! - there can be about 10 cycles (or even longer) before pipe resonation settles to a steady state, but these cycles are far from "chaotic" - they are, however, not often  harmonically related to the frequency the pipe is 'singing' when its stable, and opinions about what sounds "authentic" or "pleasant" or "bloody horrible" might even be more contested than thereminist discussing what a "true" theremin sound should be..

What I am saying is that its probably not going to be a simple matter of modulating the amplitude of the attack portion with a PRBS or anything like that to obtain an 'acoustic' quality from the theremin - Your thoughts though have led me to wonder whether miniscule modulation of the theremin pitch by the envelope (or attack thereof) might achieve this quality (if it exists).. Sadly, doing this could be a teeny bit more difficult.

Fred.

 

Farnell are selling these in the UK for £2.62 !! (Excl VAT) - This is just incredible! (Farnell has only the 4100 in stock, 4200 on order - IMO, wait for the 4200!)

*I dont think that the DAC's would  be available if one was using driven shielded Capsense for the pedal - In this case, I think the best way to implement "VCA" may be to with PWM, and drive analogue switches to perform the VCA function, or (probably better) generate a CV that is then fed to a conventional analogue VCA.

Using PWM driven from the 48MHz you could get 10 bit resolution with 46.8kHz PWM clock, which should be good enough.

Oh - Be sure to get the 4200 not the 4100 if you want  programmable digital blocks - the 4100 has none of these, the 4200 has 4 (4*UDB) - These blocks can be configured by the developer to provide functions not otherwise available, and (certainly for me) are essential.

 

Posted: 7/22/2014 12:43:12 AM
GordonC

From: Croxley Green, Hertfordshire, UK

Joined: 10/5/2005

Hi Fred. Perhaps I did not explain my thoughts as clearly as I would like. When I say thereminists characterise the theremin as being like an acoustic instrument, I assume they mean that it is capable of subtle shadings of expression, that it is responsive in a way that they associate with for example a violin or the human voice - two things that the theremins are often compared to, despite not really sounding very like either. 

So, seeing the specs for this PSoC, it seemed to me that just generating an envelope was somewhat underutilising it, and my first thought for additional capabilities was to add an acoustic characteristic in a rather more literal sense, in the same way that a touch of reverb can enhance the sound of a theremin (IMO) by making the sound less "electronic" and more "natural".

Anyway, it's just a thought. Perhaps something for an upgrade to the software rather than part of the initial specification for the pedal, adding some extra thing (perhaps a percussive element) to augment the delineation of notes.

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