From 9906bc6e361b1b91a3edd9f06568aee5cf5b696a Mon Sep 17 00:00:00 2001 From: Simon G Date: Wed, 12 May 2021 20:01:33 +0200 Subject: [PATCH] - handle controlChangeMessage for buttons --- Lib.Audio/Channel.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Lib.Audio/Channel.cs b/Lib.Audio/Channel.cs index d7bf73a..6eb28cd 100644 --- a/Lib.Audio/Channel.cs +++ b/Lib.Audio/Channel.cs @@ -122,6 +122,11 @@ namespace Lib.Audio { if (Fader != null && Fader.Controller == controlChangeMessage.Controller) Fader.Position = controlChangeMessage.Value; + else + { + IButton? button = Buttons.FirstOrDefault(b => b.Controller == controlChangeMessage.Controller); + button?.HandlePressed(Controllable, (Velocity) controlChangeMessage.Value); + } } }