Thonking!

Posted on March 21, 2016

I’ve decided to take the plunge (in a very small way) into the world of Eurorack. Right now, I’m more interested in creating an unusual and unique signal processing chain, than I am in creating a stand-alone synthesiser. My current plan is to try and build every module myself, either from a kit, or hopefully, in the future, from my own designs.

I treated myself to a couple of kits from Thonk. A site well worth checking out. I built a Mikrophonie (a contact mic pre-amp) and a Radio Music, a sample player that behaves like a radio, inspired by radio-powered compositions by John Cage and Karlheinz Stockhausen. I had a lot of fun building them, even though I managed to solder some header onto the wrong side of the board (even though the board clearly states which side to use!). This mistake took about 4 hours of tedious desoldering and copious swearing to rectify. Both of these modules were designed by Tom Whitwell from Music Thing. I’ve housed these inside a Doepfer A-100 mini-case. The unfinished wood case is crying out to be screen-printed, but that’s a project for another day! They both worked pretty much first time, which I was fairly surprised and pleased by. I’ll post up some demos when I have some more interesting things to run them through.

 

IMG_0240

MIDI pedal complete!

Posted on February 29, 2016

After some soldering and drilling I’ve finished the final version of my MIDI pedal. I’m really pleased with how it’s turned out. I’ve used it live now, and it was really handy having LEDs to show which pedals I had active, and I can now control Ableton’s looper more accurately. I’m less convinced by the usefulness of the MIDI clock LED flash, it’s in equal amounts useful and distracting. Never mind, it’s easy to disable in code if I choose.

I tried to make the layout of my breadboard prototype as close as possible to the layout I was going to use on the Veroboard. Soldering this together was pretty straightforward, and although it looks a little untidy it worked first time (ok, second time, I had to solder suck some of the solder from one of the joints as it was connecting 2 rails together).

The build went reasonably smoothly. I used InkScape to create a drilling schematic. The only problem was I didn’t factor in the size of the components (only the size of the drill holes), meaning it was only by chance that the bodies of the potentiometers didn’t overlap the USB port – phew! I then marked each centre point with an awl, before drilling a small pilot hole, and then cutting the desired hole size with the hole cutter. This may well be the de-facto drilling technique, not sure, but it worked for me.

 

Pre-drilling

Pre-drilling

guts

Guts!

finished

Finished article

 

The code is now slightly more complex. LEDs can be paired together allowing the activation of one to toggle the state of another (called a sister pedal in the code). This is because 2 of my pedals control the activation of the ‘Record Arm’ on 2 audio tracks that output to the same channel on my Audio Interface (basically 2 different guitar amps, which can play simultaneously but only one can be receiving audio). Activating one ‘Record Arm’ disables the other.

Code available on GitHub https://github.com/cutlasses/MidiPedal

Thee Sunday Sonics

Posted on February 1, 2016

Really excited to be playing at Thee Sunday Sonics this weekend as part of the Fat Tuesday Festival in Hastings. It’s going to be an entire day of electronic music in two locations. I should be on around 5pm in the Printworks. Should be a great day.

 

Thee Sunday Sonics flyer

MIDI pedal prototype complete

Posted on January 9, 2016

The prototype of my USB MIDI pedal is now complete. What you see below is prototyped on breadboard using the TEENSY development board, running software which I wrote in C/C++. It has 4 fully programmable pedal switches (either toggle or momentary), and an LED which flashes in time with the midi clock. This clock LED is to enable me to record loops without the need for headphones (I have not actually tried doing this). The next stage will be to solder it up on veroboard and build the housing. The enclosure has arrived, just need to do some drilling!

 

Once this is finished I’ll have more control over my live performance. My previous MIDI pedal was not programmable, and therefore I was somewhat restricted. With this I’ll be able to have more control over my live looping.

 

breadboard

Prototype on breadboard

Enclosure

Painted aluminium enclosure

 

 

Here’s the source code for those interested.

#include 

