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.

No comments:

Post a Comment