3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck * |
6 |
* Copyright (C) 2005-2009 Christian Schoenebeck * |
* Copyright (C) 2005-2008 Christian Schoenebeck * |
7 |
* Copyright (C) 2009 Grigor Iliev * |
* Copyright (C) 2009-2010 Christian Schoenebeck and Grigor Iliev * |
8 |
* * |
* * |
9 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
10 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
91 |
cmd.pRegionsInUse->clear(); |
cmd.pRegionsInUse->clear(); |
92 |
|
|
93 |
// delete all key groups |
// delete all key groups |
94 |
ActiveKeyGroups.clear(); |
DeleteGroupEventLists(); |
95 |
|
|
96 |
// request gig instrument from instrument manager |
// request gig instrument from instrument manager |
97 |
::gig::Instrument* newInstrument; |
::gig::Instrument* newInstrument; |
131 |
// counter for each region |
// counter for each region |
132 |
int region = 0; |
int region = 0; |
133 |
for (::gig::Region* pRegion = newInstrument->GetFirstRegion(); pRegion; pRegion = newInstrument->GetNextRegion()) { |
for (::gig::Region* pRegion = newInstrument->GetFirstRegion(); pRegion; pRegion = newInstrument->GetNextRegion()) { |
134 |
if (pRegion->KeyGroup) ActiveKeyGroups[pRegion->KeyGroup] = NULL; |
AddGroup(pRegion->KeyGroup); |
135 |
|
|
136 |
RoundRobinIndexes[region] = 0; |
RoundRobinIndexes[region] = 0; |
137 |
for (int iKey = pRegion->KeyRange.low; iKey <= pRegion->KeyRange.high; iKey++) { |
for (int iKey = pRegion->KeyRange.low; iKey <= pRegion->KeyRange.high; iKey++) { |