#define MIDI_CHANNEL        1
#define MIDI_CLOCK          248
#define MIDI_START          250
#define MIDI_CONTINUE       251
#define MIDI_STOP           252
#define PULSES_PER_QUARTER  24

#define NUM_PEDAL_SWITCHES  4

#define MIDI_CLOCK_LED      4     

#define BOUNCE_TIME         10

int midi_counter(0);

struct PEDAL_SWITCH
{
  int                   m_pedal_pin;
  int                   m_led_pin;
  int                   m_midi_cc;
  bool                  m_is_toggle;
  bool                  m_active;

  Bounce                m_bounce;

  PEDAL_SWITCH( int pedal_pin, int led_pin, int midi_cc, bool is_toggle ) :
    m_pedal_pin( pedal_pin ),
    m_led_pin( led_pin ),
    m_midi_cc( midi_cc ),
    m_is_toggle( is_toggle ),
    m_active( false ),
    m_bounce( pedal_pin, BOUNCE_TIME )
  {
  }
};

PEDAL_SWITCH pedals[ NUM_PEDAL_SWITCHES ] = { PEDAL_SWITCH( 0, 5, 16, true ),
                                              PEDAL_SWITCH( 1, 6, 17, true ),
                                              PEDAL_SWITCH( 2, 7, 18, true ),
                                              PEDAL_SWITCH( 3, 8, 19, false ) };

void setup()
{
  pinMode( MIDI_CLOCK_LED, OUTPUT );
  
  for( int i = 0; i < NUM_PEDAL_SWITCHES; ++i )
  {
    const PEDAL_SWITCH& pedal = pedals[i];
    
    pinMode( pedal.m_pedal_pin, INPUT_PULLUP );
    pinMode( pedal.m_led_pin, OUTPUT );
  }
  
  usbMIDI.setHandleRealTimeSystem( midi_real_time_event );

  midi_counter = 0;
}

void midi_real_time_event( byte data )
{
  switch( data )
  {
    case MIDI_CLOCK:
    {
      ++midi_counter; 
  
      if( midi_counter == PULSES_PER_QUARTER )
      {
        midi_counter = 0;
        digitalWrite( MIDI_CLOCK_LED, HIGH );
      }
      else if( midi_counter == PULSES_PER_QUARTER / 2 )
      {
        digitalWrite( MIDI_CLOCK_LED, LOW );
      }

      break;
    }
    case MIDI_START:
    case MIDI_CONTINUE:
    {
      midi_counter = 0;
      
      digitalWrite( MIDI_CLOCK_LED, HIGH );

      break;
    }
    case MIDI_STOP:
    {
      digitalWrite( MIDI_CLOCK_LED, LOW );
      
      break;
    }
  }
}

void loop()
{
  usbMIDI.read();

  for( int i = 0; i < NUM_PEDAL_SWITCHES; ++i )
  {
    PEDAL_SWITCH& pedal = pedals[i];

    pedal.m_bounce.update();

    if( pedal.m_bounce.fallingEdge() )
    {
       /*Serial.print("pedal down ");
       Serial.print(i);
       Serial.print("n");*/

       if( pedal.m_is_toggle )
       {
        pedal.m_active = !pedal.m_active;
       }
       else
       {
         pedal.m_active = true;
       }

       usbMIDI.sendControlChange( pedal.m_midi_cc, 127, MIDI_CHANNEL );
    }
    else if( pedal.m_bounce.risingEdge() )
    {
      /*Serial.print("pedal up ");
      Serial.print(i);
      Serial.print("n");*/

      if( !pedal.m_is_toggle )
      {
        pedal.m_active = false;

        usbMIDI.sendControlChange( pedal.m_midi_cc, 0, MIDI_CHANNEL );
      }
    }

    if( pedal.m_active )
    {
      digitalWrite( pedal.m_led_pin, HIGH );
    }
    else
    {
      digitalWrite( pedal.m_led_pin, LOW );
    }
  }
}

Happy New Year

Posted on January 1, 2016

Happy 2016! Amidst the over indulgence and reverie, I managed to find the time to finish some tracks over the Christmas break. They are now up on the Music page.

Most of these were composed in Ableton and then mixed in Logic, using LANDR to master. I quite liked this approach. I bounced down each individual track in Ableton and started from fresh in Logic, eq-ing and treating each track from scratch. I found this a useful way to work. I was less tempted to add things and restructure, although there was a bit of that. I plan to release more later in the year.

Playing Live – Mainstage vs Ableton

Posted on November 20, 2015

I often find myself searching for information on how other artists put together their live performances.  Whether others are cautious about sharing their secrets, or they just don’t consider it interesting, I’m not sure, but information seems reasonably thin on the ground. I thought I’d document my experiences, hopefully someone will find it useful!

When I played as Unicorn Power, we used Mainstage from Apple. Essentially it hosts all of the instruments that come with Logic, but allows you to create your own interface to them. It has loopers and playback plugins, and you can layout exactly what you want to see. For our gigs, we were essentially playing to a backing track, which contained the drums and also any samples we couldn’t cue live. We also used samplers, guitar simulation and soft synths, which we played in real-time. The thing I liked about it most, was that for every song I could have a completely different set of mappings and instruments on each track.

 

 

When I decided to do something different from Unicorn Power, I was driven to do something that allowed me to create more of the electronic elements live, and to structure the songs on the fly. As much as I liked Mainstage, it’s rather limited. Ableton Live seemed the obvious progression. I was actually quite surprised initially, by how difficult it was to achieve the same level of flexibility. Gone was the ability to completely change presets with each song, without some rather fiddly faffing about.

 

Set construction

After much research, consultation with friends and copious procrastination, I settled on a format for my Live set. I had 8 main tracks divided into drums, bass, melody, and soundscapes. Some of these tracks play audio clips, and some MIDI clips. I found MIDI useful for live drums especially, where I don’t want the tail to be cut off by the loop. Taking my existing tracks and breaking them down into clips, when they’d not been authored with this in mind, took far longer than I’d care to admit. With the tracks broken down like this I can launch them from a Launchpad Mini. I have various plugins such as filters on specific tracks that are then mapped to physical knobs on a controller.

 

 

Changing Tempo

There is a somewhat hidden Ableton feature where you can change tempo via scene naming. If your scene name contains xxbpm, where xx is a value in beats per minutes, Ableton will change the tempo on the scene change. I thought this was rather obtuse, but it works. The only problem is that the tempo change is immediate, not a gradual change. The tempo changes in my set are reasonable small, and I order the tracks in order of ascending tempo so it works for me.

 

Dummy clips

I wanted to be able to quickly change guitar effects live. In MainStage I could have a different guitar preset for every track, but in Ableton this proved more tricky. I eventually stumbled on ‘Dummy Clips’. These are clips of empty audio that contain envelopes which are triggered when the clip is launched. These envelopes can then drive whatever you want. You could have an envelope to enable/disable multiple plugins for instance.

 

Changing Guitar Presets

My first attempts to have multiple presets that I could switch between, was to create an Effect Rack, and have multiple instances of Guitar Rig with different pedals loaded. I could then switch between these effects using the Chain Selector, triggered by dummy clips. This worked fine, but totally canned my CPU. I hadn’t realised that each instance of Guitar Rig was running concurrently. It was causing audio glitches, so I needed another approach. I eventually discovered that you can change Guitar Rig presets using MIDI CC commands. This seems very poorly documented, so below I’ve detailed how I made it work.

  1. Add a Guitar Rig plug-in to an audio track
  2. Make a note of the #num of the presets you wish to change to (shown next to the preset), this correlates to the program change MIDI command you have to give. Due to the fact that the max value is 127, and you can’t re-order the presets, I had to remove the factory presets (annoying)
  3. Create a MIDI Track
  4. Set the ‘MIDI To’ in the MIDI track to be your guitar rig track
  5. Create an empty MIDI clip
  6. Set the Program Change to match the Preset in Guitar Rig
  7. Optionally map these clips to your pedal (I use a launch pad, so launch the clips as part of a scene to select the Guitar Rig preset).

