[Scummvm-devel] Timidity in Scummvm?
yotam barnoy
yotambarnoy at gmail.com
Mon May 3 11:47:24 CEST 2010
Yeah it's pretty messy. I couldn't figure out what the Adlib driver
was doing there.
Basically I would do something like our MidiDriver_Fluidsynth class,
which inherits MidiDriver_Emulated, except we would have the internals
inside our code the same way that we have the OPL code inside our
code, so we can improve it.
Timidity could replace OPL emulation in general the same way that on
Windows, Windows' General Midi softsynth replaces our Adlib emulation.
The sound quality is much better since it's using real instrument
samples rather than synthesized modulated waveforms, and theoretically
at least, the CPU usage should be lower for the same reason -- playing
back samples is 'cheaper' than generating them from scratch. In
reality, since you have to adjust the samples for the correct pitch
and envelope etc I'm not sure how big the saving really is, but it
should be there. The down side is that more memory is needed to store
the samples.
To answer your question, I'm not suggesting taking out the OPL
emulation and putting Timidity as the only option since OPL has its
own particular sound that's historically associated with early PC
games, but for those platforms that can afford the memory, could use
the speedup, and would like proper General Midi sound but aren't able
to use the 'big guns' of Windows Softsynth or FluidSynth, it could be
a good option. Of course this assumes Timidity really is faster and
better sounding, of which I'm not certain yet.
Yotam
On Mon, May 3, 2010 at 12:06 PM, Max Horn <max at quendi.de> wrote:
> Hi Yotam,
>
> just to get this clear: You want to work on improved / alternate MIDI emulation, right? Because I don't see how Timidity could replace OPL emulation in general, can it?
>
> On that matter, our current situation is quite bad and confused and convoluted here anyway, this is part of the whole "midi/music driver" mess. We have an adlib "MIDI driver" but that is really based on code specific to SCUMM, and not really generic, and contains SCUMM specific hacks; various engines read "music driver adlib" as "use adlib 'MIDI'", while others use it to enable custom "adlib" code, etc.
>
> So, if we had a "real" soft MIDI emulator, different from (and less CPU hungry than) the current FM OPL based softsynth, that would IMO be a very very good thing.
>
> Cheers,
> Max
More information about the Scummvm-devel
mailing list