Il giorno ven 3 ott 2014 alle 19:45, Tito Latini <tito.01beta@gmail.com> ha scritto:<br><blockquote type="cite"><div class="plaintext" style="white-space: pre-wrap;">
I don't use systemd so I cannot test it, however the file used by
archlinux is

<a href="https://projects.archlinux.org/svntogit/packages.git/tree/trunk/fluidsynth.systemd?h=packages/fluidsynth">https://projects.archlinux.org/svntogit/packages.git/tree/trunk/fluidsynth.systemd?h=packages/fluidsynth</a>

If the rule "After=sound.target" implies "start fluidsynth after the
start of the audio server", it should work.

If you want to use a config file for the environment variables,
a template/example is

<a href="https://projects.archlinux.org/svntogit/packages.git/tree/trunk/fluidsynth.conf?h=packages/fluidsynth">https://projects.archlinux.org/svntogit/packages.git/tree/trunk/fluidsynth.conf?h=packages/fluidsynth</a>

so `-a jack' if you use jack and `-m jack' if you use jack midi, etc.

    fluidsynth -a help
    fluidsynth -m help

<blockquote> Requested a period size of 64, got 940 instead
 [...]
 Requested 16 periods, got 8 instead
</blockquote>
Probably the correct parameters with `-a alsa' (no jack,
no pulseaudio, etc) in this case are

    fluidsynth -is -a alsa -r 48000 -z 1024 -c 8

because I presume 940 is "1024 * 44100 / 48000".
</div></blockquote><br><div>Thanks, now systemd service is starting correctly, but something is wrong with fluidsynth command because I cannot hear any sound. Maybe some ALSA/Pulseaudio conflict?</div><div>As you can see here:</div><div><br></div><div><div># systemctl status -l fluidsynth.service</div><div>● fluidsynth.service - FluidSynth Daemon</div><div>   Loaded: loaded (/etc/systemd/system/fluidsynth.service; disabled)</div><div>   Active: active (running) since sab 2014-10-04 10:38:02 CEST; 2s ago</div><div> Main PID: 7768 (fluidsynth)</div><div>   CGroup: /system.slice/fluidsynth.service</div><div>           └─7768 /usr/bin/fluidsynth -is -a alsa -m alsa_seq -r 48000 -z 1024 -c 8 -p 7345</div></div><div><br></div><div>the command is:</div><div>fluidsynth -is -a alsa -m alsa_seq -r 48000 -z 1024 -c 8 -p 7345</div><div><br></div><div>I'm using PulseAudio but I've added these lines to ~/.asoundrc:</div><div><br></div><div><div>pcm.!default {</div><div>    type pulse</div><div>}</div><div><br></div><div>ctl.!default {</div><div>    type pulse</div><div>}</div></div><div><br></div><div>I want to specify fluidsynth port so I don't have to select it each time I start an application (Frescobaldi).</div><div><br></div>