How can a newb like myself get my midi piano working with Linux?

All your LV2 and LADSPA goodness and more.

Moderators: MattKingUSA, khz

crystalvox1
Posts: 1
Joined: Wed Mar 02, 2022 10:58 pm

How can a newb like myself get my midi piano working with Linux?

Post by crystalvox1 »

Hi there everyone. I really hope you all might be able to help a total newb out… I have always been on Windows, but my current situation has me on a Linux laptop, which I love and don’t really want to change back to Windows if I can keep from it.

I’m just a piano player/singer-songwriter who likes to record from home. I’m not a producer, I’m not a programmer. I’m pretty technologically challenged. So I will just say in all my shame that I will need explanations that ELI5. The "For Dummies" edition. My husband is a computer nerd, and he can help a little bit, but he’s not a music nerd, so its challenging for us to find solutions together.

ALL I want to be able to do is play piano and record midi piano along with my vocals. Currently I’m on Linux Mint. I have Ardour, which I have tried and I’m getting used to.

I have Ableton Live 9, but I hear this does not work on Linux… if I’m wrong, someone let me know. I would love to go back to it!

I also have Rosegarden, but whoa I don’t understand what I’m looking at there.

I’m set up with Jack, whatever that means (thanks hubby,) so I can record vocals and piano through the instrument cable in Ardour. But I seriously need midi, because I’m not on my beloved Roland either right now. I’m on an el cheapo Williams Legato III who’s onboard sound is reminiscent of a toy piano that’s been sitting in a lake for a few days. BTW, I have no idea how to use USB midi either, I’m used to the old 5 pin stuff. Plugging this keyboard directly into my laptop does absolutely nothing so far, so I assume there’s a bunch of settings or something that I need to deal with once I figure out what programs and plugins I’m supposed to be using.

Ardour does not have instruments. So I’ve been looking for free piano instruments online.. I think I found a few? I just don’t know how to run them.. I’m not even sure what I have.

Can someone point me in the right direction here? I guess I need a piano instrument that will work with my usb midi keyboard and a plug-in that will play that instrument through Ardour? OR should I be using Rosegarden, and if so.. how? (OR is Ableton an option at all?)

This is all Greek to me really. Any advice would be much appreciated!
User avatar
Linuxmusician01
Established Member
Posts: 1524
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland
Has thanked: 756 times
Been thanked: 135 times

Re: How can a newb like myself get my midi piano working with Linux?

Post by Linuxmusician01 »

You say that you want a Midi connection. So let's start by using your USB instrument as Midi in JackAudio, which you say has been set-up successfully already. Have you heard of the utility QJackCtl? Install it, start it. It looks like this if you click on the "Connect" button (in Setup choose: Misc --> un-select "Replace connections window with graph"):
Image
The DAW (Digital Audio Workstation) that I use is Qtractor (in your case that would be Ardour). The Connections window of Qjackctl has 3 tabs. The first is for audio signals, the second is is Jack Midi in/out (you're not gonna use that) and the third, which is open in the screenshot, is Alsa Midi. My synth, the Korg Monologue, is connected via a USB cable that functions as a Midi connection to my PC. I know that the first USB Midi port from my synth is out and the second is in. So I connected synth-midi-out to DAW-midi-in. One connects out to in.

But I've got a sneaking suspicion that you don't want to record the Midi notes that you play, but the audio (i.e. the music that you play). That, of course, is something other than Midi. And the difference between 'm has got nothing to do with Linux or Windows.

Good luck :)
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: How can a newb like myself get my midi piano working with Linux?

Post by merlyn »

crystalvox1 wrote: Wed Mar 02, 2022 11:57 pm BTW, I have no idea how to use USB midi either, I’m used to the old 5 pin stuff.
I've found USB MIDI to be plug and play. It's less complicated to use USB MIDI with a computer than 5 pin MIDI as it doesn't require a MIDI interface.
Plugging this keyboard directly into my laptop does absolutely nothing so far, so I assume there’s a bunch of settings or something that I need to deal with once I figure out what programs and plugins I’m supposed to be using.
Most USB MIDI keyboards are class compliant, so they work with Linux. The Williams Legato III is class compliant, so it should work. Maybe the thing is that Linux doesn't make a 'bing-bong' sound when a USB device is plugged in. Personally that's a plus for me.
Ardour does not have instruments. So I’ve been looking for free piano instruments online.. I think I found a few? I just don’t know how to run them.. I’m not even sure what I have.
Ardour has 'reasonable synth' which is only there really to allow you to check things are working. Add a MIDI track. In the 'add track' dialogue there is an option to choose the instrument. Choose reasonable synth. You could choose the input in this dialogue too. Choose your Williams. It probably won't have a useful name -- it will be called something like capture_1.

A sampled piano is Salamander Grand Piano : https://musical-artifacts.com/artifacts/3

The link above is to a soundfont and to play that back you will need a soundfont player e.g. Qsynth or sfizz.

Add another MIDI track and this time choose your soundfont player as the instrument. Open the soundfont player GUI, choose the Salamander soundfont and choose the WIlliams as the input. To hear the instrument record arm the track. That should do it.
folderol
Established Member
Posts: 2069
Joined: Mon Sep 28, 2015 8:06 pm
Location: Here, of course!
Has thanked: 224 times
Been thanked: 400 times
Contact:

Re: How can a newb like myself get my midi piano working with Linux?

Post by folderol »

My question would be: Is there a specific reason you chose Ardour?
The reason I ask is that it is an exceptionally fine software suite that can produce profesional recordings and stems, but is also incredibly complex with a learning curve that somewhat resembles the north face of the Eiger! It also requires a very good computer.

You, seem more like someone playing for their own amusement, in which case you may be more comfortable with MusE or qtractor.
The Yoshimi guy {apparently now an 'elderly'}
asbak
Established Member
Posts: 897
Joined: Thu Sep 11, 2014 3:04 pm
Has thanked: 71 times
Been thanked: 64 times

Re: How can a newb like myself get my midi piano working with Linux?

Post by asbak »

What you're asking is not trivial to accomplish on Linux. Yes it's trivial for people who already know how it all works, but for newbies - not so much. You need to break down your problem down into small pieces and solve and understand each step.

Your problem: Play piano using Linux as a softsampler and a MIDI controller keyboard.
Your challenges: Getting audio working, latency, getting a decent set of samples loaded into a suitable host on the computer, getting the MIDI controller to work.

Issue #1: typical Linux distros come with consumer grade audio which sucks for playing instruments because there's a very noticeable delay between hitting the keys and hearing the sound.

Most Linux audio enthusiasts are not musicians and therefore they don't care about or understand anything about this. Some do, but they seem to believe that latency is just A-OK. I guess it takes all sorts in life.......

There are many ways of resolving this problem which again leads to more confusion and complexity. Such is Linux audio life. One way to fix it is to disable pulseaudio and use ALSA directly. Another way is to replace Pulseaudio with Pipewire. Another way is to use Jack + Alsa while disabling Pulseaudio. Another way is to use Jack + Alsa and route Pulseaudio via Jack.

Additionally, for better results, the kernel needs to be changed to a PREEMPT or RT type. PREEMPT is good enough for most people and easier to install & maintain on distros like Ubuntu or similar. (Other distros may have more or less complex ways of adding additional kernels.)

The reason to change the kernel to PREEMPT or RT is that the standard kernel does not handle audio applications very well and with low-latency settings the audio tends to crackle. These kernels go a long way toward resolving such problems, however, some further system tuning is required to improve the sound.

Ted from Rosegarden explains much of it here.
http://www.tedfelix.com/linux/linux-midi.html

How you solve #1 depends on how far down the rabbithole you want to go. If you just want quick & dirty results then disabling Pulseaudio and using ALSA may be the way to go. Jack also works great, provided some of the aforementioned issues have been taken care of.

Issue #2: You need a suitable host application on your computer to run a piano softsynth. Again - there are a number of options here. There are a number of sfz / sf2 (sample formats) capable host programs out there. Pick one. Fluidsynth is one such program.

Issue #3: You need piano samples, as already mentioned the Salamander Piano sample set is one place to start. These will need to be loaded into the host application.

Issue #4: You need to get MIDI working, the controller either has a USB or DIN MIDI port or both. Your computer will need a MIDI interface if your keyboard doesn't have USB MIDI. You'll need a MIDI cable to connect the keyboard to the computer. If you have a USB interface then a USB printer cable to the computer should work.

Once you've solved all these problems you'll need to virtually connect your keyboard to the host that plays back the sample files. For that you'll need to either use the host software (if it has controls for this) or use alsa utilities or jack utilities (qjackctl for example) to make the MIDI virtual connections between the keyboard device & the softsynth device.

