(SOLVED) How do I connect a digital piano to a sampler?

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
amc252
Established Member
Posts: 139
Joined: Fri May 05, 2023 12:24 am
Has thanked: 92 times
Been thanked: 22 times

(SOLVED) How do I connect a digital piano to a sampler?

Post by amc252 »

Hi,

I'd like to use a digital piano Yamaha Clavinova CLP115 to connect to a Toshiba Satellite laptop in Devuan to play and record realistic piano sound.
I was able to setup the keyboard with a MIDI interface and aconnect to play with fluidsynth (qsynth). But, after trying various acoustic piano soundfonts, the quality of the sound is not great.
It would seem that using a sampler would provide better results.

So, here are my question(s):

1) is this true?
2) which open source sampler for Linux would be easier to set up (perhaps using either aconnect or qjackctl)?
3) which step would be required to set up the keyboard to work with the sampler?

Last edited by amc252 on Sun May 21, 2023 7:39 am, edited 1 time in total.
User avatar
noedig
Established Member
Posts: 239
Joined: Wed Feb 12, 2014 4:39 am
Location: South Africa
Has thanked: 9 times
Been thanked: 54 times

Re: How do I connect a digital piano to a sampler?

Post by noedig »

amc252 wrote: Mon May 15, 2023 6:21 am

1) is this true?

Try it and see for yourself :P

Although one of my goto piano sounds is a small soundfont, the Splendid 72M. It's really playable (in my opinion), small and convenient.
I can't find it anywhere on the Internet, though, but found this which sounds exactly the same. Maybe it works for you.
https://musical-artifacts.com/artifacts/1451

A paid but very good alternative is Pianoteq.

amc252 wrote: Mon May 15, 2023 6:21 am

2) which open source sampler for Linux would be easier to set up (perhaps using either aconnect or qjackctl)?
3) which step would be required to set up the keyboard to work with the sampler?

Since you want to record your playing, I would suggest using Ardour to host a sampler plugin. Ardour can work in either ALSA or JACK MIDI mode, so if you already got your keyboard working with QSynth, it should be straight forward to use with Ardour.

If you don't need JACK, try using ALSA directly, and/or just use the one that works for you.

Ardour has a built-in soundfont plugin.

For SFZ samples, you can use the Sfizz plugin (https://github.com/sfztools/sfizz) or Carla which can also host SFZ instruments.

The steps are, roughly:

  • Start Ardour and select either JACK or ALSA as a sound driver.
  • Add a MIDI + Audio track.
  • Add a plugin to the track - either Sfizz, Carla, or the built-in Fluidsynth (soundfont) plugin.
  • Select a soundfont/SFZ file in the plugin.
  • Connect the track MIDI input to your keyboard MIDI output.

This is just a rough guideline, consult the Ardour manual or videos for more info.

Regarding SFZ libraries:

amc252
Established Member
Posts: 139
Joined: Fri May 05, 2023 12:24 am
Has thanked: 92 times
Been thanked: 22 times

Re: How do I connect a digital piano to a sampler?

Post by amc252 »

Thanks for the feedback.
I have Ardour installed, so I'll sure give it a try.

As for trying a sampler, I have installed Muse and, following the tutorial, was able to successfully complete the soft synth test and the Midi keyboard test.
However, I have a couple of problems:

1) Although I heard the sound, Muse does not appears in the Pavucrontrol monitor settings and, therefore, when I (for example) select the system sound to record on OBS Studio as audio source, Muse does not appear (but Qsynth does if I use it instead)
2) I can get the soft synth to play, but haven't figured out how to: A) import piano samples B) configure Muse to play piano samples instead of the soft synth.

User avatar
Impostor
Established Member
Posts: 1390
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 148 times
Been thanked: 365 times

Re: How do I connect a digital piano to a sampler?

Post by Impostor »

amc252 wrote: Mon May 15, 2023 10:30 pm

Thanks for the feedback.
I have Ardour installed, so I'll sure give it a try.

As for trying a sampler, I have installed Muse and, following the tutorial, was able to successfully complete the soft synth test and the Midi keyboard test.
However, I have a couple of problems:

1) Although I heard the sound, Muse does not appears in the Pavucrontrol monitor settings and, therefore, when I (for example) select the system sound to record on OBS Studio as audio source, Muse does not appear (but Qsynth does if I use it instead)
2) I can get the soft synth to play, but haven't figured out how to: A) import piano samples B) configure Muse to play piano samples instead of the soft synth.

If you want to route audio (and/or midi) between different programs, you should install Jack, and set your programs to use it. You can then use QJackCtl to set it up, and any connections you want made.

MusE ships with Fluidsynth Soundfont player. You should use that to play .sf2 files (add synth track, select fluidsynth in menu, select soundfont in the plugin's menu).
To play other instrument samples you'd need a sampler to play them. Or sfizz for .sfz files.

But, seriously, make it easy for yourself and run the demo of pianoteq. It has world class models of a variety of (acoustic and electric) pianos, and more. No samples involved, it's all mathematical modeling (well, apart from optional key and pedal noises).

amc252
Established Member
Posts: 139
Joined: Fri May 05, 2023 12:24 am
Has thanked: 92 times
Been thanked: 22 times

Re: How do I connect a digital piano to a sampler?

Post by amc252 »

I just tried Pianoteq. It certainly make it easy to get everything to work together out of the box.
Off course, the demo version have some nuisances, as they always do.

I also installed Rosegarden, haven't tried it yet.
It seems to have very good documentation, same as Muse, which is a very big plus for a newbie compared to other software.

amc252
Established Member
Posts: 139
Joined: Fri May 05, 2023 12:24 am
Has thanked: 92 times
Been thanked: 22 times

Re: How do I connect a digital piano to a sampler?

Post by amc252 »

Okay, here's my solution just in case some other newbie has the same problem.

1) perhaps optional, but I installed the liquorix real time kernel (actually copied the files in /boot and /lib/modules from av linux to my devuan system)
2) installed linuxsampler and qsampler (I actually installed linuxsampler from the kxstudio repository since linuxsampler from github seems to be compiled without jack, but ended up not using jack anyway)
3) downloaded a piano sample in gig format (big file)

Code: Select all

wget http://sonimusicae.free.fr/Host/Maestro-Concert-Grandv2.rar 

4) plugged in my midi keyboard (the right way, thanks Impostor)
5) started qsampler and clicked on the green 'device configuration' icon
6) in the 'devices-qsampler' window I:
A) clicked on 'audio devices', left the driver to ALSA, and clicked 'create'
B) clicked on 'MIDI devices', left the driver to ALSA, and clicked 'create'
7) closed the 'devices-qsampler' window and saved the configuration
8) in qsampler main window clicked on the 'track' icon and selected:
A) Engine: GIG
B) Filename: /path/to/my .gig file which in turn set the instrument
C) MIDI input type: ALSA
D AUDIO out: ALSA
and OK
9) in the terminal I typed: aconnect -l which gave me the client number of my midi keyboard and linuxsampler (in my case respectively 20: and 128:
10) typed: aconnect 20: 128:

and voila, I was able to play keyboard and hear a beautiful piano sound.
It might seem many steps but in fact it's a simple rpocess and once saved you can use the same setup all the time.
I like it cause I don't need jack or anything else.
also, this way the sound is capturated in OB studio defaults and I could record myself playing.

I haven't tested this with SFZ or SF2 samples yet.

Post Reply