Remove midi_timiditylike
- Did anybody actually use this? Use WildMidi instead if you want something that sounds more like Timidity++ without actually being Timidity++, since not even the old Timidity manages that.
This commit is contained in:
parent
0cc4bd56d1
commit
14361d9313
9 changed files with 33 additions and 165 deletions
|
|
@ -29,8 +29,6 @@
|
|||
#include "timidity.h"
|
||||
#include "c_cvars.h"
|
||||
|
||||
EXTERN_CVAR(Bool, midi_timiditylike)
|
||||
|
||||
namespace Timidity
|
||||
{
|
||||
|
||||
|
|
@ -118,7 +116,7 @@ void Renderer::recompute_freq(int v)
|
|||
voice[v].sample_increment = (int)(a);
|
||||
}
|
||||
|
||||
static BYTE vol_table[] = {
|
||||
static const BYTE vol_table[] = {
|
||||
000 /* 000 */, 129 /* 001 */, 145 /* 002 */, 155 /* 003 */,
|
||||
161 /* 004 */, 166 /* 005 */, 171 /* 006 */, 174 /* 007 */,
|
||||
177 /* 008 */, 180 /* 009 */, 182 /* 010 */, 185 /* 011 */,
|
||||
|
|
@ -161,16 +159,7 @@ void Renderer::recompute_amp(Voice *v)
|
|||
|
||||
if (v->sample->type == INST_GUS)
|
||||
{
|
||||
if (midi_timiditylike)
|
||||
{
|
||||
v->attenuation = float(timidityxx_perceived_vol(v->velocity / 127.0) *
|
||||
timidityxx_perceived_vol(chanvol / 127.0) *
|
||||
timidityxx_perceived_vol(chanexpr / 127.0));
|
||||
}
|
||||
else
|
||||
{
|
||||
v->attenuation = (vol_table[(chanvol * chanexpr) / 127] * vol_table[v->velocity]) * ((127 + 64) / 12419775.f);
|
||||
}
|
||||
v->attenuation = (vol_table[(chanvol * chanexpr) / 127] * vol_table[v->velocity]) * ((127 + 64) / 12419775.f);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -199,7 +188,7 @@ void Renderer::compute_pan(double pan, int type, float &left_offset, float &righ
|
|||
}
|
||||
else
|
||||
{
|
||||
if (type == INST_GUS && !midi_timiditylike)
|
||||
if (type == INST_GUS)
|
||||
{
|
||||
/* Original amp equation looks like this:
|
||||
* calc_gf1_amp(atten + offset)
|
||||
|
|
@ -218,9 +207,7 @@ void Renderer::compute_pan(double pan, int type, float &left_offset, float &righ
|
|||
}
|
||||
else
|
||||
{
|
||||
/* I have no idea what equation, if any, will reproduce the sc_pan_table
|
||||
* that TiMidity++ uses, so midi_timiditylike gets the same Equal Power
|
||||
* Panning as SF2/DLS.
|
||||
/* Equal Power Panning for SF2/DLS.
|
||||
*/
|
||||
left_offset = (float)sqrt(1 - pan);
|
||||
right_offset = (float)sqrt(pan);
|
||||
|
|
@ -561,7 +548,7 @@ void Renderer::finish_note(int i)
|
|||
v->status &= ~VOICE_SUSTAINING;
|
||||
v->status |= VOICE_RELEASING;
|
||||
|
||||
if (!(v->sample->modes & PATCH_NO_SRELEASE) || midi_timiditylike)
|
||||
if (!(v->sample->modes & PATCH_NO_SRELEASE))
|
||||
{
|
||||
v->status &= ~VOICE_LPE; /* sampled release */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue