Idea for Theremin Staccato Pedal

Posted: 7/22/2014 2:14:56 AM
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 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. " - GordonC

Yeh..

That is also a big part of it.... The "nugget" for me was the idea of attack (or in fact movement of the volume hand in general, but particularly rapid movement over a larger distance) having a 'modulating' effect on pitch, and the possible link between this and perceived acoustic qualities.

"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"."

It may well be possible - But this is an area where I am out of my depth. Gordon, to be completely blunt about it, I mastered the PSoC 1 through blood sweat and tears - But it was in the 'zone' where I had competency, so I really mastered it.. I am 'visual' and 'old school' - ASM and C coding, schematics for digital and analogue.. I once had a full set of schematics for the PDP computers that used TTL and could read these and comprehend it all ......... But the PSoC 3,4,5 - well, I can use them - but my attempts to get the digital filter block to do what I wanted (and this wasn't going really deep, and theres far more complex stuff in the PSoC 5) caused me to hit my limits - maths was a big part of that, but not soley to blame.. I wanted (as I always seem to) to do things outside of what was ready-built in the libraries - and couldn't. So I wont be fully exploiting the PSoC4 if I use it - For me, its a circuit board with a logic array, some pre-defined analogue and digital ICs, and a processor packed into a package, its cheaper than I could dream of putting a board together to do, so I will use what I understand or can make myself understand.. But if I wanted to have a formant filter with co-efficients that varied with hand position for example, I would probably have a separate analogue filter simply because I couldn't work out how to use the on-chip one ore even determine whethere it was possible to use the on-chip one! 

I know, its sad! ;-)     Someone else will need to develop any digital audio stuff - it wont be me!

