Esempio n. 1
0
    public void SetFloatParameter(Hv_voiceSynth_AudioLib.Parameter param, float x)
    {
        switch (param)
        {
        case Parameter.Metron: {
            x      = Mathf.Clamp(x, 0.0f, 1.0f);
            metron = x;
            break;
        }

        case Parameter.Noto: {
            x    = Mathf.Clamp(x, 15.0f, 127.0f);
            noto = x;
            break;
        }

        case Parameter.Synthoctave1: {
            x            = Mathf.Clamp(x, 0.0f, 2.0f);
            synthOctave1 = x;
            break;
        }

        case Parameter.Vol: {
            x   = Mathf.Clamp(x, 0.0f, 1.0f);
            vol = x;
            break;
        }

        default: return;
        }
        if (IsInstantiated())
        {
            _context.SendFloatToReceiver((uint)param, x);
        }
    }
Esempio n. 2
0
    // see Hv_voiceSynth_AudioLib.Parameter for definitions
    public float GetFloatParameter(Hv_voiceSynth_AudioLib.Parameter param)
    {
        switch (param)
        {
        case Parameter.Metron: return(metron);

        case Parameter.Noto: return(noto);

        case Parameter.Synthoctave1: return(synthOctave1);

        case Parameter.Vol: return(vol);

        default: return(0.0f);
        }
    }