Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glitchy drums with SF3 files #14

Open
mmontag opened this issue Sep 23, 2018 · 14 comments
Open

Glitchy drums with SF3 files #14

mmontag opened this issue Sep 23, 2018 · 14 comments

Comments

@mmontag
Copy link

mmontag commented Sep 23, 2018

When loading SF3 compressed SoundFonts with FluidLite (such as https://github.com/musescore/MuseScore/raw/2.1/share/sound/FluidR3Mono_GM.sf3) and playing any MIDI file with drums, I am getting very glitchy drum sounds.

Anyone else able to reproduce this or is something wrong with my build?

@mmontag
Copy link
Author

mmontag commented Oct 1, 2018

@divideconcept have you tested FluidLite with SF3 soundfonts?

@RyanBram
Copy link

RyanBram commented Jun 18, 2019

I think the problem is with SF3 format itself.
Because if I remember correctly, the latest Fluidsynth has supported SF3 as well, and also has similar problem like FluidLite.

Because of this, I never use sf3 anymore, because apart from problem above, sf3 has higher latency especially in low spec device as it needs Vorbis to be decoded first before producing sound.

If I want small filesize, but good sound I prefer to use mo3 format which basically a module music format like Impulse Tracker, but using Vorbis or Mp3 encoded samples. Unfortunatelly it still not implemented in libxmp yet. But you may want to use libopenmpt if you want to support mo3.

@mmontag
Copy link
Author

mmontag commented Jun 18, 2019

Same here, I totally abandoned it. Decompressing SF3 was taking longer than downloading the SF2 in my application... https://mmontag.github.io/chip-player-js

@katyo
Copy link
Contributor

katyo commented Feb 6, 2020

Possibly related to #17. I fixed it in my fork.

@mmontag
Copy link
Author

mmontag commented Feb 6, 2020

Your fork looks nice! What is the likelihood of merging your changes back here?

@katyo
Copy link
Contributor

katyo commented Feb 7, 2020

@mmontag Besides bug fixes I made some useful improvements so I would like to make PRs but this project looks inactive under last three years.

@divideconcept
Copy link
Owner

Hi guys, indeed not much activity from me in this repository but I'd be happy to merge any PR !

@katyo
Copy link
Contributor

katyo commented Feb 7, 2020

@divideconcept Sounds good!

@katyo
Copy link
Contributor

katyo commented Jun 14, 2020

@mmontag Can you test it now?

@Ghabry
Copy link
Contributor

Ghabry commented Aug 25, 2020

Maybe unrelated as I use SF2 but the drums break for me when there is a CC command on the drum channel doesn't happen with latest fluidsynth

@katyo
Copy link
Contributor

katyo commented Aug 25, 2020

Maybe unrelated as I use SF2 but the drums break for me when there is a CC command on the drum channel doesn't happen with latest fluidsynth

Can you give me your font and short midi sample.
I would like to debug it.

@Ghabry
Copy link
Contributor

Ghabry commented Aug 25, 2020

We discovered this while integrating FluidLite in EasyRPG Player (because I hate glib). It is a runtime for RPG Maker 2000 games and these games use tons of Midis.

The bug was mentioned here EasyRPG/Player#2250 (comment)

Soundfont doesn't seem to matter, but we use this one: https://stash.reaper.fm/v/23360/Scc1t2.sf2 (basicly GM.DLS from Windows converted to SF2 because users are used to this one when playing RPG Maker games)

(CC @elsemieni : For the short midi sample: Can you help providing one? And give more information?)

Here is one file:
opening2.zip

The Runtime Package with more Music is here: https://www.rpgmakerweb.com/run-time-package (2000 and 2003, you can extract them with 7zip or unar. The mids are in the Music folder)

Related upstream fluidsynth commit (we think): FluidSynth/fluidsynth@59bbdf1

But is hard to backport. I was told Fluidsynth 1.1.11 also plays the drums correctly, maybe easier to fix with there code.

@Ghabry
Copy link
Contributor

Ghabry commented Aug 25, 2020

I found it. For GM devices (the default one fluidsynth uses) the Bank select command is ignored on the DRUM channel: https://github.com/FluidSynth/fluidsynth/blob/v1.1.11/src/synth/fluid_chan.c#L232

So this shouldn't be too hard to backport 👍

@Ghabry
Copy link
Contributor

Ghabry commented Aug 26, 2020

I found another bug related to drums. Now Opening2.mid sounds beautiful (like in upstream FluidSynth) for me.

I will provide a patch soon 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants