Exporting or capturing Digitakt MIDI tracks?

Hi all

I’ve been getting into MIDI sequencing on the Digitakt and it’s great. I’m actually routing the MIDI tracks through my DAW and triggering h/w and soft synths. Sounds really tight! After only sequencing within the DAW until now, it’s really inspiring and great to have the music and the drums grooving together (the sample tracks are coming through to the DAW using Overbridge).

But with the lack of song mode etc, I can only go so far (at least with the way I work), so I’d like to arrange my grooves in the DAW to turn them into finished tracks. As the MIDI is already being routed into my DAW (REAPER), I thought it’d be fairly straight-forward to capture it. How wrong I was!

I’m encountering the dreaded MIDI jitter, which pretty much destroys the groove of the tracks. I mean, everything’s there but without the tight timing you hear on playing back from the Digitakt. It’s such a shame and very frustrating!

This is mainly using the Digitakt’s USB out, but I’ve tried pretty much everything at this point, including the MIDI DIN out with a Roland UM-ONE and not had any improvement. I’m on a high spec-ed Windows 7 machine but I’ve also tried with Win 10. The only thing that I can think of that might help is a Mac, which I haven’t been able to try yet (people talk about Macs having low MIDI jitter and accurate MIDI time-stamping).

Obviously I could record the audio rather than the MIDI but I’d like to keep the flexibility of working with MIDI if I can, and so this wouldn’t really get me where I need to be.

I’m wondering if anyone has come up against this problem and if they’ve found any solutions?

Other thoughts of mine are - is there some way to just export the MIDI info from the Digitakt’s project files? Is that info somehow available from the sysex? Or another way to export the Digitakt’s MIDI info as data?

Or, is that some way to get the Digitakt’s MIDI info out of the Overbridge plugin? Have I overlooked something there? I’m thinking if there is, this would likely be far more accurate as it would be “piped” straight into the DAW.

Apologies for the long post! TL;DR - I want to accurately record the Digitakt’s MIDI tracks’ data in my DAW.

Big thanks

Ben

1 Like

This might be obvious but have you tried quantizing?

I want to keep my performance as is, ie swing and microtimings etc. Quantizing will at best change things, at worst ruin the groove!

Have you tried just recording the midi in by itself one track at a time? That might help if you’re having latency issues etc.

Thanks - I have already tried that yes. It does seem to help a little… but not enough! Latency is fine/good and dealable - it’s jitter that’s a nightmare.

Have you tried using a different device to record? Another computer, tape recorder etc?

Yes tried a few different MIDI devices - direct from the Digitakt via USB, then via Digitakt’s MIDI DIN to the Roland UM-ONE and to an Orpheus. All result in pretty much the same thing unfortunately. Tape recorder?! No…

have you tried other software or only reaper?

i have had luck with this one https://gigperformer.com/downloads.html

I did try Studio One and ACID - same results. Thanks - I’ll try it! You’ve been able to record pretty much jitter-free with this? Can I ask what your setup is?

when i was on pc: i have used a steinberg(midex) and motu(timepiece long ago, then midi express 128) midi interfaces running cubase when i was on pc.

on mac i used my access virus as my midi interface into ableton.

i would suggest contacting a friend with a mac and taking your digitakt and midi interface over there to rule that out.

Thanks for the info. Yes been thinking exactly that - going to test on a Mac and see if I get better results on OS X.

I know you said you’d prefer not to record the audio, but why not give that a try? Often it’s good to “print” a track and then move on. If you really, really need to change something, you can always just go back to the Digitakt and re-render it.

I render midi to audio as soon as I’m happy with it. I never keep midi around in Logic unless I actually used one of Logic’s soft instruments. It helps keep the load down on my 10-year-old Mac, too!

3 Likes

Thanks for the suggestion but it’s not just the way I want to work. I mainly compose on the DAW and I consider the Digitakt a great groovebox - a really useful augmentation to my existing workflow. Really cool for getting ideas started but then I want to hone these further in the DAW and arrange etc. Committing to audio at such an early stage in the composition/production process would be really restrictive to me. I’ve tried it - it doesn’t work for me. In fact I used to work like this many years ago before DAWs were able to handle what they can today. So I’d consider it a seriously backwards step!

Plus I’m also often working for clients/to briefs who want changes etc. This requires me to stay in MIDI for as long as possible.

@mzero - I wonder if there’s any way at all to extract the MIDI track notes from project sysex files?! That would be amazing!

I wonder too @Elektron if there are any plans to get the MIDI tracks piped to the Overbridge plugin, ie bypassing the need for USB MIDI input. That would perhaps be far more accurate?

Cheers

Ben

Well, yes, all the information from the MIDI tracks is indeed in the sysex… and with some work, I could extract it… but… it opens the question of how do you want that data. For example - if a trig has a conditional flag on it like 25% - do you render it into the MIDI output or not? What if you have a trig with 1:3 and another with 1:5? Do you render 15 measures?

