fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fluid-dev] Config files ?


From: David Henningsson
Subject: Re: [fluid-dev] Config files ?
Date: Tue, 26 Aug 2014 13:27:44 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0



On 2014-08-26 07:58, Peter Billam wrote:
Greetings.

I wrote:
I keep wishing there was some little config file, maybe:
    ~> cat ~/.fluidsynth/config
    audio:
      alsa
    soundfonts:
      /home/soundfonts/MyGM.sf2
      /home/soundfonts/ReallyGoodPiano.sf2
something like that.

David Henningsson wrote:
In general, the fluidsynth settings system could use some
thinking/overhaul

Well, in fluidsynth.lua version 1.2
   http://www.pjb.com.au/comp/lua/fluidsynth.html#read_config_file
I've gone for a default config file ~/.config/fluidsynth
   ~> cat ~/.config/fluidsynth
   audio.driver = alsa
   synth.polyphony = 1024
   load /home/soundfonts/MyGM.sf2
   load /home/soundfonts/ReallyGoodPiano.sf2

which, AFAICS, is also useable by
   fluidsynth -f ~/.config/fluidsynth
which seems to safely ignore the first two lines.
If this is not safe, I'd be happy to protect them with a
comment-character, though I didn't see comments documented...

There is also the "set" shell command, i e "set audio.driver alsa" instead of your "a = b" syntax.

The problem is though that some things should be set before creating the synth (and other objects), such as which audio driver to use, and other things need to be done afterwards, such as which soundfonts to load.

Btw, looking at the code, the fluidsynth executable also seems to automatically run shell commands from ~/.fluidsynth and /etc/fluidsynth.conf. (The fluid_get_sysconf and fluid_get_userconf commands can be used to get these filenames.)


Using fluidsynth.lua, an app would typically read the file with:
   soundfonts = FS.read_config_file(filename)
then start the synth (which inherits the custom settings), then invoke
   FS.sf_load(synth, soundfonts)
which loads MyGM.sf2 and ReallyGoodPiano.sf2
I think most sensible apps would offer a -f option; my testbed is
   http://www.pjb.com.au/midi/fluadity.html

fluidsynth.lua is still early in its lifecycle and I can change
things without worrying much about backward-compatibility,
but I would like to suggest ~/.config/fluidsynth and its
extended-fluidsynth-shell format ...

Regards,  Peter Billam

http://www.pjb.com.au      address@hidden     (03) 6278 9410
"Follow the charge, not the particle."  --  Richard Feynman
  from The Theory of Positrons, Physical Review, 1949


_______________________________________________
fluid-dev mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fluid-dev




reply via email to

[Prev in Thread] Current Thread [Next in Thread]