GetFloatParameter() public abstract method

public abstract GetFloatParameter ( string name, float &value ) : bool
name string
value float
return bool
Esempio n. 1
0
        public override bool OnGUI(IAudioEffectPlugin plugin)
        {
            float blend = (!plugin.IsPluginEditableAndEnabled()) ? 0.5f : 1f;
            float value;

            plugin.GetFloatParameter(ParamEqGUI.kCenterFreqName, out value);
            float value2;

            plugin.GetFloatParameter(ParamEqGUI.kOctaveRangeName, out value2);
            float value3;

            plugin.GetFloatParameter(ParamEqGUI.kFrequencyGainName, out value3);
            GUILayout.Space(5f);
            Rect rect = GUILayoutUtility.GetRect(200f, 100f, new GUILayoutOption[]
            {
                GUILayout.ExpandWidth(true)
            });

            if (ParamEqGUI.ParamEqualizerCurveEditor(plugin, rect, ref value, ref value2, ref value3, blend))
            {
                plugin.SetFloatParameter(ParamEqGUI.kCenterFreqName, value);
                plugin.SetFloatParameter(ParamEqGUI.kOctaveRangeName, value2);
                plugin.SetFloatParameter(ParamEqGUI.kFrequencyGainName, value3);
            }
            return(true);
        }
Esempio n. 2
0
        public override bool OnGUI(IAudioEffectPlugin plugin)
        {
            float blend = !plugin.IsPluginEditableAndEnabled() ? 0.5f : 1f;
            float centerFreq;

            plugin.GetFloatParameter(ParamEqGUI.kCenterFreqName, out centerFreq);
            float bandwidth;

            plugin.GetFloatParameter(ParamEqGUI.kOctaveRangeName, out bandwidth);
            float gain;

            plugin.GetFloatParameter(ParamEqGUI.kFrequencyGainName, out gain);
            GUILayout.Space(5f);
            Rect rect = GUILayoutUtility.GetRect(200f, 100f, new GUILayoutOption[1]
            {
                GUILayout.ExpandWidth(true)
            });

            if (ParamEqGUI.ParamEqualizerCurveEditor(plugin, rect, ref centerFreq, ref bandwidth, ref gain, blend))
            {
                plugin.SetFloatParameter(ParamEqGUI.kCenterFreqName, centerFreq);
                plugin.SetFloatParameter(ParamEqGUI.kOctaveRangeName, bandwidth);
                plugin.SetFloatParameter(ParamEqGUI.kFrequencyGainName, gain);
            }
            return(true);
        }
Esempio n. 3
0
        public override bool OnGUI(IAudioEffectPlugin plugin)
        {
            var blend = plugin.IsPluginEditableAndEnabled() ? 1.0f : 0.5f;

            plugin.GetFloatParameter(kCenterFreqName, out var centerFreq);
            plugin.GetFloatParameter(kOctaveRangeName, out var octaveRange);
            plugin.GetFloatParameter(kFrequencyGainName, out var frequencyGain);

            GUILayout.Space(5f);

            var r = GUILayoutUtility.GetRect(200, 100, GUILayout.ExpandWidth(true));

            if (ParamEqualizerCurveEditor(plugin, r, ref centerFreq, ref octaveRange, ref frequencyGain, blend))
            {
                plugin.SetFloatParameter(kCenterFreqName, centerFreq);
                plugin.SetFloatParameter(kOctaveRangeName, octaveRange);
                plugin.SetFloatParameter(kFrequencyGainName, frequencyGain);
            }

            return(true);
        }
Esempio n. 4
0
        public override bool OnGUI(IAudioEffectPlugin plugin)
        {
            float blend = plugin.IsPluginEditableAndEnabled() ? 1.0f : 0.5f;

            float threshold, ratio, makeupGain, attackTime, releaseTime, knee;

            plugin.GetFloatParameter(kThresholdName, out threshold);
            plugin.GetFloatParameter(kRatioName, out ratio);
            plugin.GetFloatParameter(kMakeupGainName, out makeupGain);
            plugin.GetFloatParameter(kAttackTimeName, out attackTime);
            plugin.GetFloatParameter(kReleaseTimeName, out releaseTime);
            plugin.GetFloatParameter(kKneeName, out knee);

            float[] metering; plugin.GetFloatBuffer("Metering", out metering, 2);

            GUILayout.Space(5f);
            Rect r = GUILayoutUtility.GetRect(200, 160, GUILayout.ExpandWidth(true));

            if (CurveDisplay(plugin, r, ref threshold, ref ratio, ref makeupGain, ref attackTime, ref releaseTime, ref knee, metering[0], metering[1], blend))
            {
                plugin.SetFloatParameter(kThresholdName, threshold);
                plugin.SetFloatParameter(kRatioName, ratio);
                plugin.SetFloatParameter(kMakeupGainName, makeupGain);
                plugin.SetFloatParameter(kAttackTimeName, attackTime);
                plugin.SetFloatParameter(kReleaseTimeName, releaseTime);
                plugin.SetFloatParameter(kKneeName, knee);
            }

            return(true);
        }
Esempio n. 5
0
        public override bool OnGUI(IAudioEffectPlugin plugin)
        {
            float num2;
            float num3;
            float num4;
            float blend = !plugin.IsPluginEditableAndEnabled() ? 0.5f : 1f;

            plugin.GetFloatParameter(kCenterFreqName, out num2);
            plugin.GetFloatParameter(kOctaveRangeName, out num3);
            plugin.GetFloatParameter(kFrequencyGainName, out num4);
            GUILayout.Space(5f);
            GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.ExpandWidth(true) };
            Rect r = GUILayoutUtility.GetRect((float)200f, (float)100f, options);

            if (ParamEqualizerCurveEditor(plugin, r, ref num2, ref num3, ref num4, blend))
            {
                plugin.SetFloatParameter(kCenterFreqName, num2);
                plugin.SetFloatParameter(kOctaveRangeName, num3);
                plugin.SetFloatParameter(kFrequencyGainName, num4);
            }
            return(true);
        }
Esempio n. 6
0
        public override bool OnGUI(IAudioEffectPlugin plugin)
        {
            float blend = (!plugin.IsPluginEditableAndEnabled()) ? 0.5f : 1f;
            float value;

            plugin.GetFloatParameter(DuckVolumeGUI.kThresholdName, out value);
            float value2;

            plugin.GetFloatParameter(DuckVolumeGUI.kRatioName, out value2);
            float value3;

            plugin.GetFloatParameter(DuckVolumeGUI.kMakeupGainName, out value3);
            float value4;

            plugin.GetFloatParameter(DuckVolumeGUI.kAttackTimeName, out value4);
            float value5;

            plugin.GetFloatParameter(DuckVolumeGUI.kReleaseTimeName, out value5);
            float value6;

            plugin.GetFloatParameter(DuckVolumeGUI.kKneeName, out value6);
            float[] array;
            plugin.GetFloatBuffer("Metering", out array, 2);
            GUILayout.Space(5f);
            Rect rect = GUILayoutUtility.GetRect(200f, 160f, new GUILayoutOption[]
            {
                GUILayout.ExpandWidth(true)
            });

            if (DuckVolumeGUI.CurveDisplay(plugin, rect, ref value, ref value2, ref value3, ref value4, ref value5, ref value6, array[0], array[1], blend))
            {
                plugin.SetFloatParameter(DuckVolumeGUI.kThresholdName, value);
                plugin.SetFloatParameter(DuckVolumeGUI.kRatioName, value2);
                plugin.SetFloatParameter(DuckVolumeGUI.kMakeupGainName, value3);
                plugin.SetFloatParameter(DuckVolumeGUI.kAttackTimeName, value4);
                plugin.SetFloatParameter(DuckVolumeGUI.kReleaseTimeName, value5);
                plugin.SetFloatParameter(DuckVolumeGUI.kKneeName, value6);
            }
            return(true);
        }
