diff options
author | Wohlstand <admin@wohlnet.ru> | 2020-08-24 00:04:45 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2020-08-24 00:04:45 +0300 |
commit | c9cfbda24b2ad1b1c646b8104ec86c5541d80451 (patch) | |
tree | cf0cae525e16f4e2b2fce1309059cc71cf9c1353 /src/adlmidi_private.cpp | |
parent | 1b4237dffce60e8546e550767b2816c1979bbb9d (diff) | |
download | libADLMIDI-c9cfbda24b2ad1b1c646b8104ec86c5541d80451.tar.gz libADLMIDI-c9cfbda24b2ad1b1c646b8104ec86c5541d80451.tar.bz2 libADLMIDI-c9cfbda24b2ad1b1c646b8104ec86c5541d80451.zip |
Another piece of removed code
Diffstat (limited to 'src/adlmidi_private.cpp')
-rw-r--r-- | src/adlmidi_private.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/adlmidi_private.cpp b/src/adlmidi_private.cpp index ac2b496..9478236 100644 --- a/src/adlmidi_private.cpp +++ b/src/adlmidi_private.cpp @@ -126,14 +126,7 @@ void adlFromInstrument(const BanksDump::InstrumentEntry &instIn, adlinsdata2 &in { instOut.voice2_fine_tune = 0.0; if(instIn.secondVoiceDetune != 0) - { - if(instIn.secondVoiceDetune == 1) - instOut.voice2_fine_tune = 0.000025; - else if(instIn.secondVoiceDetune == -1) - instOut.voice2_fine_tune = -0.000025; - else - instOut.voice2_fine_tune = instIn.secondVoiceDetune * (15.625 / 1000.0); - } + instOut.voice2_fine_tune = (double)((((int)instIn.secondVoiceDetune + 128) >> 1) - 64) / 32.0; instOut.midi_velocity_offset = instIn.midiVelocityOffset; instOut.tone = instIn.percussionKeyNumber; @@ -155,6 +148,7 @@ void adlFromInstrument(const BanksDump::InstrumentEntry &instIn, adlinsdata2 &in instOut.adl[op].feedconn = (instIn.fbConn >> (op * 8)) & 0xFF; instOut.adl[op].finetune = static_cast<int8_t>(op == 0 ? instIn.noteOffset1 : instIn.noteOffset2); } + instOut.ms_sound_kon = instIn.delay_on_ms; instOut.ms_sound_koff = instIn.delay_off_ms; } |