bug-freedink
[Top][All Lists]
Advanced

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

Re: [Bug-freedink] [Linux] Bug: music very loud feedback, clips


From: beuc
Subject: Re: [Bug-freedink] [Linux] Bug: music very loud feedback, clips
Date: Tue, 28 Jul 2015 21:55:48 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hey,

A note for clarity, FreeDink relies on SDL_mixer, which has 2 main
MIDI backends, TiMIDity++-internal and libfluidsynth.

I can reproduce your "Solstice" video sound with fluidsynth +
'musescore-soundfont-gm' (cf. /usr/share/sounds/sf2/TimGM6mb.sf2).
I also have "noise" with the 'fluid-soundfont-gm' package.
(btw I don't think fluidsynth uses freepats, but when I remove all
sound fonts, or use the SDL_FORCE* trick, SDL_mixer does switch to
TiMIDity++ which relies on freepats)

Making TiMIDity++ the default: both TiMIDity++ and the newer
fluidsynth have pros and cons.  Debian/Ubuntu patch SDL_Mixer to make
fluidsynth the default, so it's a bit out of our control.
Contributing explicit engine selection in SDL_mixer would be nice.

Your idea of modify the volume is actually right!  I don't experience
noise if I lower the SDL_Mixer MIDI/Ogg music channel to < 60%.
However I don't think I can arbitrarily fix it to 60% because this
would make other, less loud MIDIs sound faint.  All this means we need
a volume slider for FreeDink 1.09, what do you think? :)

In this regard,
> I think this project could use some more eyes and development in
> general.

I do agree.  My current idea is to make it easier to improve the
engine without breaking all the existing D-Mods, by writing an
extensive test suite.  That's hard to do for legacy C code, but I've
been studying that recently and hope to come up with something.

As for the tracker: I understand this may be more familiar and visible
than a mailing-list, though bugs usually pile up and it's hard to
organise/re-group them.  A wiki Tasks page could be a good compromise.

Cheers!
Sylvain

On Tue, Jul 28, 2015 at 05:29:41PM +0200, Vincent Beers wrote:
> Hi,
> As I was typing the reply, I noticed a lot was going on here so I put it
> all in a list.
> 
> - I use Ubuntu 15.04.
> - I use QSynth for all my other MIDI purposes. This uses libfluidsynth, but
> not the fluidsynth command itself.
> - Thus, the fluidsynth command isn't installed on my system. (Trying to run
> fluidsynth on a terminal gives me "The program 'fluidsynth' is currently
> not installed.")
> - FreeDink seems to be telling its own internal MIDI player to use
> libfluidsynth, which is why I reported it.
> - However, it ignores whether QSynth is running or not, and seems to be
> initiating libfluidsynth all by itself.
> - It also seems to be using the default settings for libfluidsynth, which
> means it uses freepats, which I find to be a terrible patchset that causes
> exactly this sort of loudness and lack of balance in the music.
> - The loudness of the music depends entirely on the instruments used (bad
> freepats sound levels), as well as the initial loudness of the MIDI itself.
> See videos: https://youtu.be/d0eFTIlmHJ8 for a loud one and
> https://youtu.be/8AF_WskjQdo for a low volume one.
> Hope this is enough info.
> 
> SDL_FORCE_SOUNDFONTS=1 works perfectly, so I'll make sure to set that
> variable by default now. :)
> I wonder if this should be forced by default, since it seems like THE best
> option to begin with? (Even on the Windows version it uses its internal
> player rather than the system's.)
> 
> > Who needs a complex bug tracker when we can nicely discuss this directly?
> :)
> Well, mostly to encourage further development, I suppose! If bugs are
> public and out in the open, other people can confirm them, perhaps give
> more/better info on a different kind of system. And it could stay simple -
> GitHub's is simple and useful for example. I could list more stuff, but I
> also just realized that this goes to the mailing list, so whatever I guess.
> :P
> 
> - Vince
> 
> PS. On an entirely different note: I'm trying to create some completely
> free sound effects and music for FreeDink. Noticed how many are missing! I
> think this project could use some more eyes and development in general.
> 
> On 28 July 2015 at 14:06, <address@hidden> wrote:
> 
> > Hi,
> >
> > On Mon, Jul 27, 2015 at 11:57:44PM +0200, Vincent Beers wrote:
> > > I've noticed this on many different D-Mods, but the MIDI music is played
> > > exceedingly loudly, causing a lot of audio clipping. As an example, I
> > have
> > > recorded a bit of the intro from the D-Mod Solstice (
> > > http://www.dinknetwork.com/file/solstice/).
> > >
> > > https://youtu.be/VvijkP9Sbow
> > >
> > > However, note that this happens on a LOT of D-Mods, including popular
> > ones
> > > like Pilgrim's Quest.
> > > System is Ubuntu, Dink version is 108.4. Suggested solution is to have
> > the
> > > music engine output the MIDI at a lower volume so it never clips, and
> > > manually make that louder so it can still be heard.
> >
> > I don't think the issue is related to clipping.
> >
> > My first guess is that your system uses the 'fluidsynth' MIDI engine
> > which sometimes has weird behavior.
> >
> > A few questions:
> >
> > - which Ubuntu version is it?
> >
> > - can you try running without fluidsynth, from the command line:
> >      SDL_FORCE_SOUNDFONTS=1 SDL_SOUNDFONTS= freedink
> >   (cf. /usr/share/doc/freedink-engine/TROUBLESHOOTING)
> >
> > - if you can, try to run the MIDI file manually with fluidsynth and
> >   check the sound quality, something like:
> >
> >     fluidsynth -a alsa -l -i /usr/share/sounds/sf2/TimGM6mb.sf2
> > /usr/share/games/dink/dink/Sound/dance.mid
> >
> > - how loud is the MIDI compared to the sound effects ?
> >
> >
> > I'll make a few tests with Solstice later and check with lowering the
> > full Music channel, though that's the only control we have on the whole
> > MIDI chain.
> >
> >
> > > PS. Kinda baffled there's no bug tracker?
> >
> > Who needs a complex bug tracker when we can nicely discuss this
> > directly? :)



reply via email to

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