Wednesday, January 23, 2019

Updated Meta-trombone pedalboard now in stereo

I haven't looked back since moving my meta-trombone from the Macbook Pro to the pedalboard in 2014. Playing with hardware has lead me to create musical devices of my own (which I consider to be a fun hobby and a great distraction) and has benefited my music-making. For instance, here are some videos: the first from a performance in Providence in 2016 and the second of a piano jam at home.



While I enjoyed playing with this setup, there is one compromise I found increasingly hard to accept: the lack of stereo separation. I therefore took it upon myself to redesign my board to remake the meta-trombone once again in stereo. To do so, some pedals were added and others removed. The most surprising change might be the replacement of the Inifinity looper with a second Ditto. The most inspiring (and costly) may be the addition of the three Meris pedals. A lot of changes were also done under the hood in the Pure Data patch and may need to be explored in another post. Overall, this new iteration of the meta-trombone gives me even more flexibility to create music that can be either very rhythmic or atmospheric and drone-like. 

As you might expect if you've been following along for a while, the signal path is complicated. I made a graphical representation to better communicate it (description follows).

Signal path is complex, but colour-coded: green is MIDI, red is control voltage and the other colours represents different audio signal paths.

Audio signal path

The audio path starts with the YSL-697Z Professional Trombone into my trusty Audio-Technica cardioid condenser clip-on microphone. I have been using this microphone for a while and I have never felt the need to look elsewhere in over a hundred gigs. The mic is plugged directly into the Apogee Duet, which provides it with the required phantom power and pre-amplification. The Duet has two inputs and four outputs and I use all but one of the inputs. The Duet provides the interface to my Pure Data patches running on an iPhone 5 through an app with the unlikely name of MobMuPlat.

Once processed in Pure Data, the audio takes three different paths:

First, a stereo signal is sent to the Meris Ottobit Jr. Its outputs are sent to a pair of mono TC Electronic Ditto loopers modified to accept 5v control voltage in lieu of footswitch presses (more on this here). The outputs of the two Ditto loopers are sent to two audio summers (left and right).

Second, the left channel is sent through the Moog Minifooger Ring to the Montreal Assembly Count to 5 and then to a EHX Freeze and the Meris Polymoon. The Polymoon’s outputs are sent to two audio summers (left and right)

