Example #1
0
void ModuleRouter::loadJSONDataInternal(var data)
{
	BaseItem::loadJSONDataInternal(data);
	setSourceModule(ModuleManager::getInstance()->getItemWithName(data.getProperty("sourceModule", "")));
	setDestModule(ModuleManager::getInstance()->getItemWithName(data.getProperty("destModule", "")));
	if (data.getDynamicObject()->hasProperty("sourceValues")) sourceValues.loadItemsData(data.getProperty("sourceValues", var()));
}
Example #2
0
void Mapping::loadJSONDataInternal(var data)
{
	BaseItem::loadJSONDataInternal(data);
	input.loadJSONData(data.getProperty("input", var()));
	cdm.loadJSONData(data.getProperty("conditions", var()));
	fm.loadJSONData(data.getProperty("filters", var()));
	om.loadJSONData(data.getProperty("outputs", var()));

	fm.setupSource(input.inputReference);
}
void Parameter::loadJSONDataInternal(var data)
{
	Controllable::loadJSONDataInternal(data);

	if (!saveValueOnly) setRange(data.getProperty("minValue", minimumValue), data.getProperty("maxValue", maximumValue));
	if (data.getDynamicObject()->hasProperty("value")) setValue(data.getProperty("value", 0));

	if (data.getDynamicObject()->hasProperty("controlMode")) setControlMode((ControlMode)(int)data.getProperty("controlMode", MANUAL));
	if (data.getDynamicObject()->hasProperty("expression")) setControlExpression(data.getProperty("expression", ""));
	if (data.getDynamicObject()->hasProperty("editable")) isEditable = data.getProperty("editable", true);
}
void MIDIDeviceParameter::loadJSONDataInternal(var data)
{
	Parameter::loadJSONDataInternal(data);
	setInputDevice(MIDIManager::getInstance()->getInputDeviceWithName(value[0]));

	if (inputDevice == nullptr) ghostDeviceIn = data.getProperty("value", var())[0];	

	setOutputDevice(MIDIManager::getInstance()->getOutputDeviceWithName(value[1]));

	if (outputDevice == nullptr) ghostDeviceOut = data.getProperty("value", var())[1];

}
void ConditionManager::addItemFromData(var data, bool fromUndoableAction)
{

	String conditionType = data.getProperty("type", "none");
	if (conditionType.isEmpty()) return;
	Condition * i = ConditionFactory::getInstance()->createModule(conditionType);
	if (i != nullptr) addItem(i, data, fromUndoableAction);
}
Example #6
0
void AudioModule::loadJSONDataInternal(var data)
{
	Module::loadJSONDataInternal(data);
	if (data.getDynamicObject()->hasProperty("audioSettings"))
	{

		ScopedPointer<XmlElement> elem = XmlDocument::parse(data.getProperty("audioSettings", ""));
		am.initialise(2, 2, elem, true);
	}
}
void BitcrushAudioProcessor::setState(const var & state)
{
	bitcrush->setValue(state.getProperty("bitcrush", bitcrush->getDefaultValue()));
	downsample->setValue(state.getProperty("downsample", downsample->getDefaultValue()));
	wet->setValue(state.getProperty("wet", wet->getDefaultValue()));
}
void VolumeAudioProcessor::setState(const var & state)
{
	volumeL->setValue(state.getProperty("volumeL", volumeL->getDefaultValue()));
	volumeR->setValue(state.getProperty("volumeR", volumeR->getDefaultValue()));
	stereoCoupling->setBoolValue(state.getProperty("stereoCoupling", stereoCoupling->getDefaultValue()));
}
Example #9
0
void PanAudioProcessor::setState(const var & state)
{
	panning->setValue(state.getProperty("panning", panning->getDefaultValue()));
}
void FilterAudioProcessor::setState(const var & state)
{
	frequency->setValue(state.getProperty("frequency", frequency->getDefaultValue()));
	resonance->setValue(state.getProperty("resonance", resonance->getDefaultValue()));
	setFilterType(state.getProperty("filterType", 0));
}