Beispiel #1
0
void Ambix_wideningAudioProcessor::setStateInformation (const void* data, int sizeInBytes)
{
    // You should use this method to restore your parameters from this memory block,
    // whose contents will have been created by the getStateInformation() call.
    
    ScopedPointer<XmlElement> xmlState (getXmlFromBinary (data, sizeInBytes));
    
    if (xmlState != nullptr)
    {
        // make sure that it's actually our type of XML object..
        if (xmlState->hasTagName ("MYPLUGINSETTINGS"))
        {
            for (int i=0; i < getNumParameters(); i++) {
                setParameter(i, xmlState->getDoubleAttribute(String(i)));
            }
        }
        
    }
}
Beispiel #2
0
void JbcfilterAudioProcessor::setStateInformation (const void* data, int sizeInBytes)
{
    // You should use this method to restore your parameters from this memory block,
    // whose contents will have been created by the getStateInformation() call.

    // This getXmlFromBinary() helper function retrieves our XML from the binary blob..
    ScopedPointer<XmlElement> xmlState (getXmlFromBinary (data, sizeInBytes));

    if (xmlState != nullptr)
    {
        // make sure that it's actually our type of XML object..
        if (xmlState->hasTagName ("MYPLUGINSETTINGS"))
        {
            // ok, now pull out our parameters..
            lastUIWidth = xmlState->getIntAttribute ("uiWidth", lastUIWidth);
            lastUIHeight = xmlState->getIntAttribute ("uiHeight", lastUIHeight);

            //gain = (float) xmlState->getDoubleAttribute ("gain", gain);
            delay = (float) xmlState->getDoubleAttribute ("delay", delay);
        }
    }
}
Beispiel #3
0
void JuceDemoPluginAudioProcessor::setStateInformation (const void* data, int sizeInBytes)
{
    // You should use this method to restore your parameters from this memory block,
    // whose contents will have been created by the getStateInformation() call.

    // This getXmlFromBinary() helper function retrieves our XML from the binary blob..
    ScopedPointer<XmlElement> xmlState (getXmlFromBinary (data, sizeInBytes));

    if (xmlState != nullptr)
    {
        // make sure that it's actually our type of XML object..
        if (xmlState->hasTagName ("MYPLUGINSETTINGS"))
        {
            // ok, now pull out our last window size..
            lastUIWidth  = xmlState->getIntAttribute ("uiWidth", lastUIWidth);
            lastUIHeight = xmlState->getIntAttribute ("uiHeight", lastUIHeight);

            // Now reload our parameters..
            for (int i = 0; i < getNumParameters(); ++i)
                if (AudioProcessorParameterWithID* p = dynamic_cast<AudioProcessorParameterWithID*> (getParameters().getUnchecked(i)))
                    p->setValueNotifyingHost ((float) xmlState->getDoubleAttribute (p->paramID, p->getValue()));
        }
    }
}
void AutomizerAudioProcessor::setStateInformation (const void* data, int sizeInBytes)
{
    // You should use this method to restore your parameters from this memory block,
    // whose contents will have been created by the getStateInformation() call.
    // This getXmlFromBinary() helper function retrieves our XML from the binary blob..
    ScopedPointer<XmlElement> xmlState (getXmlFromBinary (data, sizeInBytes));
    
    if(xmlState != 0)
    {
        // make sure that it's actually our type of XML object..
        if(xmlState->hasTagName("AYOPLUGINSETTINGS"))
        {
            // ok, now pull out our parameters..
            lastUIWidth  = xmlState->getIntAttribute("uiWidth", lastUIWidth);
            lastUIHeight = xmlState->getIntAttribute("uiHeight", lastUIHeight);
            
            engine->outputGainPar   = (float)xmlState->getDoubleAttribute("OutputGain", engine->outputGainPar);
			engine->voice1GainPar   = (float)xmlState->getDoubleAttribute("Voice1Gain", engine->voice1GainPar);
			engine->voice2GainPar   = (float)xmlState->getDoubleAttribute("Voice2Gain", engine->voice2GainPar);
            engine->shiftTypePar    = (float)xmlState->getDoubleAttribute("PitchShiftType", engine->shiftTypePar);
            engine->transposePar    = (float)xmlState->getDoubleAttribute("Transpose", engine->transposePar);
			engine->panLPar         = (float)xmlState->getDoubleAttribute("PanVoice1",engine->panLPar);
			engine->panRPar         = (float)xmlState->getDoubleAttribute("PanVoice2", engine->panRPar);
			engine->keyPar          = (float)xmlState->getDoubleAttribute("Key", engine->keyPar);
			engine->scalePar        = (float)xmlState->getDoubleAttribute("Scale", engine->scalePar);
			engine->autotunePar     = (float)xmlState->getDoubleAttribute("Autotune", engine->autotunePar);
			engine->attackPar       = (float)xmlState->getDoubleAttribute("Attack", engine->attackPar);
			engine->referenceHzPar  = (float)xmlState->getDoubleAttribute("Reference", engine->referenceHzPar);	
			engine->shiftPar	    = (float)xmlState->getDoubleAttribute("TransposeOnOff", engine->shiftPar);	
			engine->rollOnPar		= (float)xmlState->getDoubleAttribute("RollOnOff", engine->rollOnPar);	
			engine->whiteningPar	= (float)xmlState->getDoubleAttribute("SpectralWhitening", engine->whiteningPar);	
			engine->harmonyPar		= (float)xmlState->getDoubleAttribute("SpectralShape", engine->harmonyPar);	
			engine->harm1AttackPar  = (float)xmlState->getDoubleAttribute("Harm1Attack", engine->harm1AttackPar);	
			engine->harm2AttackPar  = (float)xmlState->getDoubleAttribute("Harm2Attack", engine->harm2AttackPar);	
			engine->vDepth  = (float)xmlState->getDoubleAttribute("VibratoDepth", engine->vDepth);	
			engine->vRate  = (float)xmlState->getDoubleAttribute("Harm2Attack", engine->vRate);	
			engine->tunePar =  (float)xmlState->getDoubleAttribute("Tuning", engine->tunePar);	
		}
    }
}
Beispiel #5
0
void StocSynthAudioProcessor::setStateInformation (const void* data, int sizeInBytes)
{
    ScopedPointer<XmlElement> xmlState (getXmlFromBinary (data, sizeInBytes));

    if (xmlState != nullptr)
    {
        if (xmlState->hasTagName ("STOCSETTINGS"))
        {
            toneAmp = (float) xmlState->getDoubleAttribute("toneAmp", toneAmp);
            a135 = (float) xmlState->getDoubleAttribute("a135", a135);
            a246 = (float) xmlState->getDoubleAttribute("a246", a246);
            a789 = (float) xmlState->getDoubleAttribute("a789", a789);
            sub = (float) xmlState->getDoubleAttribute("sub", sub);
            var135 = (float) xmlState->getDoubleAttribute("var135", var135);
            var246 = (float) xmlState->getDoubleAttribute("var246", var246);
            var789 = (float) xmlState->getDoubleAttribute("var789", var789);
            pitch135 = (float) xmlState->getDoubleAttribute("pitch135", pitch135);
            pitch246 = (float) xmlState->getDoubleAttribute("pitch246", pitch246);
            pitch789 = (float) xmlState->getDoubleAttribute("pitch789", pitch789);
            cutoff = (float) xmlState->getDoubleAttribute("cutoff", cutoff);
            res = (float) xmlState->getDoubleAttribute("res", res);
            ampA = (float) xmlState->getDoubleAttribute("ampA", ampA);
            ampD = (float) xmlState->getDoubleAttribute("ampD", ampD);
            ampS = (float) xmlState->getDoubleAttribute("ampS", ampS);
            ampR = (float) xmlState->getDoubleAttribute("ampR", ampR);
            gain  = (float) xmlState->getDoubleAttribute ("gain", gain);
        }
    }
}