Export Multiple Midi Tracks Routed to a External Synth (With Single Stereo Out) Separately to Audio


I am totally new and coming from Cubase here. I have a 40 midi tracks to create stems for mixing a 10-minute music. The midi tracks are all routed to an external synth as sound generator. The synth just has 1 stereo output port. I wish it had more.

I suppose I can render them or export them to audio in Ardour one at a time. This would take a lot of time over 6 hours assume.

Is there a way to make this faster? Say, using Mac’s automator? Can I write my own function and rebuild Ardour?

Any help would be greatly appreciated.


Is that hardware, or an external software synth? What synth is is it?

If it’s a hardware synth I don’t see how you can get around the realtime requirement (it’s 40 * 10 min = 6h 40min – not 60 hours). You’ll have to wait for that hardware to synthesize.

For software synths it depends on the synth. By default Ardour exports faster than realtime “freewheeling” (as fast as possible, as slow as needed). This generally works well with plugins and it does also work with external JACK-apps.

Thank you for catching the error. I meant over 6 hours. I don’t mind setting it over night to do that for me! The mix down should be down in real time. or I can do it on my other Mac to do that for me while working on other projects.

About the hardware is Yamaha PSR-A3000, its an standard PSR Yamaha Keyboard with lots of ethnic sounds.

If that feature is not readily available in Ardour, can I do this using Ardour’s API?

If so, I will write a subroutine to do that myself. The algorithm is intuitive as follows:

Inputs: midi_tracks, Array/vector/collection of single/multi channel MIDI events/track, MOP, midi output port ( of course 16 channels), time window ( say from bar 1 to bar 16)
Outputs: wave_files, Array/vector/collection of stereo wave files [wf1, wf2

For each track in midi_tracks:
1. remove the input bus
2. set output bus of the MIDI to MID out of track to MOP
3. mixdown/render MIDI not the project folder to wav file.
4. name the wave file the name of the midi track ( not necessary, would be great if possible)

Any help would be appreciated.


Ardour does not have a built-in feature to facilitate this. Actually a DAW may even be overkill to do this. I’d probably used a command-line .mid player.

Anyway, you can script this in Ardour. paste the following in Menu > Window > Scripting and hit “Run”

Ardour 5.12 doesn’t have any Cancel/Progress-Report for Lua scripts, so test it first with a small session, short record-time. This script simply un/mutes the MIDI tracks instead of dis/reconnecting them, so the process differs from how you have described it. Still, it may serve as inspiration.

Thank you Robin for sharing the code generously with me. Before trying your code, I need to set up my Yamaha PSR keyboard MIDI ports and Audio ports correctly. My MIDI connection to PSR is USB MIDI and audio connection is through my Yamaha Audio Interface (on inputs 7 and 8 )
However, I have a hard time to have Ardour recognize my Yamaha PSR. I am on Mac Mojave and have the USB-MIDI driver installed and work with it in Cubase. However, I don’t see it in Ardour. Do I need to install any additional add-on to have Ardour recognize my MIDI ports? I did restart and nothing worked.

As far as rendering MIDI, should I use MIDI+ Audio track? or simple MIDI track? Can I define my External Synth Keyboard as instrument plugin? From manual:

MIDI A MIDI track is created with a single MIDI input, and a single MIDI output. This is the type of track to use when planning to record and play back MIDI. There are several methods to enable playback of a MIDI track: add an instrument plugin to the track, connect the track to a software synthesizer, or connect it to external MIDI hardware.

If an instrument plugin is added, the MIDI track outputs audio alongside MIDI data.
Audio/MIDI There are a few notable plugins that can usefully accept both Audio and MIDI data (Reaktor is one, and various “auto-tune” like plugins are another). It can be tricky to configure this type of track manually, so Ardour allows to select this type specifically for use with such plugins. It is not generally the right choice when working normal MIDI tracks, and a dialog will warn of this.

Thank you very much, again,


No. Ardour does not directly interact with any Hardware. It always uses Apple’s Coreaudio/CoreMIDI.
Is the device shown and active in Apple’s Applications > Utilities > Audio-MIDI Setup (MIDI Devices Window)?

Check Ardour’s Menu > Window > Audio/MIDI Setup if you have MIDI enabled.

I’m amazed that Apple still allows users to install custom drivers in 2019 :slight_smile:

No, Those are special tracks that have both Audio and MIDI simultaneously. e.g for Vocoders.
In your case you’ll want either MIDI or Audio.

No. It is not. I restarted my computer it is dimmed and dow not let me select anything!