I change guitar presets on scene changes, and have the ‘Record Arm’ mapped to my USB MIDI pedal. This allows me to turn guitar channels on and off. I also have looper controls on the same pedal (record and clear).

I’m pretty happy with my setup now. It’s taken time to learn Ableton, and I still think MainStage represents a better option if you just want to play previously written songs with a set structure. Where Ableton strengths lie are in its ability to let you improvise. I want to start experimenting with making more of my own MIDI controllers, and possibly some MAX MSP plugins. I might post up some pictures of how everything is physically connected later.

MIDI Controller Stage 2

Posted on November 9, 2015

It works! I had made a couple of foolish errors, due to looking at the wrong pin schematic for the TEENSY (I have 3.2 not 2). But I now have a working, single pot controller. With this mastered I’m hoping that adding more pots should be straight forward. I’d also like to include an LED that flashes on the MIDI clock, this should help me keep time without the need for headphones.

I was impressed at the simplicity of the coding for TEENSY. The snippet below is the entire code. I’m having to smooth the value to reduce noise. Apparently the inclusion of a capacitor will help reduce this.

Looking forward to designing a case..

 

 


#define NUM_PORTS           1
int values[NUM_PORTS][2];

void setup()
{

}

void loop()
{

 for( int i = 0; i < NUM_PORTS; ++i )
 {
   const int prev_value    = values[i][0];
   const int current_value = values[i][1];
   int new_value           = analogRead( A0 ) / 8;

   int blended_value       = ( new_value + current_value + prev_value ) / 3;

   if( prev_value != blended_value )
   {
     Serial.print("analog 0 is: ");
     Serial.print(blended_value);
     Serial.print("n");

     usbMIDI.sendControlChange( 1, blended_value, 1 );
   }

   values[i][0]             = current_value;
   values[i][1]             = blended_value;
 }

 delay(5);

}

MIDI Controller Protoype

Posted on October 29, 2015

I’ve just put together a very simple prototype for a USB MIDI controller. I’m using Teensy, which is a programmable circuit board, which lets you code small programs in C, and upload them to the board. Very much like Arduino, but smaller, and easier to setup MIDI on. I’ve just prototyped it on some breadboard. Once I’ve got a setup I’m happy with I can start on the enclosure. It’s not working quite right yet, more details to follow.

  

DIY controllers

Posted on October 22, 2015

When I began to prepare to play live, earlier this year, I was amazed how few decent USB MIDI footpedals were available. Especially ones small enough to fit in my gig bag. As an aside, after spending ages in previous bands, lugging and setting up gear, one of the tenets of Cutlasses was to have a live act that ostensibly fits into a single bag (plus my guitar). It strikes me as strange that there isn’t a 4 switch, programmable USB pedal, around the size of those larger EHX pedals, widely available. There is Looptimus, but that’s rather expensive and over-customisable for my needs. Another thing that struck me as strange was that the vast majority of information online about such pedals was from people playing music at church congregations. Am I really the only electronic musician who wants to use their feet as well as their fingers? (I realise I’m not.) My eventual solution was to buy a homemade non-programmable USB 4 switch midi pedal from eBay (pretty cheap, sub £50), and replace the DPDT switches with the combination of toggles and latches that fitted my needs.

 

I found this very slight foray into the world of soldering and DIY controllers pretty fascinating, so I’m going to try and take it further. I’m considering for my next project, building something from scratch using the TEENSY USB development board, more on that if and when it happens.

And so it begins..

Posted on October 19, 2015

So, 3 gigs down and I’m already blogging about it. My aim at the moment is to try and document my experience of creating some of my compositions, and the fun and frustration along the way. I’ll probably waffle a little bit about field recording, and discuss some of the tech I’m using, and hopefully provide answers to some of the things I struggled with (expect detailed essays on using dummy clips in Ableton).

 

It’s getting late now, and I promised myself an early night, so I’ll sign out here with an exciting picture of my new field recorder, complete with little hat! (It’s a Tascam DR-40, the little hat, or windshield, is from eBay).

 

FullSizeRender

..