Idea for Theremin Staccato Pedal

Posted: 9/2/2014 3:26:20 PM
GordonC

From: Croxley Green, Hertfordshire, UK

Joined: 10/5/2005

OK - well, I'll ask around to see if any of my online friends can program a PSoC4 and want to be involved in this (not optimistic about that), and I think it would be a good idea if I rustled up a proper spec for the device to avoid future confusion, now that I have a pretty clear idea what I want it to do. I'll post a draft here once I have it ready.

Posted: 9/2/2014 6:05:14 PM
GordonC

From: Croxley Green, Hertfordshire, UK

Joined: 10/5/2005

Specification for “Yellow Pearl” Audio Effect Pedal.
 
 
The Yellow Pearl audio effect pedal varies the volume of an audio signal by applying an ADSR Envelope to it. Specifically, in normal operation, a thin sensor plate on the floor detects foot contact and triggers a Note-On event when the performers foot comes into contact with the plate, and triggers a Note-Off event when the player’s foot leaves the plate.
 
In addition to the plate, the pedal will have four user accessible potentiometers (labeled A D S and R) and four on-off switches, one to turn the pedal on and off and three others described below to vary the functionality of the pedal. 
 
When the pedal on/off switch is in the off position audio will pass from the audio in to the audio out unaffected. When it is on the pedal will behave as follows.
 
A Note-On event will cause the amplitude of the output signal to rise from its current state - zero gain (i.e. silence, unless initiated during the Release phase, see below) to unity gain (full volume) over a period determined by a user adjustable potentiometer. (Time to rise to full volume variable between 0 and 1 second.) This is the Attack phase of the ADSR envelope. 
 
Once the Attack phase is complete the envelope generator will move directly into the Decay phase, where the volume drops to a user specified volume over a user specified period. The period is determined by the Decay potentiometer (variable between 0 and 1 second) and the final volume is determined by the Sustain potentiometer (variable between silence and full volume.) 
 
Once the Decay phase is complete the envelope generator will remain in the Sustain phase until a Note-Off event is detected. 
 
When a Note-Off event is detected the amplitude of the output signal will drop from the current volume to silence over a user specified period of time. The period is determined by the Release potentiometer (variable between 0 and 1 second.) This is the Release phase of the ADSR envelope.
 
Once the Release phase is complete the envelope generator will remain at zero gain (silence) until a new Note-On event is detected. 
 
If a Note-Off event is detected during the Attack or Decay phases the envelope generator will move directly to the start of Release phase. If a Note-On event is detected during the Release phase, the envelope generator will move directly to the start of Attack phase.
 
Three switches vary the functionality of the pedal. 
 
The first switch reverses the logic of the sensing plate so that it behaves "the wrong way round". In normal mode foot contact generates a Note-On event and foot removal generates a Note-Off event. In “wrong way round” mode foot contact generates a Note-Off event and foot removal generates a Note-On event. From a player’s perspective normal mode enables staccato notes, while “wrong way round” mode enables brief interruptions to a continuous tone - a "kill-switch".
 
The second switch causes the Envelope generator to operate backwards. i.e. instead of generating an ADSR envelope which accentuates the start of the note, it generates an envelope as illustrated below, accentuating the end of a note. This facilitates “reverse tape” effects.
 
The third switch turns the envelope upside down, as illustrated below. This is commonly referred to as an inverted envelope. In upside-down mode the envelope generator behaves as described above, except that references to "silence" should be replaced with "full volume" and vice versa.
 
 
Construction notes.
 
The pedal should be sufficiently robust to withstand the rigours of gigging. The sensor plate should be robust enough to withstand being stamped on enthusiastically. 
 
The pedal would be based around a PSoC4 and a capacitive force sensor constructed from pieces of thin semi-flexible double sided circuit board bonded together with silicon rubber. The sensor plate should be of an appropriate size for easy foot operation, say 150mm * 150mm. The sensor plate should be very thin to facilitate a "foot tapping on the floor whilst performing" style usage and sensitive enough to respond to the lightest of taps.
 
Audio In and Audio Out should be via standard 6.35mm mono jack sockets. Audio will be Line Level.
 
Power should be from a 9V external power adaptor (“wall wart”) as used for most guitar effects pedals. 
 
Despite the name, the enclosure need be neither yellow nor encrusted with pearls. (It is from the line in the Phil Lynott song of the same name "The Yellow Pearl control, attack, attack, attack, attack...") Simple and functional is fine.
 
The four switches should be labeled OFF, WWR, USD and BKW (i.e on/off, wrong way round, upside down and backwards.)
 

****Fred***** Please can you let me know what I have missed and what should be reworded for clarity. Also can I offer one of your Mini-Progs and a PSoC 4 to anyone willing to undertake the project?

Posted: 9/2/2014 10:49:19 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,

Nice clear specification which covers all the aspects if that's really what you want.

I am a little doubtful about the lack of non-reversed (normal) envelope in inverted mode - my feeling was that this could even be the most musically useful mode for a theremin, in that it would allow fast attack transients to be tapped synchronously, these punctuating the the volume set by the loop.. But I am not the musician ;-) - it should be easy to add anyway - just one more switch (effectively the envelopes I gave on the last page, + the reverse envelope option.)

If I can find my Mini-progs, your developer is welcome to one.. Right now I only have one I obtained with the full DK. Its one of those things I never used and had several of, so put in some drawer or box in my old lab... My 2bX wife has gone into my loft, and hoiked down all the dead synths and old computers (goes back to CPM Z80 kit with 8" drives ;-) and dumped them in my lab just to make it impossible for me to access anything - IF they are where I think they are, I should be able to move stuff away from the drawer and get them - but if not, I may only get them by sorting stuff out in the war zone - needs to be done anyway in the next few months as I have things there I probably need for my development - but I cant say when.

For something as simple as the pedal, the on-board programmer should be fine anyway .. I am only bothered about the space taken by the bootloader because I am overstretching the PSoC4 hardware capacity massively, and want to reserve the flash and ram for possible direct use by the hardware through PLD datapaths and the like.. Similarly, with the hardware complexity of my design, having direct access and ICE is important, but for a simple project one doesn't need it.. In fact, learning to use the debugger (which requires the Mini-Prog) takes probably longer than learning PSoC creator.. I had a head start here as its close to what I know from PSoC designer.

This (horrible imo) PSoC4 "theremin" is running under bootloader and just using CapSense.. Why people insist on picking the theremin for crap demos like this I really do not know.. But it demonstrates that everything needed for the pedal is there.

As for sending you a board.. If I did that, I would need to buy more and post one to you..  And I would need to spend >£20 to get free postage - buying a single board clocks in at about £8 otherwise.. the same price as you would pay:

Goods Subtotal: £2.62
Basic shipping/handling: £3.95
VAT: £1.31
Total: £7.88

.

You get free postage if goods >= £20, and you will probably need some parts (potentiometers, switches, header pins for the PSOC board, sockets for these headers so you can swap the boards  etc) and I seriously suggest at least 2 boards so you can program different versions to compare.. That will total £20 easily ;-)

http://uk.farnell.com/cypress-semiconductor/cy8ckit-049-42xx/prototype-board-cy8c4245axi-483/dp/2420489

Fred.

Posted: 9/3/2014 7:21:23 PM
GordonC

From: Croxley Green, Hertfordshire, UK

Joined: 10/5/2005

OK, well, I've taken on board your point about including an inverted envelope mode - I'm not entirely convinced, but it's only one switch and a bit of extra code, and it does feel more complete with it included. I have updated the "specification" posting to reflect this change.

Not to worry about the mini-prog - our house also has an impressive floordrobe, and I wouldn't want to go hunting through it, so I can hardly expect you to do similarly. Also point about cost of PS0C4 noted. :-)

Another question - of the various circuits you have posted here, which would be of use to someone building a pedal to the Yellow Pearl specification, so that I can include them as an addendum to the spec?

Posted: 9/3/2014 9:25:42 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

"Another question - of the various circuits you have posted here, which would be of use to someone building a pedal to the Yellow Pearl specification, so that I can include them as an addendum to the spec?" - Gordon

Only a VCA will be needed from that lot!

Quick system diagram.. Note, any port pin without other function can be safely assigned to anything except P32 P33, P42, P43 on this board, P07,P16 and P17 are used by onboard switches and stuff, so best not to use these either... But you have plenty of pins available!

Showing Pedal Wiring:

The Pedal has the PCB on top with the shield layer facing up - this should be covered ideally with an insulator which inhibits electrostatic discharge from player to shield. Alternatively, a single sided (or double sided with one layer against the shield layer) PCB can be put on top of the shield layer, and the other (foot facing) layer connected to GND.

All Input circuitry on one side of board (but doesnt need to be - everything can be almost anywhere):

(capsense shield and sense should be next to each other, and probably my placement near to GND isnt the best .. Not sure if you can connect the shield to two pins (internally) either side of the sense - You can with the digital IO, but not sure if you can with the analogue.. But if you can, do this.)

 

The sort of circuitry needed for clean potentiometers:

 

All that's left thats really needed is the PWM filter and the VCA. One pin from anywhere.

 

Fred.

 

Posted: 9/4/2014 10:09:49 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

Just an aside:

The above is based on PSoC4 - the advantages having been stated before..

But really it could be implemented with many small MCU's (including PIC and probably Arduino or similar boards) if a designer is familiar with these and prefers to use them.

FSR or different capacitive or other sensing circuitry would then be needed.. FSR sensing could possible be implemented with a single resistor and capacitive probably with a TS555C RC oscillator outputting say 2MHz when pedal not pressed and 1.8MHz when pressed - A simple sandwich construction with GND on bothsides of a squidgy pensor part would work (and thinking about it, would also work for the PSoC and might be easier)

Posted: 9/4/2014 3:51:01 PM
GordonC

From: Croxley Green, Hertfordshire, UK

Joined: 10/5/2005

Hi Fred,

Second draft of the spec document. Does not include info from your post immediately above this one, as I just saw it. Should I include that?

I have included some of your circuit diagrams and notes, so they need to be checked by you before I proceed. In particular I have added a comment that the potentiometer in the VCA circuit can be a trim pot as it need not be user accessible. 

https://www.dropbox.com/s/dcmjxasbzu74cwj/yellow%20pearl.pdf?dl=0

 

 

Posted: 9/4/2014 6:22:36 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,

Yes, I would certainly include this.. Thinking about it and doing a few experiments using a TSC555C this scheme seems far more effective and simpler.

The sense wire (connecting to the sensor pad) could stil be shielded with the shield signal, or this signal run as tracks either side of the sense track on the PCB to shield the sense from interferers (but I doubt this would be needed unless a PWM track or the like was near to it).

The specification looks good. If you hold off with it for a few more days I will try to add a proposed circuit for the PWM filter/s and VCA drive.. There are a couple of op-amps in the PSoC, and these (alone) have pins that cannot be relocated - I will try to run a filter/VCA simulation and provide you with the schematic...

The H11F1 VCA will work, but is probably not the best for this PSoC scheme - We only have 5V available from the PWM, and this 5V has well defined limits and offsets can be set digitally if required - I think a Jfet VCA may well do the job, and might be able to use one (PSoC) op-amp for the filter and one for VCA.

The above suggestion would eliminate all external active components.. or at least cater for the PWM filter.

(I personally prefer not to use PSoC analogue in the audio path - I like to be able to get to any active audio component and be able to change it to something else if it doesn't sound right to me - and this particullarly, for me, applies to op-amps .. Its unscientific, but I like the sound of some and not the sound of others - and in different applications / circuits they are not always the same op-amps I use ;-) - but others are happily using PSoC op-amps for audio path, so perhaps im just being silly.

But your specification is great - and presumably you are having this thing PROTOTYPED and not intending to go straight to any kind of pre-production or "ready to go based on these circuits" scenario !? - Because any such action would be folly IMO, even with a re-configurable PSoC...

I am sure the pedal will do what you want - and I have presented my best ideas on how to do this.. But my first advice for whoever builds / programs it is to start with the Capsense - build the sensor, check that this can be reliably detected to switch on/off - then implement the PWM / VCA feeding it a simple test envelope generated (repeating up/down count from min to max) in the PSoC and get that working and sounding clean, and checking for latency etc, then test the A/D sequencing and conversion on the pots - do all these independently, and when all are working you will have all the required functions to simply clip together in the firmware, and not have any nasty surprises.

I have listed the above in the order of (what I think is) descending complexity and probability of problems.

Fred.

 

Posted: 9/4/2014 7:06:49 PM
GordonC

From: Croxley Green, Hertfordshire, UK

Joined: 10/5/2005

No problem, I can hold off. :-)

Yes, it will go to prototype. It is most likely that it won't go beyond prototype, but you never know... publicly hunting around on the dreaded Facebook for someone to make it might generate some interest...

Posted: 9/4/2014 7:35:16 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,

There is just one thing remaining to question.

Often a client proposes some specifuckations (or I misunderstand their requirements / specification) and one goes about several design iterations to meet these - in this process the real specifications emerge and usually the design is adapted to cater for these -

However, if I am not careful, I can end up carrying ideas from specifuckation and end up altering these to meet the specification rather than just throwing that idea away and implementing a simpler solution for the real requirements.

My initial understanding was that some form of force sensing (as in, analogue) was required, and all that followed thereafter was based on this notion until  [8/30/2014 9:41:31 PM]..

In fact, (analogue) force sensing is not required at all - all you want is a sensitive foot switch! And there are a possibly a whole load of ways to implement this - for example 4 simple contacts wired in parallel on the corners of some plates bonded together with squidge, or reed switches - even horizontally aligned (flat) photo interruption on some simple assembly..

I am NOT saying that the proposed Capsense scheme is the wrong choice.. I think it could be the best choice anyway - It serves the function with almost no mechanical complexity and is probably the most robust solution if the right materials (for the squidge in particular) are found.. But what I am saying is that for a switching (as opposed to linear) pedal, it is certainly not the only choice available - and if a different switch was employed then many small MCUs or boards could do this job and you may find it easier to get an expert on one of these more popular parts .

Fred.

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