Fluidsynth and reverb

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
KevinW
Posts: 26
Joined: Wed Jan 04, 2006 2:40 pm
Location: Bochum, Germany
Contact:

Fluidsynth and reverb

Post by KevinW »

Hello there!

I'm using Fluidsynth for all General-Midi-compatible games in ScummVM, like Sam and Max.

One thing that bothers me a little is that the reverb-effect sounds poor compared to my old midi-soundcards back in the day or the mt-32 emulation in scummvm.

I don't know if anyone is working on Fluidsynth or midi at the moment, but maybe the reverb-routine of the mt-32 emulator could be used for fluidsynth optionally?
It's just an idea, but it would certainly sound a lot better.
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3559
Joined: Mon Oct 31, 2005 7:39 am

Re: Fluidsynth and reverb

Post by eriktorbjorn »

FluidSynth is its own project. As far as I know, none of the ScummVM developers are involved with it, we're just using the libfluidsynth library. The FluidSynth-related code in ScummVM is actually pretty short. It's of course possible that we use it in a suboptimal way. I didn't really have anything to compare it to...

(According to the documentation, reverb is enabled by default and the amount of reverb is specified in the SoundFont.)
KevinW
Posts: 26
Joined: Wed Jan 04, 2006 2:40 pm
Location: Bochum, Germany
Contact:

Post by KevinW »

Thanks for your quick reply!

The reverb-effect is definitely there when using Fluidsynth, but it sounds very unnatural and cheap and it seems to be limited to some kind of simple, closed-in room reverb. I suppose, that the fluidsynth libraries in their current status are limited in that way.

The Munt libraries included in ScummVM seem to have far superior routines for reverb generation, but I assume these can't be used that easily?
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3559
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

KevinW wrote: The Munt libraries included in ScummVM seem to have far superior routines for reverb generation, but I assume these can't be used that easily?
I don't know. I can't even run the Munt emulator myself, so I couldn't say which is right/wrong/better/worse. If there is a bug or shortcoming in FluidSynth, it would have to be reported and fixed upstream because ScummVM uses the standard version. Unlike some of the other sound emulation, we don't have our own copy of it.
User avatar
tsoliman
ScummVM Developer
Posts: 404
Joined: Wed Jan 19, 2011 3:47 pm
Location: USA

Post by tsoliman »

They're really different things.
One is an actual synth and the other is a wavetable.

Let me try to explain the difference in very simple terms:
Munt and other synths generate waveforms (sound) from scratch based on maths.
Fluidsynth and other wavetable-based approaches (the soundfont is wavetable data) uses a list of pre-recorded digital sound (e.g. a recorded piano) to reproduce the midi music.

My point is that fluidsyth is very very simple compared to munt. Munt's quality comes from recreating (and using software from) an actual "expensive" Roland synth (including reverb code)

If you want an "expensive" wavetable solution try the EAX effects from a Creative sound card (or similar). Its midi is wavetable based but it has nice reverb effects.

But you probably know all that since you own an MT-32 :)
KevinW
Posts: 26
Joined: Wed Jan 04, 2006 2:40 pm
Location: Bochum, Germany
Contact:

Post by KevinW »

@tsoliman: I never said that I own an MT-32 or use Munt, but I do know what both sound like, real and emulated. And I know the difference between synth-based and wavetable-based soundcards perfectly well. I've been using both as a musician back then. BTW, the MT-32 uses synthesis AND samples (e.g. the drums), which are stored in the rom that is needed for Munt.

But this has nothing to do with my point, that the reverb generation in Fluidsynth is lacking, compared to most standard wavetable soundcards. But since the Munt libraries are part of scummvm and already contain a good sounding reverb-routine, I was just wondering if that routine could be used or modified to be used in Fluidsynth.
User avatar
tsoliman
ScummVM Developer
Posts: 404
Joined: Wed Jan 19, 2011 3:47 pm
Location: USA

Post by tsoliman »

Understood.
I am guessing here but my understanding is that the mt32 roms contain the routines you're referring to.
Munt folks would know more.
mrbumpy409
Posts: 2
Joined: Wed Dec 19, 2012 1:04 am

Post by mrbumpy409 »

The FluidSynth reverb, while not as good as the old Live!/Audigy hardware reverbs (which were quite good), can still sound decent with the right settings. I have no idea how to change this in ScummVM, but I have found the following FluidSynth settings to sound much better:

Reverb:

Room: 0.61
Damp: 0.23
Width: 0.76
Level: 0.57

Chorus:

N: 3
Level: 1.2
Speed: 0.3
Depth: 8

This gives a much more spacious sound, as opposed to the "stuffy room" that seems to be FluidSynth's default.
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3559
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

mrbumpy409 wrote:I have no idea how to change this in ScummVM,
Other than modifying the ScummVM source code to set those options, I don't think there is any way. At least as far as I can tell, all the default settings are hard-coded in FluidSynth, and except for the "gain" and "sample-rate" settings ScummVM doesn't touch them.

At least if you're using FluidSynth as ScummVM's Music Device setting. Under Linux, I think you can set up ALSA to use an external FluidSynth process to handle MIDI for you. Though I've never bothered to figure out how myself, and I don't know about other operating systems.
mrbumpy409
Posts: 2
Joined: Wed Dec 19, 2012 1:04 am

Post by mrbumpy409 »

I've done that with DOSbox. Playing Monkey Island through DOSbox -> Qsynth sound a lot better than ScummVM -> FluidSynth, due to the different reverb settings (Qsynth is a FluidSynth frontend).
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3559
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

mrbumpy409 wrote:I've done that with DOSbox. Playing Monkey Island through DOSbox -> Qsynth sound a lot better than ScummVM -> FluidSynth, due to the different reverb settings (Qsynth is a FluidSynth frontend).
About 1.5 hours ago, some code was merged to add a new options dialog for FluidSynth settings. (So presumably, it should appear in daily Windows builds within a day or so.) I don't know enough about what these settings actually mean myself, but it may be what you're looking for. (If it's not working as intended, please file a bug report.)
KevinW
Posts: 26
Joined: Wed Jan 04, 2006 2:40 pm
Location: Bochum, Germany
Contact:

Post by KevinW »

Great news and good work! An options dialog like that was sorely missed. :)
Post Reply