Idea for Theremin Staccato Pedal

Posted: 8/30/2014 11:31:43 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

About PSoC 4

Sorry if this is looking like a hijack! - I will happily start a new PSoC 4 thread if people want, and move this and even my last post there - just let me know.

Getting more familiar with the part now, and more importantly perhaps, with PSoC Creator (its a lot different to PSoC designer that I know inside-out from PSoC 1).

There is a LOT in this chip, and I haven't scraped the surface yet - but on the issue of clocks (and that I couldn't seem to get 48MHz) this was because I was thinking in terms of PSoC 1 which had a 24MHz clock and a separate multiplied version of this at 48MHz - I was looking for this *2 clock and not finding it... In fact, with PSoC 4 one can set your master clock to any frequency (in 1MHz steps) up to 48MHz* - so there is no "x2" clock - by default the master clock is set to 24MHz, but can be changed up to 48MHz.

The options for creating derived clocks from this master are huge - I believe there are 4 independent divider banks each with 3 separate 16 bit dividers that can be chained if required, giving 12 possible clocks without consuming any UDB or other resources.   AFAICS, one of these is capable of fractional division .. The bottom line though is that if you want a specific frequency clock in the design, you simply place a clock 'source' on the schematic and specify the frequency and whether you are allowing use of a fractional divider if needed - PSoC creator will then compute the divisor based on available clocks, and set it up for you, showing the divisor and any error to the closest match. Back with PSoC 1, you had a few clock divisors available, but needed to consume PWM resources if you needed more clocks.

The funny thing is that my experience with PSoC 1 is almost a disadvantage with the PSoC 4, as I have been using resources to implement things that are already implemented in the PSoC 4.

For the pedal application though, there is no problem.. 48MHz clocking a 10 bit PWM makes a simple adequate D/A.

Actually, I think 10 bit audio (un-attenuated waveform) with 10 bit D/A for external VCA could be good enough for a digital theremin - The Fairlight CMI used 8 bit waveforms with 8 bit VCA in its early incarnations! - In my view, it is the reduction of waveform resolution that occurs as volume decreases in conventional digital implementations that makes many sound horrible (particularly at low amplitude parts of the envelope) and 10 bit x 10 bit analogue multiplication could be greatly superior.

Fred.

 

*This is if using the internal clock, which has an accuracy of about 2% .. You can drive the chip with an external crystal oscillator for higher accuracy and stability, and would probably need to do this if using the PSoC clocks referencing theremin oscillators.. I would actually thinking about driving the master clock from a conventional LC reference oscillator multiplied up to ~48MHz for any high-end analogue theremin, but will see how stable the internal oscillator is first.

 

Posted: 8/30/2014 8:41:31 PM
GordonC

From: Croxley Green, Hertfordshire, UK

Joined: 10/5/2005

Fred - could you clarify - is this a hijack, or are we discussing a PSoC 4 based design as alternative to the existing pedal design? If the latter, do I understand correctly that this would be capacitive sensing?

Also, I've been looking at the existing design notes. Hopefully I understand them correctly. If it helps simplify things, I would be setting gain very low, so that even the slightest touch puts the VCA to max. I don't think it is necessary for it to be able to track changes in foot pressure while my foot is on the pedal, as his overlaps with the functionality of the volume loop. 

Posted: 8/30/2014 9:31:07 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

"Fred - could you clarify - is this a hijack, or are we discussing a PSoC 4 based design as alternative to the existing pedal design? If the latter, do I understand correctly that this would be capacitive sensing?

Also, I've been looking at the existing design notes. Hopefully I understand them correctly. If it helps simplify things, I would be setting gain very low, so that even the slightest touch puts the VCA to max. I don't think it is necessary for it to be able to track changes in foot pressure while my foot is on the pedal, as his overlaps with the functionality of the volume loop." - Gordon

Hi Gordon -

Its on the edge of a hijack ;-) .. I am saying that I believe its possible to use the PSoC4 board to implement everything in my schematic except the VCA, and had a minor worry about getting the envelope waveform out of the PSoC in analogue, for the VCA.. My last post laid that doubt to rest - but I did kind of go on a hijack because that was all I really needed to say, but said a lot more.

In my usual pedantic way, I am trying to add required information with any ideas I present - The PSoC idea could use a FSR (using the ADC) and this was my original thinking - but I realised that equally one could easily construct a "FSR" (in fact a "FS Capacitor") which would be cheaper and possibly more adaptable to requirements (as in, it could cover a larger sensing area without having to buy big FSR pads or use more than one) because the CapSense on this PSoC looks like it could easily do the job (it has features not present in PSoC 1, in particular, shielding).