You'll need to ensure that the host software outputs to the soundcard of the computer using a suitable audio backend, eg ALSA, or Jack.
Last edited by asbak on Thu Mar 03, 2022 3:03 pm, edited 4 times in total.
Some Focal / 20.04 audio packages and resources https://midistudio.groups.io/g/linuxaudio
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: How can a newb like myself get my midi piano working with Linux?

Post by merlyn »

Don't listen to asbak. It's easy. :D
tseaver
Established Member
Posts: 398
Joined: Mon Mar 13, 2017 6:07 am
Has thanked: 11 times
Been thanked: 98 times

Re: How can a newb like myself get my midi piano working with Linux?

Post by tseaver »

@crystalvox1 FWIW, I really like the Modartt Pianoteq pianos: https://www.modartt.com/pianoteq#instruments.

While they are proprietary, they ship a native Linux (LV2) version, and allow you to install additional instruments (using the same player) easily.

Once installed, you need to tell Ardour where the player plugin lives, adding the path to the LV2 path, and run a plugin search. You then add "MIDI track" and select the "Pianoteq 7" instrument. Connect that track to your USB keyboard and bang away.
Ubuntu, Mixbus32C; acoustic blues / country / jazz
User avatar
bluzee
Established Member
Posts: 338
Joined: Mon Nov 30, 2020 11:43 pm
Has thanked: 18 times
Been thanked: 88 times

Re: How can a newb like myself get my midi piano working with Linux?

Post by bluzee »

I was also going to mention Pianoteq as well as Decent Sampler. https://www.decentsamples.com/product/d ... er-plugin/

I use Linux Mint as well. While it is not ideally configure for live music production it can be set up if you follow the the https://wiki.linuxaudio.org/wiki/system_configuration guide. Linux Mint also tends to have rather out dated versions of music software. AV Linux comes preconfigured for music production so might make some things simpler. That said it's not difficult to get Mint tweaked.

I like USB midi. Plug the USB in and turn the keyboard on and you are ready to start connecting to software.

Familiarize yourself with qjackctl and learn how to make midi connections and interconnected audio connections with it. It's not always needed as DAWs can often handle this internally, but it's a basic skill that is invaluable. I prefer version 9 over the outdated version shipped with Mint as it has a graphic display for making connections, however for Mint I've had to compile it from source to get the new version.

Any hoo, what I have setup is a USB midi keyboard connected to qsampler https://qsampler.sourceforge.io/ which is a front end for linuxsampler https://www.linuxsampler.org/. I load the Salamander Grand Piano samples that were referred to earlier then route the audio out puts from that to Carla plugin host to run a reverb plugin. From Carla I just send the audio to the soundcard and play live. It's a pretty great piano sound. The easiest way to install linuxsampler is through KX studio repo. https://kx.studio/Repositories:Plugins

Using a DAW like Audour I assume you would load the LV2 linuxsampler plugin and do this all within the DAW.
Gps
Established Member
Posts: 1136
Joined: Mon Mar 09, 2015 3:09 pm
Has thanked: 331 times
Been thanked: 112 times

Re: How can a newb like myself get my midi piano working with Linux?

Post by Gps »

I only like to repeat what was already said.

I am on opensuse and don't always get a pop up when I connect something through USB, but the changes of it working anyway are huge.

I do not get a pop up when I connect, my Maudio keystation mini 32.
In LMMS however its in the list of devices I can select.

LMMS can't record life music, it can only record midi. Good enough for my use case, but probably not for you.

Back to mint though, you not getting a pop up like on windows, does not mean it's not working. :)
haast
Established Member
Posts: 16
Joined: Sat Oct 03, 2020 3:13 pm
Has thanked: 8 times
Been thanked: 2 times

Re: How can a newb like myself get my midi piano working with Linux?

Post by haast »

At crystalvox: Are you following this thread? Many replies / advice, but no reaction from your side!

My advice would be to start with the manual of your Williams Legato III. In there is tells you how to make this piano send out midi messages through the USB connection.
asbak
Established Member
Posts: 897
Joined: Thu Sep 11, 2014 3:04 pm
Has thanked: 71 times
Been thanked: 64 times

Re: How can a newb like myself get my midi piano working with Linux?

Post by asbak »

After seeing the replies Crystal's probably done a runner, for the hills. :mrgreen:

There's lots of good advice on this thread, (even Merlyn's jokes were funny) that can be collected into a newbie Getting Started w. Linux Audio Guide so that we don't have to keep re-typing the same answers to the same questions.

If there's one thing that is sorely lacking in Linuxland (not on all projects obviously but on many) it is the lack of documentation and up to date documentation and sensical (to a novice) documentation, as and when frequent updates and changes occur. Unless you're an insider or following a topic closely you're often on your own and have to resort to begging when trying to get things to work.

Case in point, it recently took me a couple of days on & off to get from zero knowledge to having firewire audio working because so much of the information is old, confused, outdated, irrelevant, not applicable, incomplete and not well-publicised and ordered. Some will argue that firewire is obsolete (and it is) but this is Linuxland, not Mac & PC world and imo we do things a bit differently. The technology still works incredibly well, why wouldn't one want to use it.
Some Focal / 20.04 audio packages and resources https://midistudio.groups.io/g/linuxaudio
User avatar
GMaq
Established Member
Posts: 2774
Joined: Fri Sep 25, 2009 1:42 pm
Has thanked: 520 times
Been thanked: 555 times

Re: How can a newb like myself get my midi piano working with Linux?

Post by GMaq »

asbak wrote: Fri Mar 04, 2022 12:50 pm
Case in point, it recently took me a couple of days on & off to get from zero knowledge to having firewire audio working because so much of the information is old, confused, outdated, irrelevant, not applicable, incomplete and not well-publicised and ordered. Some will argue that firewire is obsolete (and it is) but this is Linuxland, not Mac & PC world and imo we do things a bit differently. The technology still works incredibly well, why wouldn't one want to use it.
As can only happen in Linux land as well, as I'm sure you've discovered we have 2 firewire methods where one completely disrupts the ability of the other to function... :roll:
asbak
Established Member
Posts: 897
Joined: Thu Sep 11, 2014 3:04 pm
Has thanked: 71 times
Been thanked: 64 times

Re: How can a newb like myself get my midi piano working with Linux?

Post by asbak »

Hi GMaq

Are you referring to the ALSA vs FFADO drivers situation?

I don't claim to know what I'm doing (maybe there are things that are broken I am yet to become aware of?) and admittedly I haven't attempted to create a massive project to really test it to the limits but just messing around with some guitar through an ADAT box into a fw box and piping pulse through jack to the main outs etc and it seems to work fine when using either set of drivers. Loads of channels, low latency, no xruns, so far running as happily as Lil' Castro working one of his fancy dress parties.
Some Focal / 20.04 audio packages and resources https://midistudio.groups.io/g/linuxaudio
User avatar
GMaq
Established Member
Posts: 2774
Joined: Fri Sep 25, 2009 1:42 pm
Has thanked: 520 times
Been thanked: 555 times

Re: How can a newb like myself get my midi piano working with Linux?

Post by GMaq »

asbak wrote: Fri Mar 04, 2022 5:03 pm Hi GMaq

Are you referring to the ALSA vs FFADO drivers situation?
Yessir I am,

But if it works it works well, it's just a half-assed way to leave things for the User to figure out.. But indeed there are a lot of perfectly good FW interfaces out there for those who still have FW ports and are willing to roll up their sleeves. Unfortunately the variable support of the host FW adapters themselves was always a fly in the ointment as well..
asbak
Established Member
Posts: 897
Joined: Thu Sep 11, 2014 3:04 pm
Has thanked: 71 times
Been thanked: 64 times

Re: How can a newb like myself get my midi piano working with Linux?

Post by asbak »

Yes the Linux Audio experience is all about figuring it out, whatever information exists is either in the code, touched upon in obscure correspondence or scattered around while much of it is outdated.

Too bad there isn't any money in writing a Linux Audio book because that would have been a nice ticket to retire on instead of slaving for the man. :mrgreen:

Still, it is pretty amazing how far things have come along and the fact that it is totally, 100% usable for doing professional work imo. Not that many pros will be attracted because of the steep learning curve, the lack of a professional support ecosystem, the lack of vendor support and them already being invested in other platforms.

Once one gets Linux audio working well it's awesome. It's the getting there part that's such a drag. I think once Pipewire's sorted out it will go some way toward improving the overall situation for the beginners. After that the main problem is getting more vendors interested.
Some Focal / 20.04 audio packages and resources https://midistudio.groups.io/g/linuxaudio
Post Reply