Page 1 of 2

Unable to autostart Fluidsynth automatically using Startup

Posted: Mon Jun 01, 2020 12:59 pm
by Malik
Hi, I am unable to autostart Fluidsynth as a background process when starting Mint. (19.3) (On Laptop Thinkpad X230)

I can load it manually at the terminal but can't make it autostart. The command is

Code: Select all

fluidsynth --audio-driver=alsa --midi-driver=alsa_seq --server ~/MIDI/arachno.sf2
I have also tried prefixing the path to fluidsynth in the command section.

When I check with aplaymidi -l, fluidsynth is not loaded, when I start Mint.

Any help is appreciated. Thank you.

P.S. The above command works in Arch Linux that I have installed with MATE DE and LightDM, and the fluidsynth is able to autostart by adding the command in the Startup Applications menu.

Re: Unable to autostart Fluidsynth automatically using Startup

Posted: Mon Jun 01, 2020 2:14 pm
by MrEen
Hi Malik,

Try a brief pause to the startup command. Maybe ALSA isn't ready when your command runs. I'd suggest this as your Startup command:

Code: Select all

bash -c "sleep 5 && fluidsynth --audio-driver=alsa --midi-driver=alsa_seq --server ~/MIDI/arachno.sf2"
Good luck.

P.S. The reason for the bash command is the interpreter for the startup command is pretty basic. This ensures the command is fired properly.

Re: Unable to autostart Fluidsynth automatically using Startup

Posted: Mon Jun 01, 2020 9:57 pm
by Malik
MrEen wrote:
Mon Jun 01, 2020 2:14 pm
Hi Malik,

Try a brief pause to the startup command. Maybe ALSA isn't ready when your command runs. I'd suggest this as your Startup command:

Code: Select all

bash -c "sleep 5 && fluidsynth --audio-driver=alsa --midi-driver=alsa_seq --server ~/MIDI/arachno.sf2"
Good luck.

P.S. The reason for the bash command is the interpreter for the startup command is pretty basic. This ensures the command is fired properly.
Hi MrEen, thank you for your response.

I have tried the above but it seems not to be loaded when I check with aplaymidi -l. I even tried delaying the execution within the Startup Application option up to 15 seconds, but still doesn't work.

Re: Unable to autostart Fluidsynth automatically using Startup

Posted: Mon Jun 01, 2020 10:11 pm
by MrEen
I'm at a bit of a loss here.

Oops, try this instead:

Code: Select all

bash -c 'sleep 5 && fluidsynth --audio-driver=alsa --midi-driver=alsa_seq --server ~/MIDI/arachno.sf2'

Re: Unable to autostart Fluidsynth automatically using Startup

Posted: Mon Jun 01, 2020 11:17 pm
by Malik
MrEen wrote:
Mon Jun 01, 2020 10:11 pm
I'm at a bit of a loss here.

Oops, try this instead:

Code: Select all

bash -c 'sleep 5 && fluidsynth --audio-driver=alsa --midi-driver=alsa_seq --server ~/MIDI/arachno.sf2'
Tried that but still doesn't load at startup. :(

Even when I click on "run now" within the Startup Application window, it doesn't run....

Thanks anyway for your help! :)

Re: Unable to autostart Fluidsynth automatically using Startup

Posted: Tue Jun 02, 2020 4:26 pm
by MrEen
One last try. I know you said yours works in the terminal, but see if this works for the Startup Applications:

Code: Select all

bash -c 'sleep 5 && fluidsynth -a alsa -m alsa_seq -l -i ~/MIDI/arachno.sf2'
I'm basing that on this page: https://wiki.archlinux.org/index.php/FluidSynth

Re: Unable to autostart Fluidsynth automatically using Startup

Posted: Wed Jun 03, 2020 9:27 pm
by Malik
MrEen wrote:
Tue Jun 02, 2020 4:26 pm
One last try. I know you said yours works in the terminal, but see if this works for the Startup Applications:

Code: Select all

bash -c 'sleep 5 && fluidsynth -a alsa -m alsa_seq -l -i ~/MIDI/arachno.sf2'
I'm basing that on this page: https://wiki.archlinux.org/index.php/FluidSynth
Tried that, and unfortunately, doesn't load fluidsynth through the autostartup.

I even tried creating a executable file with the fluidsynth loading commands and direct the auto start application to load this file on start up, but it wouldn't autostart.

