Sunday, 22 May 2016

EHX Pitch Fork Remote Control


The EHX Pitch Fork is a very compact and flexible pitch shifter, and I use it in various ways with Zaardvark: octave up/down/both, 50% wet/dry blend. 100% wet, sometimes latching footswitch, sometimes momentary. The number of different permutations gives me a headache during gigs. I have to follow the notes on my setlist very carefully and it always seems to take too long.

What I need is to be able to store settings with patches in my pedalboard controller and have them applied automatically when I change patches, just as they are for the Moogerfoogers.

Fortunately, none of the controls are in the audio signal path - they just provide inputs to the processor. The Blend and Shift pots divide the 3.3V to produce analogue levels that the micro can read. The Latch button connects or disconnects a pullup to a digital input, and the 3-way octave switch connects a digital input to 0V, a 55Hz square wave or 3.3V.

I thought it should be possible to drive the Blend and Shift processor inputs from DAC outputs (with the pot wipers disconnected) and use some analogue switches in parallel with the latch and octave switches. I also wanted to be able to 'press' the footswitch from the pedalboard controller as a bonus feature (allowing the Pitch Fork to be turned on when the signal envelope crosses a threshold, for example). I didn't want to make the pedal unusable in the normal manual mode, so the original pots and switches needed to be left on and continue to work.

Prototyping:


This is the final schematic:


The processor is an ATmega328p, as used in many Arduinos. It will receive MIDI messages from the controller and set the DAC and switches to match the requested settings. The dual DAC generates the 0-3.3V levels for blend and shift. A quad SPST switch handles latch, octave and footswitch. A dual SPDT switch is used to choose whether the blend and shift values are driven by the original pots or the DAC outputs.

There's a handy space inside the Pitch Fork box for a battery. I never use it and it should be big enough for a small PCB using surface mount components. This is the layout:


A 1/4" jack socket is the blend CV input. It is also used to mount the PCB to the box. On the other side is a 1/8" TRS socket for the MIDI input, which is just the ATmega's 3.3V level USART. The 6-way header is for reprogramming the firmware. The 10-way connector carries the Pitch Fork PCB signals.

The PCB was made by Ragworm:


It fits nicely:


Assembly:

Testing:
The end result:

I made a few mistakes in the design, hence the mods. I forgot to update the schematic when I found during prototyping that the DAC CS signal could not just be held low. I also overlooked the DAC output minimum load spec. Without the resistors the outputs tended to oscillate when connected to the Pitch Fork. The resistor on the bottom side is a stronger pullup for the MIDI in. The ATmega's internal pullup was not strong enough.

Putting it all together:
Final assembly:

Firmware

The firmware is written in C++ using the Arduino platform, built in Xcode with the embedXcode tools and downloaded to the target using USBasp and the 6-pin header.

Each control is represented by a class that registers interest in specific MIDI messages, and knows what to do with them when they are received by the MIDI class that polls the serial port. The main program (.ino file, in Arduino terms) just instantiates each of the classes and calls their setup() and loop() methods:


The pedalboard controller firmware was also updated with a PitchFork class that supports a new set of messages from the iPad and translates them to the MIDI messages for the Pitch Fork itself.

User Interface

The MIDI Designer-based iPad interface (described in this blog post) now has a new page:


Each of the controls has an associated local/remote toggle. The blend can be controlled by the Pitch Fork's blend pot (local), MIDI or the CV input.

Here's a rather scratchy demo using a simple loop. It shows how the Pitch Fork controls can be operated from the iPad or the pedal itself, depending on the local/remote setting. The box with the 4-digit display at the top left is the pedalboard controller. The iPad connects to this via its MIDI Bluetooth interface and it translates the MIDI messages received from the iPad into Pitch Fork MIDI, which it transmits to the pedal.


This one shows Pitch Fork settings being restored by the controller when the patch is changed:


It seems to work exactly as intended and has allowed me to remove the Pitch Fork instructions from my setlist altogether.

7 comments:

  1. Hi there! This is awesome. Any chance you'd be willing to sell a few of these modded Pitchforks? :)

    ReplyDelete
  2. Hi, you clearly have crazy modding skills so I wonder if you could help a relative novice back in the analogie world!? All I want to do to my pitch fork is add a simple low pass filter to tame the highs on the upper octave, or the wet signal if that's easier. I tried adding a cap to ground at various points but after reading your blog I can see why that didn't work. Can you suggest anything simce you know this circuit so well?

    Thanks!

    ReplyDelete
  3. You rock !

    I’m really interested. Do you sell some ?

    Do you think such a midi mod is possible with the new pitchfork plus ?

    Awesome work !

    ReplyDelete
    Replies
    1. Hi, I don't sell them, sorry. The Pitchfork Plus might allow similar mods but it would depend on how the controls are read by the micro.

      Delete
  4. Any chance you'd share the girbers of the PCB design so I can g t my own printed? I could probably copy yours from what you've shared already but thought I'd just ask to see if you could save me some time?
    Thanks for sharing this it's awesome and just what I was after doing to my pitchfork!

    ReplyDelete
    Replies
    1. Maybe. In fact I've got some spare PCBs. Where are you?

      Delete
    2. Similar question - I'd be interesting in the project files for this. But more importantly than the schematics (which, again, shouldn't be too bad to copy from what you've shared), I'd love to be able to reuse the code you've written for it; Arduino isn't really something I want to deal with unless necessary. I'd be happy to go as far as actually buying a license for the project ;> Could you shoot me an email at griwes(at)griwes.info? Cheers!

      Delete