188 |
pRegion = pInstrument->GetNextRegion(); |
pRegion = pInstrument->GetNextRegion(); |
189 |
} |
} |
190 |
|
|
191 |
int low = pInstrument->DimensionKeyRange.low; |
if (loaded) { // retrieve keyswitching only if the instrument is fully loaded. |
192 |
int high = pInstrument->DimensionKeyRange.high; |
int low = pInstrument->DimensionKeyRange.low; |
193 |
if (low < 0 || low > 127 || high < 0 || high > 127 || low > high) { |
int high = pInstrument->DimensionKeyRange.high; |
194 |
std::cerr << "Invalid keyswitch range: " << low << " - " << high << std::endl; |
if (low < 0 || low > 127 || high < 0 || high > 127 || low > high) { |
195 |
} else { |
std::cerr << "Invalid keyswitch range: " << low << " - " << high << std::endl; |
196 |
for (int i = low; i <= high; i++) info.KeySwitchBindings[i] = 1; |
} else { |
197 |
|
for (int i = low; i <= high; i++) info.KeySwitchBindings[i] = 1; |
198 |
|
} |
199 |
} |
} |
200 |
|
|
201 |
if (loaded) Unlock(); |
if (loaded) Unlock(); |