NoteFinder.Update C# (CSharp) Method

Update() private method

private Update ( ) : void
return void
    void Update()
    {
        int f = (int)micIn.frequency; // Get the frequency from our MicrophoneInput script

        Debug.Log(f);

        //ROTATION
        if (f >= 125 && f <= 127)
        {
            rotR = true;
        }
        else
        {
            rotR = false;
        }

        if (f >= 168 && f <= 173)
        {
            rotL = true;
        }
        else
        {
            rotL = false;
        }

        if (f >= 200 && f <= 205) // Compare the frequency to known value, take possible rounding error in to account
        {
            dPlay = true;
            Debug.Log("D played, count: " + dPlay);
        }
        else
        {
            dPlay = false;
        }

        if (f >= 225 && f <= 229) // Compare the frequency to known value, take possible rounding error in to account
        {
            bPlay = true;
            Debug.Log("B played, count: " + bPlay);
        }
        else
        {
            bPlay = false;
        }

        if (f >= 175 && f <= 185) // Compare the frequency to known value, take possible rounding error in to account
        {
            gPlay = true;
            Debug.Log("G played, count: " + gPlay);
        }
        else
        {
            gPlay = false;
        }

        if (f >= 300 && f <= 325) // Compare the frequency to known value, take possible rounding error in to account
        {
            ePlay = true;
            Debug.Log("E played, count: " + ePlay);
        }
        else
        {
            ePlay = false;
        }

        if(f >= 460 && f <= 500) // going to check if powerup is enabled - if playing between 400-500 and powerup is met - cast lightning
        {
            // needs corouting
            // cant do lighning for a while after... set monster count to zero
            lightning = true;
            Debug.Log("lightning played, count: " + lightning);
        }

        /*
        if (f >= 261 && f <= 262) // Compare the frequency to known value, take possible rounding error in to account
        {
            gui_text.text = "Middle-C played!";
        }
        else
        {
            gui_text.text = "Play another note...";
        }
        */
    }