Fred.

 Oh - if anyone in the UK really gets into the PSoC, I have psoc.co.uk up for sale ;-) (as well as a whole set of related url's)

Posted: 7/22/2014 7:21:23 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"Someone else will need to develop any digital audio stuff - it wont be me!"  - FredM

Fred, I ran across this today:

http://www.jamesoakwood.co.uk/Digital%20filter%20design%20for%20Analogue%20engineers.pdf

The main thing that confused me in it: CR = RC (time constant)!

Digital filtering is a royal pain, but it can be grasped if you have the time and stamina.  I had several classes in it so that helps, but I've forgotten 95% or more of what I once "knew" in a mathematical sense.  The real problem IMO is teachers teach the way they were taught: gobs of math up-front, and if you are lucky a bit of hands-on at some point, but no real effort to break it down into understandable bits.  They go into parallels between analog and digital ("how do we make a digital filter that does what this analog filter does?") but that brings with it a boatload more math with s-plane and z-circle stuff.  This is why DSP papers are so dense and mathy.  But analog filtering papers can be dense and mathy too.

I think it's similar to all design: you have a box full of constructs that you know really well and you apply them whenever it makes sense to do so, otherwise you have to think outside of your box, which is painful and slow going.  So it's maybe just a matter of getting to know a couple of digital filters well.

Nothing beats Excel for understanding the simpler ones and how to implement them as you get to see everything going on, can track min/max, etc.  Checking the verilog sim against the Excel sim is a good way to make sure everything is kosher.  To avoid much math you can work entirely in the difference equation domain, which is pretty simple to map to Excel, and examine frequency response by seeing what happens to an input sinewave at various frequencies.

[EDIT] I'm fairly certain the entries in in the table on page 8 are off by a factor of 2.  And I'm not sure where he got his sine based warping formula from, all I've ever seen there is tangent.  And his 2nd order filter seems somewhat suspect, the path through the major loop should only have one delay. (We all need good peer review.)

Posted: 7/22/2014 9:12:12 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

Thank you for that article Dewster - It does look really well thought out and presented, and the concepts are well within my grasp.

Given a little time you are probably right - I could implement a digital filter from these first principles, and have control over cut-off and Q, and stack them to implement 2nd order BP filters that could do whats in my head and give me reasonably easy access to their parameters in real time...

But I would need to do the whole lot - and would (if I wanted to use the DFM in the PSoC) need to bypass or re-write the UM/API's for the DFM to convert it to a form I could understand and use.

The DFM is, as I understand things, effectively a separate 'processor' with ALU etc which one can configure for non-filter applications so it all should be possible - in fact it should be possible to generate a specific UM with API's and create a re-usable module one can insert in the PSoC Creator component library.

Perhaps its just my mental state, or the heat, or the stresses of life - But I guess it would take me months, and even if it only took me weeks I realize that I dont have the energy or motivation - Whatever I developed in this area is likely to be inferior to what someone competent with DSP could knock together in a day, the time I spent on it would be a drudge, and the returns most likely small to zero.

I am finding it really hard to be interested in electronics or theremins or musical instruments - even in the areas I feel competent and passionate about. Things may change and get better.. But I still think it likely that:

"Someone else will need to develop any digital audio stuff - it wont be me"

Fred

 LOL - there you are, understanding it enough to find flaws! - I wouldn't recognize a flaw in any of those formula if it  whacked me in the test....s  ... And that's where it would whack me, after id painstakingly implemented the scheme in DFM and found it didn't function.....

OT (strange the way the spelling checker seems to be converting words to olde English today 'wouldst' and 'didst' Ive had to go back and alter to wouldn't and didn't after it changed them because I left out the ' ... Is this checker "in" TW, or is it something I accidentally installed with some other update? - )

PPS.. Me trying to implement a digital filter or other digital audio scheme would be a bit like what I advise others not to do (and get angry about ;-) .. "If you dont understand why the oscillators must be HF and have an audio difference frequency, how the hell can you hope to design a heterodyning mixer ?!  ;-)

Posted: 7/23/2014 5:15:43 PM
dewster

From: Northern NJ, USA

Joined: 2/17/2012

"LOL - there you are, understanding it enough to find flaws!"  - FredM

Well, I was searching the web for exactly what was in that paper: a generic warping formula.  He even used the same LPF construct and sampling frequency as I was simulating in his table.  My numbers weren't working out and his were closer so I double checked his and they are inconsistent with his formulas, and even with an example he gives earlier which seems OK.  His derivation of the digital integrator from the analog is really good, and his spreadsheet stuff is nice.

I understand the 2nd order filter from the standpoint of the digital sine wave oscillator construct, which is an infinite Q filter.  It only works if there is a single delay in the loop, otherwise it blows up or decays, and it is actually quite curious that it is stable at all.  Perhaps in a non-infinite Q filtering scenario the two delay loop could be less troublesome?  Two delays would be good in hardware as it naturally pipelines things, but my feeling is it would give truncation noise an opportunity to recirculate and "live" in the ring.

"And that's where it would whack me, after id painstakingly implemented the scheme in DFM and found it didn't function."

I don't think there is any substitute for Excel (or similar) simulation.  You can give things a quick spin there and work out any bugs / idiosyncrasies.  I usually do a frequency response analysis (z=e^jw) followed by a time domain analysis (difference equation) and make sure the two jibe, then code it in verilog and check it against the Excel.  It's all rather time consuming but straightforward and not very mathy other than a bit of algebra.  The tricky part is knowing / finding / producing the construct you need and then making sure it is satisfactory in all necessary ways.  Subtle things like accumulator overflow and truncation noise can cause trouble, particularly in IIR (feedback) filters, which are generally useful for audio work.

I'm beginning to doubt that anyone has a complete grasp on all of digital filtering.  Just understanding the math isn't sufficient (though I'm sure it can get you far).

"Someone else will need to develop any digital audio stuff - it wont be me"

Fred, I hope you get your groove back soon - these Theremins aren't going to design themselves! ;-)

Posted: 7/28/2014 11:32:45 PM
GordonC

From: Croxley Green, Hertfordshire, UK

Joined: 10/5/2005

Hi Fred, in response to your thoughts on the nano theremin thread.

Yes! That sounds like a very good idea. And I have a bit of good news - for the second time ever, money has come to me as a result of my playing the theremin, rather than it moving in the usual direction - away from me. Last time I ploughed my ill gotten gains back into a lovely bass bin. This time isn't quite so much, just £50, but looking at the price of the nano I am guessing it would be sufficient to cover the cost of building my staccato pedal to at least the same quality as the nano and maybe buy you a nice pint of beer too. :-) (Or put any excess in your charity jar - as you see fit.)

Let's keep the design as simple as possible. I would want it durable and reliable as top priority. Using the pressure plate as a switch and dialling up attack and release on potentiometers would be sufficient, anything more than that (i.e a decay phase, responsiveness to different foot pressures) would be a nice bonus. A stomp box style foot operated button to reverse attack and release.

Is that proposal acceptable to you?

Posted: 8/1/2014 4:30:56 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,

I could build the electronics (circuit board) to take input from a FSR and switch, but couldn't do the actual pedal assembly at this time.. I could provide you with the FSR.

If you made the pedal bit (simply a sandwich - hard top surface, hard rubber base - I could perhaps provide paxolin or PCB for the top surface - the rubber could probably be cut from a cheap mat) and a box to mount on this for electronics, we may be able to get what you want.

To be honest though, for a one-off, I would buy a Nano and use the existing assembly - perhaps mount the whole pad on a larger floor panel - tap the pressure sensor connection and go from there..

I suspect that the sensor will produce a changing voltage (potential divider or the like) which could be intercepted, taken out, used to drive an external circuit, and the output of this could even be fed back to the Nano if desired.

"just £50, but looking at the price of the nano I am guessing it would be sufficient to cover the cost of building my staccato pedal to at least the same quality as the nano "

What's missing in the above evaluation is the development costs, which certainly wouldn't be recovered on the sale of one Nano! - How many hours did assec spend testing materials and sensors? Not to mention obtaining these in small quantities.. Yes, the production version of the pad probably has a FSR costing say £3 and perhaps another £2 for the rubber... But it really wouldn't surprise me if development costs, even at minimum wage, clocked in at a few hundred pound.

Ok, im not even looking for minimum wage ;-) .. The time I spend here, even on minimum wage, would probably pay my solicitor and court fees... What I am saying though is that unless there is some reasonable possibility of getting development costs back by producing and selling a few, it makes more sense to adapt something that has gone through the process.

I would need you to do the mechanical development - construct a pad which provided the feel you want and gave a reasonable change in resistance as force was applied.. I can provide a FSR, and could develop whatever electronic functions you want from its output.. The minimum test equipment you would need is a resistance meter, I could lend you one with USB output so you could view the resistance change on a logger.

Fred.

(it should be noted that what I said on the Nano thread was speculative / hypothetical.. I have never sandwiched a FSR between rigid and flexible substrates* - have always used them with some 'actuator' such as a key.. ok, I fitted rubber over the FSR to 'damp' the actuation, and cannot see any reason why my idea about the Nano operation could be wrong - but it could be! ... *Actually, that may not be true - I think I tried them in this way on a joystick grip sensor perhaps 18 years ago, I think they worked but not particularly well and I switched to capacitive sensing - but the grip from a hand on a joystick was probably way lower than the force from a foot)

pps..

It may be worth contacting assec to see if he would provide you with just the assembled pedal board - all you need is access to the sensor - if he provided you with this section (and ideally a blank nano box and fasteners which fitted the pedal so your electronics could be built into this) then the rest should be simple.

Posted: 8/1/2014 6:42:42 PM
GordonC

From: Croxley Green, Hertfordshire, UK

Joined: 10/5/2005

Fred, thank you for taking the time to consider my proposal and give a reasoned reply. I was half-anticipating a "How much? you must be joking!" type response.

I think I shall move to Plan B, which is to get in touch with a boutique pedal maker that I have had excellent dealings with before, and haggle over the price of a "pressure pad operated kill switch with variable attack and release". My preference would be to work with members of the theremin community, but I understand that my project is perhaps tangential to their area of interest.

What I would like to do is to thank sincerely everyone who has participated in this discussion - you have really helped me to clarify and organise my ideas, challenged my assumptions and given me lots of food for thought. I appreciate it very much indeed. 

:-)

Posted: 8/1/2014 9:15:10 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

Gordon,

For me, money isn't the issue (I am down the pan - £50 or £500 ain't going to make a difference)  - I have all the needed components ex stock, and would happily spend the time building the electronics for you.. If you put the unit into production, a payment would be appreciated - but otherwise we could just publish the design so others could build the unit.

