From 802f2997c294f9234e32fa536996a3d009616735 Mon Sep 17 00:00:00 2001 From: Cassandra de la Cruz-Munoz Date: Wed, 16 Aug 2023 19:56:00 -0400 Subject: [PATCH] create new constructor for VmcExtMidiCcBit --- VmcMessages/VmcExtMidiCcBit.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/VmcMessages/VmcExtMidiCcBit.cs b/VmcMessages/VmcExtMidiCcBit.cs index 0ca4628..754af3d 100644 --- a/VmcMessages/VmcExtMidiCcBit.cs +++ b/VmcMessages/VmcExtMidiCcBit.cs @@ -45,5 +45,16 @@ namespace godotVmcSharp knob = (int)m.Data[0].Value; active = (int)m.Data[1].Value; } + + public VmcExtMidiCcBit(int _knob, int _active) : base(new godotOscSharp.Address("/VMC/Ext/Midi/CC/Bit")) + { + if (_active < 0 || _active > 1) + { + GD.Print($"Invalid value for \"active\" argument of {addr}. Expected 0 or 1, received {_active}."); + return; + } + knob = _knob; + active = _active; + } } } \ No newline at end of file