But no - I am not suggesting a "capacitive sensing pedal" in anything like the original proposed way - one would be constructing a force sensor probably out of a couple of pieces of thin semi-flexible double sided circuit board bonded together perhaps with silicon rubber.

"I would be setting gain very low, so that even the slightest touch puts the VCA to max. I don't think it is necessary for it to be able to track changes in foot pressure while my foot is on the pedal, as his overlaps with the functionality of the volume loop.""

The above is a trigger scheme - just generate a trigger / sustain when the pedal is pressed, and release when its not.. Cranking the FSR gain up will give this - the FSR amplifier will saturate, no further foot movement (other than release) will influence the volume, only the envelope will influence the volume. If this is what you want (and dont want to be able to set the depth of envelope by the tap force) , the FSR amplifier section can be replaced with a comparator giving on/off output.. could probably do it with just a MOSFET ;-)

If you want the above, and you really want the VCA to go fully to Max every time (or min if in reverse mode) then only attack and release controls are needed - If you wanted the above but wanted to have control of depth, one other user control would be needed.

And If the above is what you want, the PSoC with FSC would be the best way to go - because its a lot easier to change the way it behaves by modifying the code or configuration than it would be to add the FSR amplifier and other stuff if you changed your mind! ;-)

Fred.

(also, CapSense is ideal for switch on/off type functions - it will compensate for ambient changes etc, keeping the trigger level above an adjusting base-line, and AFAICS would be ideal for a switch, but could be altered for linear operation as well - all in software - with tools to view the capacitance etc in the debugger)

But it all comes down to the competency of the builder - if they are into digital, then the PSoC is a good route, if not then my schematic may give them a direction for an analogue implementation.. If they are into PIC or Arduino, they could easily implement most of the stuff in these using an FSR.

Posted: 8/30/2014 10:07:03 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

Here is an alternative input circuit that will give switch-like output:

Uses cheap CMOS 555.

This gives a 5V "pad pressed" 0V "pad not pressed" output, so could be taken to anything analogue or digital. (could equally be powered from 3.3V or 12V)

Posted: 8/31/2014 2:24:30 AM
tinkeringdude

From: Germany

Joined: 8/30/2014

Heh, rather interesting to see this thread.
My (technical) looking at the subject "theremin" is maybe 2..3 weeks old, I watched what the playing technique was about, and since last week I thought "hey, what about providing a foot pedal that triggers an envelope generator, as an alternate playing mode fo more easily get staccato sounds".
So, not only outsiders are blasphemous :-D (I imagine some purists might cringe when hearing of this unethereal way of playing)
And then I got doubts and had to look for videos of people who 1) play well and 2) are doing that sitting down, they seem to exist :-)

Posted: 8/31/2014 2:50:31 AM
RS Theremin

From: 60 mi. N of San Diego CA

Joined: 2/15/2005

That is a good schematic above and similar to my switch de-bouncer or pitch popper I introduced four months ago. The 555 shows up in just about everything I design. My Classic Theremin thread uses a 555 to square up my PWM used in my custom volume control. I demonstrate sound samples of what my Attack approach can sound like below, quite interesting.

http://www.oldtemecula.com/theremin/pitch-popper/index.htm

Christopher

Posted: 8/31/2014 3:19:58 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

That 555 circuit is simply a comparator with hysteresis  - without any bias on the CV, the output goes low when the input goes above 2/3 VCC, and stays low until the input drops below 1/3 VCC, Output stays high then until input goes above 2/3 VCC again.

The upper threshold is set by the voltage on pin CV, which is (on the TS555C) pulled to VCC by internal 100k, then there is 200k from this pin to GND and this is centre tapped internally to set the low threshold. One can either bias by putting resistors in parallel with the internal resistors (from CV to VCC or from CV to GND) or by providing a voltage on CV. Leave the pin disconnected for default thresholds (on the TS555C you dont need a decoupling capacitor, but I kike to put one there anyway ;-)

Its difficult to get data on the Min and Max CV's but I tend to limit these to VCC-1.5V to GND+1.5V for non-critical applications, but have seen this part work beyond that range.

I used these parts 20 years ago in this way to implement a fast robust comparator - it was incorporated into the door sensors of new London buses, and also use them a lot in this way for oscillators - all you need is one resistor between Q and the inputs, with a capacitor from the inputs to GND, and you get equal M/S square wave out - the only way to get an equal MS square wave from a 555 ;-)

