95 |
cmd.pRegionsInUse->clear(); |
cmd.pRegionsInUse->clear(); |
96 |
|
|
97 |
// delete all key groups |
// delete all key groups |
98 |
ActiveKeyGroups.clear(); |
DeleteGroupEventLists(); |
99 |
|
|
100 |
// request sfz instrument from instrument manager |
// request sfz instrument from instrument manager |
101 |
::sfz::Instrument* newInstrument; |
::sfz::Instrument* newInstrument; |
137 |
// rebuild ActiveKeyGroups map with key groups of current instrument |
// rebuild ActiveKeyGroups map with key groups of current instrument |
138 |
for (std::vector< ::sfz::Region*>::iterator itRegion = newInstrument->regions.begin() ; |
for (std::vector< ::sfz::Region*>::iterator itRegion = newInstrument->regions.begin() ; |
139 |
itRegion != newInstrument->regions.end() ; ++itRegion) { |
itRegion != newInstrument->regions.end() ; ++itRegion) { |
140 |
if ((*itRegion)->group) ActiveKeyGroups[(*itRegion)->group] = NULL; |
AddGroup((*itRegion)->group); |
141 |
|
AddGroup((*itRegion)->off_by); |
142 |
} |
} |
143 |
|
|
144 |
InstrumentIdxName = newInstrument->GetName(); |
InstrumentIdxName = newInstrument->GetName(); |