5696 |
* @param bBypass - if true, the script slot will be skipped by the sampler |
* @param bBypass - if true, the script slot will be skipped by the sampler |
5697 |
* @see Script::Bypass |
* @see Script::Bypass |
5698 |
*/ |
*/ |
5699 |
void Instrument::SetScriptSlotBypassed(uint index, bool bBypass) { |
void Instrument::SetScriptSlotBypassed(size_t index, bool bBypass) { |
5700 |
if (index >= ScriptSlotCount()) return; |
if (index >= ScriptSlotCount()) return; |
5701 |
if (pScriptRefs) |
if (pScriptRefs) |
5702 |
pScriptRefs->at(index).bypass = bBypass; |
pScriptRefs->at(index).bypass = bBypass; |
5742 |
* @param slot - script slot index of the variable to be retrieved |
* @param slot - script slot index of the variable to be retrieved |
5743 |
* @param variable - name of the 'patch' variable in that script |
* @param variable - name of the 'patch' variable in that script |
5744 |
*/ |
*/ |
5745 |
bool Instrument::IsScriptPatchVariableSet(int slot, String variable) { |
bool Instrument::IsScriptPatchVariableSet(size_t slot, String variable) { |
5746 |
if (variable.empty()) return false; |
if (variable.empty()) return false; |
5747 |
Script* script = GetScriptOfSlot(slot); |
Script* script = GetScriptOfSlot(slot); |
5748 |
if (!script) return false; |
if (!script) return false; |
5776 |
* |
* |
5777 |
* @param slot - script slot index of the variable to be retrieved |
* @param slot - script slot index of the variable to be retrieved |
5778 |
*/ |
*/ |
5779 |
std::map<String,String> Instrument::GetScriptPatchVariables(int slot) { |
std::map<String,String> Instrument::GetScriptPatchVariables(size_t slot) { |
5780 |
Script* script = GetScriptOfSlot(slot); |
Script* script = GetScriptOfSlot(slot); |
5781 |
if (!script) return std::map<String,String>(); |
if (!script) return std::map<String,String>(); |
5782 |
const _UUID uuid = _UUIDFromCArray(&script->Uuid[0]); |
const _UUID uuid = _UUIDFromCArray(&script->Uuid[0]); |
5808 |
* @param slot - script slot index of the variable to be retrieved |
* @param slot - script slot index of the variable to be retrieved |
5809 |
* @param variable - name of the 'patch' variable in that script |
* @param variable - name of the 'patch' variable in that script |
5810 |
*/ |
*/ |
5811 |
String Instrument::GetScriptPatchVariable(int slot, String variable) { |
String Instrument::GetScriptPatchVariable(size_t slot, String variable) { |
5812 |
std::map<String,String> vars = GetScriptPatchVariables(slot); |
std::map<String,String> vars = GetScriptPatchVariables(slot); |
5813 |
return (vars.count(variable)) ? vars.find(variable)->second : ""; |
return (vars.count(variable)) ? vars.find(variable)->second : ""; |
5814 |
} |
} |
5835 |
* @throws gig::Exception if given script @p slot index is invalid or given |
* @throws gig::Exception if given script @p slot index is invalid or given |
5836 |
* @p variable name is empty |
* @p variable name is empty |
5837 |
*/ |
*/ |
5838 |
void Instrument::SetScriptPatchVariable(int slot, String variable, String value) { |
void Instrument::SetScriptPatchVariable(size_t slot, String variable, String value) { |
5839 |
if (variable.empty()) |
if (variable.empty()) |
5840 |
throw Exception("Variable name must not be empty"); |
throw Exception("Variable name must not be empty"); |
5841 |
Script* script = GetScriptOfSlot(slot); |
Script* script = GetScriptOfSlot(slot); |
5876 |
* @param slot - script slot index of the variable to be unset |
* @param slot - script slot index of the variable to be unset |
5877 |
* @param variable - name of the 'patch' variable in that script |
* @param variable - name of the 'patch' variable in that script |
5878 |
*/ |
*/ |
5879 |
void Instrument::UnsetScriptPatchVariable(int slot, String variable) { |
void Instrument::UnsetScriptPatchVariable(ssize_t slot, String variable) { |
5880 |
Script* script = GetScriptOfSlot(slot); |
Script* script = GetScriptOfSlot(slot); |
5881 |
|
|
5882 |
// option 1: unset a particular variable of one particular script slot |
// option 1: unset a particular variable of one particular script slot |