Playing a sampled Instrument in 2021 – is it really that complicated?

Link to good samples/soundfonts at http://wiki.linuxaudio.org/wiki/free_audio_data

Moderators: MattKingUSA, khz

quadronado
Established Member
Posts: 12
Joined: Tue Feb 09, 2021 12:41 pm

Playing a sampled Instrument in 2021 – is it really that complicated?

Post by quadronado »

I‘ve been using Ardour 5 several times with many Audio Tracks with Guitars, Bass and Vocals, etc. without any Problems. Now I want to use a sampled Instrument. I tried several solutions and figured out a workflow that it quiet complicated. I probably did or understood some things wrong. Here‘s what I did:
At first I tried some free sampled Pianos. I wasn‘t quite satisfied so I bought a Piano in sfz format. I read about a plugin called sfizz. I tried to load sfizz in ardour and had some trouble with this plugin. It takes about 15-20 seconds before the plugin interface has loaded and I can open my sfz file. But no matter which settings I use in jack, the sfz file is not comfortable to play. When I use a tolerable latency I get a lot of xruns that results in irritating clicking. Especially when I use the sustain pedal. When I raise the buffer I get less clicking but the latency is even more irritating. I can record midi, but it‘s very unconfortable to play. I can play but it doesn‘t feel like making music. The only way to fix the problem is after the recording. When I have the midi, I can raise the buffer (to get rid of the xruns) and record the virtual instrument to an audio track in ardour.
Is this how It works or am I doing something wrong?
User avatar
Michael Willis
Established Member
Posts: 1458
Joined: Mon Oct 03, 2016 3:27 pm
Location: Rocky Mountains, North America
Has thanked: 70 times
Been thanked: 166 times
Contact:

Re: Playing a sampled Instrument in 2021 – is it really that complicated?

Post by Michael Willis »

I think the first thing to do is try a different SFZ sampled instrument. That way you can narrow down whether your problem is sfizz or the specific piano sfz that you are trying to use. Maybe try some of the instruments from No Budget Orchestra.
Death
Established Member
Posts: 372
Joined: Sun Oct 11, 2015 1:43 pm
Been thanked: 32 times

Re: Playing a sampled Instrument in 2021 – is it really that complicated?

Post by Death »

Do you have a good computer & audio interface? Is the CPU in performance mode?

As for the noises from Xruns, they'll only be there when you're palying, they won't come out in the actual recording. So you can just lower the buffer size temporarily while recording parts if you can put up with the noises whilst doing so. It'd be better if you didn't have to adjust it of course but it is a workaround you can do if nothing else works.
User avatar
milo
Established Member
Posts: 1242
Joined: Wed Sep 06, 2017 2:55 am
Location: Southern Utah, USA
Has thanked: 275 times
Been thanked: 218 times
Contact:

Re: Playing a sampled Instrument in 2021 – is it really that complicated?

Post by milo »

I have the same behavior with sfizz taking 20+ sec to load its gui in Ardour 5. I don't play keyboards well enough to notice the second behavior, because I always program the notes into the piano roll.
tavasti
Established Member
Posts: 2056
Joined: Tue Feb 16, 2016 6:56 am
Location: Kangasala, Finland
Has thanked: 372 times
Been thanked: 209 times
Contact:

Re: Playing a sampled Instrument in 2021 – is it really that complicated?

Post by tavasti »

quadronado wrote: Thu Feb 25, 2021 10:23 pm At first I tried some free sampled Pianos. I wasn‘t quite satisfied so I bought a Piano in sfz format. I read about a plugin called sfizz. I tried to load sfizz in ardour and had some trouble with this plugin.
Possibly does not help, but it is worth trying to test if liquidsfz would work any better. I suspect same problems with it.

Linux veteran & Novice musician

Latest track: https://www.youtube.com/watch?v=ycVrgGtrBmM

quadronado
Established Member
Posts: 12
Joined: Tue Feb 09, 2021 12:41 pm

Re: Playing a sampled Instrument in 2021 – is it really that complicated?

Post by quadronado »

Thank you all for your help!
Michael Willis wrote: Thu Feb 25, 2021 10:59 pm I think the first thing to do is try a different SFZ sampled instrument. That way you can narrow down whether your problem is sfizz or the specific piano sfz that you are trying to use. Maybe try some of the instruments from No Budget Orchestra.
OK, the sfz file could be the problem. I have much fewer xruns with other sfz files. There are some notes missing, but I don't get the clicking. But other sfz files are "smaller". (I don't know if smaller is the right word for it). I tried some strings (Curves 7, Masters 0, Groups 13, Regions 182, Regions 182). The piano I have problems with has much higher values (Curves 100, Masters 14, Groups 503, Regions 5096, Samples 2783). Could it have something to do with these values or do you think that the file is corrupted? Maybe the settings for Polyphony (64), Oversampling (1x) and Preload Size (32 kB) have something to do with it? Or does it have something to do with the jack settings. I use 256 samples for the Buffer Size.
Death wrote: Fri Feb 26, 2021 1:40 am Do you have a good computer & audio interface?
I don't really know. It always worked good with audio (without midi or only midi drums). It's a ThinkPad Laptop with i5 CPU, 8 GByte Ram, SSD. I have a steinberg UR22 mkII (class compliant) Audio Interface that I've been using without Problems so far. I'm on Kubuntu 20.04 with KXStudio Repositories.
Death wrote: Fri Feb 26, 2021 1:40 am Is the CPU in performance mode?
Never heard of it. How do I turn on the performance mode? Edit: OK, googled it. I will try again.
Death wrote: Fri Feb 26, 2021 1:40 am As for the noises from Xruns, they'll only be there when you're palying, they won't come out in the actual recording. So you can just lower the buffer size temporarily while recording parts if you can put up with the noises whilst doing so. It'd be better if you didn't have to adjust it of course but it is a workaround you can do if nothing else works.
That's kind of what I tried. But it feels more like recording with a Computer in 1991, not in 2021. Or am I expecting to much.
tavasti wrote: Fri Feb 26, 2021 12:11 pm Possibly does not help, but it is worth trying to test if liquidsfz would work any better. I suspect same problems with it.
I tried liquidsfz before but I don't get any sound at all.
User avatar
Toejam76
Established Member
Posts: 138
Joined: Sat Jun 20, 2020 10:41 am
Has thanked: 15 times
Been thanked: 21 times

Re: Playing a sampled Instrument in 2021 – is it really that complicated?

Post by Toejam76 »

Just Kubuntu isn't up to par for pro audio.
Regarding pesky xruns, check this out https://github.com/raboof/realtimeconfigquickscan
This is a perl script that will check your config.
You can make the changes manually or use a optimized distro like Ubuntu Studio.
You can also download the Ubuntu studio installer to add it to your debian based distro.
There are other optimized distros and everyone has their preferences.
Have a look at the "System Tuning and Configuration" section here.
All the information you will probably ever need is here on this board, given there are some hoops to jump through.
Configure jack with qjackctl (settings may differ according to your interface, going below 10 ms should be very possible without xruns)
Install some soundfont player like fluidsynth and there you go.
Like many things after finding out how things work, it's actually not hard at all. I understand the butthurt and I hated Linux with a passion, but
now I would say it's working way better than Windows or MacOs for me. Even got better latency.
quadronado
Established Member
Posts: 12
Joined: Tue Feb 09, 2021 12:41 pm

Re: Playing a sampled Instrument in 2021 – is it really that complicated?

Post by quadronado »

Toejam76 wrote: Fri Feb 26, 2021 1:12 pm Just Kubuntu isn't up to par for pro audio.
I think you missunderstood me. I use kxstudio. It's like ubuntustudio (what I've been using for some years) - only better. Most of the software is more up to date. I never had any problems with xruns or latency on my system. I had recording sessions with 30 to 40 tracks and effect plugins on every track with no problems.
Toejam76 wrote: Fri Feb 26, 2021 1:12 pm Install some soundfont player like fluidsynth and there you go.
I know that fluidsynth work. That's not what I want. I can't open an sfz file with fluidsynth.
Toejam76 wrote: Fri Feb 26, 2021 1:12 pm Like many things after finding out how things work, it's actually not hard at all. I understand the butthurt and I hated Linux with a passion, but
now I would say it's working way better than Windows or MacOs for me. Even got better latency.
I've never used MacOs and I hardly know Windows. Not sure if I know what you're aiming at. I never had a problem with linux. And I don't think that my problem is linux related.
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Playing a sampled Instrument in 2021 – is it really that complicated?

Post by merlyn »

Something to check is -- what is the sample rate of the samples? and what is the sample rate of the Ardour project? If they're different re-sampling may be involved and that is more CPU intensive than playing the samples back at their original sample rate.
User avatar
Michael Willis
Established Member
Posts: 1458
Joined: Mon Oct 03, 2016 3:27 pm
Location: Rocky Mountains, North America
Has thanked: 70 times
Been thanked: 166 times
Contact:

Re: Playing a sampled Instrument in 2021 – is it really that complicated?

Post by Michael Willis »

