本文整理汇总了C++中CtrlrModulator::getProcessor方法的典型用法代码示例。如果您正苦于以下问题:C++ CtrlrModulator::getProcessor方法的具体用法?C++ CtrlrModulator::getProcessor怎么用?C++ CtrlrModulator::getProcessor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CtrlrModulator
的用法示例。
在下文中一共展示了CtrlrModulator::getProcessor方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setProgram
void CtrlrPanel::setProgram(ValueTree programTree, const bool sendSnapshotNow)
{
ValueTree program;
if (programTree.hasType(Ids::panelState))
{
program = programTree;
}
else
{
if (programTree.getChildWithName(Ids::panelState).isValid())
{
program = programTree.getChildWithName(Ids::panelState);
}
}
setProgramState (true);
if (program.isValid())
{
for (int i=0; i<program.getNumChildren(); i++)
{
if (program.getChild(i).hasType(Ids::value))
{
CtrlrModulator *m = getModulator (program.getChild(i).getProperty(Ids::name));
if (m)
{
m->setRestoreState (true);
m->getProcessor().setValueFromGUI (program.getChild(i).getProperty(Ids::value), true);
if (m->getComponent())
{
m->getComponent()->setComponentValue (program.getChild(i).getProperty(Ids::value), false);
}
m->getProcessor().handleUpdateNowIfNeeded();
m->setRestoreState (false);
}
}
}
if ((bool)getProperty (Ids::panelMidiSnapshotAfterProgramChange) == true)
{
snapshot.sendSnapshot();
}
if (luaPanelProgramChangedCbk && !luaPanelProgramChangedCbk.wasObjectDeleted())
{
if (luaPanelProgramChangedCbk->isValid())
{
getCtrlrLuaManager().getMethodManager().call (luaPanelProgramChangedCbk);
}
}
}
setProgramState (false);
if (sendSnapshotNow)
{
_DBG("CtrlrPanel::setProgram sendSnapshotNow");
sendSnapshot();
}
}
示例2: getParameter
float CtrlrProcessor::getParameter (int index)
{
CtrlrModulator *m = ctrlrManager->getModulatorByVstIndex (index);
if (m)
{
return (m->getProcessor().getValueForHost());
}
else
{
return 0.0f;
}
}
示例3: setParameter
void CtrlrProcessor::setParameter (int index, float newValue)
{
CtrlrModulator *m = ctrlrManager->getModulatorByVstIndex (index);
if (m == nullptr)
{
return;
}
else if (newValue > 1.0f || newValue < 0.000000f)
{
return;
}
else
{
return (m->getProcessor().setValueFromHost(newValue));
}
}