/// <summary> /// Handles the expression changed notification. /// </summary> /// <param name="normalizedValue">The normalized value.</param> /// <param name="controlType">Type of the expression control.</param> private void HandleExpressionChanged(double normalizedValue, ExpressionControlType controlType) { switch (controlType) { case ExpressionControlType.Expression: _midiOutAdapter.SendExpressionChange(Get7bitMidiRange(normalizedValue)); break; case ExpressionControlType.ModulationWheel: _midiOutAdapter.SendModulationChange(Get7bitMidiRange(normalizedValue)); break; } }
/// <summary> /// Gets the expression control item by ExpressionControlType. /// </summary> /// <param name="expressionControlType">Type of the expression control.</param> /// <returns>The requested item if found; otherwise null.</returns> private ExpressionControlItem GetExpressionControlItem(ExpressionControlType expressionControlType) { return(_expressionControlItems.FirstOrDefault(item => item.TypeId == expressionControlType)); }