Third, the right channel is sent to the EHX Superego and Pitch Fork. The signal then goes to the Abattoir (one of my original creations) and the Moog Minifooger Drive before reaching the Meris Mercury7 reverb. The Mercury7`s outputs are also sent to two audio summers (left and right).

The outputs of the two audio summers are sent through a Radial ProD2 to a pair of ZLX-12P powered speakers. To round out the audio path, the Organelle’s outputs are also sent to the two ZLX-12P through a second ProD2. The Organelle provides percussion by running a Pure Data patch that includes my external based on the code for Mutable Instruments' Grids module.

MIDI signal path

The MIDI signal path starts with two controllers, the KMI 12 Step and the original Trigger Finger from M-Audio, that are sent to the Apogee Duet through a MIDI Solutions Merger and a Roland UM-ONE MIDI USB interface. Trombone notes are also converted to MIDI signals on the iPhone 5 by using the MIDImorphosis app. Most of this MIDI data is consumed in my Pure Data patch, but some is filtered and sent out to control parameters on other devices. After the MIDI out, the first in the chain is the TEMPODE which merges tap-generated MIDI clock to the control information it receives. Next in the chain, we have a MIDI Solutions Quadra Thru that buffers the signal and splits it to the Organelle, through a second UM-ONE, and to two DIY MIDI modules: a DIY MIDIBox and my Ditto loopers controller. MIDI signals are routed from the DIY MIDIBox to all three Meris pedals.

Control voltage signal path

There are two distinct control voltage (CV) signal path. The first starts with the Patterner, my original creation that replaces an expression pedal anywhere you would normally use one. The Patterner's output is sent to the expression pedal input of the Copilot FX Bandwitdh, which outputs three 0-5v CV signals based on its expression pedal input. These three outputs are used to modulate the Pitch Fork and the Ring I'm considering routing the third CV output to the Count to 5 as I've learned that it can accept control voltage in the 0-3v range.

The second CV path is generated from my DIY Ditto controller that sends out 5v gates to trigger the looper's "footswitch" functions based on incoming MIDI control signals.

In performance

Last year I was invited to submit a track for Trombilation, a compilation of solo performances by some adventurous trombonists. My contribution, Cicada river chorus, documents one of the first performances with this setup.

Hacking the Ditto looper for MIDI control

I have long wished for a hardware looper that would allow me to record two loops of different lengths at once from the same source. It shouldn't come as a surprise that looking over the manuals of all available multiloop loopers reveals that no current looper hardware allows this. A software implementation would be trivial, but I'm fairly committed to my pedalboard at this point in the story.

Therefor, I've been considering a way of hacking existing hardware to implement this feature. I settled on the Ditto looper for this experiment because I would need two identical loopers and I already have one Ditto, which reduced my project cost.

My strategy involved two parts: I would first hack the Ditto to gain CV control over its footswitch and then code a microprocessor to translate MIDI commands into appropriate voltages to control the looper.

Ditto CV Mod

The first step was rather straightfoward. After considering a few options, I decieded to replace the footswitch with a mini-jack soldered to the LED side of an opto-isolator. The transitor side of the opto-isolator was soldered directly to the ground and to the appropriate pin of the tactswitch on the Ditto PCB. Sending 5V to the mini-jack makes the pedal respond exactly as it would if its footswitch were pressed.

This modification made for very interesting interaction with my modular synthesizer.


MIDI to CV Conversion

The second part of this project involved converting MIDI signals to CV to control two Ditto loopers. For this, I opted to use an Arduino Pro Mini, because they are inexpensive (~ 2$), small and so useful that I keep a few on hand at all times. Receiving and reacting to MIDI signal with an Arduino is rather straightforward and the information is readily available online (for instance here). A trickier aspect of this implementation is that two Arduino output pins need to be set at the exact same time. Using digitalWrite() in the usual way would introduce latency of a few microseconds between the two loopers. 

To resolve this problem, I had to become familiar with the concept of port manipulation:
Port registers allow for lower-level and faster manipulation of the i/o pins of the microcontroller on an Arduino board. The chips used on the Arduino board (the ATmega8 and ATmega168) have three ports:
  • B (digital pin 8 to 13)
  • C (analog input pins) 
  • D (digital pins 0 to 7)
Each port is controlled by three registers, which are also defined variables in the arduino language. The DDR register, determines whether the pin is an INPUT or OUTPUT. The PORT register controls whether the pin is HIGH or LOW, and the PIN register reads the state of INPUT pins set to input with pinMode(). 
For instance, assigning the binary number 00000011 to the variable PORTB will set pins 8 and 9 high (5 volts) at the exact same time. I decided to use MIDI CC commands to control the loopers with a bit of logic. Have a look at the truth table for exclusive or (XOR):

+---+---+---------+
| x | y | x XOR y |
+---+---+---------+
| T | T |    F    |
| T | F |    T    |
| F | T |    T    |
| F | F |    F    |
+---+---+---------+

The operator returns TRUE if one and only if one of its operands is TRUE. This is a lot more useful than might first appear, since we can use it to toggle a bit on and off without keeping track of its current state. For example, if bit x is on (equals 1), assigning it the result of x XOR 1 will turn it off (equals 0). Repeating this operation will toggle the bit back on.

Returning to our MIDI CC, I control my loopers according to this scheme:
  • MIDI CC value of 1 controls the first looper
  • MIDI CC value of 2 controls the second looper
  • MIDI CC value of 3 controls both loopers
Converting this values to binary should make things rather clear:
  • 1 = 00000001
  • 2 = 00000010
  • 3 = 00000011
With the loopers connected to pin 8 and 9, all we need to do is assign to PORTB the result of a XOR operation (^ in the Arduino language) between itself and the received CC value:

PORTB = PORTB ^ ccValue
This worked like a charm, but I also wanted to sync execution of these commands to a MIDI clock. I solved this problem by pushing the received MIDI CC values into a FIFO buffer and counting the MIDI clock ticks to a certain number before popping values and sending them to PORTB as described above. The number of ticks to count depends on the note value to sync to. For instance, as there are 24 ticks per beat, to sync to sixteenth notes you need to count 6 ticks between function calls.

Possible next-steps

While this approach works and does bring about the desired effect (see video below), the Ditto looper remains a rather simple instrument. Successfully controlling a looper with MIDI messages converted to control voltages does suggest that it would be worthwhile to explore current offerings of eurorack loopers and delays.