public void SetFloatParameter(Hv_augmentedBusker_1_AudioLib.Parameter param, float x) { switch (param) { case Parameter.Pitch1: { x = Mathf.Clamp(x, 120.0f, 880.0f); pitch1 = x; break; } case Parameter.Pitch2: { x = Mathf.Clamp(x, 120.0f, 880.0f); pitch2 = x; break; } case Parameter.Pitchrange: { x = Mathf.Clamp(x, 50.0f, 1600.0f); pitchRange = x; break; } default: return; } if (IsInstantiated()) { _context.SendFloatToReceiver((uint)param, x); } }
// see Hv_augmentedBusker_1_AudioLib.Parameter for definitions public float GetFloatParameter(Hv_augmentedBusker_1_AudioLib.Parameter param) { switch (param) { case Parameter.Pitch1: return(pitch1); case Parameter.Pitch2: return(pitch2); case Parameter.Pitchrange: return(pitchRange); default: return(0.0f); } }