diff options
author | Wohlstand <admin@wohlnet.ru> | 2020-08-21 14:58:12 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2020-08-21 14:58:12 +0300 |
commit | c20df9edf6c19a130dd794a9d6c82c93351afbcc (patch) | |
tree | f72525f3dac1e9cd59d0c5b0909dbc7cd38ff504 /utils/gen_adldata/file_formats/load_op2.h | |
parent | 0f6e197d1f2243e1fb9415e1ea2209c39b972650 (diff) | |
download | libADLMIDI-c20df9edf6c19a130dd794a9d6c82c93351afbcc.tar.gz libADLMIDI-c20df9edf6c19a130dd794a9d6c82c93351afbcc.tar.bz2 libADLMIDI-c20df9edf6c19a130dd794a9d6c82c93351afbcc.zip |
Replace the second voice formula
Diffstat (limited to 'utils/gen_adldata/file_formats/load_op2.h')
-rw-r--r-- | utils/gen_adldata/file_formats/load_op2.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/utils/gen_adldata/file_formats/load_op2.h b/utils/gen_adldata/file_formats/load_op2.h index feb85ed..86f1377 100644 --- a/utils/gen_adldata/file_formats/load_op2.h +++ b/utils/gen_adldata/file_formats/load_op2.h @@ -128,11 +128,8 @@ static bool LoadDoom(const char *fn, unsigned bank, const char *prefix) else // Double instrument { tmp2.pseudo4op = true; - tmp2.voice2_fine_tune = (((double)ins.finetune - 128.0) * 15.625) / 1000.0; - if(ins.finetune == 129) - tmp2.voice2_fine_tune = 0.000025; - else if(ins.finetune == 127) - tmp2.voice2_fine_tune = -0.000025; + // Simulate behavior of DMX second voice detune + tmp2.voice2_fine_tune = (double)((ins.finetune >> 1) - 64) / 32.0; //printf("/*DOOM FINE TUNE (flags %000X instrument is %d) IS %d -> %lf*/\n", ins.flags, a, ins.finetune, tmp2.fine_tune); size_t resno = InsertIns(tmp[0], tmp[1], tmp2, std::string(1, '\377') + name, name2); SetBank(bank, (unsigned int)gmno, resno); |