[LAU] Multiple fluidsynth instances

From: Egor Sanin <egor.sanin@email-addr-hidden>
Date: Sun Nov 24 2013 - 18:27:36 EET

Hi folks,

I was recently stuck on an issue that I could not readily find
solutions for online. So I thought documenting the solution here may
be of use to someone in the future.

Problem: when attempting to start two independent instances of
fluidsynth in server mode from the command line, I get the following
error:

fluidsynth: error: Failed to bind server socket

After a bit of research, it seems that the problem is a result of the
fact that in server mode (and probably in other modes as well, though
I am not sure) fluidsynth communicates with the shell through a socket
on the local machine. From what I saw in the source, there is no
automatic checking to see if the default port is already bound, so the
second instances tries to grab the same socket as the first, and fails
with the above error. There is a setting "shell.port", which needs to
be set explicity in this case (see man page). the -o command line
option allows one to define settings. In the end, the following two
commands give me the kind of environment I need (notice the "-o
shell.port="):

$ fluidsynth -a jack -m alsa_seq --portname=fluidsynth_piano
--no-shell -s -g 1 \
    -o audio.jack.id=fl_piano -o shell.port=9800 piano.sf2 &

$ fluidsynth -a jack -m alsa_seq --portname=fluidsynth_drums
--no-shell -s -g 1 \
    -o audio.jack.id=fl_drums -o shell.port=9801 drums1_harris.sf2 &

I do not know if this problem occurs when using Qsynth, I am doing
this in a text only environment.

Machine info:
$ uname -a
Linux mervag 3.12.1-1-ARCH #1 SMP PREEMPT Thu Nov 21 08:18:42 CET 2013
x86_64 GNU/Linux

$ jackd -V
jackdmp 1.9.9.5
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Sun Nov 24 20:15:01 2013

This archive was generated by hypermail 2.1.8 : Sun Nov 24 2013 - 20:15:02 EET