Beispiel #1
0
        public void SetNoiseParameters(NoiseModes mode, double frequency, InterpolationModes interpolation)
        {
            NoiseMode         = mode;
            Frequency         = frequency;
            InterpolationMode = interpolation;

            Noise.SetFrequency(Frequency);
            Noise.SetInterp((FastNoise.Interp)(int) InterpolationMode);
        }
Beispiel #2
0
    void OnGUI()
    {
        GUILayout.Label("Noise Removal by Dominic Mazzoni");
        GUILayout.Space(10);

        GUILayout.Label("Step 1");
        GUILayout.Label("Select a few seconds of just noise so the");
        GUILayout.Label("algorithm knows what to filter out, then");
        GUILayout.Label("click Get Noise Profile:");
        if (GUILayout.Button("Get Noise Profile", GUILayout.MinHeight(40)))
        {

        }
        GUILayout.Space(10);

        GUILayout.Label("Step 2");
        GUILayout.Label("Select all of the audio you want filtered,");
        GUILayout.Label("choose how much noise you want filtered");
        GUILayout.Label("out, and then click 'OK' to remove noise.");
        GUILayout.Space(10);

        if (GUILayout.Button("SetDefaults", GUILayout.MinHeight(40)))
        {
            m_noiseReduction = 24;
            m_sensitivity = 0f;
            m_frequencySmoothing = 150;
            m_attackDecayTime = 0.15f;
        }

        DisplayControl("Noise reduction (dB):", "{0:F0}", ref m_noiseReduction, 0, 48);
        DisplayControl("Sensitivity (dB):", "{0:F2}", ref m_sensitivity, -20, 20);
        DisplayControl("Frequency smoothing (Hz):", "{0:F0}", ref m_frequencySmoothing, 0, 1000);
        DisplayControl("Attack/decay time (secs):", "{0:F2}", ref m_attackDecayTime, 0, 1);

        GUILayout.Space(10);

        GUILayout.BeginHorizontal();
        GUILayout.Label("Noise:", GUILayout.Width(150));
        m_noiseMode = (NoiseModes)EditorGUILayout.EnumPopup(m_noiseMode);
        GUILayout.EndHorizontal();

        GUILayout.Space(10);

        GUILayout.BeginHorizontal();
        if (GUILayout.Button("Preview"))
        {
        }
        GUILayout.Label(string.Empty, GUILayout.Width(20));
        if (GUILayout.Button("OK"))
        {
        }
        if (GUILayout.Button("Cancel"))
        {
        }
        GUILayout.EndHorizontal();

        GUILayout.Space(10);
    }