public void setPitch( float p )
    {
        // Make sure there is a pan control
        if( sampleRateControl == null )
        {
            return;
        }
        float sampleRate = p;

        // make sure the value is valid (between 0.5f and 2.0f)
        if( sampleRate < 0.5f )
            sampleRate = 0.5f;
        if( sampleRate > 2.0f )
            sampleRate = 2.0f;

        sampleRate = sampleRate * initialSampleRate;

        // Update the pan:
        sampleRateControl.setValue( sampleRate );
    }