Page 1 of 1

Linuxsampler work with pipewire?

Posted: Sun Sep 12, 2021 3:00 am
by aki42
I don't know well about LinuxSampler yet.
But as I test Linuxsampler with netcat, I found that I can't create Jack device because of a error "ERR:0:Seems Jack server is not running."
I use Manjaro Linux with pipewire.
Can Linuxsampler work with pipewire?

Re: Linuxsampler work with pipewire?

Posted: Tue Sep 14, 2021 3:17 pm
by cuse
That's because of exactly what the error message sais: you need start the JACK daemon, if you want to use JACK as audio output.

Re: Linuxsampler work with pipewire?

Posted: Wed Sep 15, 2021 1:22 pm
by aki42
Thanks for your comment.

I've installed pipewire-jack and jack application works fine like guitarix or qsynth.
And as you point, there are no jack daemon running.
I tried following pw-jack command for linuxsampler, but no good.
https://wiki.archlinux.org/title/PipeWire#JACK_clients

As long as I use pipewire, I can't start jack as a deamon.

Is there someone who use linuxampler with pipewire on the forum?

Re: Linuxsampler work with pipewire?

Posted: Wed Sep 15, 2021 3:41 pm
by cuse
Please try to be more precise about what behaviour you encounter exactly. For instance you now explained you tried to launch LS by Pipewire, but it failed. What are the error messages that you got in this case?

Did you compile both pipewire and LS by yourself? Or did you install one of the two or both precompiled as binaries? Because some common issue with JACK is that e.g. one app might be compiled to run with JACK1 and another with JACK2, which sometimes renders incompatibility issues like stating that JACK server is not running, whereas it simply another JACK version.

Re: Linuxsampler work with pipewire?

Posted: Thu Sep 16, 2021 2:47 pm
by aki42
At first, I've installed linuxsampler 2.2.0-2.
https://archlinux.org/packages/communit ... uxsampler/
https://github.com/archlinux/svntogit-c ... k/PKGBUILD

And I usually don't use pw-jack prefix which I happen to know.
But as I use it, I get following errors.

Code: Select all

[aki@w530 ~]$ netcat localhost 8888
LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS
ALSA,JACK
CREATE AUDIO_OUTPUT_DEVICE JACK
ERR:0:Seems Jack server is not running.

I've also tested on qsampler and got following errors when I added a jack output device on my alsaoutput.lscp.

Code: Select all