The issue is that I dont have the capabilities to do any kind of mechanical work at present - Also, I dont think I have the emotional / motivational requirements to undertake any development / R+D of the kind required for the mechanical aspects.

But you are probably wise to go to a pedal maker..

FYI, my guess at the electronics is as follows:

(1) Sensor -> (2) amplifier -> (3) window comparator <- (7) Polarity selector switch

(3) Window comparator -> (4) speed timer -> (5) Trigger + (6) Analogue (velocity) outputs

(5)+(6) ->  (8) Envelope generator -> (9) Envelope output

(7)+(9) -> (10) Envelope switching / biasing / inversion (to facilitate selectable inverted envelope) -> (11) VCA

" I understand that my project is perhaps tangential to their area of interest." - Gordon

I think its probably only "tangential" for a small minority - and if it wasnt for folks outside this minority, TW would probably fizzle out or drudge along on 'tick over' - You are one of the people who keeps TW interesting to a wider audience than the (hundred or so?) interested only in the 'precision' or 'classical' theremin area... I find TW referenced widely in all sorts of places - technical/engineering, music, synthesis and of course other theremin sites ;-) .. TW must get money from ads, this would reduce greatly if us "others" reduced our activity and numbers visiting TW was impacted.

Fred.

Posted: 8/1/2014 11:25:06 PM
GordonC

From: Croxley Green, Hertfordshire, UK

Joined: 10/5/2005

I'll be getting something much simpler than that to minimise costs - just using the pressure sensor to trigger a predetermined release/attack - I assume I won't need any digital circuitry for that. Anything fancier can wait until it becomes financially viable.

And if anyone else is interested in owning one, I'll tell them who made it, assuming it works out for me. 

But not until I've been on holiday. We're all packed and heading off in the morning.

And if anyone wants to jump in and say "I could do that" my preference is still to keep it in the theremin community just in case I'm not the only person in the world that wants one.

Posted: 8/2/2014 12:22:19 AM
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'll be getting something much simpler than that to minimise costs - just using the pressure sensor to trigger a predetermined release/attack - I assume I won't need any digital circuitry for that. Anything fancier can wait until it becomes financially viable."

I suspect that the Nano takes the sensor output into an ADC, and the processing available could be quite intensive.

The simplest you could get away with is probably to take the sensor output into an op-amp  and drive a pre-configured RC circuit to provide attack and release, then (if you want to be able to flip the waveform so that it either accentuates or attenuates the audio) into another op-amp switchable as either inverting or non inverting, with appropriate bias shifting incorporated, prior to driving the VCA.

sensor -> amplifier -> simple RC / diode attack / release -> [optional 'polarity' switcher] VCA driver -> VCA.

I think you will certainly need an op-amp following the sensor, as the Z into the envelope circuit needs to be constant and low compared to the envelope RC - adding adjustable attack and release to such a circuit is just replacing fixed resistors with variable ones, so at least fit presets! ;-)

Probably the most tricky bit to design is the stage preceding the VCA (providing the control voltage or current) particularly if switching from 'normal' to 'inverted' is required - oh, there's nothing complex about it, but its the only bit one couldn't just pull from a Tab book ;-) - and will also depend on which VCA you choose.

I am happy to do this design for you and run simulation on it if you want - may be cheaper than getting the pedal builder to do it, unless they have some similar function board already built that could be adapted.

Fred.

BTW - Have a good holiday! ;-)

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