From 0ea1c8e14cd7dece8f6deb8a1b45139178d4287b Mon Sep 17 00:00:00 2001 From: Duncan McGreggor Date: Sat, 19 Oct 2024 20:48:38 -0500 Subject: [PATCH] Better CC support. --- src/midimsg.erl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/midimsg.erl b/src/midimsg.erl index fb1a6d3..50a6653 100644 --- a/src/midimsg.erl +++ b/src/midimsg.erl @@ -54,7 +54,7 @@ rt_tick/0 ]). -export([ - cc/2, + cc/2, cc/3, program_change/1, program_change/2 ]). -export([ @@ -252,8 +252,13 @@ poly_aftertouch(Channel, Pitch, Pressure) -> %%%%%%%%%%%%%%%%%%%%%%%%%%%% -spec cc (integer(), integer()) -> tuple(). -cc(Controller, Value) -> - {midi, {cc, [{controller, Controller}, +cc(Control, Value) -> + {midi, {cc, [{control, Control}, + {value, Value}]}}. + +cc(Channel, Control, Value) -> + {midi, {cc, [{channel, Channel}, + {control, Control}, {value, Value}]}}. -spec program_change (integer()) -> tuple().