quadronado wrote: Fri Feb 26, 2021 12:33 pm The piano I have problems with has much higher values (Curves 100, Masters 14, Groups 503, Regions 5096, Samples 2783). Could it have something to do with these values or do you think that the file is corrupted? Maybe the settings for Polyphony (64), Oversampling (1x) and Preload Size (32 kB) have something to do with it? Or does it have something to do with the jack settings. I use 256 samples for the Buffer Size.
That is a heavy weight sample library, but I'm still disappointed to hear that your system stutters so much while trying to play it. It might be a matter of tuning sfizz to better handle a larger number of samples, you can try bumping up the preload size to the maximum (256kB in the version of sfizz that I have installed). I also usually bump up the polyphony when I'm playing piano samples.

Also, please be aware that sfizz is still a young project, so this might be a bug that needs to be fixed. The developers are very responsive, you can open up an issue on their Github project, or talk to them on their Discord chat.

If you feel up to trying a different plugin, there's ye olde Linux Sampler, just be aware that the setup process is more involved than just loading the plugin and picking your SFZ file.
quadronado
Established Member
Posts: 12
Joined: Tue Feb 09, 2021 12:41 pm

Re: Playing a sampled Instrument in 2021 – is it really that complicated?

Post by quadronado »

merlyn wrote: Fri Feb 26, 2021 2:06 pm Something to check is -- what is the sample rate of the samples? and what is the sample rate of the Ardour project? If they're different re-sampling may be involved and that is more CPU intensive than playing the samples back at their original sample rate.
That was the first thing I tried. It's 44.1 for both.

Now I tried a windows software called sforzando in Carla. It works with nearly no xruns. But honestly I don't like using windows software in linux. And I don't know if I can use it inside Ardour without creating new problems.

With sfizz I have similar problems in carla
quadronado
Established Member
Posts: 12
Joined: Tue Feb 09, 2021 12:41 pm

Re: Playing a sampled Instrument in 2021 – is it really that complicated?

Post by quadronado »

Michael Willis wrote: Fri Feb 26, 2021 2:47 pm That is a heavy weight sample library, but I'm still disappointed to hear that your system stutters so much while trying to play it. It might be a matter of tuning sfizz to better handle a larger number of samples, you can try bumping up the preload size to the maximum (256kB in the version of sfizz that I have installed). I also usually bump up the polyphony when I'm playing piano samples.
I tried with 255kb and 128 Polyphony and unfortunately it didn't improve anything.
Michael Willis wrote: Fri Feb 26, 2021 2:47 pm If you feel up to trying a different plugin, there's ye olde Linux Sampler, just be aware that the setup process is more involved than just loading the plugin and picking your SFZ file.
I remember trying linuxsampler some years ago. I managed to play my strings sfz file with linux sampler and qsampler. But when I try to load the piano sfz it doesn't work and ardour crashes.

It's weird that it works with plogue. Maybe there are some settings in the sfz file that prevent working with other software?
varpa
Established Member
Posts: 509
Joined: Fri Feb 25, 2011 6:40 pm
Been thanked: 13 times

Re: Playing a sampled Instrument in 2021 – is it really that complicated?

Post by varpa »

Its not weird that it works with plugue. Plogue is commercial software and supports many more sfz opcodes than any open source sfz player. Many commercial sfz files recommend using plugue. Its not unlikely that your commercial sfz file uses opcodes not supported in sfizz. If you want a very good piano sound buy pianoteq. Not open source or cheap but works very well and sounds quite good.
tseaver
Established Member
Posts: 404
Joined: Mon Mar 13, 2017 6:07 am
Has thanked: 11 times
Been thanked: 100 times

Re: Playing a sampled Instrument in 2021 – is it really that complicated?

Post by tseaver »

Where are your samples (the actual WAV files) stored? Most folks using "large" sample libraries (commercial ones like those used by pro film composers) suggest putting them on an SSD, rather than on a spinning HDD. The load times are directly proportional to the disk access time, and with large libraries you *really* notice.
Ubuntu, Mixbus32C; acoustic blues / country / jazz
quadronado
Established Member
Posts: 12
Joined: Tue Feb 09, 2021 12:41 pm

Re: Playing a sampled Instrument in 2021 – is it really that complicated?

Post by quadronado »

Pianoteq looks intressting. The standard version seems to have a fair price. I will try the demo version. (Actually I tried the demo version of the sfz piano I am trying to use and had no problems (Concert Grand Compact from productionvoices.com)

I don't any hdd's on my system. I have two ssd's, one for the system and one for the data.
Post Reply