Esempio n. 7
0
        public override bool OnGUI(IAudioEffectPlugin plugin)
        {
            float blend = !plugin.IsPluginEditableAndEnabled() ? 0.5f : 1f;
            float threshold;

            plugin.GetFloatParameter(DuckVolumeGUI.kThresholdName, out threshold);
            float ratio;

            plugin.GetFloatParameter(DuckVolumeGUI.kRatioName, out ratio);
            float makeupGain;

            plugin.GetFloatParameter(DuckVolumeGUI.kMakeupGainName, out makeupGain);
            float attackTime;

            plugin.GetFloatParameter(DuckVolumeGUI.kAttackTimeName, out attackTime);
            float releaseTime;

            plugin.GetFloatParameter(DuckVolumeGUI.kReleaseTimeName, out releaseTime);
            float knee;

            plugin.GetFloatParameter(DuckVolumeGUI.kKneeName, out knee);
            float[] data;
            plugin.GetFloatBuffer("Metering", out data, 2);
            GUILayout.Space(5f);
            Rect rect = GUILayoutUtility.GetRect(200f, 160f, new GUILayoutOption[1]
            {
                GUILayout.ExpandWidth(true)
            });

            if (DuckVolumeGUI.CurveDisplay(plugin, rect, ref threshold, ref ratio, ref makeupGain, ref attackTime, ref releaseTime, ref knee, data[0], data[1], blend))
            {
                plugin.SetFloatParameter(DuckVolumeGUI.kThresholdName, threshold);
                plugin.SetFloatParameter(DuckVolumeGUI.kRatioName, ratio);
                plugin.SetFloatParameter(DuckVolumeGUI.kMakeupGainName, makeupGain);
                plugin.SetFloatParameter(DuckVolumeGUI.kAttackTimeName, attackTime);
                plugin.SetFloatParameter(DuckVolumeGUI.kReleaseTimeName, releaseTime);
                plugin.SetFloatParameter(DuckVolumeGUI.kKneeName, knee);
            }
            return(true);
        }
    public override bool OnGUI(IAudioEffectPlugin plugin)
    {
		float fval = 0.0f;
		bool  bval = false;

		Separator();
		Label ("Global Scale (Range: 0.00001 - 10000.0f)");
		plugin.GetFloatParameter("GScale", out fval);
		plugin.SetFloatParameter("GScale", EditorGUILayout.FloatField(" ", Mathf.Clamp (fval, 0.00001f, 10000.0f)));

		Separator();

		// Treat these floats as bools in the inspector
		plugin.GetFloatParameter("E.Rflt On", out fval);
		bval = (fval == 0.0f) ? false : true;
		bval = EditorGUILayout.Toggle("Early Refl. On", bval);
		plugin.SetFloatParameter("E.Rflt On", (bval == false) ? 0.0f : 1.0f);

		plugin.GetFloatParameter("E.Rflt Rev On", out fval);
		bval = (fval == 0.0f) ? false : true;
		bval = EditorGUILayout.Toggle("Reverb On", bval);
		plugin.SetFloatParameter("E.Rflt Rev On", (bval == false) ? 0.0f : 1.0f);

		Separator();
		Label("ROOM DIMENSIONS (meters)");
		Label("");
		plugin.GetFloatParameter("Room X", out fval);
		plugin.SetFloatParameter("Room X", EditorGUILayout.Slider("Room Size X", fval, 1.0f, 200.0f));
		plugin.GetFloatParameter("Room Y", out fval);
		plugin.SetFloatParameter("Room Y", EditorGUILayout.Slider("Room Size Y", fval, 1.0f, 200.0f));
		plugin.GetFloatParameter("Room Z", out fval);
		plugin.SetFloatParameter("Room Z", EditorGUILayout.Slider("Room Size Z", fval, 1.0f, 200.0f));

		Separator();
		Label("WALL REFLECTION VALUES (0-0.97)");
		Label("");

		plugin.GetFloatParameter("Left", out fval);
		plugin.SetFloatParameter("Left", EditorGUILayout.Slider("Left", fval, 0.0f, 0.97f));
		plugin.GetFloatParameter("Right", out fval);
		plugin.SetFloatParameter("Right", EditorGUILayout.Slider("Right", fval, 0.0f, 0.97f));
		plugin.GetFloatParameter("Up", out fval);
		plugin.SetFloatParameter("Up", EditorGUILayout.Slider("Up", fval, 0.0f, 0.97f));
		plugin.GetFloatParameter("Down", out fval);
		plugin.SetFloatParameter("Down", EditorGUILayout.Slider("Down", fval, 0.0f, 0.97f));
		plugin.GetFloatParameter("Behind", out fval);
		plugin.SetFloatParameter("Behind", EditorGUILayout.Slider("Behind", fval, 0.0f, 0.97f));
		plugin.GetFloatParameter("Front", out fval);
		plugin.SetFloatParameter("Front", EditorGUILayout.Slider("Front", fval, 0.0f, 0.97f));

		// We will override the controls with our own, so return false
		return false;
    }
Esempio n. 9
0
		public override bool OnGUI(IAudioEffectPlugin plugin)
		{
			float blend = (!plugin.IsPluginEditableAndEnabled()) ? 0.5f : 1f;
			float value;
			plugin.GetFloatParameter(ParamEqGUI.kCenterFreqName, out value);
			float value2;
			plugin.GetFloatParameter(ParamEqGUI.kOctaveRangeName, out value2);
			float value3;
			plugin.GetFloatParameter(ParamEqGUI.kFrequencyGainName, out value3);
			GUILayout.Space(5f);
			Rect rect = GUILayoutUtility.GetRect(200f, 100f, new GUILayoutOption[]
			{
				GUILayout.ExpandWidth(true)
			});
			if (ParamEqGUI.ParamEqualizerCurveEditor(plugin, rect, ref value, ref value2, ref value3, blend))
			{
				plugin.SetFloatParameter(ParamEqGUI.kCenterFreqName, value);
				plugin.SetFloatParameter(ParamEqGUI.kOctaveRangeName, value2);
				plugin.SetFloatParameter(ParamEqGUI.kFrequencyGainName, value3);
			}
			return true;
		}
Esempio n. 10
0
    public override bool OnGUI(IAudioEffectPlugin plugin)
    {
        float fval = 0.0f;
        bool  bval = false;

        Separator();
        Label ("GLOBAL SCALE (0.00001 - 10000.0)");
        plugin.GetFloatParameter("GScale", out fval);
        plugin.SetFloatParameter("GScale", EditorGUILayout.FloatField(" ", Mathf.Clamp (fval, 0.00001f, 10000.0f)));

        Separator();

        // Treat these floats as bools in the inspector
        plugin.GetFloatParameter("E.Rflt On", out fval);
        bval = (fval == 0.0f) ? false : true;
        bval = EditorGUILayout.Toggle("Reflections Engine On", bval);
        plugin.SetFloatParameter("E.Rflt On", (bval == false) ? 0.0f : 1.0f);

        plugin.GetFloatParameter("E.Rflt Rev On", out fval);
        bval = (fval == 0.0f) ? false : true;
        bval = EditorGUILayout.Toggle("Late Reverberation", bval);
        plugin.SetFloatParameter("E.Rflt Rev On", (bval == false) ? 0.0f : 1.0f);

        Separator();
        Label("ROOM DIMENSIONS (meters)");
        Label("");
        plugin.GetFloatParameter("Room X", out fval);
        plugin.SetFloatParameter("Room X", EditorGUILayout.Slider("Width", fval, 1.0f, 200.0f));
        plugin.GetFloatParameter("Room Y", out fval);
        plugin.SetFloatParameter("Room Y", EditorGUILayout.Slider("Height", fval, 1.0f, 200.0f));
        plugin.GetFloatParameter("Room Z", out fval);
        plugin.SetFloatParameter("Room Z", EditorGUILayout.Slider("Length", fval, 1.0f, 200.0f));

        Separator();
        Label("WALL REFLECTION COEFFICIENTS (0.0 - 0.97)");
        Label("");

        plugin.GetFloatParameter("Left", out fval);
        plugin.SetFloatParameter("Left", EditorGUILayout.Slider("Left", fval, 0.0f, 0.97f));
        plugin.GetFloatParameter("Right", out fval);
        plugin.SetFloatParameter("Right", EditorGUILayout.Slider("Right", fval, 0.0f, 0.97f));
        plugin.GetFloatParameter("Up", out fval);
        plugin.SetFloatParameter("Up", EditorGUILayout.Slider("Up", fval, 0.0f, 0.97f));
        plugin.GetFloatParameter("Down", out fval);
        plugin.SetFloatParameter("Down", EditorGUILayout.Slider("Down", fval, 0.0f, 0.97f));
        plugin.GetFloatParameter("Behind", out fval);
        plugin.SetFloatParameter("Behind", EditorGUILayout.Slider("Back", fval, 0.0f, 0.97f));
        plugin.GetFloatParameter("Front", out fval);
        plugin.SetFloatParameter("Front", EditorGUILayout.Slider("Front", fval, 0.0f, 0.97f));

        Separator();
        Label("SHARED REVERB ATTENUATION RANGE (1.0 - 10000.0 meters)");
        Label("");
        plugin.GetFloatParameter("Shared Rev Min", out fval);
        plugin.SetFloatParameter("Shared Rev Min", EditorGUILayout.Slider("Minimum", fval, 1.0f, 10000.0f));
        plugin.GetFloatParameter("Shared Rev Max", out fval);
        plugin.SetFloatParameter("Shared Rev Max", EditorGUILayout.Slider("Maximum", fval, 1.0f, 10000.0f));

        // We will override the controls with our own, so return false
        return false;
    }
 public override bool OnGUI(IAudioEffectPlugin plugin)
 {
   float blend = !plugin.IsPluginEditableAndEnabled() ? 0.5f : 1f;
   float threshold;
   plugin.GetFloatParameter(DuckVolumeGUI.kThresholdName, out threshold);
   float ratio;
   plugin.GetFloatParameter(DuckVolumeGUI.kRatioName, out ratio);
   float makeupGain;
   plugin.GetFloatParameter(DuckVolumeGUI.kMakeupGainName, out makeupGain);
   float attackTime;
   plugin.GetFloatParameter(DuckVolumeGUI.kAttackTimeName, out attackTime);
   float releaseTime;
   plugin.GetFloatParameter(DuckVolumeGUI.kReleaseTimeName, out releaseTime);
   float knee;
   plugin.GetFloatParameter(DuckVolumeGUI.kKneeName, out knee);
   float[] data;
   plugin.GetFloatBuffer("Metering", out data, 2);
   GUILayout.Space(5f);
   Rect rect = GUILayoutUtility.GetRect(200f, 160f, new GUILayoutOption[1]
   {
     GUILayout.ExpandWidth(true)
   });
   if (DuckVolumeGUI.CurveDisplay(plugin, rect, ref threshold, ref ratio, ref makeupGain, ref attackTime, ref releaseTime, ref knee, data[0], data[1], blend))
   {
     plugin.SetFloatParameter(DuckVolumeGUI.kThresholdName, threshold);
     plugin.SetFloatParameter(DuckVolumeGUI.kRatioName, ratio);
     plugin.SetFloatParameter(DuckVolumeGUI.kMakeupGainName, makeupGain);
     plugin.SetFloatParameter(DuckVolumeGUI.kAttackTimeName, attackTime);
     plugin.SetFloatParameter(DuckVolumeGUI.kReleaseTimeName, releaseTime);
     plugin.SetFloatParameter(DuckVolumeGUI.kKneeName, knee);
   }
   return true;
 }