I also have the MUNT MT-32 emulator which I invoke with the "/usr/bin/mt32emu-qt" which just works fine with autostart. (I already tried disabling this to see if it's conflicting with fluidsynth, but it doesn't, and still won't load automatically, even after the MUNT autostart is disabled.)

Re: Unable to autostart Fluidsynth automatically using Startup

Posted: Wed Jun 03, 2020 10:10 pm
by MrEen
I'm completely at a loss. You've done everything I would have tried. I thought that at one time I had fluidsynth installed, but it's not now and I rarely uninstall anything.

Now it gets weirder. I do have Qsynth installed, which is a fluidsynth front-end. I maybe installed something that uninstalled fluidsynth?

Like I said, I'm at a loss why you can't get it autostarted. It looks to me like you've done things properly. I haven't played with any softsynths for some time now, but maybe I'll try over the next few days and see if that leads to something helpful for you. I'm not expecting much though, as some of what you've tried should have worked.

Re: Unable to autostart Fluidsynth automatically using Startup

Posted: Wed Jun 03, 2020 10:44 pm
by Malik
Thank you for your help.

I too am wondering why it simply refuses to load automatically on startup, the same command which can be loaded manually at the terminal. It's not so much a problem but the disappointment (and annoyance) of why something which is straight forward not working as it should.

Maybe will get the answer as the time goes by.

Thanks again! :)

Re: Unable to autostart Fluidsynth automatically using Startup

Posted: Wed Jun 03, 2020 10:53 pm
by MrEen
I think I might know what could be happening. Those Startup things are launching as root, and you need it as your user. Try this change to the original:

Code: Select all

bash -c "sleep 5 && sudo -u yourusername fluidsynth --audio-driver=alsa --midi-driver=alsa_seq --server ~/MIDI/arachno.sf2"
I've probably got the syntax messed up, but I suspect this might be the right idea.

Re: Unable to autostart Fluidsynth automatically using Startup

Posted: Thu Jun 04, 2020 8:10 am
by Malik
I'm afraid that didn't work too.

I wonder why an otherwise normally successful executing command within a terminal, (including invoking fluidsynth through an executable file), works, but can't run from within Startup Applications. :roll:

Re: Unable to autostart Fluidsynth automatically using Startup

Posted: Thu Jun 04, 2020 3:17 pm
by MrEen
Damn, I thought I was onto something with that approach. You don't have JACK autostarting, do you?

Re: Unable to autostart Fluidsynth automatically using Startup

Posted: Mon Jun 08, 2020 10:06 pm
by Malik
Sorry for the late reply.

No I don't have JACK autostarting.

Re: Unable to autostart Fluidsynth automatically using Startup

Posted: Mon Jun 08, 2020 10:09 pm
by MrEen
The only thing I can think of is to try it this way (slightly different):

Code: Select all

bash -c 'sleep 5; fluidsynth -a alsa -m alsa_seq -l -i ~/MIDI/arachno.sf2'

Re: Unable to autostart Fluidsynth automatically using Startup

Posted: Mon Jun 08, 2020 10:49 pm
by MartyMint
I believe you need to have JACK running first, before Fluidsynth starts...
I'm not sure...I always start JACK before starting QSynth, Fluidsynth, etc...

Re: Unable to autostart Fluidsynth automatically using Startup

Posted: Tue Jun 09, 2020 4:49 am
by Malik
MartyMint wrote:
Mon Jun 08, 2020 10:49 pm
I believe you need to have JACK running first, before Fluidsynth starts...
I'm not sure...I always start JACK before starting QSynth, Fluidsynth, etc...
I can start Fluidsynth from the terminal command prompt.Just couldn't load it automatically when I start up Mint, using the Startup Applications control panel item.

Re: Unable to autostart Fluidsynth automatically using Startup

Posted: Tue Jun 09, 2020 5:13 am
by Malik
MrEen wrote:
Mon Jun 08, 2020 10:09 pm
The only thing I can think of is to try it this way (slightly different):

Code: Select all

bash -c 'sleep 5; fluidsynth -a alsa -m alsa_seq -l -i ~/MIDI/arachno.sf2'
Unfortunately this didn't make it autostart too.

Re: Unable to autostart Fluidsynth automatically using Startup

Posted: Tue Jun 09, 2020 5:42 am
by Malik
I installed Timidity just now, and it starts automatically along with my MUNT MT-32 emulator, without problems.

I guess, I'll just keep using Timidity in MINT instead.

I'll keep this thread unsolved, since I can't make Fluidsynth start automatically on startup.

Re: Unable to autostart Fluidsynth automatically using Startup

Posted: Tue Jun 09, 2020 5:23 pm
by MrEen
Understood.

Do be aware that many users have an issue where Timidity blocks their sound card from working with anything else. Just a heads up.

Re: Unable to autostart Fluidsynth automatically using Startup

Posted: Tue Jun 09, 2020 7:39 pm
by Malik
MrEen wrote:
Tue Jun 09, 2020 5:23 pm
Understood.

Do be aware that many users have an issue where Timidity blocks their sound card from working with anything else. Just a heads up.
Yes, that's true. I noticed that in Arch Linux. Hence, changed to Fluidsynth there.

In Mint, Timidity works without problems (at least, in this laptop) along with the PCM sounds. I tested with DOOM2 in Dosbox.