Oh - R3 in the above circuit is not essential - due to the high Z of the input pins it really does'nt do a lot, its there as minimum ESD protection, as it limits any possible input current. The TS555C has fairly good ESD protection, but not enough to stand a full HBM discharge .. IF R3 survived an ESD, it would protect the inputs.. but theres no gaurantee it would survive.. If the FSR was connected by an accessible lead or contact, I would put a neon before R3.

The TS555CN is IMO by far the best variant of the 555, operating up to 2.7MHz, low power, and robust - there are some really horrible CMOS 555's out there, take care!

Fred.

Posted: 8/31/2014 3:45:29 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

"So, not only outsiders are blasphemous"

LOL ;-) ... Thinking that just because we post here means we are "insiders" is probably a mistake! .. And there's only one thing that fanatical believers hate more than blasphemy and that's apostasy!

;-)

Fred.

Posted: 8/31/2014 8:35:51 AM
GordonC

From: Croxley Green, Hertfordshire, UK

Joined: 10/5/2005

Fred - you present compelling arguments for a PSoC implementation.

I like the idea of a large sensing plate (an "FS Capacitor") - easier to hit consistently without looking where my foot is. :-)

And I'm thinking that it would be quite easy to make it fully ADSR - i.e. with knobs to set attack duration, decay duration, sustain level and release duration. This seems to be the most popular set of parameters for envelope shaping, presumably with good reason.

 

(I think I have settled on a name for the pedal - "The Yellow Pearl". From the song by Phil Lynott: . "We all must beware of the Yellow Pearl. The Yellow Pearl control, attack, attack, attack, attack...")

Posted: 8/31/2014 12:13:50 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

"And I'm thinking that it would be quite easy to make it fully ADSR - i.e. with knobs to set attack duration, decay duration, sustain level and release duration. This seems to be the most popular set of parameters for envelope shaping, presumably with good reason." - Gordon

Yes, there are good reasons, it gets far closer to simulating the envelope of acoustic instruments for one thing ..

The biggest flaw in ADSR (not a "flaw" for sounds which need to be sustained, like Moog lead lines etc) is the constant sustain level.. My ADSR's had an additional "Droop" control which was switch selectable.. The atack and decay preceded this, decay dropped the level to the sustain level, then the level dropped at the "droop" rate (usually slow) to 0 unless release came before then, at which point the (usually faster) release kicked in.

Digital synths brought in all sorts of envelope options. A lot comes down to the UI.. With analogue the biggest problem is packing the required user controls on the panel - with any digital UI its down to how many menu levels etc, and how you implement the UI (this is IMO the greatest challenge for digital - getting the UI right! - A challenge they have mostly failed on with musical instruments)

Im sure that you can see - its easy to implement whatever you want in terms of envelopes on a 32 bit Arm Cortex running at 48MHz ! - even if one didn't have piles of controllable hardware counters etc.. You also have a fast ADC with multiplexer, so could scan potentiometers if you chose an analogue user interface .. Implementing a gray decoder which generates inc/dec interrupts is available if you use rotary encoders, and there is support for driving LCD etc if you go that route, and theres CapSense.

One PWM is needed for analogue output, and inverting the output envelope is as easy as simply tacking an XOR onto the output of this before it goes to the pin - you dont even need software to scan for the "normal / inverted" switch , just take the other XOR input to a pin and wire it to the switch! - put the switch in upside down? change the XOR to an XNOR!

If you do go the PSoC route, I have a couple of spare Mini-Prog programmers / debug interfaces and if I can find these ;-) can lend you one indefinitely - They really are needed for real development, and even for playing / learning, make life far easier (it annoys me that Cypress didn't  fit a MiniProg rather than the bootloader interface they did - but at £3 one cant complain.. The Mini-Prog is way over-priced at $70 and they were giving them away with cheap kits some years ago - I guess they want to make money on it, but IMO its a daft move, because it makes playing with the part a lot easier and would lead to more people adopting it... A bit like selling theremins and not getting someone who can play demo it! ;-)

Im sure this is just a way of saying the same thing, but for clarification (and being pedantic again ;-) the word "duration" isnt really the one I would use:

"with knobs to set attack duration, decay duration, sustain level and release duration."

I would use the word 'slope' - for the simple reason that the duration of attack and decay and release can be altered depending on the trigger duration - one can truncate for example a slow attack and go straight to release when a short trigger is present, both the attack and release durations would then be altered, and one would have a shorter attack, zero decay  but could have a longer or shorter release! - or one could truncate the decay and shorten it, leading to a longer release.

Fred.

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