Esempio n. 12
0
 public override bool OnGUI(IAudioEffectPlugin plugin)
 {
   float blend = !plugin.IsPluginEditableAndEnabled() ? 0.5f : 1f;
   float centerFreq;
   plugin.GetFloatParameter(ParamEqGUI.kCenterFreqName, out centerFreq);
   float bandwidth;
   plugin.GetFloatParameter(ParamEqGUI.kOctaveRangeName, out bandwidth);
   float gain;
   plugin.GetFloatParameter(ParamEqGUI.kFrequencyGainName, out gain);
   GUILayout.Space(5f);
   Rect rect = GUILayoutUtility.GetRect(200f, 100f, new GUILayoutOption[1]
   {
     GUILayout.ExpandWidth(true)
   });
   if (ParamEqGUI.ParamEqualizerCurveEditor(plugin, rect, ref centerFreq, ref bandwidth, ref gain, blend))
   {
     plugin.SetFloatParameter(ParamEqGUI.kCenterFreqName, centerFreq);
     plugin.SetFloatParameter(ParamEqGUI.kOctaveRangeName, bandwidth);
     plugin.SetFloatParameter(ParamEqGUI.kFrequencyGainName, gain);
   }
   return true;
 }
Esempio n. 13
0
		public override bool OnGUI(IAudioEffectPlugin plugin)
		{
			float blend = (!plugin.IsPluginEditableAndEnabled()) ? 0.5f : 1f;
			float value;
			plugin.GetFloatParameter(DuckVolumeGUI.kThresholdName, out value);
			float value2;
			plugin.GetFloatParameter(DuckVolumeGUI.kRatioName, out value2);
			float value3;
			plugin.GetFloatParameter(DuckVolumeGUI.kMakeupGainName, out value3);
			float value4;
			plugin.GetFloatParameter(DuckVolumeGUI.kAttackTimeName, out value4);
			float value5;
			plugin.GetFloatParameter(DuckVolumeGUI.kReleaseTimeName, out value5);
			float value6;
			plugin.GetFloatParameter(DuckVolumeGUI.kKneeName, out value6);
			float[] array;
			plugin.GetFloatBuffer("Metering", out array, 2);
			GUILayout.Space(5f);
			Rect rect = GUILayoutUtility.GetRect(200f, 160f, new GUILayoutOption[]
			{
				GUILayout.ExpandWidth(true)
			});
			if (DuckVolumeGUI.CurveDisplay(plugin, rect, ref value, ref value2, ref value3, ref value4, ref value5, ref value6, array[0], array[1], blend))
			{
				plugin.SetFloatParameter(DuckVolumeGUI.kThresholdName, value);
				plugin.SetFloatParameter(DuckVolumeGUI.kRatioName, value2);
				plugin.SetFloatParameter(DuckVolumeGUI.kMakeupGainName, value3);
				plugin.SetFloatParameter(DuckVolumeGUI.kAttackTimeName, value4);
				plugin.SetFloatParameter(DuckVolumeGUI.kReleaseTimeName, value5);
				plugin.SetFloatParameter(DuckVolumeGUI.kKneeName, value6);
			}
			return true;
		}