3807 |
* @throws gig::Exception if requested zone could not be deleted |
* @throws gig::Exception if requested zone could not be deleted |
3808 |
*/ |
*/ |
3809 |
void Region::DeleteDimensionZone(dimension_t type, int zone) { |
void Region::DeleteDimensionZone(dimension_t type, int zone) { |
3810 |
|
if (!Dimensions) |
3811 |
|
throw gig::Exception("Could not delete dimension zone, because there is no dimension at all."); |
3812 |
dimension_def_t* oldDef = GetDimensionDefinition(type); |
dimension_def_t* oldDef = GetDimensionDefinition(type); |
3813 |
if (!oldDef) |
if (!oldDef) |
3814 |
throw gig::Exception("Could not delete dimension zone, no such dimension of given type"); |
throw gig::Exception("Could not delete dimension zone, no such dimension of given type"); |
3837 |
// requested by the arguments of this method call) to the temporary |
// requested by the arguments of this method call) to the temporary |
3838 |
// region, and don't use Region::CopyAssign() here for this task, since |
// region, and don't use Region::CopyAssign() here for this task, since |
3839 |
// it would also alter fast lookup helper variables here and there |
// it would also alter fast lookup helper variables here and there |
3840 |
dimension_def_t newDef; |
dimension_def_t newDef = {}; |
3841 |
for (int i = 0; i < Dimensions; ++i) { |
for (int i = 0; i < Dimensions; ++i) { |
3842 |
dimension_def_t def = pDimensionDefinitions[i]; // copy, don't reference |
dimension_def_t def = pDimensionDefinitions[i]; // copy, don't reference |
3843 |
// is this the dimension requested by the method arguments? ... |
// is this the dimension requested by the method arguments? ... |
3848 |
} |
} |
3849 |
tempRgn->AddDimension(&def); |
tempRgn->AddDimension(&def); |
3850 |
} |
} |
3851 |
|
// silence clang sanitizer warning |
3852 |
|
if (newDef.dimension == dimension_none) |
3853 |
|
throw gig::Exception("Unexpected internal failure resolving dimension in DeleteDimensionZone() [this is a bug]."); |
3854 |
|
|
3855 |
// find the dimension index in the tempRegion which is the dimension |
// find the dimension index in the tempRegion which is the dimension |
3856 |
// type passed to this method (paranoidly expecting different order) |
// type passed to this method (paranoidly expecting different order) |
5701 |
* still being able to fine tune certain aspects of the script for each |
* still being able to fine tune certain aspects of the script for each |
5702 |
* instrument individually. |
* instrument individually. |
5703 |
* |
* |
5704 |
|
* @note This is an own format extension which did not exist i.e. in the |
5705 |
|
* GigaStudio 4 software. It will currently only work with LinuxSampler and |
5706 |
|
* Gigedit. |
5707 |
|
* |
5708 |
* @param slot - script slot index of the variable to be retrieved |
* @param slot - script slot index of the variable to be retrieved |
5709 |
* @param variable - name of the 'patch' variable in that script |
* @param variable - name of the 'patch' variable in that script |
5710 |
*/ |
*/ |
5736 |
* still being able to fine tune certain aspects of the script for each |
* still being able to fine tune certain aspects of the script for each |
5737 |
* instrument individually. |
* instrument individually. |
5738 |
* |
* |
5739 |
|
* @note This is an own format extension which did not exist i.e. in the |
5740 |
|
* GigaStudio 4 software. It will currently only work with LinuxSampler and |
5741 |
|
* Gigedit. |
5742 |
|
* |
5743 |
* @param slot - script slot index of the variable to be retrieved |
* @param slot - script slot index of the variable to be retrieved |
5744 |
*/ |
*/ |
5745 |
std::map<String,String> Instrument::GetScriptPatchVariables(int slot) { |
std::map<String,String> Instrument::GetScriptPatchVariables(int slot) { |
5767 |
* still being able to fine tune certain aspects of the script for each |
* still being able to fine tune certain aspects of the script for each |
5768 |
* instrument individually. |
* instrument individually. |
5769 |
* |
* |
5770 |
|
* @note This is an own format extension which did not exist i.e. in the |
5771 |
|
* GigaStudio 4 software. It will currently only work with LinuxSampler and |
5772 |
|
* Gigedit. |
5773 |
|
* |
5774 |
* @param slot - script slot index of the variable to be retrieved |
* @param slot - script slot index of the variable to be retrieved |
5775 |
* @param variable - name of the 'patch' variable in that script |
* @param variable - name of the 'patch' variable in that script |
5776 |
*/ |
*/ |
5791 |
* still being able to fine tune certain aspects of the script for each |
* still being able to fine tune certain aspects of the script for each |
5792 |
* instrument individually. |
* instrument individually. |
5793 |
* |
* |
5794 |
|
* @note This is an own format extension which did not exist i.e. in the |
5795 |
|
* GigaStudio 4 software. It will currently only work with LinuxSampler and |
5796 |
|
* Gigedit. |
5797 |
|
* |
5798 |
* @param slot - script slot index of the variable to be set |
* @param slot - script slot index of the variable to be set |
5799 |
* @param variable - name of the 'patch' variable in that script |
* @param variable - name of the 'patch' variable in that script |
5800 |
* @param value - overridden initial value for that script variable |
* @param value - overridden initial value for that script variable |
5835 |
* still being able to fine tune certain aspects of the script for each |
* still being able to fine tune certain aspects of the script for each |
5836 |
* instrument individually. |
* instrument individually. |
5837 |
* |
* |
5838 |
|
* @note This is an own format extension which did not exist i.e. in the |
5839 |
|
* GigaStudio 4 software. It will currently only work with LinuxSampler and |
5840 |
|
* Gigedit. |
5841 |
|
* |
5842 |
* @param slot - script slot index of the variable to be unset |
* @param slot - script slot index of the variable to be unset |
5843 |
* @param variable - name of the 'patch' variable in that script |
* @param variable - name of the 'patch' variable in that script |
5844 |
*/ |
*/ |
5963 |
PianoReleaseMode = orig->PianoReleaseMode; |
PianoReleaseMode = orig->PianoReleaseMode; |
5964 |
DimensionKeyRange = orig->DimensionKeyRange; |
DimensionKeyRange = orig->DimensionKeyRange; |
5965 |
scriptPoolFileOffsets = orig->scriptPoolFileOffsets; |
scriptPoolFileOffsets = orig->scriptPoolFileOffsets; |
5966 |
pScriptRefs = orig->pScriptRefs; |
// deep copy of pScriptRefs required (to avoid undefined behaviour) |
5967 |
|
if (pScriptRefs) delete pScriptRefs; |
5968 |
|
pScriptRefs = new std::vector<_ScriptPooolRef>; |
5969 |
|
if (orig->pScriptRefs) |
5970 |
|
*pScriptRefs = *orig->pScriptRefs; |
5971 |
scriptVars = orig->scriptVars; |
scriptVars = orig->scriptVars; |
5972 |
|
|
5973 |
// free old midi rules |
// free old midi rules |