Tutorials

Soft-hacking the Korg SQ-1 Sequencer

I have to admit it: I love the world of step sequencers. My original motivation for getting into Max was to create The Best Step Sequencer Ever - something I’m still trying to do. But I’ve also always been entranced by hardware step sequencers: I’ve owned almost all of them at one point or another, and can always improve my mood by cranking up a sequencer and letting it rip.

One of the sequencers I’ve been seeing a lot lately is the Korg SQ-1. It makes sense: this device is cheap (around US$100) and has a lot of interesting functionality, including MIDI sync, host USB connection, battery power and CV/Gate outputs. It’s also right-sized (about the size of a brick…), so how could I not dig into it?

The Setup (and the Limitations)

Since I wanted to make a fun portable rig for some recent travel, I thought the best bet would be to have the SQ-1 sequence sounds from my laptop. This works well - right until I wanted to sync the sequencer to a MIDI clock, at which point it turned silent. You see, this is a case where functions collide; when the SQ-1 is receiving MIDI Clock, it no longer sends its steps to the connected computer through the USB connection. It’s a little maddening, but that wasn’t going to stop me on my quest!

After a little experimenting, I found that I could still get the USB MIDI note information if the sequencer was driven by the ‘Sync’ input jack on the device itself. Since I wanted to play around with timing as well as notes, I needed to be able to sync to a clock within Max. This meant that I had to create a funky two-way setup that would connect one channel of my laptop’s audio interface to the sync jack, connect another channel to my headphones, and still have the USB jack connected to the SQ-1 for receiving note information.

<sigh>

Luckily, I had one of these jacks in my box ’o’ plugs:

This is a stereo-to-dual-mono adapter, and it was perfect for my needs. I could run the left channel back to the SQ-1, still monitor the right channel (to hear my MIDI notes), and capture MIDI.

Making - and Hearing - Steps

The first thing we need to do is to create the sync steps that we need to drive the SQ-1 properly. The manual for the SQ-1 was kind of helpful - it says that the output of the Sync jacks is a 15ms, 5VDC blip. My headphone jack isn’t likely to produce 5VDC, but I thought I could get a 15ms blip. I also needed to get the notes back from the SQ-1, so I set up a simple MIDI-to-device connection to serve as my note player.

You’ll notice that I don’t feed a tone (like a cycle~ or rect~ object) to the output - rather, I just use a sig~ with value of 1.0. After some experimentation, I found that sending a tone would cause unreliable double-triggering, but punching out a quick DC offset - and using a line~ envelope to turn it into a pulse - worked great.

At this point, I could get a note sounding by turning on the SQ-1 transport (which would be paused, because it saw that the Sync input was connected), then punching the button that drives the line~ envelope. Success Part One!

Note: If you find that the sequencer is doubling up on sync input, you may need to change the sync mode. You can find out more about the available modes - as well as a bunch of other information - on this page: http://www.korg.com/us/products/dj/sq_1/faq_tips.php

Clicking To The Beat

Next up was driving the sequencer with a clock. There are many ways to do this in Max - the transport, a metro, tracking a bouncing ball… I knew that I’d be playing around with timing, so I decided to use a lesser-known tool: tempo.

The tempo object is similar to metro, but it has a few extra capabilities: it works in musical BPM, it gives you note divisions, and it counts as if there was an embedded counter object. All these things would become handy, so I started my experiments with this.

The result is a fun little sequencer-driver. On to more adventurous clocking!

Swing Like You Just Don’t Care

Because of my early work on Max for Live, people have been pointing to my swing tools as important ‘borrow-able’ Max content. Rather than just grab the swing function out of the old Step Sequencer from MFL, I decided to try something different: building a swing function with a delay object.

Now, swing/shuffle shouldn’t be that hard: you just hold off a little on every other beat. But that is easier said than done - but let’s do it. First, you need to figure out when ‘every other beat’ actually occurs. This is where the counted output of the tempo object comes in handy. Since we are going to be gating between two ‘banged’ outputs, let’s calculate the even and odd steps and use that to run a switching gate. This is easily done with the % (modulo) object:

Now, let’s use the gating to delay the odd steps. Since we don’t yet know how much to delay, we can start with a number box and play around with the results.

OK - this is pretty cool. But it would be better to have the delay time be automatically calculated by our tempo. This is where things get interesting. I’m used to using older drum machines, where the swing values are often given in the 50% - 75% range, meaning that a normal note comes in 50% of the way between its neighbors, and a hard-swung note is 75% of the way between neighbors.

Thus, we have to make a control that goes between 50 and 75 (in this case, a dial with a minimum value of 50, and 26 steps…), then translate it into a percentage. We then apply the percentage to the per-step timing to get a delay time.

Whew! Now, I’m able to get things swinging - from subtle to over-the-top. Of course, that’s not yet quite fun enough, so it’s time to add a burst generator.

A Burst In Time

Burst generators are a fun addition to a sequencer, since it’ll mix things up - throwing your sequencer into a different note range, and giving a bolt of energy to a repeating pattern. In my case, I decided to have a burst generator that would be turned off the next even step that occurred. Turns out that a second tempo, a umenu and an extra switch was all that was needed.

Now, anytime I wanted a quick flurry of notes, hitting the ‘Burst’ button would jump start things for me!

In Closing

So, hopefully, you see how much fun we can have once we take over some of the clocking functions of a hardware device like the SQ-1. There’s a lot more you could do here, including note alterations, step jumping (muting the MIDI, jumping a few steps forward, then unmuting the MIDI) and other tricking things. But just starting with a little swing-and-burst timing system really added to the fun with this cool little device.

Happy patching!

SQ1-swingclocker.maxpat.zip
application/zip 3.78 KB
Here's the file you'll need to try this yourself!

by Darwin Grosse on February 20, 2018

Creative Commons License
midinerd's icon

Was the main issue from wanting to use the USB port? I'm not familiar with this unit's ports.

The swing: You can use the % output (of 0 or 1) as the coefficient/gate for how much 'delay time' to add. So adding delay of 0 means no delay, and 1*(delay_amount). Then both pathways can run straight into the same delay and you don't have to fork the implementation with that gswitch or whatever.

Also using 'delay' doesn't update itself between ticks, so if you had a very low tempo and wanted to slowly increase your delay time, 'delay' scaling amount would not continuously update, it only would instantaneously upon each click sent down to it. Pipe is the same.

for that reason its better to transfer over into the MSP domain and manage your swinging perhaps with PWM on a squarewave, since the phase of the cycle is constantly calculated as opposed to the gaps in time from sending maxdata to a delay object.

Burst Generator:
- I haven't looked at the patch but I'm wondering how a burst generator puts the sequence into a different 'note' range. It puts it into a different timescale but doesn't affect the 'pitches' or notes.
Does the burst generator get itself back on-time? Cheers