CSQ-100-style Arduino sequencer, part 2

Cardboardsequencer

I’ve been working on my silly cardboard-faced Arduino CV/gate sequencer thing. My previous post (Beginning CV/gate sequencing with the Arduino) outlined the idea, here’s my criteria:

  • it should work like the Roland CSQ-100 (or SH-101) step sequencer
  • sequence hz/v or 1v/oct synths
  • allow the user to change patterns and record/edit sequences while it plays (like the TR-606)
  • should be super-tight

Here’s a video of where I’ve got to, with lots of annotations to explain what on earth these unlabelled buttons do.

It’s now based on an Arduino Mega, mostly because I was always on the edge of running out of pins. I got fed up with having to wire up shift registers for the buttons. And then I got fed up with having to wire buttons, so having been obsessed with the idea of the Roland MC-4, I added a numeric keypad. (Eventually it’ll be able to email as well, right?). It’s handy having the seemingly endless 128KB of program memory, I was bumping up against the Atmega168 memory limit of 16KB on a previous project.

I wanted lots of LED displays, mostly because I was trying to ape the MC-4’s measure, step, and data display – so the previous version had three of them (demo video here). But carelessly I killed one of them, and then realised they were expensive for the amount of information they display. Instead I got hold of a suitably retro Samsung 20T202DA2JA vacuum fluorescent display (datasheet), which is lovely. Here’s my first childish first fiddle with it:

Vfdbollocks

I’m using Ladyada’s SPI_VFD library to talk to it, which works really well.

This time, rather than just storing voltages (read in by the onboard 10-bit ADC), I’m using a lookup table to store a key number based on the input voltage from the synth keyboard. This saves a bit of EEPROM space, but it also means I can allow for transposing the sequence from the connected keyboard, which is a replication of the KCV Add feature on the CSQ-100.

On playback, the program uses another lookup table to convert the note number to a number between 0 and 2048, corresponding to 0 and 5v. I’ve fiddled around with these numbers to get them as close to the note frequencies as possible. I’d use a different lookup table for v/oct and hz/v synths – this has a nice side effect in that I could have a hz/v keyboard controlling a 1v/oct synth. Also I could use further custom lookup tables for synths that are scaled differently, so it could be handy for controlling my cv/gate modded SH-1000 that runs closer to 1.3v/oct.

Because it can only output a maximum of 5v (using a very cheap Microchip MCP4922 dual DAC, following along with Mr Book’s post Controlling a Gakken SX-150 synth with Arduino), this means I’m getting just over 2 octaves on the MS20, but should be over 4 on anything 1v/oct. Before I added the slide circuit, I was getting better than +/- 2 cents across the range on the MS, which is acceptable to me.

Currently each (max 32 step) pattern uses a byte each for note number, gate length, aux control voltage, and switches, which are currently rest, tied note, and slide. I’ve had another trigger output (called MPX on the MC-4) working as well, which worked well for switching in LFO modulation for certain notes on the MS20.

Each pattern uses 129 bytes of storage space – 128 bytes for the pattern itself and one for the length. On my previous attempt I was storing patterns in the Arduino internal flash, but on this version I’ve moved to an external 512 kilobit (64 kilobyte) 24LC512 EEPROM, following Cutedigi’s tutorial. Writing a 128 byte page is slow, taking at least 5ms, so to avoid interrupting the playback, saving and loading is scheduled for directly after a note trigger. This currently has the side effect that it has to be playing to save something, which isn’t so good. As far as possible I also update the screen directly after a note trigger, although it may not such an issue with the SPI VFD display as with the slower Sparkfun LED displays. Here’s one that I’m currently using for the step display, glowing ultrabrightly:

Sparkfunled

Because it’s so much fun to play with, it’s easy enough just to sit there twiddling with it and not actually getting it finished. It seems to spit out little melodies that I wouldn’t naturally come up with sitting at the keyboard.

In particular, the transpose function is a lot of fun. When it can’t transpose the note any higher because of the limitation on the maximum voltage output by the DAC, the software forces it to wrap round underneath; so rather than a F4 which it can’t reach, it (should) play an F0, which makes for some unexpected but pleasantly varied lines.

Here’s a quick demo of the transpose function from the MS20 perspective; I’d already recorded a short sequence:

I’m finding designing the physical user interface design fascinating, and difficult. I always wanted synths and sequencers with a knob or button per function, but now I come to designing my own instrument, I can easily see why the 80s thing was to sling in a screen and an alpha dial. And like I say, it’s a pain to wire up the buttons. There’s also a temptation just to keep adding features ad infinitum. Currently I’m giving in to it, although I’ll need to make decisions if I’m ever going to get it boxed up.

I’ve been looking at the Mutable Instruments Shruthi-1 for inspiration for a box, particularly Hannes Pasqualini’s Shruti-1, which looks really good. Slowly getting there… will get it done eventually.

7 comments

  1. 15th October 2011haima says:

    I’m pretty excited by this – do you plan on making it available in some form in the future? I’m capable of the hardware DIY’ing and my brother is good at arduino programming… I’d love to be a beta tester! 🙂

  2. 17th October 2011ua726 says:

    Thanks for your comment, it’s nice to hear that someone likes it.I could post the Arduino sketch and libraries I’m using but it’s a half finished mess. It’s set up for an Arduino Mega which is a bit expensive too. You could put the hardware side together fairly easily using the following…

    I used a bunch of existing libraries; the Bounce library (http://www.arduino.cc/playground/Code/Bounce) to debounce the buttons, the wire.h library (http://www.arduino.cc/en/Reference/Wire) for the EEPROM, digitalWriteFast for triggering the outputs as quickly as possible (http://code.google.com/p/digitalwritefast/), Ladyada’s SPI_VFD library (https://github.com/adafruit/SPI_VFD), and the keypad.h library for the silly keypad (http://www.arduino.cc/playground/Code/Keypad) although that’s probably overkill for most. There’s a fair amount of info on how implemented the voltage to note number and back again conversion in the blog post too. Hope that helps for now. I’d like to design a boiled down version for the standard Arduino, I’ll get round to it eventually.

  3. 5th December 2011Erik Hysterik says:

    I could easily make a frontpanel and box for you, if you could supply the schematics, and the newest code 🙂

  4. 13th December 2011Zachary Lovitch says:

    wow! really cool project. looking forward to its completion and great jams btw.

  5. 24th December 2011ua726 says:

    thanks chaps@erik Thanks for the offer, I will eventually do a front panel, I have all the bits… just need the time 😉

  6. 2nd May 2017Mike M. says:

    Did you ever get to finish this? It looks like an awesome sequencer. It would be really great to get some code/schematics. I love the glide and transpose features you did. I don’t see those on many other sequencers.

  7. 2nd May 2017ua726 says:

    Nooooo… bought an MC-4 a couple of years later, and that was that.

    Although this does more in some ways. I might still get round to it, though not with an Arduino Mega.

    Since I did this there have been sequencers out that do similar-ish things; nearly bought an Arturia Keystep the other day, looks simple and fun. Just watched the Sonicstate video for the Beatstep Pro, which also looks amazing for the price.

    In Eurorack-land there are a few 101-style sequencers, most of which are too tiny for me. Not quite the same thing, but I’ve had a demo of the TSL Stepper Acid, and that’s great and they’re nice people.

Write a comment: