Help with basic drum sequencer - saving and looping MIDI in real time

Hi all!

Frustrated Arduino newbie here who may have bit off more than I can chew for a starter project, and I'm hoping you guru's can point me in the right direction.

My goal is to create a stand alone MIDI drum sequencer, capable of creating, storing, and sending MIDI drum patterns. I know this has been discussed ad nauseam, but everything I've come across is either way too advanced for my level, or includes so many variations of the idea that I'm struggling to square their concept with my own.

Ideally I would like to create a drum sequencer like this fellow has done here, but admittedly that's a ways off.

For now, I'm just trying to figure out how to capture a simple pattern of say 1 note over maybe 8 steps, and loop it.

Thus far I've created a MIDI controller using the Notes and Volts tutorial here, and am able to send my MIDI notes to a second Ardinuo Uno using his MIDI input tutorial.

I've done some simple modifications to the Notes and Volts tutorials, like adding LEDs to the MIDI IN, and am able to see my hard coded MIDI OUT notes using MIDI-OX (run through a MIDI in-out interface connected to my PC).

In this setup I've essentially created a real-time MIDI controller - but I want the buttons (notes) I press on the MIDI OUT Arduino to be recorded and looped. Eventually I'd add LEDs to the buttons to signify tempo, pots for velocity and temo control, etc.. But for now, I'd just like to see a loop captured and repeated from the buttons on my breadboard :confused:

Over the past several weeks I've come to the realization that there is a significant difference between just sending a MIDI note (i.e., MIDI controller), and capturing, saving and looping MIDI notes in real-time. But I'm at a loss as to where to start learning... :frowning:

Is the Arduino Uno the wrong platform for this? If anyone point me to a simple starting point tutorial on recording and looping MIDI I would be much appreciative!! :slight_smile:

I'd say the really ambitious part is the "real time" requirement. You may think you're tapping the buttons in strict eighth notes but in reality your timing will be all over the place. Most real-time loopers are able to apply a lot of quantization to get the notes you tapped nearer to strict time. That's a fairly tricky thing to do, particularly if you have a tendency to tap a bit late.

Step recording and looped playback is much easier, which is why you see such a lot of drum machines that work that way.

Steve

Thanks Steve,

You're right about challenges with quantization, but to clarify about real-time recording, I'm referring to enabling or disabling a step as the pattern is being played. I should have been clearer.

For the time being, I've scaled back my ambitions to just getting a rough starting point for a sketch than can fire off a pre-programmed MIDI note based on a looping 8 step pattern. My google skills are apparently lacking in this arena :confused:

Maybe I'm wrong to assume that a "looping pattern" sketch has anything to with MIDI at all? (That's what I've been researching these past couple weeks..)

Is the Arduino Uno the wrong platform for this?

No.

But I'm at a loss as to where to start learning..

I do cover this in Chapter 4 of my book:- Arduino Music Projects. You can down load the code from this website as well. You want listing 4.10. MIDI Looper Pedal. In addition to the MIDI interface you will need two push / foot switches, record and stop recording as well as two LEDs showing, recording and replaying.

Thanks Grumpy Mike,

I got a digital copy of your book and jumped to Chapter 4. I've loaded the MIDI_Looper sketch and built out the schematic depicted in figure 4-8 (page 97 on the Amazon kindle cloud reader), but I'm not seeing where we're reading any MIDI IN data from. Am I missing something? I have not built out the projects prior to this- are they intended to be sequential?

Thanks again for your help- the intent of the MIDI Looper project is exactly what I'm looking to implement.

The MIDI input is handled by the checkIn function. It reads the serial port and then sorts out what sort of MIDI message you are getting. It makes it's first appearance in Listing 4-1 and is explained in the paragraph following this listing.