Fix Timidity's DLS instrument loading:
- Envelope data needed to be converted to SF2 values. - Fine tuning was ignored which made pretty much every instrument off tune. - Despite this, it still sounds like shit compared to FMOD or Microsoft's wavetable synth. There are lots of missing notes and some instruments are still off tune. I'm not sure it's worth trying to salvage it. It'd probably be better to scrap it, since Timidity is very much oriented toward GF1 patches, which it handles perfectly fine.
This commit is contained in:
parent
d234a6af5d
commit
f9574a98fd
4 changed files with 52 additions and 27 deletions
|
|
@ -678,6 +678,9 @@ int LoadDMXGUS()
|
|||
return 0;
|
||||
}
|
||||
|
||||
DLS_Data *LoadDLS(FILE *src);
|
||||
void FreeDLS(DLS_Data *data);
|
||||
|
||||
Renderer::Renderer(float sample_rate, const char *args)
|
||||
{
|
||||
// 'args' should be used to load a custom config or DMXGUS, but since setup currently requires a snd_reset call, this will need some refactoring first
|
||||
|
|
@ -701,6 +704,11 @@ Renderer::Renderer(float sample_rate, const char *args)
|
|||
voices = MAX(*midi_voices, 16);
|
||||
voice = new Voice[voices];
|
||||
drumchannels = DEFAULT_DRUMCHANNELS;
|
||||
#if 0
|
||||
FILE *f = fopen("c:\\windows\\system32\\drivers\\gm.dls", "rb");
|
||||
patches = LoadDLS(f);
|
||||
fclose(f);
|
||||
#endif
|
||||
}
|
||||
|
||||
Renderer::~Renderer()
|
||||
|
|
@ -713,6 +721,10 @@ Renderer::~Renderer()
|
|||
{
|
||||
delete[] voice;
|
||||
}
|
||||
if (patches != NULL)
|
||||
{
|
||||
FreeDLS(patches);
|
||||
}
|
||||
}
|
||||
|
||||
void Renderer::ComputeOutput(float *buffer, int count)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue