diff options
author | Wohlstand <admin@wohlnet.ru> | 2017-11-04 15:32:02 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2017-11-04 15:32:02 +0300 |
commit | 8861a00a87fc09ec5b08d3c8ee1d47fa6f5d6c6e (patch) | |
tree | cb4974f46ddacd1b50d257d98fff0b693222ba25 /utils/gen_adldata/file_formats/load_ail.h | |
parent | 79a4100777d99c00e983ee78b4539acc349bd148 (diff) | |
download | libADLMIDI-8861a00a87fc09ec5b08d3c8ee1d47fa6f5d6c6e.tar.gz libADLMIDI-8861a00a87fc09ec5b08d3c8ee1d47fa6f5d6c6e.tar.bz2 libADLMIDI-8861a00a87fc09ec5b08d3c8ee1d47fa6f5d6c6e.zip |
All real 4-operator voices are must be different
Diffstat (limited to 'utils/gen_adldata/file_formats/load_ail.h')
-rw-r--r-- | utils/gen_adldata/file_formats/load_ail.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/gen_adldata/file_formats/load_ail.h b/utils/gen_adldata/file_formats/load_ail.h index 4c6c482..af2d3b4 100644 --- a/utils/gen_adldata/file_formats/load_ail.h +++ b/utils/gen_adldata/file_formats/load_ail.h @@ -57,11 +57,13 @@ static bool LoadMiles(const char *fn, unsigned bank, const char *prefix) insdata tmp[200]; const unsigned inscount = (length - 3) / 11; + bool twoOp = (inscount == 1); + for(unsigned i = 0; i < inscount; ++i) { unsigned o = offset + 3 + i * 11; tmp[i].finetune = (gmno < 128 && i == 0) ? notenum : 0; - tmp[i].diff = false; + tmp[i].diff = (i == 1); tmp[i].data[0] = data[o + 0]; // 20 tmp[i].data[8] = data[o + 1]; // 40 (vol) tmp[i].data[2] = data[o + 2]; // 60 @@ -81,8 +83,6 @@ static bool LoadMiles(const char *fn, unsigned bank, const char *prefix) tmp[1].data[10] = uint8_t((fb_c & 0x0E) | (fb_c >> 7)); } } - if(inscount == 1) - tmp[1] = tmp[0]; if(inscount <= 2) { @@ -92,7 +92,7 @@ static bool LoadMiles(const char *fn, unsigned bank, const char *prefix) tmp2.voice2_fine_tune = 0.0; std::string name; if(midi_index >= 0) name = std::string(1, '\377') + MidiInsName[midi_index]; - size_t resno = InsertIns(tmp[0], tmp[1], tmp2, name, name2); + size_t resno = InsertIns(tmp[0], tmp[1], tmp2, name, name2, twoOp); SetBank(bank, (unsigned int)gmno, resno); } } |