fluidsynth 2.1.1 not creating a server

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

fluidsynth 2.1.1 not creating a server

Knute Snortum
I am trying to get fluidsynth to start a server so that an outside
application (frescobaldi) can send MIDI events to it.  Here is what I
get when I try to do this:

$ fluidsynth -is /usr/share/sounds/sf2/FluidR3_GM.sf2
FluidSynth runtime version 2.1.1
Copyright (C) 2000-2020 Peter Hanappe and others.
Distributed under the LGPL license.
SoundFont(R) is a registered trademark of E-mu Systems, Inc.

fluidsynth: error: Failed to bind server socket: 98
Failed to create the server.
Continuing without it.
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
fluidsynth: warning: Failed to set thread to high priority
jackdmp 1.9.12
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2017 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
Cannot create RT messagebuffer thread: Operation not permitted (1)
Retrying messagebuffer thread without RT scheduling
Messagebuffer not realtime; consider enabling RT scheduling for user
no message buffer overruns
Cannot create RT messagebuffer thread: Operation not permitted (1)
Retrying messagebuffer thread without RT scheduling
Messagebuffer not realtime; consider enabling RT scheduling for user
no message buffer overruns
Cannot create RT messagebuffer thread: Operation not permitted (1)
Retrying messagebuffer thread without RT scheduling
Messagebuffer not realtime; consider enabling RT scheduling for user
no message buffer overruns
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
Cannot lock down 82280346 byte memory area (Cannot allocate memory)
audio_reservation_init
Acquire audio card Audio0
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 32bit integer little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit integer little-endian
ALSA: use 2 periods for playback
Cannot use real-time scheduling (RR/10)(1: Operation not permitted)
AcquireSelfRealTime error
Cannot lock down 82280346 byte memory area (Cannot allocate memory)
fluidsynth: Jack sample rate mismatch, adjusting.
(synth.sample-rate=44100, jackd=48000)
Cannot use real-time scheduling (RR/5)(1: Operation not permitted)
JackClient::AcquireSelfRealTime error
JackTemporaryException : now quits...
Jack main caught signal 2
Released audio card Audio0
audio_reservation_finish

fluidsynth is trying to bind to socket 98, but according to
/etc/protocols, that socket is in use by another app.  Is there a way
to change sockets or will that just confuse frescobaldi?

I'm on Ubuntu 20.04, using the fluidsynth version that apt gets.

---
Knute Snortum
(via Gmail)

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: fluidsynth 2.1.1 not creating a server

Marcus Weseloh
Hi Knute,

as you want FluidSynth to respond to MIDI events, you don't need to
start a server but simply specify which audio/midi driver to use. The
"server" that can be started with the -s command-line option is a way
to access the FluidSynth command shell and not required for your
use-case.

I've never used frescobali, but looking at the docs at
https://www.frescobaldi.org/uguide#help_preferences_midi it seems like
it only supports ALSA MIDI. And assuming you are on a modern distro,
your sound system is probably based on pulseaudio. So you could start
FluidSynth with the following command-line:

fluidsynth -a pulseaudio -m alsa_seq /usr/share/sounds/sf2/FluidR3_GM.sf2

(Alternatively, if you have a pure ALSA based system, replace -a
pulseaudio with -a alsa).
Then start frescobaldi and open the MIDI settings. You should be able
to choose the FluidSynth MIDI ports as output.

For further details, you could have a look at the manual:
https://github.com/FluidSynth/fluidsynth/wiki/ExampleCommandLines#fluidsynth-with-pulseaudio

Cheers
Marcus

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: fluidsynth 2.1.1 not creating a server

Knute Snortum
Thanks, Marcus!

That works if I start FluidSynth manually in a terminal and leave it
there, but I'd like to get it to start every time the system reboots.
I have put the command in the Startup Applications (which I think is
just a GUI for systemd) but Frescobaldi says that no output was found.

How would you start FluidSynth at startup automatically?

---
Knute Snortum
(via Gmail)

On Wed, Aug 5, 2020 at 11:59 AM Marcus Weseloh <[hidden email]> wrote:

>
> Hi Knute,
>
> as you want FluidSynth to respond to MIDI events, you don't need to
> start a server but simply specify which audio/midi driver to use. The
> "server" that can be started with the -s command-line option is a way
> to access the FluidSynth command shell and not required for your
> use-case.
>
> I've never used frescobali, but looking at the docs at
> https://www.frescobaldi.org/uguide#help_preferences_midi it seems like
> it only supports ALSA MIDI. And assuming you are on a modern distro,
> your sound system is probably based on pulseaudio. So you could start
> FluidSynth with the following command-line:
>
> fluidsynth -a pulseaudio -m alsa_seq /usr/share/sounds/sf2/FluidR3_GM.sf2
>
> (Alternatively, if you have a pure ALSA based system, replace -a
> pulseaudio with -a alsa).
> Then start frescobaldi and open the MIDI settings. You should be able
> to choose the FluidSynth MIDI ports as output.
>
> For further details, you could have a look at the manual:
> https://github.com/FluidSynth/fluidsynth/wiki/ExampleCommandLines#fluidsynth-with-pulseaudio
>
> Cheers
> Marcus
>
> _______________________________________________
> fluid-dev mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/fluid-dev

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: fluidsynth 2.1.1 not creating a server

Ceresa Jean-Jacques

Hi,

 

>How would you start FluidSynth at startup automatically? -

 

Here possible solution.

https://lists.nongnu.org/archive/html/fluid-dev/2020-01/msg00032.html

jjc

 


_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: fluidsynth 2.1.1 not creating a server

Knute Snortum
Thanks, Ceresa, I read that whole thread but it doesn't seem to apply
to my situation.

I am on Ubuntu 20.04, using systemd now to try to start FluidSynth.  I
learned that PulseAudio won't start as root, so I added my service to
~/.config/systemd/user.  It looks like this:

[Unit]
Description=FluidSynth launched in server mode
After=sound.target

[Service]
ExecStart=/usr/bin/fluidsynth -a pulseaudio -m alsa_seq -i -l -s -p
FluidSynth /usr/share/sounds/sf2/FluidR3_GM.sf2

[Install]
WantedBy=default.target

But when I do a systemctl status fluidsynth, I see this:

fluidsynth.service - FluidSynth
     Loaded: loaded (/lib/systemd/system/fluidsynth.service; enabled;
vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2020-08-06 08:47:37
PDT; 5h 6min ago
    Process: 838 ExecStart=/usr/bin/fluidsynth -a pulseaudio -m
alsa_seq /usr/share/sounds/sf2/FluidR3_GM.sf2 (code=exited,
status=255/EXCEPTION)
   Main PID: 838 (code=exited, status=255/EXCEPTION)

Aug 06 08:47:36 knute-NUC7PJYH systemd[1]: Started FluidSynth.
Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: fluidsynth: error:
Failed to create PulseAudio connection
Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: Failed to create the
audio driver
Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: FluidSynth runtime version 2.1.1
Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: Copyright (C)
2000-2020 Peter Hanappe and others.
Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: Distributed under the
LGPL license.
Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: SoundFont(R) is a
registered trademark of E-mu Systems, Inc.
Aug 06 08:47:37 knute-NUC7PJYH systemd[1]: fluidsynth.service: Main
process exited, code=exited, status=255/EXCEPTION
Aug 06 08:47:37 knute-NUC7PJYH systemd[1]: fluidsynth.service: Failed
with result 'exit-code'.

Any ideas why the PulseAudio connection fails?

---
Knute Snortum
(via Gmail)


---
Knute Snortum
(via Gmail)


On Wed, Aug 5, 2020 at 2:41 PM Ceresa Jean-Jacques
<[hidden email]> wrote:

>
> Hi,
>
>
>
> >How would you start FluidSynth at startup automatically? -
>
>
>
> Here possible solution.
>
> https://lists.nongnu.org/archive/html/fluid-dev/2020-01/msg00032.html
>
> jjc
>
>
>
> _______________________________________________
> fluid-dev mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/fluid-dev

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: fluidsynth 2.1.1 not creating a server

Marcus Weseloh
Hi Knute,

you say that you used a user unit file file in .config/systemd/user/,
but the output from the status command is a report from a system unit
file in /lib/systemd/system/fluidsynth.service.

If you want to use user-unit files, you need to prefix all systemctl
commands with --user. So you could try the following:

First make sure your system-wide fluidsynth unit is stopped:
$ sudo systemctl stop fluidsynth

Then reload your user-systemd just to be on the safe side:
$ systemctl --user daemon-reload

Then try to activate your user-unit and check it's status:
$ systemctl --user start fluidsynth
$ systemctl --user status fluidsynth

Cheers
Marcus


Am Do., 6. Aug. 2020 um 23:08 Uhr schrieb Knute Snortum <[hidden email]>:

>
> Thanks, Ceresa, I read that whole thread but it doesn't seem to apply
> to my situation.
>
> I am on Ubuntu 20.04, using systemd now to try to start FluidSynth.  I
> learned that PulseAudio won't start as root, so I added my service to
> ~/.config/systemd/user.  It looks like this:
>
> [Unit]
> Description=FluidSynth launched in server mode
> After=sound.target
>
> [Service]
> ExecStart=/usr/bin/fluidsynth -a pulseaudio -m alsa_seq -i -l -s -p
> FluidSynth /usr/share/sounds/sf2/FluidR3_GM.sf2
>
> [Install]
> WantedBy=default.target
>
> But when I do a systemctl status fluidsynth, I see this:
>
> fluidsynth.service - FluidSynth
>      Loaded: loaded (/lib/systemd/system/fluidsynth.service; enabled;
> vendor preset: enabled)
>      Active: failed (Result: exit-code) since Thu 2020-08-06 08:47:37
> PDT; 5h 6min ago
>     Process: 838 ExecStart=/usr/bin/fluidsynth -a pulseaudio -m
> alsa_seq /usr/share/sounds/sf2/FluidR3_GM.sf2 (code=exited,
> status=255/EXCEPTION)
>    Main PID: 838 (code=exited, status=255/EXCEPTION)
>
> Aug 06 08:47:36 knute-NUC7PJYH systemd[1]: Started FluidSynth.
> Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: fluidsynth: error:
> Failed to create PulseAudio connection
> Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: Failed to create the
> audio driver
> Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: FluidSynth runtime version 2.1.1
> Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: Copyright (C)
> 2000-2020 Peter Hanappe and others.
> Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: Distributed under the
> LGPL license.
> Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: SoundFont(R) is a
> registered trademark of E-mu Systems, Inc.
> Aug 06 08:47:37 knute-NUC7PJYH systemd[1]: fluidsynth.service: Main
> process exited, code=exited, status=255/EXCEPTION
> Aug 06 08:47:37 knute-NUC7PJYH systemd[1]: fluidsynth.service: Failed
> with result 'exit-code'.
>
> Any ideas why the PulseAudio connection fails?
>
> ---
> Knute Snortum
> (via Gmail)
>
>
> ---
> Knute Snortum
> (via Gmail)
>
>
> On Wed, Aug 5, 2020 at 2:41 PM Ceresa Jean-Jacques
> <[hidden email]> wrote:
> >
> > Hi,
> >
> >
> >
> > >How would you start FluidSynth at startup automatically? -
> >
> >
> >
> > Here possible solution.
> >
> > https://lists.nongnu.org/archive/html/fluid-dev/2020-01/msg00032.html
> >
> > jjc
> >
> >
> >
> > _______________________________________________
> > fluid-dev mailing list
> > [hidden email]
> > https://lists.nongnu.org/mailman/listinfo/fluid-dev
>
> _______________________________________________
> fluid-dev mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/fluid-dev

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: fluidsynth 2.1.1 not creating a server

Knute Snortum
Thanks, Marcus.

I disabled the system config for fluidsynth and enabled the user
config.  I took PulseAudio out of the config and just used ALSA.
Status looks good and MIDI plays from Frescobaldi when I start the
process "manually" after boot.  But when I reboot, I get no MIDI
output and systemctl --user static fluidsynth produces this:

fluidsynth.service - FluidSynth launched in server mode
     Loaded: loaded
(/home/knute/.config/systemd/user/fluidsynth.service; enabled; vendor
preset: enabled)
     Active: active (running) since Fri 2020-08-07 08:18:57 PDT; 1min 18s ago
   Main PID: 1810 (fluidsynth)
     CGroup: /user.slice/user-1000.slice/[hidden email]/fluidsynth.service
             └─1810 /usr/bin/fluidsynth -a alsa -m alsa_seq -i -l -s
-p FluidSynth /usr/share/sounds/sf2/FluidR3_GM.sf2

Aug 07 08:18:57 knute-NUC7PJYH systemd[1798]: Started FluidSynth
launched in server mode.
Aug 07 08:18:57 knute-NUC7PJYH fluidsynth[1810]: fluidsynth: warning:
Failed to set thread to high priority
Aug 07 08:19:27 knute-NUC7PJYH fluidsynth[1810]: ALSA lib
pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Timeout
Aug 07 08:19:27 knute-NUC7PJYH fluidsynth[1810]: fluidsynth: error:
Failed to open the "default" audio device
Aug 07 08:19:27 knute-NUC7PJYH fluidsynth[1810]: Failed to create the
audio driver

Any ideas why ALSA is trying to connect to PulseAudio?  Is there some
other way for me to start FluidSynth at boot time?

---
Knute Snortum
(via Gmail)

On Thu, Aug 6, 2020 at 3:21 PM Marcus Weseloh <[hidden email]> wrote:

>
> Hi Knute,
>
> you say that you used a user unit file file in .config/systemd/user/,
> but the output from the status command is a report from a system unit
> file in /lib/systemd/system/fluidsynth.service.
>
> If you want to use user-unit files, you need to prefix all systemctl
> commands with --user. So you could try the following:
>
> First make sure your system-wide fluidsynth unit is stopped:
> $ sudo systemctl stop fluidsynth
>
> Then reload your user-systemd just to be on the safe side:
> $ systemctl --user daemon-reload
>
> Then try to activate your user-unit and check it's status:
> $ systemctl --user start fluidsynth
> $ systemctl --user status fluidsynth
>
> Cheers
> Marcus
>
>
> Am Do., 6. Aug. 2020 um 23:08 Uhr schrieb Knute Snortum <[hidden email]>:
> >
> > Thanks, Ceresa, I read that whole thread but it doesn't seem to apply
> > to my situation.
> >
> > I am on Ubuntu 20.04, using systemd now to try to start FluidSynth.  I
> > learned that PulseAudio won't start as root, so I added my service to
> > ~/.config/systemd/user.  It looks like this:
> >
> > [Unit]
> > Description=FluidSynth launched in server mode
> > After=sound.target
> >
> > [Service]
> > ExecStart=/usr/bin/fluidsynth -a pulseaudio -m alsa_seq -i -l -s -p
> > FluidSynth /usr/share/sounds/sf2/FluidR3_GM.sf2
> >
> > [Install]
> > WantedBy=default.target
> >
> > But when I do a systemctl status fluidsynth, I see this:
> >
> > fluidsynth.service - FluidSynth
> >      Loaded: loaded (/lib/systemd/system/fluidsynth.service; enabled;
> > vendor preset: enabled)
> >      Active: failed (Result: exit-code) since Thu 2020-08-06 08:47:37
> > PDT; 5h 6min ago
> >     Process: 838 ExecStart=/usr/bin/fluidsynth -a pulseaudio -m
> > alsa_seq /usr/share/sounds/sf2/FluidR3_GM.sf2 (code=exited,
> > status=255/EXCEPTION)
> >    Main PID: 838 (code=exited, status=255/EXCEPTION)
> >
> > Aug 06 08:47:36 knute-NUC7PJYH systemd[1]: Started FluidSynth.
> > Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: fluidsynth: error:
> > Failed to create PulseAudio connection
> > Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: Failed to create the
> > audio driver
> > Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: FluidSynth runtime version 2.1.1
> > Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: Copyright (C)
> > 2000-2020 Peter Hanappe and others.
> > Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: Distributed under the
> > LGPL license.
> > Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: SoundFont(R) is a
> > registered trademark of E-mu Systems, Inc.
> > Aug 06 08:47:37 knute-NUC7PJYH systemd[1]: fluidsynth.service: Main
> > process exited, code=exited, status=255/EXCEPTION
> > Aug 06 08:47:37 knute-NUC7PJYH systemd[1]: fluidsynth.service: Failed
> > with result 'exit-code'.
> >
> > Any ideas why the PulseAudio connection fails?
> >
> > ---
> > Knute Snortum
> > (via Gmail)
> >
> >
> > ---
> > Knute Snortum
> > (via Gmail)
> >
> >
> > On Wed, Aug 5, 2020 at 2:41 PM Ceresa Jean-Jacques
> > <[hidden email]> wrote:
> > >
> > > Hi,
> > >
> > >
> > >
> > > >How would you start FluidSynth at startup automatically? -
> > >
> > >
> > >
> > > Here possible solution.
> > >
> > > https://lists.nongnu.org/archive/html/fluid-dev/2020-01/msg00032.html
> > >
> > > jjc
> > >
> > >
> > >
> > > _______________________________________________
> > > fluid-dev mailing list
> > > [hidden email]
> > > https://lists.nongnu.org/mailman/listinfo/fluid-dev
> >
> > _______________________________________________
> > fluid-dev mailing list
> > [hidden email]
> > https://lists.nongnu.org/mailman/listinfo/fluid-dev
>
> _______________________________________________
> fluid-dev mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/fluid-dev

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: fluidsynth 2.1.1 not creating a server

Marcus Weseloh
Hi Knute,

as your Ubuntu is using pulseaudio as sound server by default, alsa is
configured to use pulseaudio as the output "sink". So if you want to
keep the default system configuration of your ubuntu, then it makes
sense to use the FluidSynths pulseaudio driver as alsa will simply
forward all audio to pulseaudio anyway.

That the FluidSynth user service works fine when started manually but
breaks when enabled and executed at login seems to indicate a timing
problem. I suspect that pulseaudio just takes a little too long to
start accepting connections. So you could try to add a little delay to
your unit file, maybe with an ExecStartPre command:

[Service]
ExecStartPre=/bin/sleep 10

Please bear in mind that once started, FluidSynth is always "active",
even when you don't send MIDI events to it. So when you start it
automatically at boot, then it will constantly eat some CPU cycles and
also cause pulseaudio to have a higher load. So when you need it
mainly as a synth for Frescobaldi, another solution could be to simply
create a shell script that starts fluidsynth and frescobaldi together.

Cheers
Marcus

Am Fr., 7. Aug. 2020 um 17:33 Uhr schrieb Knute Snortum <[hidden email]>:

>
> Thanks, Marcus.
>
> I disabled the system config for fluidsynth and enabled the user
> config.  I took PulseAudio out of the config and just used ALSA.
> Status looks good and MIDI plays from Frescobaldi when I start the
> process "manually" after boot.  But when I reboot, I get no MIDI
> output and systemctl --user static fluidsynth produces this:
>
> fluidsynth.service - FluidSynth launched in server mode
>      Loaded: loaded
> (/home/knute/.config/systemd/user/fluidsynth.service; enabled; vendor
> preset: enabled)
>      Active: active (running) since Fri 2020-08-07 08:18:57 PDT; 1min 18s ago
>    Main PID: 1810 (fluidsynth)
>      CGroup: /user.slice/user-1000.slice/[hidden email]/fluidsynth.service
>              └─1810 /usr/bin/fluidsynth -a alsa -m alsa_seq -i -l -s
> -p FluidSynth /usr/share/sounds/sf2/FluidR3_GM.sf2
>
> Aug 07 08:18:57 knute-NUC7PJYH systemd[1798]: Started FluidSynth
> launched in server mode.
> Aug 07 08:18:57 knute-NUC7PJYH fluidsynth[1810]: fluidsynth: warning:
> Failed to set thread to high priority
> Aug 07 08:19:27 knute-NUC7PJYH fluidsynth[1810]: ALSA lib
> pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Timeout
> Aug 07 08:19:27 knute-NUC7PJYH fluidsynth[1810]: fluidsynth: error:
> Failed to open the "default" audio device
> Aug 07 08:19:27 knute-NUC7PJYH fluidsynth[1810]: Failed to create the
> audio driver
>
> Any ideas why ALSA is trying to connect to PulseAudio?  Is there some
> other way for me to start FluidSynth at boot time?
>
> ---
> Knute Snortum
> (via Gmail)
>
> On Thu, Aug 6, 2020 at 3:21 PM Marcus Weseloh <[hidden email]> wrote:
> >
> > Hi Knute,
> >
> > you say that you used a user unit file file in .config/systemd/user/,
> > but the output from the status command is a report from a system unit
> > file in /lib/systemd/system/fluidsynth.service.
> >
> > If you want to use user-unit files, you need to prefix all systemctl
> > commands with --user. So you could try the following:
> >
> > First make sure your system-wide fluidsynth unit is stopped:
> > $ sudo systemctl stop fluidsynth
> >
> > Then reload your user-systemd just to be on the safe side:
> > $ systemctl --user daemon-reload
> >
> > Then try to activate your user-unit and check it's status:
> > $ systemctl --user start fluidsynth
> > $ systemctl --user status fluidsynth
> >
> > Cheers
> > Marcus
> >
> >
> > Am Do., 6. Aug. 2020 um 23:08 Uhr schrieb Knute Snortum <[hidden email]>:
> > >
> > > Thanks, Ceresa, I read that whole thread but it doesn't seem to apply
> > > to my situation.
> > >
> > > I am on Ubuntu 20.04, using systemd now to try to start FluidSynth.  I
> > > learned that PulseAudio won't start as root, so I added my service to
> > > ~/.config/systemd/user.  It looks like this:
> > >
> > > [Unit]
> > > Description=FluidSynth launched in server mode
> > > After=sound.target
> > >
> > > [Service]
> > > ExecStart=/usr/bin/fluidsynth -a pulseaudio -m alsa_seq -i -l -s -p
> > > FluidSynth /usr/share/sounds/sf2/FluidR3_GM.sf2
> > >
> > > [Install]
> > > WantedBy=default.target
> > >
> > > But when I do a systemctl status fluidsynth, I see this:
> > >
> > > fluidsynth.service - FluidSynth
> > >      Loaded: loaded (/lib/systemd/system/fluidsynth.service; enabled;
> > > vendor preset: enabled)
> > >      Active: failed (Result: exit-code) since Thu 2020-08-06 08:47:37
> > > PDT; 5h 6min ago
> > >     Process: 838 ExecStart=/usr/bin/fluidsynth -a pulseaudio -m
> > > alsa_seq /usr/share/sounds/sf2/FluidR3_GM.sf2 (code=exited,
> > > status=255/EXCEPTION)
> > >    Main PID: 838 (code=exited, status=255/EXCEPTION)
> > >
> > > Aug 06 08:47:36 knute-NUC7PJYH systemd[1]: Started FluidSynth.
> > > Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: fluidsynth: error:
> > > Failed to create PulseAudio connection
> > > Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: Failed to create the
> > > audio driver
> > > Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: FluidSynth runtime version 2.1.1
> > > Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: Copyright (C)
> > > 2000-2020 Peter Hanappe and others.
> > > Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: Distributed under the
> > > LGPL license.
> > > Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: SoundFont(R) is a
> > > registered trademark of E-mu Systems, Inc.
> > > Aug 06 08:47:37 knute-NUC7PJYH systemd[1]: fluidsynth.service: Main
> > > process exited, code=exited, status=255/EXCEPTION
> > > Aug 06 08:47:37 knute-NUC7PJYH systemd[1]: fluidsynth.service: Failed
> > > with result 'exit-code'.
> > >
> > > Any ideas why the PulseAudio connection fails?
> > >
> > > ---
> > > Knute Snortum
> > > (via Gmail)
> > >
> > >
> > > ---
> > > Knute Snortum
> > > (via Gmail)
> > >
> > >
> > > On Wed, Aug 5, 2020 at 2:41 PM Ceresa Jean-Jacques
> > > <[hidden email]> wrote:
> > > >
> > > > Hi,
> > > >
> > > >
> > > >
> > > > >How would you start FluidSynth at startup automatically? -
> > > >
> > > >
> > > >
> > > > Here possible solution.
> > > >
> > > > https://lists.nongnu.org/archive/html/fluid-dev/2020-01/msg00032.html
> > > >
> > > > jjc
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > fluid-dev mailing list
> > > > [hidden email]
> > > > https://lists.nongnu.org/mailman/listinfo/fluid-dev
> > >
> > > _______________________________________________
> > > fluid-dev mailing list
> > > [hidden email]
> > > https://lists.nongnu.org/mailman/listinfo/fluid-dev
> >
> > _______________________________________________
> > fluid-dev mailing list
> > [hidden email]
> > https://lists.nongnu.org/mailman/listinfo/fluid-dev
>
> _______________________________________________
> fluid-dev mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/fluid-dev

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: fluidsynth 2.1.1 not creating a server

Knute Snortum
Thanks Marcus,

I think I will just use the shell script solution you proposed, since
I don't use Frescobaldi all the time.  Thanks again for all your help!

---
Knute Snortum
(via Gmail)

On Sun, Aug 9, 2020 at 4:27 AM Marcus Weseloh <[hidden email]> wrote:

>
> Hi Knute,
>
> as your Ubuntu is using pulseaudio as sound server by default, alsa is
> configured to use pulseaudio as the output "sink". So if you want to
> keep the default system configuration of your ubuntu, then it makes
> sense to use the FluidSynths pulseaudio driver as alsa will simply
> forward all audio to pulseaudio anyway.
>
> That the FluidSynth user service works fine when started manually but
> breaks when enabled and executed at login seems to indicate a timing
> problem. I suspect that pulseaudio just takes a little too long to
> start accepting connections. So you could try to add a little delay to
> your unit file, maybe with an ExecStartPre command:
>
> [Service]
> ExecStartPre=/bin/sleep 10
>
> Please bear in mind that once started, FluidSynth is always "active",
> even when you don't send MIDI events to it. So when you start it
> automatically at boot, then it will constantly eat some CPU cycles and
> also cause pulseaudio to have a higher load. So when you need it
> mainly as a synth for Frescobaldi, another solution could be to simply
> create a shell script that starts fluidsynth and frescobaldi together.
>
> Cheers
> Marcus
>
> Am Fr., 7. Aug. 2020 um 17:33 Uhr schrieb Knute Snortum <[hidden email]>:
> >
> > Thanks, Marcus.
> >
> > I disabled the system config for fluidsynth and enabled the user
> > config.  I took PulseAudio out of the config and just used ALSA.
> > Status looks good and MIDI plays from Frescobaldi when I start the
> > process "manually" after boot.  But when I reboot, I get no MIDI
> > output and systemctl --user static fluidsynth produces this:
> >
> > fluidsynth.service - FluidSynth launched in server mode
> >      Loaded: loaded
> > (/home/knute/.config/systemd/user/fluidsynth.service; enabled; vendor
> > preset: enabled)
> >      Active: active (running) since Fri 2020-08-07 08:18:57 PDT; 1min 18s ago
> >    Main PID: 1810 (fluidsynth)
> >      CGroup: /user.slice/user-1000.slice/[hidden email]/fluidsynth.service
> >              └─1810 /usr/bin/fluidsynth -a alsa -m alsa_seq -i -l -s
> > -p FluidSynth /usr/share/sounds/sf2/FluidR3_GM.sf2
> >
> > Aug 07 08:18:57 knute-NUC7PJYH systemd[1798]: Started FluidSynth
> > launched in server mode.
> > Aug 07 08:18:57 knute-NUC7PJYH fluidsynth[1810]: fluidsynth: warning:
> > Failed to set thread to high priority
> > Aug 07 08:19:27 knute-NUC7PJYH fluidsynth[1810]: ALSA lib
> > pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Timeout
> > Aug 07 08:19:27 knute-NUC7PJYH fluidsynth[1810]: fluidsynth: error:
> > Failed to open the "default" audio device
> > Aug 07 08:19:27 knute-NUC7PJYH fluidsynth[1810]: Failed to create the
> > audio driver
> >
> > Any ideas why ALSA is trying to connect to PulseAudio?  Is there some
> > other way for me to start FluidSynth at boot time?
> >
> > ---
> > Knute Snortum
> > (via Gmail)
> >
> > On Thu, Aug 6, 2020 at 3:21 PM Marcus Weseloh <[hidden email]> wrote:
> > >
> > > Hi Knute,
> > >
> > > you say that you used a user unit file file in .config/systemd/user/,
> > > but the output from the status command is a report from a system unit
> > > file in /lib/systemd/system/fluidsynth.service.
> > >
> > > If you want to use user-unit files, you need to prefix all systemctl
> > > commands with --user. So you could try the following:
> > >
> > > First make sure your system-wide fluidsynth unit is stopped:
> > > $ sudo systemctl stop fluidsynth
> > >
> > > Then reload your user-systemd just to be on the safe side:
> > > $ systemctl --user daemon-reload
> > >
> > > Then try to activate your user-unit and check it's status:
> > > $ systemctl --user start fluidsynth
> > > $ systemctl --user status fluidsynth
> > >
> > > Cheers
> > > Marcus
> > >
> > >
> > > Am Do., 6. Aug. 2020 um 23:08 Uhr schrieb Knute Snortum <[hidden email]>:
> > > >
> > > > Thanks, Ceresa, I read that whole thread but it doesn't seem to apply
> > > > to my situation.
> > > >
> > > > I am on Ubuntu 20.04, using systemd now to try to start FluidSynth.  I
> > > > learned that PulseAudio won't start as root, so I added my service to
> > > > ~/.config/systemd/user.  It looks like this:
> > > >
> > > > [Unit]
> > > > Description=FluidSynth launched in server mode
> > > > After=sound.target
> > > >
> > > > [Service]
> > > > ExecStart=/usr/bin/fluidsynth -a pulseaudio -m alsa_seq -i -l -s -p
> > > > FluidSynth /usr/share/sounds/sf2/FluidR3_GM.sf2
> > > >
> > > > [Install]
> > > > WantedBy=default.target
> > > >
> > > > But when I do a systemctl status fluidsynth, I see this:
> > > >
> > > > fluidsynth.service - FluidSynth
> > > >      Loaded: loaded (/lib/systemd/system/fluidsynth.service; enabled;
> > > > vendor preset: enabled)
> > > >      Active: failed (Result: exit-code) since Thu 2020-08-06 08:47:37
> > > > PDT; 5h 6min ago
> > > >     Process: 838 ExecStart=/usr/bin/fluidsynth -a pulseaudio -m
> > > > alsa_seq /usr/share/sounds/sf2/FluidR3_GM.sf2 (code=exited,
> > > > status=255/EXCEPTION)
> > > >    Main PID: 838 (code=exited, status=255/EXCEPTION)
> > > >
> > > > Aug 06 08:47:36 knute-NUC7PJYH systemd[1]: Started FluidSynth.
> > > > Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: fluidsynth: error:
> > > > Failed to create PulseAudio connection
> > > > Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: Failed to create the
> > > > audio driver
> > > > Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: FluidSynth runtime version 2.1.1
> > > > Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: Copyright (C)
> > > > 2000-2020 Peter Hanappe and others.
> > > > Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: Distributed under the
> > > > LGPL license.
> > > > Aug 06 08:47:37 knute-NUC7PJYH fluidsynth[838]: SoundFont(R) is a
> > > > registered trademark of E-mu Systems, Inc.
> > > > Aug 06 08:47:37 knute-NUC7PJYH systemd[1]: fluidsynth.service: Main
> > > > process exited, code=exited, status=255/EXCEPTION
> > > > Aug 06 08:47:37 knute-NUC7PJYH systemd[1]: fluidsynth.service: Failed
> > > > with result 'exit-code'.
> > > >
> > > > Any ideas why the PulseAudio connection fails?
> > > >
> > > > ---
> > > > Knute Snortum
> > > > (via Gmail)
> > > >
> > > >
> > > > ---
> > > > Knute Snortum
> > > > (via Gmail)
> > > >
> > > >
> > > > On Wed, Aug 5, 2020 at 2:41 PM Ceresa Jean-Jacques
> > > > <[hidden email]> wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > >
> > > > >
> > > > > >How would you start FluidSynth at startup automatically? -
> > > > >
> > > > >
> > > > >
> > > > > Here possible solution.
> > > > >
> > > > > https://lists.nongnu.org/archive/html/fluid-dev/2020-01/msg00032.html
> > > > >
> > > > > jjc
> > > > >
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > fluid-dev mailing list
> > > > > [hidden email]
> > > > > https://lists.nongnu.org/mailman/listinfo/fluid-dev
> > > >
> > > > _______________________________________________
> > > > fluid-dev mailing list
> > > > [hidden email]
> > > > https://lists.nongnu.org/mailman/listinfo/fluid-dev
> > >
> > > _______________________________________________
> > > fluid-dev mailing list
> > > [hidden email]
> > > https://lists.nongnu.org/mailman/listinfo/fluid-dev
> >
> > _______________________________________________
> > fluid-dev mailing list
> > [hidden email]
> > https://lists.nongnu.org/mailman/listinfo/fluid-dev
>
> _______________________________________________
> fluid-dev mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/fluid-dev

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev