Esempio n. 1
0
    //----------------------------------------------------------
    // アップデート
    //
    private void Update()
    {
        // キーボード操作でノブを回す
        if (enableButton.IsCurrentKeyDown() || frequencyKnob.isHitting)
        {
            // frequency
            if (Input.GetKey(KeyCode.LeftArrow))
            {
                frequencyKnob.RotateKnob(-150.0f * Time.deltaTime);
            }
            else if (Input.GetKey(KeyCode.RightArrow))
            {
                frequencyKnob.RotateKnob(150.0f * Time.deltaTime);
            }

            // resonance
            // if (Input.GetKey(KeyCode.UpArrow))          { resonanceKnob.RotateKnob(-100.0f * Time.deltaTime); }
            // else if (Input.GetKey(KeyCode.DownArrow))   { resonanceKnob.RotateKnob( 100.0f * Time.deltaTime); }

            // ノブの値を適用
            frequency = ((3000.0f - 100.0f) * frequencyKnob.GetcurrentRotateValue()) + 100.0f;
            // resonance = ((5.0f - 1.0f)      * resonanceKnob.GetcurrentRotateValue()) + 1.0f;
        }
        EffectUpdate();
    }
Esempio n. 2
0
    //----------------------------------------------------------
    // アップデート
    //a
    private void Update()
    {
        // キーボード操作でノブを回す
        if (enableButton.IsCurrentKeyDown() || depthKnob.isHitting)
        {
            if (Input.GetKey(KeyCode.LeftArrow))
            {
                depthKnob.RotateKnob(-150.0f * Time.deltaTime);
            }
            else if (Input.GetKey(KeyCode.RightArrow))
            {
                depthKnob.RotateKnob(150.0f * Time.deltaTime);
            }

            depth = depthKnob.GetcurrentRotateValue();
        }
        EffectUpdate();
    }
Esempio n. 3
0
    //----------------------------------------------------------
    // アップデート
    //
    private void Update()
    {
        // キーボード操作でノブを回す
        if (enableButton.IsCurrentKeyDown() || pitchKnob.isHitting)
        {
            if (Input.GetKey(KeyCode.LeftArrow))
            {
                pitchKnob.RotateKnob(-150.0f * Time.deltaTime);
            }
            else if (Input.GetKey(KeyCode.RightArrow))
            {
                pitchKnob.RotateKnob(150.0f * Time.deltaTime);
            }

            // ノブの値を適用
            pitch = ((1.2f - 0.8f) * pitchKnob.GetcurrentRotateValue()) + 0.8f;
        }
        EffectUpdate();
    }
Esempio n. 4
0
 public float GetEffectLevel()
 {
     if (IsEnabled() || reverbKnob.isHitting)
     {
         return(roomKnob.GetcurrentRotateValue());
     }
     else
     {
         return(0.0f);
     }
 }
Esempio n. 5
0
    //----------------------------------------------------------
    // アップデート
    //
    private void Update()
    {
        // キーボード操作でノブを回す
        if (enableButton.IsCurrentKeyDown())
        {
            if (Input.GetKey(KeyCode.LeftArrow))
            {
                depthKnob.RotateKnob(-100.0f * Time.deltaTime);
            }
            else if (Input.GetKey(KeyCode.RightArrow))
            {
                depthKnob.RotateKnob(100.0f * Time.deltaTime);
            }
        }

        // ノブの値を適用
        drymix = (100.0f - 0.0f) * drymixKnob.GetcurrentRotateValue();
        wetmix = (100.0f - 0.0f) * wetmixKnob.GetcurrentRotateValue();
        depth  = (1.0f - 0.0f) * depthKnob.GetcurrentRotateValue();
        rate   = (20.0f - 0.0f) * rateKnob.GetcurrentRotateValue();

        // エフェクトを適用するか
        if (enableButton.IsPushed())
        {
            myAudioMixer.SetFloat("bgm_Flange_Wet", 0.0f);

            myAudioMixer.SetFloat("bgm_Flange_Drymix", drymix);
            myAudioMixer.SetFloat("bgm_Flange_Wetmix", wetmix);
            myAudioMixer.SetFloat("bgm_Flange_Depth", depth);
            myAudioMixer.SetFloat("bgm_Flange_Rate", rate);
        }
        else
        {
            Initialize();
            myAudioMixer.SetFloat("bgm_Flange_Wet", -80.0f);
        }
    }
Esempio n. 6
0
    //----------------------------------------------------------
    // アップデート
    //
    private void Update()
    {
        // キーボード操作でノブを回す
        if (enableButton.IsCurrentKeyDown())
        {
            if (Input.GetKey(KeyCode.LeftArrow))
            {
                reverbKnob.RotateKnob(-150.0f * Time.deltaTime);
            }
            else if (Input.GetKey(KeyCode.RightArrow))
            {
                reverbKnob.RotateKnob(150.0f * Time.deltaTime);
            }

            // ノブの値を適用
            reverb = ((1500.0f - (-300.0f)) * reverbKnob.GetcurrentRotateValue()) + (-500.0f);
            // room = ((0.0f - (-1000.0f)) * roomKnob.GetcurrentRotateValue()) + (-1000.0f);
            // reflections = ((1000.0f - (-500.0f)) * reflectionsKnob.GetcurrentRotateValue()) + (-500.0f);
        }
        EffectUpdate();
    }