Resources for building a sequencer from scratch?

I have lots of experience writing code but zero experience building hardware. I’m reading intro books about electricity now and browsing adafruit.com to see what’s available, but really could use some suggestions from the elektron brain trust. I’m envisioning a device with a handful of knobs and buttons and a display screen with a raspberry pi or similar device running code internally.

2 Likes

I’m interested in something like this as well. Traditional PWM pots for knobs and using GPIO is fairly straightforward but writing the software will be interesting. I’m currently exploring writing some code in Go on my normal machines and cross compiling to the raspberry pi. It’s a silly idea but I want to make MIDI out of application logs…

But making a solid unit would be quite interesting!

Would you be doing MIDI over USB or actual MIDI ports?

1 Like

I’d recommend getting started with MicroPython/CircuitPython if you want to play around with microcontrollers and have some experience writing code. Adafruit offers a good selection of boards as well as great tutorials to get you going.

2 Likes

If you are set on the raspberry pi for the brain I recommend a GPIO breakout cable that attaches to a breadboard. Much easier to expand to ESP32/Arduino interfaces and setting up buttons for first prototypes!

1 Like

You probably will want to go down the route of running code on a microcontroller rather than a computer like a raspberry pi.

Running code “on the metal” will allow you to have precise timing and almost no latency which is important for audio applications where these things are a top priority.

MIDIBox Seq V4 is a great place for you to learn about the hardware side. It’s very simple when compared to the code side.
MIDIBox uses an STM32F4 microcontroller which is sufficient for a sequencer. They have a breakout board for the STM32 discovery (engineering board) which gives you all your outputs/inputs on easy to access pins (like the PI). It’s basically GPIO’s with multiplexers to give you more inputs/outputs than the Microcontroller has. Maybe some ADC too if you need more. It’s all open source so you can learn what you need for the hardware from there.

For MIDI/MIDI clock code look into the open source Mutable instruments stuff. Everything I e seen and used based on that code is solid when it comes to clock and MIDI

That said… I would make a sequencer prototype and only worry about the software code first using Max MSP (or other prototyping software) and then use the SDK to convert your objects (code) to C for the microcontroller). This will allow you to figure out what kind of interface you need before you start building and testing hardware.
Some Elektron gear (Digitone) was protyped in Max MSP before they made the real code and hardware (for example).

9 Likes

I’m not set on anything, in fact I really don’t know what I’m talking about :hugs: but I’m loving all the suggestions so far, it helps me know where to start.

Coding wise I was leaning towards a strongly typed, compiled language, but I’ll use whatever tool is best for the job.

Thank you. This is a great roadmap.

1 Like

C? https://github.com/pichenettes

2 Likes

I thought about this too, because I seem to want something, that most devices don’t provide and love to play around in my free time with some coding.
While I am quite confident in my programming-skills (they pay my bills for over 2 decades now), I am also not that big of a hardware guy. I built some projects with Arduino/32Bit Microcontroller already, but all I used there was a display, 2 buttons and some sensors.
At the end, I canceled it, because of the costs of the hardware I wanted. I love how the Circuit Interface is used, but would like more buttons. This gets expensive very fast! I started reading about using a Launchpad as Button-Array, that would have been way cheaper, than building one my own.
I eventually found a Deluge on ebay and currently am quite happy with it.

So, what I can give you as an advice: Think about the UserInterface and check out if it is possible, what you want it to be. Less Userinterface than a Digi* or a Pyramid would be a bad experience, I think.

1 Like

Yep this is a great starting/learning point for your MIDI side of things in the code.

1 Like

I’m the polar opposite of this

2 Likes

Check out axoloti theres a good forum an down threads on here as well
http://www.axoloti.com/product/axoloti-core/

3 Likes

This is where you’ll end up but it will speed things up to use a higher level language (like Max MSP) to make the prototype. This way you can make a virtual interface and see what works and what doesn’t before writing huge chunks of code you have to change later.

3 Likes

This could help “ Step by Step: Adventures in Sequencing with Max/MSP by Gregory Taylor”

2 Likes

Really? Where did you find that?

The great grand dad of Ableton Live is a Max patch.

1 Like

And the coding rabbit hole similar to GAS begins haha

I dunno I find that micro second latency is fine for game engines in JS I don’t see how a ms can make such a big difference but what do I know. I’ve only dealt with baud rates of 9600 when making USB controllers (not MIDI, radio/relay controllers) but I prefer to use memory safe languages like Rust/Go however C is the industry standard and can do a lot more in this world. You just have to be sure to manage memory well. And while C is static/compiled, the type system is ok.

At the end of the day, just pick something useful to get a prototype going while you learn hardware. Then refactor to low latency solutions moving forward.

I’ve heard great things about micropython for sure!

MaxMSP seems quite useful as well. Never knew about it! TIL

Have fun with it :sunglasses:

3 Likes

The hardware side of things isn’t so difficult if you can find the resources of people that have already connected similar components.
Knobs an buttons are easy enough. I hooked a screen up to axoloti an it was straightforward.
A good soldering iron goes a long way - it’s really frustrating using a cheap one an the results can be pretty poor.

3 Likes

I was just searching for something yesterday for doing a Euclidean Sequencer using an rPI and came across this:

I am, however, neither a hardware guy nor a coder. I knew some basics of C a long time ago and I’ve poked at Python before. I’ve always wanted to learn and figured “what better way than to learn by doing a project for something you’re passionate about!”

2 Likes

I think Simon posted it somewhere on the forum a while back.

1 Like

It’s not only the user experience, but clock timing internally as well as externally that is vital. If the device has a sloppy clock because of interrupts and a shared CPU with an operating system deciding resource allocation you are going to have a sloppy sequencer. Low latency and solid clocking (not just MIDI) is essential to audio/midi sequencers working well with themselves and each other :smiley:

Just search around for people not being able to get their hardware to sync with Ableton Live (on a computer with a shared CPU) if you want to see examples. If Ableton can’t make it work reliably… well you get the idea :slight_smile:

If you look at the majority of pro audio equipment, you’ll see that almost all of it is done on microcontroller or equivalent components(and for good reason). Much of it is written in Assembly or C to get as close to the machine language as possible.

5 Likes