blupi-games / blupimania

Blupimania source code
https://www.blupi.org
Other
7 stars 1 forks source link

Music: the .ogg files' midi sources are in the other repository #10

Open OdyX opened 6 months ago

OdyX commented 6 months ago

It would be nice™ to be able to play and compress the .ogg music files from their .mid source files (it looks like they got removed in https://github.com/blupi-games/blupimania/commit/ed84063bcefa0ba29e8a055ca333cd06524d2c33), similar to what can be done in Planet Blupi:

midfiles := $(wildcard resources/music/*.mid)
oggfiles := $(midfiles:.mid=.ogg)

resources/music/%.ogg: resources/music/%.mid
    # Encode to ogg with "Quality=0" ~ 64 kB
    timidity -c /etc/timidity/timgm6mb.cfg -Ow $< -o - | oggenc -Q -q0 --serial 1 -o $@ -
Skywalker13 commented 6 months ago

It's not removed, it's just moved to the blupimania-data repository https://github.com/blupi-games/blupimania-data/tree/master/musics

But I disagree (even with Planet Blupi) because the default sound font provided with timidity (or something like that) is very low quality (too much instruments are missing). Some planetblupi musics provided by the debian package are in bad state. The ogg that I provide are much better.

OdyX commented 6 months ago

My view (and it's mostly Debian's) is that "the real source should be available, and binary artifacts should be built (buildable / re-buildable) by the recipients of the binary artifacts, from the source files"; hence why I'm trying to :

  1. get access to the "real source" (the files that get updated by the authors when changes are needed; these are the .mid's, not the .ogg's)
  2. document the FLOSS way to get from the source to the compiled artifact (the .ogg's).

If there's a "free" way (with FLOSS tools and FLOSS soundbanks) to get good quality ogg's from the .mid's, I'm happy to include that (also for planetblupi, of course)!

(Note that I'm not saying it's necessarily a blocker for inclusion in Debian, but it would be "way nicer" to have a good quality mid-to-ogg conversion in place with free tools!)

Happy to help here too.

OdyX commented 6 months ago

Quickly browsing Debian main, it looks like there are options:

The latter is what's used by default, but again; happy to switch to any other (I don't care about build-time or disk-space; builders will take as much time as needed!)

OdyX commented 6 months ago

During my sleep, I realised: the ideal would be a release of the Smaky soundfont as free software!

Skywalker13 commented 6 months ago

I need to test these soundfonts.

About the Smaky, blupimania has only the jingles, not the background musics (DOS) because the Smaky doesn't support audio mixing. Only one sound can be played at a time (and it's done by the CPU). The Smaky is bad for music stuff. No soundfont in this case.

For Windows it's using the soundfont provided in the blupimania-data directory and it's a fan which has converted to sf2 the original file. In 90' most of the time it's using the soundfont provided in the hardware like the soundblaster for example. And it's mostly the same that the sf2 file. Then I use this sf2 file in order to be as much as possible like DOS.

I know that's it's a problem when packaging with Debian and other distributions. Ogg is the best way to provide the same experience on all platforms.

I go back to you once I've tested the free soundfonts.

PS: the webp files can be built from the PNG files by using the blupimania-data repository and my scripts.

Skywalker13 commented 6 months ago

@OdyX this one sounds good csound-soundfont: /usr/share/sounds/sf2/sf_GMbank.sf2