what is the best way to play piano (decent quality sound with with key dynamics) on linux with the least software?

Still new to all of this? Feel free to post in any of the subforums on this site, but in this subforum newbie questions are especially encouraged!

Moderators: MattKingUSA, khz

Post Reply
User avatar
olivia
Established Member
Posts: 9
Joined: Sat Nov 23, 2024 9:26 am
Has thanked: 4 times
Been thanked: 4 times

what is the best way to play piano (decent quality sound with with key dynamics) on linux with the least software?

Post by olivia »

ciao all, this is my first proper post so 'hello and how do you do' to you all.

my kit = linux mint lmde os (debian mint), m-audio keystation (mk3) class compliant, system 16gb ram, cpu = 3.3gb 4 core.

essentially, i'm having a tech nightmare trying to get my m-audio keystation (mk3) to make acceptable piano sounds in any of the software options i have tried (and i have tried a lot).

my core requirement is to be able to get a decent piano sound with key dynamics (harder/softer i play key, louder/softer the sound) so i can plug in my m-audio as and when and practice piano.
if it's possible i would also like to be able to add musescore to that at some point, so i can notate my playing on the staff. so i add that thought as a consideration re recommends (musescore compatible would be helpful).

i don't want to record anything (maybe one day, but not now). and the DAWs i have tried (and have now unistalled) all seemed super daunting to me and (frankly) massive overkill and waste of resources (ssd space and CPU effort). so i have uninstalled them now and would prefer a piano playing option that did not involve them if possible.

that said, the only thing i have been able to get any sound out of at all was LMMS DAW. i was able to get a 'piano' (inverted commas!) sound out of that (so i know - at least - that my keyboard is connecting to my PC and keys register). but it was a horrible 1990s ringtone quality piano sound with no dynamics (crude plinky-plonky on/off noises) and i couldn't seem to improve it using any of the options available (which were overwhelming and confusing).

i think DAWs generally are just way too involved for my needs. menus-within-menus-within-menus, busy and cluttered desktops, chaotically organised. i need clear, simple, easy to navigate.

anyway, these are all the things i have on my system at present that relate to the subject.

if you think you can see a way by which i can make what i want out of these random bits i would be grateful for your suggestions (ps. i'm beginner level re using command lines, so simple GUIs my preference re doing things).

jackd
jackd2
jackd2firewire

qjackCtl
Qsynth

Fluidsynth
Fluid-soundfont-gm

Musescore
musescore-general-soundfont-lossless
musescore-general-soundfont-small

timgm6mbsoundfont (i don't even remember installing this, but it's there)

carla rar extracted to a folder (maybe that means it's installed?)

alsa - lots of this stuff which i think is part of the basic LMDE package

pipewire and pipewire-pulse - again, afaik all part of the basic LMDE package

re sfizz, i went to the sfizz github page but couldn't see what i was supposed to download (no obvious download button) and no command lines by which i could download it that way (confused face). so i'm aware it's something potentially useful, but not user-friendly re installation

i tried and uninstalled LMMS, VMPK, Ardour. too complicated for me to work out what is going on, and no sound from my keyboard out of the box.

in sum, i feel a bit like jack nichloson in the chicken sandwich scene in 'five easy pieces' (if you know that film?).
nicholson has to go a ridiculously convoluted way about placing his order, just to obtain a very basic thing.
i would like to be able to play piano... but hold the DAW.

btw i know pianoteq does this but it's paid subscription non-foss software (which is not how we roll at casa olivia).

many thanks in advance to anyone who has any ideas-suggestions they want to share.

song for the day: edu lobo & marilia medalha - ponteio (live 1967 MPB final)

i'm autistic, so i may sometimes be behind the curve re 'reading between the lines' of things not spelled out in instructions.
please be patient with me if i don't instantly 'get' things not literally apparent to me. i'm not stupid, just different.

User avatar
LAM
Established Member
Posts: 1122
Joined: Thu Oct 08, 2020 3:16 pm
Has thanked: 154 times
Been thanked: 408 times

Re: what is the best way to play piano (decent quality sound with with key dynamics) on linux with the least software?

Post by LAM »

olivia wrote: Sun Nov 24, 2024 2:54 pm

re sfizz, i went to the sfizz github page but couldn't see what i was supposed to download (no obvious download button) and no command lines by which i could download it that way (confused face). so i'm aware it's something potentially useful, but not user-friendly re installation

Install sfizz .deb from here: https://software.opensuse.org//download ... kage=sfizz

Download a piano, I reccomend to start with Salamander Piano SFZ from here: https://sfzinstruments.github.io/pianos/salamander/

Extract the Piano samples folder somewhere of your choice.

Start JACK with your preferred method, I see you already have Qjackctl so start it and make sure JACK is running.

From a terminal start sfizz with:

Code: Select all

sfizz_jack <path were you extracetd the Salamander Piano>/SalamanderGrandPianoV3.sfz

Open Qjackctl connections or graph and connect your MIDI input port(s) to sfizz, then connect sfizz audio ports to you audio system out, for example:

2024-11-24_16.20.37.082.png
2024-11-24_16.20.37.082.png (41.41 KiB) Viewed 2442 times

Play with your keyboard.

If you prefer a GUI you could use Sfizz as plugin in a DAW or plugin host like Carla, if you installed the .deb it should be already there as LV2 and VST3.

For SF2 if you prefer a GUI Carla, Qsynth, etc. they all should work, I don't see any reason for them to not work, once you are sure JACK is running, make sure you do all the proper connections, and you loaded a soundfont (SF2) correctly.

in mix, nobody can hear your screen

User avatar
nadir
Established Member
Posts: 57
Joined: Sat Dec 16, 2023 8:51 am
Has thanked: 21 times
Been thanked: 21 times

Re: what is the best way to play piano (decent quality sound with with key dynamics) on linux with the least software?

Post by nadir »

I, rather beginner myself, assume to play the piano what you need to install is:
qjackCtl
Qsynth
Fluidsynth
Fluid-soundfont-gm
perhaps: a2jmidid


Open qjackctl.
Click on "Setup" (the button below the Quit button(
Make sure the correct "Interace" is choosen.
Set "Frames/Perdiod" rather low, so you get no latency while playing (for piano i use 256, you have to try what works for you)
In the 4th tab of the Settings called "Misc" click on "Replace Connections with Graph buttons"
Hit on "apply"


Attach the E-Piano/ Midi Keyboard.
Open qsynth
Go to qjackctl again, click on "Graph" and make sure
qsynth is connected to system-playback (should be automatically) and
the Keybaord is connected to the Midi Input of qsynth.


Go back to qsynth
Click on the "Setup" button
Make sure in the Midi Tab "jack" is choosen
Go to the "Soundfonts" Tab and choose /usr/share/sounds/sf2/FluidR3_GM.sf2
Click on "OK"

One problem:
I use cadence to control jack soundserver.
It kinda autostarts a2jmidid , and i don't know how that works in qjackctrl. Should be easy
(i am not even that sure if it is required).

Don't take my words for it. I did the best to not make an error, but use it as the general idea, not as a "step by step".
I attach a pic how it would look like in qjackctl Graph:

Attachments
2024-11-24-163145_1920x1080_scrot.png
2024-11-24-163145_1920x1080_scrot.png (156.17 KiB) Viewed 2441 times
User avatar
Impostor
Established Member
Posts: 1685
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 170 times
Been thanked: 466 times

Re: what is the best way to play piano (decent quality sound with with key dynamics) on linux with the least software?

Post by Impostor »

So, to give you yet another(!) option besides the ones already given (you'll have to create two files for this: a script and a launcher):

This is what I did to get a click-once-and-start-playing-fluidsynth-on-my-MK3-midi-keyboard scenario.

Create a new text file, let's call it fluid.sh, with contents:

Code: Select all

#!/bin/bash
if pgrep fluidsynth 2>/dev/null; then
     pkill fluidsynth
else fluidsynth --server --no-shell --audio-driver=alsa -o audio.period-size=128 -o audio.periods=2 -r 44100 -g 1.0 /usr/share/sounds/sf2/FluidR3_GM.sf2 &>/dev/null &
     sleep 2
     keyboard=$(aconnect -i | grep -i "mk3" | head -1 | cut -d ' ' -f 2)0
     fluidsynth=$(aconnect -o | grep -i "fluid" | head -1 | cut -d ' ' -f 2)0
     aconnect $keyboard $fluidsynth
fi

Right-click the file to make it executable (if that works on your distro). Put this file wherever you want it. Get an icon, maybe from here:https://icons8.com/icons/set/synthesizer-icon, put that somewhere.

Create file ~/.local/share/applications/fluid.desktop, with contents (adjust the Exec and Icon paths to absolute ones, like /home/olivia/fluid.sh):

Code: Select all

[Desktop Entry]
Name=Fluid
Exec=/path/to/fluid.sh
Terminal=false
Icon=/path/to/some/icon.png
Type=Application
Name[en_US]=fluid.desktop

Make this one executable too, then you'll see its thumbnail change into your chosen icon. In Mint Cinnamon, it now appears in the menu in the category "others". Maybe the same in LMDE? Rightclick, pin to panel.

To play, first turn on your MK3, then click the icon on the panel. That should work. Another click on the icon kills fluidsynth.

Don't forget you can send program changes with your MK3 to change sounds. The Fluid_R3 soundfont contains some 127 instruments.

Edit: fluidsynth on Mint has the annoying habit of installing a service which autostarts at boot, which interferes with the above. You can safely disable or remove this fluidsynth.service. For example by

Code: Select all

sudo systemctl --global disable fluidsynth.service
User avatar
nadir
Established Member
Posts: 57
Joined: Sat Dec 16, 2023 8:51 am
Has thanked: 21 times
Been thanked: 21 times

Re: what is the best way to play piano (decent quality sound with with key dynamics) on linux with the least software?

Post by nadir »

Impostor wrote: Sun Nov 24, 2024 4:08 pm

So, to give you yet another(!) option besides the ones already given (you'll have to create two files for this: a script and a launcher):

This is what I did to get a click-once-and-start-playing-fluidsynth-on-my-MK3-midi-keyboard scenario.

Create a new text file, let's call it fluid.sh, with contents:

Code: Select all

#!/bin/bash
if pgrep fluidsynth 2>/dev/null; then
     pkill fluidsynth
else fluidsynth --server --no-shell --audio-driver=alsa -o audio.period-size=128 -o audio.periods=2 -r 44100 -g 1.0 /usr/share/sounds/sf2/FluidR3_GM.sf2 &>/dev/null &
     sleep 2
     keyboard=$(aconnect -i | grep -i "mk3" | head -1 | cut -d ' ' -f 2)0
     fluidsynth=$(aconnect -o | grep -i "fluid" | head -1 | cut -d ' ' -f 2)0
     aconnect $keyboard $fluidsynth
fi

Very nice.
I have a script too to autostart jack and then fluidsynth, which i used for a PC with low-ressources, and i didn't want to start X at all, only play piano.
It worked on that PC, but not that well anymore, so i won't post it, cause i don't fully understand what doesn't work.
There i seem to have figured out, that fluidsynth has the --connect-jack-outputs, which connected the midi-keyboard automatically (i had only one attached, and wouldn't know how reliable that option is. I am only saying that optin exist (which you probably know).

Code: Select all

        fluidsynth  -a jack -g 8  --connect-jack-outputs /usr/share/sounds/sf2/FluidR3_GM.sf2

To me your script would be easier than the gui qsynth, which is always a bit of clicking back and forth until i got it running, the script only needs to be run.
It is on her to decide what she prefers, but that really is more straight forward, imho.

User avatar
olivia
Established Member
Posts: 9
Joined: Sat Nov 23, 2024 9:26 am
Has thanked: 4 times
Been thanked: 4 times

Re: what is the best way to play piano (decent quality sound with with key dynamics) on linux with the least software?

Post by olivia »

hola LAM, nadir and Impostor!

many thanks to you all for taking the time and trouble to share your thoughtful and detailed instructions on how i might go about achieving the abjective as stated in the OP. obviously no-one here is under any obligation to reply to anyone at all, so i appreciate and respect your community-mindedness in stepping up to the task and making your suggestions.

i had a few uninterrupted hours this evening to try each of the approaches you have suggest in order, and (alas) in the time i had (no time to explore and debug failures and glitches in great depth, just give it my best for now), i wasn't able to get all the way through any of them to the point i could get things working as intended (which is a bit frustrating, though my expectations of success are low, as nothing i have tried before posting here has worked either).

but as this is me trying to do a completely new thing from a standing start, i will take that 'failure-for-now' in good grace and return to it as and when i can in coming days.

as the reasons for my getting bogged down in each are far more likely to be mine than due to any faults in your instructions (you all know - to a greater or lesser degree at least - what you are doing when you action these processes, whereas i'm coming to them in absolute ignorance), between now and the weekend (time permitting) i will work through each of them again more thoroughly and document (command line feedback and maybe some screenshots) those points at which where i get stuck in each. so perhaps bugs and barriers to progress will be made apparent and can then be ironed out that way.

it's nice to meet you all (or re-meet you - is that a thing? - after sharing comments in the newbies 'introduction' thread with some of you) and i will return to this project (ordeal!) as soon as i can.

many thanks again, olivia.

i'm autistic, so i may sometimes be behind the curve re 'reading between the lines' of things not spelled out in instructions.
please be patient with me if i don't instantly 'get' things not literally apparent to me. i'm not stupid, just different.

glowrak guy
Established Member
Posts: 2584
Joined: Sat Jun 21, 2014 8:37 pm
Been thanked: 330 times

Re: what is the best way to play piano (decent quality sound with with key dynamics) on linux with the least software?

Post by glowrak guy »

Install Reaper and DecentSampler, which has a lot of free sampled pianos at

https://www.pianobook.co.uk/sampler/decent-sampler/

DecentSampler includes plugins and also a standalone version, so no daw needed for that. It likes the sample sets to be in your Documents folder.

Get the Reaper daw demo at https://www.reaper.fm/ Free for 30 or 60 days, forgot which :(

Create folders .vst .vst3 and .lv2 in /home/Olivia
Create a folder .727 and unarchive Reaper there. Move all the content from the new sub-folder up to the main .727 folder.
Start Reaper in a terminal with

.727/reaper

Reaper menu Options-->Preferences-->Audio-->Device is where you choose jack so qjackctl can be your audio setup gui

The menu Options-->Preferences-->Plug-ins-->VST opens the plugin scanning panel, and pressing the 'Rescan' button pops up three options, the 'Clear cache and rescan VST paths' option is fine. Make sure you include the new .vst .vst3 and .lv2 in the path list atop the Preferences panel. It will scan the DecentSampler plugin.

(Reaper daw is small, 15 meg download, inexpensive $65 after the demo period expires, and simple to use.)

Right-click in the open space of the upper left rectanglular area. A menu option pops up, 'Insert virtual instrument on new track'
Choose DecentSampler or other piano capable plugin. The track is created, and the plugin gui is displayed. A few icons and buttons are there
in the track lane for various options, like arming the track, sending the sound to a different plugin/track, or adding effect plugins.

In the File-menu, 5th up from the bottom, you see 'Save live output to disk (bounce)' Choose that and start playing. The recording should be in

/home/Olivia/REAPER Media

Doesn't get any easier than that to record and play back your practice/performance.
Like me, tons of Reaper users never use 95% of the options, and you can do likewise.

If I can, you can thrice.

User avatar
nadir
Established Member
Posts: 57
Joined: Sat Dec 16, 2023 8:51 am
Has thanked: 21 times
Been thanked: 21 times

Re: what is the best way to play piano (decent quality sound with with key dynamics) on linux with the least software?

Post by nadir »

olivia wrote: Tue Nov 26, 2024 9:48 pm

i had a few uninterrupted hours this evening to try each of the approaches you have suggest in order, and (alas) in the time i had (no time to explore and debug failures and glitches in great depth, just give it my best for now), i wasn't able to get all the way through any of them to the point i could get things working as intended (which is a bit frustrating, though my expectations of success are low, as nothing i have tried before posting here has worked either
b

I started with audio a few years ago: It sure can be a bit frustrating.
There is often that one little thing i missed by following instructions, or the one little difference between the instructions setup and my setup.
Once you have it done, it is rather easy.

Two things.
One idea might be instead of doing it all at once, you could first of all use the application you want to use for piano playing, say qsynth, but with a virtual keyboard. So first make sure you got sound from that application at all. Add the e-piano as the next step.
That way it will be more easy for you to distinguish if the problem comes from qsynth or from the midi patchbay

The other thing:
Write up which steps you do as exact as possible. When you then have problems, ask here and give those steps too, not only the problem which occurs. Someone with experience will probably have an idea what you might have overseen.

In short: just take it easy, don't stress yourself, it can be a bit frustrating.

tseaver
Established Member
Posts: 465
Joined: Mon Mar 13, 2017 6:07 am
Has thanked: 22 times
Been thanked: 121 times

Re: what is the best way to play piano (decent quality sound with with key dynamics) on linux with the least software?

Post by tseaver »

FWIW, the following script works for me: it assumes that I have unpacked the "Salamander" grand piano (SFZ format) into `/opt/sfz/salamander/'.

Code: Select all

#! /bin/bash
sfz_file="/opt/sfz/salamander_grand_piano_v3_48khz24bit/SalamanderGrandPianoV3Retuned.sfz"
sfz_name=salamander_sfizz
echo Starting sfizz_jack w/ $sfz_file, client $sfz_name
/usr/bin/sfizz_jack \
    --jack_autoconnect \
    --client_name=$sfz_name $sfz_file  \
    2>/dev/null  > /dev/null &
sfj_pid=$!
sleep 2
echo Connecting sfizz to keyboard
# Find the name of your keyboard input via 'jack_lsp' and trial-and-error.
/usr/bin/jack_connect system:midi_capture_4 $sfz_name:input
echo Connected
wait -n

I run it from a terminal, via:

Code: Select all

$ bin/salamander.sh
Starting sfizz_jack w/ /opt/sfz/salamander_grand_piano_v3_48khz24bit/SalamanderGrandPianoV3Retuned.sfz, client salamander_sfizz
Connecting sfizz to keyboard
Connected

and can play as soon as the "Connected" bit shows up.

Ubuntu, Mixbus32C; acoustic blues / country / jazz
User avatar
noedig
Established Member
Posts: 246
Joined: Wed Feb 12, 2014 4:39 am
Location: South Africa
Has thanked: 10 times
Been thanked: 59 times

Re: what is the best way to play piano (decent quality sound with with key dynamics) on linux with the least software?

Post by noedig »

You can try Konfyt: https://github.com/noedigcode/konfyt/re ... tag/v1.6.2

The following instructions assume you have the latest LMDE which runs Pipewire, and that you want the quickest way to get going:

  • Download konfyt_1.6.2-1ubuntu22.04-nocarla_amd64.deb from the release page (note: use the "nocarla" version"
  • Install required packages:

    Code: Select all

    sudo apt install libfuidsynth3 liblscp6
  • Konfyt uses JACK, but assuming you have the latest LMDE which runs Pipewire, you can use Pipewire's JACK implementaiton.
    Install:

    Code: Select all

    sudo apt install pipewire-jack
  • Install the downloaded .deb file: sudo dpkg -i konfyt_1.6.2-1ubuntu22.04-nocarla_amd64.deb
  • Run Konfyt, using pw-jack to use Pipewire's JACK implementation:

    Code: Select all

    pw-jack konfyt

If all went well and I didn't miss some dependencies above, Konfyt should now run.

Get a small but decent sounding piano soundfont: Splendid piano (136 MB): https://musical-artifacts.com/artifacts/1451

  • Either configure Konfyt in Settings to scan the folder automatically where the soundfont is placed, or use its filesystem browser to browse to the file, double-click it, then double-click the first and only program at the bottom to add it as a layer.

Use the Ports and Buses screen in Konfyt to connect your master audio output as well as your MIDI input.

The above should hopefully get you to a playable setup relatively quickly. (hopefully I didn't miss any required packages)

Some additional notes:

  • Konfyt supports SFZ in addition to Soundfonts (sf2), but it requires LinuxSampler (or Carla) for that. I explicitly didn't include this above in order to simplify the setup. Once you get the program running and sound out of it, then you can try adding LinuxSampler if you want to play SFZ files.
  • Above steps assume your system is running Pipewire and uses pw-jack to let the app use Pipewire's JACK implementation. This should hopefully be the simplest, but you can also manually manage JACK with QJackCtl and run Konfyt without pw-jack. However, for simplicity, I used pw-jack above.
  • If you are not using Pipewire and simply JACK, then you will need to run a2jmidid -ue to expose your hardware MIDI ports to JACK so it is visible inside Konfyt.
Post Reply