115 |
throw InstrumentManagerException("resource was not created"); |
throw InstrumentManagerException("resource was not created"); |
116 |
} |
} |
117 |
|
|
118 |
|
// if requested by set_ccN opcode in sfz file, set initial CC values |
119 |
|
for (std::map<uint8_t,uint8_t>::const_iterator itCC = newInstrument->initialCCValues.begin(); |
120 |
|
itCC != newInstrument->initialCCValues.end(); ++itCC) |
121 |
|
{ |
122 |
|
const uint8_t& cc = itCC->first; |
123 |
|
uint8_t value = itCC->second; |
124 |
|
if (cc >= CTRL_TABLE_SIZE) continue; |
125 |
|
if ((cc < 128 || cc == CTRL_TABLE_IDX_AFTERTOUCH) && value > 127) value = 127; |
126 |
|
ControllerTable[cc] = value; |
127 |
|
} |
128 |
|
|
129 |
if (newInstrument->scripts.size() > 1) { |
if (newInstrument->scripts.size() > 1) { |
130 |
std::cerr << "WARNING: Executing more than one real-time instrument script slot is not implemented yet!\n"; |
std::cerr << "WARNING: Executing more than one real-time instrument script slot is not implemented yet!\n"; |
131 |
} |
} |