[Top][All Lists]

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

[fluid-dev] Allow soundfonts to be searched from multiple directories

From: Tom
Subject: [fluid-dev] Allow soundfonts to be searched from multiple directories
Date: Thu, 1 Nov 2018 08:16:28 -0400

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.

reply via email to

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