Ardour overruns external synth

I apologize if this is an silly question with an obvious answer. I just started using Ardour 4 and trying to get to a working setup…

I have an external (Roland JV-series) synthesizer/keyboard connected to my laptop via a Roland UM-one interface. The laptop runs Linux Mint 17.1. I got everything to the point where I can capture and playback MIDI tracks (I started with MusE, but it keeps crashing, so unstable it’s unusable IMO… then I discovered Ardour…)

My problem is: every time I move the playhead in Ardour, it sends a whole pile of CC events (sustain pedal and #123) to reset every MIDI part (all 16 channels, multiple times). It sends these events without pausing, which causes the external synth. MIDI buffer to overflow. After which I have to reset the synth every time. Pretty annoying.

If the MIDI events were in a track, I would just edit the track to spread them out over many ticks. But since they are auto-generated by Ardour, I don’t see how to fix this problem. Ideas anyone?

It isn’t resetting every MIDI part, merely ensuring “all notes off” (for which you need to send both CC #123 and turn off the sustain pedal). I am frankly really surprised that your synth has an issue with this: no matter how fast ALSA queues them up, they can only be sent down the MIDI cable, and the cable runs at a well-defined speed which any MIDI receiver should be able to handle.

I suppose we need a “mono-channel” option for MIDI tracks for cases where the (external) target uses only 1 MIDI channel …

Hi Paul,

Thanks for the response.

This Roland synth was always a bit finicky that way (I’d be curious to hear of anyone else’s experience with Roland JV synths). The owner’s manual says that after receiving certain types of SYSEX commands for example, it needs 250ms to process the command (so no sending anything else during that time, or else the dreaded MIDI BUFF. FULL error will show up). Nothing about CCs though, and I would expect that it should be able to handle them pretty much at “wire speed”. So I’m a bit baffled.

To be clear though, it’s not that this instrument supports only one MIDI channel. It plays up to 16 parts (16 channels). I think it’s the flood of CC events all happening “on the same clock tick” (or nearly so) that throws it off. Also, I noticed that Ardour sends one sustain pedal release and one CC #123 for each MIDI channel, per MIDI track in the session (so e.g. 5 MIDI tracks x 16 MIDI channels x 2 CCs = 160 events with no spacing between them). And this even though each track is configured to output to a single channel (on each track I’ve turned off all but the single MIDI channel that I recorded on this track).

Perhaps if Ardour realized that all these tracks output to the same MIDI port, it could limit itself to one set of 16 “all notes off” events?

Or am I just doing something wrong, i.e. with the way that my session is setup? Appreciate any ideas…

There’s some confusion here. It makes no difference whether Ardour emits 1000 MIDI events on the same clock tick or not. The MIDI data has to be delivered to your synth via a MIDI cable, and that cable has a fixed data transfer rate. The only problem (in theory) with queing a large number of events at once is that if it does very soon afterwards, and again, and again, the buffers inside the MIDI device driver in the kernel might potentially overflow. Assuming that does not happen, Ardour can queue up many, many events at the same clock tick - ultimately ALSA will “dribble” them out at a rate determined by the MIDI hardware which in turn is bound by the MIDI physical specification. Your synth does not receive all these events “at once”.

Older digital synths sometimes can’t handle the MIDI spec it seems. I have this problem on my TX-81z all the time (especially when using real time sysex messages to change LFO speeds etc). The only work around is don’t be too aggressive with your messaging to the device.

The other potential problem is that the ALSA subsystem is not sending the data uniformly. I have found that performance is much improved in MIDI when using an rt-kernel … this is easily noticed by observing a lower amount of drift on MIDI clock. It may be worth trying that first.

Paul,

No confusion, just miscommunication. “All at once” just meant that all these events get sent to the synth at the full 31.25 kbaud bandwidth of the MIDI hardware, as you pointed out. And that seems to be the problem exactly: sending so many events back-to-back with no break is more than the synth module can process (Roland JV is 1990’s technology…). I would suspect that the same issue will arise with other synth modules of the same era.

I reproduced the problem in a new session and determined that 4 MIDI tracks is the most I can have in my Ardour session that does not cause the problem. After I created and recorded a 5th track (in each track I recorded a just few notes over a couple of bars), each time I move the playhead Ardour sends 5 x 16 "all notes off"s and 5 x 16 “sustain pedal off” events and overflows the synthesizer’s receive buffer. I then have to cycle power to the synth, it won’t accept any more MIDI events after that.

Seeing as all these tracks are connected to the same output MIDI port, is there not a way to set things up so that Ardour will send only one set of 16 “all notes off” + “sustain pedal off”, regardless of the number of tracks? That is, it would be enough that Ardour sent this combination only once per output MIDI port, not once per track…

Thanks Allan K. I’ll investigate the RT kernel approach, although I understand that the latest versions of Linux don’t make that distinction anymore (i.e. the generic kernel just has the realtime scheduler built in).

aviatorgeek: http://jackaudio.org/faq/realtime_vs_realtime_kernel.html

@aviatorgeek… so typically you should not “need” an RT kernel… I have found that MIDI usage with external hardware is not really typical… (especially 80’s and 90’s digital synths)…
However, if I understand correctly, you are using multiple MIDI devices from one port…(daisy chained) and that could be congesting the interface on your JV. If that is the case I would highly recommend a small investment in a second MIDI adaptor possibly with multiple ins and outs (assuming you are using a MIDI port on an audio interface)… .Although get something name brand… (not an ebay cheapy)…