How to patch midi tracks to a hardware or virtual instrument

I have been using Cakewalk in Windows for 30+ years but am trying to learn Ardour in Ubuntu Studio as a backup system. I have successfully played back a session with imported audio tracks through an attached Native Instruments Komplete Audio 6. I imported a general midi file and tried to figure out how to get my midi instrument, a Yamaha Motif ES6, connected via 5 pin din cables to the Komplete audio 6. The only sound I can get out of Ardour is some kind of virtual instrument that I can’t change. I have hunted tutorials and searched through the online manual but have not figured out how to connect the Yamaha keyboard or to change the virtual midi instrument. Hoping that there was a Youtube video out there, I discovered that Ubuntu will not let Ardour and Firefox have access to the sound module at the same time. Any clues on where to look for midi setup instructions and to be able to have Ardour open and listen to videos at the same time will be greatly appreciated.

Hi, I will dodge the MIDI hardware routing question since I use very little MIDI and only within Ardour to hosted Virtual Instruments. As far as Ardour locking up the Sound device, this is true and expected behaviour if you use the ‘ALSA’ backend. In a properly set up Linux system using Ardour’s JACK backend should have JACK either coexist peacefully with PulseAudio and allow you to pipe in whatever outside Web Browser or Media Player you like. Or on a newer PipeWire based system selectting Ardour’s JACK backend should allow ‘pipewire-jack’ to work within PipeWire and make any external Desktop Audio connections you want.

I would expect that a specialized Audio system like Ubuntu Studio would make this pretty easy… Have you tried Ardour with the JACK backend?

Thanks Glen. I opened a new empty session and selected Jack in the opening wizard. Then I imported an audio track that played just fine with alsa selected. With Jack I got silence. The ribbons jumped but nothing out of the Komplete audio 6. When I started over to set it back to alsa, that part of the wizard disappeared. Now I can’t figure out how to get alsa back. I looked at a graphical depiction of Pipewire and my engineers brain tilted with confusion. I’m having a tough time getting inside of the programmers heads to figure out how to manage this software.
Even though you don’t use external midi instruments, It would be helpful if you could suggest how to patch a virtual instrument to a midi track. Thanks again.

You will have to manually route the MIDI track to the hardware device, or other VSTi track. The bottom of the mixer strip has the routing button for the output of the track.

Thanks guys. I did finally get sound out of my audio track by locating the
output selector at the bottom of the mixer strip. I don’t fully understand
what I did but I did get sound out of the speakers. I also did get a midi
track to trigger my Yamaha Motif ES6. Still looking for a way to send midi
messages to set the voice for each channel. Also trying to get Ardour back
to ALSA. Or maybe I should give up on ALSA. I guess I am spoiled by the
simplicity of Mac’s Core audio and ASIO in Windows.

There is an existing midnam file for Motif ES series.

On any Ardour session from the top menu items select ‘Window’–>‘Audio/MIDI Setup’ and you can change the Audio backend. I hear what you’re saying about the simplicity of Audio in Windows but in truth a properly set up Linux system with PipeWire’s JACK server linked properly to just work when you select a JACK backend is now just as simple. Sadly very few Linux Distributions seem to do this by default, if Ubuntu Studio doesn’t that’s very surprising…

Are there not any Ubuntu Studio Users here who can comment on this and make some suggestions how to get it working?

I was able to insert a patch change but the Motif does not respond. The audition of the different patches sounded correctly and I was pleased to see that someone had entered the names of all the sounds on the Motif. I will have to change the names of the user patches. The Motif only responds to the track by playing a piano sound. I cant discern if it is General midi Grand Piano or preset one Full Grand. I may have to dig into the Motif manual.

It is possible that the main outs of Ardour need to be routed to pipewire-jack.

I have recently updated to Ubuntu 24.04 LTS. I can get my system to work with ALSA just fine, but piperwire-jack did not work. I had read that it should just work. I have not spent any time troubleshooting. The pipewire-jack may need to be setup. If I find out what makes it work, I will post here.

Pipewire will allow you to playback video from a browser, and use Ardour at the same time, but it is fairly new, and there was several issues just several months ago.

Just letting you know that the problems you are having getting this to work are not uncommon.

To clarify,

I was not thrilled about PipeWire when it came along but there are some general statements about it floating around that are misleading… Since it’s 1.0.0. release it has been very solid for Audio work with the exception of a minor recent regression in versions 1.2.0. and 1.2.1 which could affect Ardour Audio exports only if the JACK backend was used, this has been fixed in version 1.2.2.

Secondly the reason PipeWire’s JACK implementation ‘doesn’t work’ is most often because the system ldconfig ‘linker’ has not been told when the system calls for JACK to provide ‘pw-jack’… So when you select the JACK backend in Ardour and ‘old JACK’ isn’t installed nobody is handing the baton to PipeWire so nothing happens… In these cases it will (annoyingly) be required to start Ardour with ‘pw-jack’ prepended (ie pw-jack ardour8) so Ardour knows it’s using PipeWire JACK…

AV Linux does this by default so no special launch commands are needed, perhaps Ubuntu Studio doesn’t so I would try adding pw-jack to Ardour’s launcher command and see if that works as expected. Setting the linker will vary from Distro to Distro but I would imagine PipeWire’s wiki or docs could clarify that.

Thank you. That helps to clarify why my system is likely not working with pipewire jack.

in the CLI, the command

PIPEWIRE_LATENCY=256/48000 pw-jack /opt/Ardour-8.6.0/bin/ardour8

This set my latency and sample rate to what I use. It worked well.

@merlin4656 I did have to manually route the master track to the USB Sound card though :
image

It can be routed with either qpwgraph or Ardour. I think using Ardour would be easier.

I did notice that pipewire calls all the inputs and outputs of my audio ports CAPTURE_FL ( OR CAPTURE_FR) , or PLAYBACK_FL (or PLAYBACK_FR) . This is confusing. There is probably a way to change it.

And the volume is very quiet compared to ALSA, but that is controlled by the system now…

I had some system sounnds coming through my USB now as well…I kinda expected that, but I will say that it seems like pipewire just kinda gets in the way. It seems like a nasty surprise is just waiting to happen. (unwanted sound recorded, mystery settings to find) I do like ALSA because it works, always works, and is very stable.

Thank you @GMaq !

Yes, I always use ALSA too, I was just explaining how JACK could be made to work. Now, to solve your channel naming if you have PulseAudio Volume Control installed you can assign a “Pro Audio” profile to your soundcard in the Configuration Tab. This is how multiple channel devices are handled with ‘AUX0, AUX1’ etc.

1 Like

I did get the Ardour audio to run in Jack by reconnecting the master strip
to the Komplete Audio 6. For some reason the system disconnected when
switching to Jack. When I went back to ALSA, it would not connect to the
Audio 6. It just wasn’t there. It was available to the Ubuntu system
settings but I still could not hear the sound of Youtube videos. Went back
to Jack in Ardour, now audio works in Youtube. Looks like sharing audio is
not a Ubuntu thing.
Thanks for helping,
Dan