Soundfonts alternatives and Timidity

Raphaël Halimi raphael.halimi at gmail.com
Tue Aug 6 13:06:15 BST 2019


Hi all,

I'm contacting you about the new "default-GM-sf*" alternatives.

Three years ago, I wrote an e-mail to the maintainers of four packages
(timidity, freepats, fluid-soundfont and timgm6mb-soundfont) to propose
a change that would allow timidity to be automatically configured to use
the best soundfont thanks to the alternatives system.

I only received a single answer at the time (by Henrique) who advised me
to open bug reports depending on one another, but I had more urgent
things to do and let it rot in my to-do list (until now!).

In a nutshell, the idea is that Timidity would provide a default
universal configuration file sourcing a snippet to get its instruments,
and this snippet would be selected by the means of an alternative
("timidity-instruments" for example). Then, all packages providing
instruments compatible with Timidity (be it in the form of a soundfont,
or patches like freepats) would register an alternative pointing to its
configuration snippet to allow Timidity to load the instruments.

The new "default-GM-sf*" alternatives are a step in the right direction,
but since Timidity also supports sound patches, for the support to be
universal, it would also need the alternative I'm proposing.

Also, both systems can coexist; soundfont packages could register both
alternatives (default-GM.sf[23] and timidity-instruments); or, if for
any reason, this is not desirable, Timidity could directly point its
configuration file to the default-GM.sf[23] alternative; unfortunately
this would eliminate the possibility of patches packages to benefit of
the automatic configuration of Timidity (although I only see freepats in
the archive, people may have custom packages providing patches; I myself
have custom packages providing old soundfonts from the Creative
SoundBlaster sound cards).

On my personal repository, I provide (and still maintain) NMUs of
aforementioned packages implementing my idea, so I can easily provide
patches for them to help you, should you accept my proposition.

Now that Timidity has a new maintainer, and that the maintainers of the
soundfonts packages decided to take measures to simplify soundfonts
management, I think it's time to bring back the idea to the front light.

I hope you'll like it and be willing to impplement it.

For the record, here is the content of the original e-mail I sent in
2016 (keep in mind that at the time, Timidity's default instruments was
freepats and not fluid-soundfont-gm (which I personally find a bad
choice, since this package is so huge, IMHO timgm6mb-soundfont, which is
way smaller but still sounds very nice, would be a better choice)).

-----%<-----

Hi all,

I write this e-mail to you as respective maintainers of the following
packages:

- timidity
- freepats
- fluid-soundfont
- timgm6mb-soundfont

The goal of the proposed changes is to offer the best out-of-the-box
experience for casual Debian users who don't know about midi files
and/or soundfonts, and who get timidity installed as a dependency for
games (like openttd or scummvm), or music learning software.

The rationale behind this proposition is that, for now, when timidity
gets installed as a dependency, it pulls in the venerable (but
unfortunately incomplete) freepats package, which sadly doesn't offer a
good musical experience, since quite a bunch of patches are missing or
sound like a basic electric organ.

If a user wants better sound on their games or software, he/she has to
install a new soundfont through apt, *and* hack in
/etc/timidity/timidity.cfg, which is far from ideal from a newbie's
point of view.

This could be achieved by simply modifying timidity's default
configuration and dependencies in favor of timgm6mb-soundfont, but I
have a (IMHO) far better plan to simplify the setup for new users, while
keeping compatibility with current patches/soundfonts packages in Debian
(and future ones).

What I propose is to:

- Create a new alternative, named for example "timidity-instruments",
which would be registered by freepats, fluid-soundfont and
timgm6mb-soundfont (and maybe other packages providing patches or
soundfonts), and point it to a timidity configuration file fragment,
provided in the packages
- Have those packages declare in their dependencies that they provide
"timidity-instruments"
- In /etc/timidity/timidity.cfg, replace the lines about freepats and
fluid-soundfont to a simple line that includes the configuration file
fragment pointed by the alternative
- Declare in timidity's dependencies that it recommends the
"timidity-instruments" virtual package, and one default real package
providing it

This way, after installing timidity, installing a soundfont with a
higher priority would automatically make timidity's configuration handle
it, without the user needing to manually modify any configuration file.
Experienced users who want to switch soundfonts/patches could do it
either through Debian's alternatives system, or by manually modifying
/etc/timidity/timidity.cfg. The best of both worlds !

You will find, attached to this e-mail, patches for the current Sid
versions of your respective packages, implementing all the steps of my plan:

- The one for timidity updates the dependencies, and modifies the
default configuration file. I chose "timgm6mb-soundfont" as a default
for the virtual package, because it sounds much better than freepats,
and is significantly smaller than the huge fluid-soundfont, but of
course this is only a suggestion
- The one for freepats updates the dependencies, and registers the
"timidity-instruments" alternative with a priority of 10 (again, only a
suggestion)
- The one for timgm6mb-soundfont does the same, with a priority of 60
(again... You get it)
- The one for fluid-soundfont does the same (with priorities 90 for the
GM soundfont and 20 for the GS soundfont), and adds a new package named
"fluid-soundfont" that depends on both the GM and GS fonts, and which
provides only a configuration file fragment including both GM and GS
fragments, and registers this alternative with priority 100

I had this idea on my mind for a couple of years now (in fact, when I
discovered OpenTTD and tested a wide range of soundfonts, and got tired
of having to manually hack timidity's configuration file each time).

I also made, for my personnal use, non-free packages of all the
soundfonts bundled with the various SoundBlaster cards, from the AWE32
to the Audigy, using the same alternative system I described here.

I'm using my modified packages for a couple of weeks now on my Sid box,
without any problem. Switching between soundfonts or freepats is as easy
as calling "sudo update-alternatives --config timidity-instruments" and
choose one of the alternatives installed.

I really hope you'll like my idea, and that you'll be willing to
implement it before the Stretch freeze.

----->%-----

Regards,

-- 
Raphaël Halimi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-multimedia-maintainers/attachments/20190806/c54eb78c/attachment.sig>


More information about the pkg-multimedia-maintainers mailing list