コード例 #1
0
void CtrlrPanelMIDISnapshot::gatherSnapshotData()
{
    buffer.clear();

    for (int i=0; i<owner.getModulators().size(); i++)
    {
        CtrlrModulator *m = owner.getModulators()[i];
        if (m->getMidiMessagePtr())
        {
            if (m->getComponent())
            {
                if ((int)m->getComponent()->getProperty(Ids::componentRadioGroupId) > 0)
                {
                    if (m->getComponent()->getToggleState() == false)
                        continue;
                    else if (!(bool)m->getProperty(Ids::modulatorExcludeFromSnapshot))
                        addCtrlrMidiMessageToBuffer (buffer, m->getMidiMessage());
                }
                else if (!(bool)m->getProperty(Ids::modulatorExcludeFromSnapshot))
                {
                    addCtrlrMidiMessageToBuffer (buffer, m->getMidiMessage());
                }
            }
        }
    }
}
コード例 #2
0
void CtrlrPanelMIDISnapshot::gatherSnapshotData()
{
	buffer.clear();

	for (int i=0; i<owner.getModulators().size(); i++)
	{
		CtrlrModulator *m = owner.getModulators()[i];
		if (m->getMidiMessagePtr())
		{
			if (m->getComponent())
			{
				if ((int)m->getComponent()->getProperty(Ids::componentRadioGroupId) > 0)
				{
					if (m->getComponent()->getToggleState() == false)
						continue;
					else if (!(bool)m->getProperty(Ids::modulatorExcludeFromSnapshot))
						addCtrlrMidiMessageToBuffer (buffer, m->getMidiMessage());
				}
				else if (!(bool)m->getProperty(Ids::modulatorExcludeFromSnapshot))
				{
					addCtrlrMidiMessageToBuffer (buffer, m->getMidiMessage());
				}
			}
		}
	}

	showDialog = owner.getProperty(Ids::panelMidiSnapshotShowProgress);

	if (showDialog)
    {
        if (alertWindow == nullptr)
            alertWindow = LookAndFeel::getDefaultLookAndFeel().createAlertWindow ("MIDI Snapshot", String(), "Stop", String(), String(), AlertWindow::NoIcon, 1, nullptr);

        alertWindow->setEscapeKeyCancels (false);
        alertWindow->addProgressBarComponent (progress);
    }
    else
    {
        alertWindow = nullptr;
    }

    if (luaPanelMidiSnapshotPreCbk && !luaPanelMidiSnapshotPreCbk.wasObjectDeleted())
	{
		if (luaPanelMidiSnapshotPreCbk->isValid())
		{
			owner.getCtrlrLuaManager().getMethodManager().call (luaPanelMidiSnapshotPreCbk, &buffer);
		}
	}
}
コード例 #3
0
void CtrlrPanelComponentProperties::refreshTargetModulationPropertyList (const ValueTree &sourceModulationTree)
{
	CtrlrModulator *target = owner.getOwner().getModulator (sourceModulationTree.getProperty (Ids::modulatorLinkedToModulator));

	if (target)
	{
		modulatorPropertyList.clear();
		modulatorPropertyList.add (COMBO_NONE_ITEM);

		if ((int)sourceModulationTree.getProperty (Ids::modulatorLinkedToComponent) == 1)
		{
			CtrlrComponent *c = target->getComponent();
			if (c)
			{
				for (int i=0; i<c->getComponentTree().getNumProperties(); i++)
				{
					modulatorPropertyList.add (c->getComponentTree().getPropertyName(i).toString());
				}
			}
		}
		if ((int)sourceModulationTree.getProperty (Ids::modulatorLinkedToComponent) == 0)
		{
			for (int i=0; i<target->getModulatorTree().getNumProperties(); i++)
			{
				modulatorPropertyList.add (target->getModulatorTree().getPropertyName(i).toString());
			}
		}
		if ((int)sourceModulationTree.getProperty (Ids::modulatorLinkedToComponent) == 2)
        {
            if (target->getMidiMessagePtr())
            {
                for (int i=0; i<target->getMidiMessage().getMidiTree().getNumProperties(); i++)
                {
                    modulatorPropertyList.add (target->getMidiMessage().getMidiTree().getPropertyName(i).toString());
                }
            }
        }
	}
}