Hi, I like the general idea. In my opinion it only makes sense if there are sensible default values for (nearly?) all platforms, so having a compile-time option would be a prerequisite.
But I think requiring the user to set -O synth.soundfont-dirs=... on the command-line if the compiled-in default needs to be changed doesn't go far enough. As the motivation behind this is to make command-line usage easier for users, maybe we should go one step further and provide a mechanism to load a runtime default configuration for all settings. Similar to the config-file mechanism, but something that takes effect before the synth object is created and which has the same effect as specifying the switches on the command-line. So on UNIX have a ~/.fluidsynthrc file, and possibly a system wide /etc/fluidsynth.conf (Not sure how this translates to the Windows world, though). In this file you could specify default settings but still override them on the command-line. Cheers, Marcus Am Do., 1. Nov. 2018 um 13:33 Uhr schrieb Tom <remya...@gmail.com>: > Per request I'm moving this discussion to the mailing list. > > Motivation: https://github.com/FluidSynth/fluidsynth/issues/453 > Current PR: https://github.com/FluidSynth/fluidsynth/pull/454 > > Essentially the feature would add an option called "synth.soundfont-dirs". > I've chosen to make this a semi-colon delimited list, like > "/usr/share/soundfonts/;~/.local/share/soundfonts" (on Windows, it's > "C:/soundfonts/"). When specifying soundfonts on the command-line, the new > functionality is to look for the soundfont in the current directory, and if > it's not there, search the other directories. This is so the user does not > need to specify an absolute path everytime. > > Some of the concerns: > > - How to implement the default path (env. variable, > dirname(synth.default-soundfont), custom path)? > > IMO, the most intuitive place is to look in the current directory, then > look in locations determined by the filesystem hierarchy (FHS, XDG, etc; > and Windows equivalent). If we allow a run-time configurable option, the > user can rearrange the search path too. > > - Compile-time or run-time configurable? > > Allow it to be compile-time configurable for maintainers to set a > reasonable default, but also run-time configurable for user convenience. > > - How to deal with other OSs? > > See #1. > > - How to deal with files that exist in this default directory as well > as in the current working directory? > > See #1. > > - After all: Why not writing a simple shell script for your use-case? > > Reducing duplication of effort. I think this patch is simple enough that > the user convenience to dev implementation ratio is good enough. > > _______________________________________________ > fluid-dev mailing list > fluid-dev@nongnu.org > https://lists.nongnu.org/mailman/listinfo/fluid-dev >
_______________________________________________ fluid-dev mailing list fluid-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/fluid-dev