If you’re extracting MIDI from the sample tracks as well, there are even more parameters that don’t fit MIDI: LFO trig? The numerous volume/level plocks?

It is doable… but this seems like the hard road…


The real issue is that you aren’t getting a reliable MIDI recording in Reaper.

Do I understand your original post correctly? You play the DIgitakt through Reaper so that the DT’s MIDI tracks play soft synths and other external hardware. The Digitakt is connected via USB. It sounds “tight”. But, when you capture it in Reaper - the MIDI is no longer timed correctly.

Two things come to mind here:

  1. The Digitakt can’t tell the difference between having it’s MIDI mearly routed through Reaper vs. being captured in Reaper. The problem probably lies within how Reaper and the computer are set up.

  2. MIDI Jitter over USB is very very low. The worst MIDI jitter over USB I’ve ever seen is almost 1ms. This isn’t enough to destroy a groove¹. MIDI over DIN, even at theoretical best has about ⅓ms latency, and is much often longer. The jitter is similar.

  3. If playing many notes, over USB there is no difference in jitter or latency (as each packet is very big). If playing over DIN, the effect of many notes can be significant.

You always want to use USB MIDI over DIN MIDI if you can.

I will run some tests later today with both Live and Reaper and see if I can get some accurate measurements for my environment to give you an idea of what you should be able to achieve without heartache.


¹ At 120bpm, a 16th note takes 125ms. So a full 1ms jitter is less than 1% variation in groove. Perhaps at the limit of perception for rhythms, and (if I recall) about what professional drummers do.

6 Likes

thank you for the great info @mzero

i would tend to agree with you about the professional drummer comment but i have met a few people that can hear the slightest differences and i guess it bothers them pretty bad. im guessing it would be a similar burden to having “perfect pitch”

1 Like

This whole issue intrigued me, so I did some careful measurements and am here to report.

tl;dr: Skip to the bottom to see the summary…

Basics

I set up my Digitakt to play a pattern with trigs on just one MIDI track. The pattern is simple alternating sixteenth notes, C5/D5.

The tempo was set to 150bpm, which means each step is 100ms. This makes timing easy!

My computer is a two year old iMac - perhaps a bit beefier than most. USB from the Digitakt was connected to my AudioHub’s USB hub, which in turn was connected to the iMac. I’m running Mojave.

Test One: MIDI over USB

Aim to see just how much jitter is in the raw data.

Digitakt is playing to its own clock. MIDI data recorded by Midi Monitor, set to show nanoseconds.

I recorded 20 min. of this, then analyzed the offset from the expected onset times. Here’s the histogram of 12k events:

image

As you can see, 78% of all events (the middle four bars combined) were within ±0.1ms, 98% within ±0.3ms. And even the worst is only about ±0.5ms.

This tells us that MIDI data coming in via USB (at least in my set up) - is pretty stable with low jitter.

Test Two: MIDI into Reaper

I set up Reaper (v5.984) to record the Digitakt’s MIDI over USB. I sent it the clock, and set output to be in low latency mode, with zero compensation. I set the Digitakt to accept sync.

Then I record a minute of events. I also hand created the same pattern in Reaper’s MIDI event editor, so I had a reference MIDI track.

Now for the clever bit:

  • I removed all the D notes in both, so we had just a 1/16th note C, every 1/8th of the measure.
  • I aligned the downbeat of the 2nd measure of the DT recording to align on beat. This fixed any global latency in the recording.
  • I arranged so each MIDI track played a 4kHz square wave with as quick an envelope as possible.
  • I inverted the reference track, and summed both. If the DT track is spot on, they’ll cancel.

Result:


That’s the sum audio above, and then the DT MIDI track, and the reference MIDI track.

You can see that there are really only three kinds of events, which we can see in a typical measure (taken from near the end):

Green events

The green events are on quarter note beats. The starts are pretty much zero indicating almost perfect time alignment. The ends of these events (and all of the events) are loud because the hand drawn reference events are all exactly 1/16th note long, where as the Digitakt’s are all a tiny bit short.

Note the scale at the top is in samples. I’m guessing the non-zero is due to the amplitudes not being perfectly matched in the synth generation.

Purple events

Some of the time, some of the quarter note aligned events are late:

In this event you can see that it is only 1.5 cycles (so they align, and hence re-enforce, not cancel, for the reset of the event). This is only 0.375ms, which looks like the jitter we sometimes saw in test 1.

Orange events

The orange events are the even eighth notes. They are all exactly like this throughout the whole minute. They are all a tiny bit early:

Since the tone is 4kHz, and there are about 10 cycles preceding the reference note, this is about 2.5ms early. You can also see that it is about 128 samples early…

AHA An eighth note @ 150bpm, with a project sample rate of 48,000Hz is… 9,600 samples. But as my buffer size was set to 256 samples, this is 37.5 bufferfuls. If Reaper quantize either the outgoing clock, or the incoming MIDI to the audio buffer size (!) then each alternate eight note will be ½ a buffer off, or… tada 128 samples.

Yes, offset by 2.5ms is starting to get into “affecting my groove” territory… Though many perceptual things come into play, and it is probably fine in many circumstances… but I’m sure there are some, like @1zerozerozero1’s where it is a concern.

Test Three

I did the same test as Test Two, but with Reaper set to 128 buffer size. The systemtic shift of even eighth notes disappeared!

Summary

  1. USB MIDI from Digitakt should be able as stable and low jitter as you are likely to see from any synth.
  2. Repear’s MIDI recording appears to be affected by the project sample rate and buffer size. At 48kHz, 256 sample buffer - even eight notes at 150bpm are shifted by ½ a buffer (128 samples, or 2.6ms)

Recommendation: Even when recording MIDI, use the lowest buffer size you can in Reaper.

Next Steps

We should repeat the test in Live…

4 Likes

Follow up:

I reproduced Test Two above in Ableton Live. Same capture settings (48kHz project sample rate, 256 sample buffers [I normally run at 128]).

Whoa! All jitter < ±0.2ms!

Looks to me like Live is using as precise timing data from the system as it can get.

2 Likes

Wow, thanks so much for your replies - with such an incredible level of detail. Very much appreciated!

To briefly go through your questions and points from your first reply:

  • If it was somehow possible to extract the MIDI tracks from the sysex, personally speaking, I think the best thing would be to ignore all the conditional flags and render all the data/notes. This seems the most logical methodology and negates the need to worry about which trigs would need to be rendered. Then if one still needed those trigs to be “conditional”, it could be done by editing in your DAW.

  • Personally no I wouldn’t need the MIDI from the sample tracks.

  • “Do I understand your original post correctly? You play the DIgitakt through Reaper so that the DT’s MIDI tracks play soft synths and other external hardware. The Digitakt is connected via USB. It sounds “tight”. But, when you capture it in Reaper - the MIDI is no longer timed correctly.”

You do absolutely understand my post correctly - that’s precisely the issue. The jitter may well be relatively low, but I concur with companyofquail in that it’s definitely enough to change the feel of the groove. Basically, on playback of the Digitakt I can hear that the bass and drums are in that “groove pocket”; this collapses on playing back the REAPER MIDI. It’s no longer a tight, funky groove - it’s all there but the groove is “off”. I’ve done some null testing by recording output of the Digitakt live playback vs the REAPER MIDI recording playback and, while I obviously didn’t expect a null, I’ve not been able to get anywhere close, except for the Overbridge drums/samples which do null, as you’d hope.

  • I totally agree that the problem lies with REAPER/my setup rather than the Digitakt.

  • It’s fascinating what you say about low MIDI jitter over USB - such a view goes against the perceived wisdom that you’ll read all over computer music forums. But I agree that based on my experience it seems tighter than MIDI DIN. I would though like to test Digitakt’s DIN output to a PCIE card with a MIDI input - but I lack one at the moment. I have tested DIN > Firewire (Orpheus) and the result was worse than using Digitakt’s USB MIDI.

  • Although we’re talking about MIDI jitter generally, what’s interesting here is that the jitter isn’t really discernible when playing back the Digitakt through the REAPER monitoring - I’m happy with what I hear whenever it hit play from the Digitakt - but only on recording the data into REAPER and playing it back. So something appears to be happening in that process (perhaps to do with REAPER’s MIDI time stamping (I’ve tried all those options in REAPER too with no improvement, FWIW)).

  • I’ve been thinking about Live too - I’ve recently downloaded my copy of Live 10 Lite and started doing some testing - I’d a spare license from a hardware purchase but never used it til this. I thought it might be handy to make some comparisons.

Thanks again!

Ben

This is really interesting, exciting and actually confirms what I thought I might be seeing from some initial testing with Live earlier today - what I was playing back sounded much tighter to me. I need to spend some more time with it and do more testing. If we’re right, then something is very much up with REAPER!

Wow thanks again mzero for everything here. I still need to read and get my head around your second post :slight_smile: Will aim to get back to you on that soon!

Cheers

Ben

1 Like

Really interesting stuff!!! Its a shame you cant test FL20 as well, im on the verge of going DAW free due to jitter and the following.

A. FL can only send clock and not receive clock

B. The clock it sends is soooo sloppy that any delay effect that is synchronized to the bpm of the track sounds like there is a crazy lfo modulating the delay time…DT, ARmkii, A4mkii included.

And to add to the crazy…The higher the latency of the audio driver the worse it gets, @ 1024ms the bpm fluctuates up to 5bpm in each direction…unusable…and is actually exhausting to listen to even at lower latency.

Its strange but just running the ARmkii as the master over DIN i can happily listen to tracks much longer without getting tiered and i have been contemplating weather sloppy midi timing makes the brain work harder??