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_wopl.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_wopl.h')
-rw-r--r-- | utils/gen_adldata/file_formats/load_wopl.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/utils/gen_adldata/file_formats/load_wopl.h b/utils/gen_adldata/file_formats/load_wopl.h index cd8765e..d10d58f 100644 --- a/utils/gen_adldata/file_formats/load_wopl.h +++ b/utils/gen_adldata/file_formats/load_wopl.h @@ -176,15 +176,11 @@ static bool LoadWopl(const char *fn, unsigned bank, const char *prefix) tmp[0].diff = false; tmp[1].diff = real4op && !tmp2.pseudo4op; - int8_t fine_tune = (int8_t)data[offset + 37]; + int fine_tune = (int)data[offset + 37]; if(fine_tune != 0) { - if(fine_tune == 1) - tmp2.voice2_fine_tune = 0.000025; - else if(fine_tune == -1) - tmp2.voice2_fine_tune = -0.000025; - else - tmp2.voice2_fine_tune = ((fine_tune * 15.625) / 1000.0); + // Simulate behavior of DMX second voice detune + tmp2.voice2_fine_tune = (double)((fine_tune >> 1) - 64) / 32.0; } uint32_t gmno = is_percussion ? i + 128 : i; |