21:58:29.977 Logging started --- Thu Sep 16 21:58:29 2021 ---
21:58:30.196 Client connecting...
21:58:30.197 Server is starting...
21:58:30.197 linuxsampler
21:58:30.201 Server was started with PID=3361.
21:58:30.203 lscp_client_create: cmd: connect: Connection refused
21:58:30.211 LinuxSampler 2.2.0
21:58:30.212 Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck
21:58:30.212 Copyright (C) 2005-2021 Christian Schoenebeck
21:58:30.212 Binary built: Jun  3 2021
21:58:30.212 Detected features: MMX SSE SSE2
21:58:30.212 Automatic Stacktrace: Off
21:58:30.212 Creating Sampler...OK
21:58:30.213 Registered sampler engines: 'GIG','SF2','SFZ'
21:58:30.213 Registered MIDI input drivers: ALSA,JACK
21:58:30.213 Registered audio output drivers: ALSA,JACK
21:58:30.243 Loading instrument editor plugins...OK
21:58:30.244 Registered instrument editors: 'gigedit'
21:58:30.244 Registered internal effect systems: LADSPA
21:58:30.254 Registered internal effects: 20
21:58:30.265 Starting LSCP network server (0.0.0.0:8888)...OK
21:58:33.412 Client connecting...
21:58:33.413 Client receive timeout is set to 1000 msec.
21:58:33.416 Client connected.
21:58:33.421 Sent fine tuning settings.
21:58:33.424 New session: "Untitled1".
21:58:33.434 LinuxSampler initialization completed. :-)
21:58:33.434 LSCPServer: Client connection established on socket:8.
21:58:33.434 LSCPServer: Client connection established on socket:9.
21:58:36.073 Unloading instrument editor plugins...OK
21:58:36.093 Warning: your soundcard doesn't support chosen hardware parameters; trying to compensate support lack with plughw...Thread: WARNING, can't assign realtime scheduling to thread!
21:58:36.133 Thread: WARNING, can't assign realtime scheduling to thread!
21:58:36.145 Channel 0 lscp_get_audio_device_info: DESCRIPTION (errno=0)
21:58:36.146 Channel 0 lscp_get_midi_device_info: DESCRIPTION (errno=0)
21:58:36.185 Starting disk thread...OK
21:58:36.186 EQ support: no
21:58:36.195 Scheduling '/usr/lib/lv2/avldrums.lv2/Black_Pearl_4_LV2.sf2' (Index=0) to be loaded in background (if not loaded yet).
21:58:36.208 Open session: "/home/aki/LinuxSampler/alsaoutput.lscp".
21:58:36.214 Loading sf2 file '/usr/lib/lv2/avldrums.lv2/Black_Pearl_4_LV2.sf2'...OK
21:58:36.214 Loading sf2 instrument ('/usr/lib/lv2/avldrums.lv2/Black_Pearl_4_LV2.sf2',0)...OK
21:58:36.214 Caching initial samples...OK
21:58:47.059 Channel 0 setup...
21:58:47.156 qt.core.qobject.connect: QObject::connect: No such signal QComboBox::activated(const QString&)
21:58:47.157 qt.core.qobject.connect: QObject::connect:  (sender name:   'InstrumentFileComboBox')
21:58:47.157 qt.core.qobject.connect: QObject::connect:  (receiver name: 'qsamplerChannelForm')
21:58:47.157 qt.core.qobject.connect: QObject::connect: No such signal QComboBox::activated(const QString&)
21:58:47.157 qt.core.qobject.connect: QObject::connect:  (sender name:   'MidiDriverComboBox')
21:58:47.157 qt.core.qobject.connect: QObject::connect:  (receiver name: 'qsamplerChannelForm')
21:58:47.158 qt.core.qobject.connect: QObject::connect: No such signal QComboBox::activated(const QString&)
21:58:47.158 qt.core.qobject.connect: QObject::connect:  (sender name:   'AudioDriverComboBox')
21:58:47.158 qt.core.qobject.connect: QObject::connect:  (receiver name: 'qsamplerChannelForm')
21:58:49.444 ALSA lib confmisc.c:165:(snd_config_get_card) Cannot get card index for 0,0
21:58:49.445 ALSA lib confmisc.c:165:(snd_config_get_card) Cannot get card index for 0,0
21:58:51.346 Cannot connect to server socket err = No such file or directory
21:58:51.347 Cannot connect to server request channel
21:58:51.348 Automatic start of JACK server is disabled at configure time
21:58:51.348 jack server is not running or cannot be started
21:58:51.349 JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
21:58:51.349 JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
21:58:51.350 Cannot connect to server socket err = No such file or directory
21:58:51.350 Cannot connect to server request channel
21:58:51.351 Automatic start of JACK server is disabled at configure time
21:58:51.351 jack server is not running or cannot be started
21:58:51.352 JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
21:58:51.352 JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
21:58:51.353 Cannot connect to server socket err = No such file or directory
21:58:51.353 Cannot connect to server request channel
21:58:51.353 Automatic start of JACK server is disabled at configure time
21:58:51.354 jack server is not running or cannot be started
21:58:51.354 JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
21:58:51.355 JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
21:58:52.283 New Audio device lscp_create_audio_device: Seems Jack server is not running. (errno=100)
21:58:52.287 Cannot connect to server socket err = No such file or directory
21:58:52.287 Cannot connect to server request channel
21:58:52.288 Automatic start of JACK server is disabled at configure time
21:58:52.288 jack server is not running or cannot be started
21:58:52.288 JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
21:58:52.289 JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
21:58:52.289 Cannot connect to server socket err = No such file or directory
21:58:52.290 Cannot connect to server request channel
21:58:52.290 Automatic start of JACK server is disabled at configure time
21:58:52.291 jack server is not running or cannot be started
21:58:52.291 JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
21:58:52.291 JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
21:58:52.292 Seems Jack server is not running.
21:58:52.292 New Audio device Could not create device. Sorry.
21:58:54.819 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 2003, resource id: 10926097, major code: 40 (TranslateCoords), minor code: 0
21:58:56.263 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 2091, resource id: 10924802, major code: 40 (TranslateCoords), minor code: 0
21:58:57.563 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 2155, resource id: 10923734, major code: 40 (TranslateCoords), minor code: 0
alsaoutput.lscp

Code: Select all

# Qsampler - A LinuxSampler Qt GUI Interface
# Version: 0.9.4
#
# File: alsaoutput.lscp
# Date: Sep 16 2021 21:37:19
#

RESET

# Audio ALSA Device 0
CREATE AUDIO_OUTPUT_DEVICE ALSA ACTIVE='true' CARD='0,0' CHANNELS='4' FRAGMENTS='2' FRAGMENTSIZE='128' SAMPLERATE='48000'
# SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 0 IS_MIX_CHANNEL='false'
SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 0 NAME='Channel 0'
# SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 1 IS_MIX_CHANNEL='false'
SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 1 NAME='Channel 1'
# SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 2 IS_MIX_CHANNEL='false'
SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 2 NAME='Channel 2'
# SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 3 IS_MIX_CHANNEL='false'
SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 3 NAME='Channel 3'

# MIDI ALSA Device 0
CREATE MIDI_INPUT_DEVICE ALSA ACTIVE='true' NAME='LinuxSampler' PORTS='1'
# SET MIDI_INPUT_PORT_PARAMETER 0 0 ALSA_SEQ_BINDINGS=''
# SET MIDI_INPUT_PORT_PARAMETER 0 0 ALSA_SEQ_ID='129:0'
SET MIDI_INPUT_PORT_PARAMETER 0 0 NAME='Port 0'

# MIDI instrument map 0 - Chromatic
ADD MIDI_INSTRUMENT_MAP 'Chromatic'

# MIDI instrument map 1 - Drum Kits
ADD MIDI_INSTRUMENT_MAP 'Drum Kits'

# Channel 0
ADD CHANNEL
SET CHANNEL AUDIO_OUTPUT_DEVICE 0 0
SET CHANNEL MIDI_INPUT_DEVICE 0 0
SET CHANNEL MIDI_INPUT_PORT 0 0
SET CHANNEL MIDI_INPUT_CHANNEL 0 0
LOAD ENGINE SF2 0
LOAD INSTRUMENT NON_MODAL '/usr/lib/lv2/avldrums.lv2/Black_Pearl_4_LV2.sf2' 0 0
SET CHANNEL AUDIO_OUTPUT_CHANNEL 0 0 0
SET CHANNEL AUDIO_OUTPUT_CHANNEL 0 1 1
SET CHANNEL VOLUME 0 1
SET CHANNEL MIDI_INSTRUMENT_MAP 0 0

# Global volume level
SET VOLUME 0.35

Do you think jack2's compile option is the problem?

Code: Select all

21:58:52.290 Automatic start of JACK server is disabled at configure time

Re: Linuxsampler work with pipewire?

Posted: Thu Sep 16, 2021 6:27 pm
by cuse
And if you don't run pipewire you are able to launch LS with JACK successfully, right?

Re: Linuxsampler work with pipewire?

Posted: Fri Sep 17, 2021 6:23 am
by aki42
No sound if I kill pipewire process.
And LS can be started but no sound.

In the installation process, pipewire-jack package is listed as required by manjaro-pipewire meta packagte.
So pipewire-jack is installed on my system.
I'd replaced the original sound system of pulseaudio, alsa and jack with pipewire.

Do you think pipewire is not supported by LS?

By the way, I found jack2 has autostart=none option on waf configuration on line 42 of PKGBUILD.
https://github.com/archlinux/svntogit-p ... k/PKGBUILD
Maybe removing the line or something can improve the situation.

Re: Linuxsampler work with pipewire?

Posted: Thu Sep 23, 2021 3:28 pm
by cuse
aki42 wrote:
Fri Sep 17, 2021 6:23 am
No sound if I kill pipewire process.
Not suprising, because pipewire is the sound server. If you kill it then there is nothing to transfer audio betweens apps and hardware.
aki42 wrote:
Fri Sep 17, 2021 6:23 am
And LS can be started but no sound.
Does LS show up in the QJackCtl graph? If yes, connect its audio output channels with QJackCtl to the destination of your choice (e.g. system out).

You can also do that automatically later on, e.g. by QJackCtl's "patchbay" feature (probably preferred solution), or by adjusting your LSCP file accordingly.
aki42 wrote:
Fri Sep 17, 2021 6:23 am
In the installation process, pipewire-jack package is listed as required by manjaro-pipewire meta packagte.
So pipewire-jack is installed on my system.
I'd replaced the original sound system of pulseaudio, alsa and jack with pipewire.

Do you think pipewire is not supported by LS?
I have actually never used pipewire before. All I can see ATM is that it promotes itself to be a plug-in replacement for various sound servers simultaniously, including JACK. So my expectation would be that existing JACK clients should just work out of the box with pipewire and its integrated JACK bindings.
aki42 wrote:
Fri Sep 17, 2021 6:23 am
By the way, I found jack2 has autostart=none option on waf configuration on line 42 of PKGBUILD.
https://github.com/archlinux/svntogit-p ... k/PKGBUILD
Maybe removing the line or something can improve the situation.
That might be intentional if the sound server is started by distro at boot time already.

If the QJackCtl approach suggested does not help, then you might ask the pipewire community if JACK clients need to be recompiled against the pipewire-jack library instead of the "official" jack library.