AFAIK, the API documentation does not refer to CC anywhere.
To control MIDI messages sent from a MIDI interface (a MIDI pad or a MIDI controller keyboard), it is possible to do so with sysex data (MIDI In and MIDI Out). You can play with this.
The sysex data are 3 2-digit values in hexadecimal notation. Here is an excerpt from my tool: New tool (3.3.0): Arturia KeyLab mkII v1.3 build 023 (January 2021)
local AKM_LOCK_IO_DEVICES=true
local AKM_INPUTS={}
local AKM_MIDI_DEVICE_IN=nil
local function akm_input_midi(in_device_name)
if not table.is_empty(AKM_INPUTS) then
if (in_device_name==nil) then
if (AKM_MIDI_DEVICE_IN and AKM_MIDI_DEVICE_IN.is_open) then AKM_MIDI_DEVICE_IN:close() end
return
else
local function midi_callback(message)
assert(#message==3)
assert(message[1]>=00 and message[1]<=0xFF)
assert(message[2]>=00 and message[2]<=0xFF)
assert(message[3]>=00 and message[3]<=0xFF)
print(("%X %X %X || %s"):format(message[1],message[2],message[3],in_device_name))
end
if (AKM_MIDI_DEVICE_IN and AKM_MIDI_DEVICE_IN.is_open) then
return
else
AKM_MIDI_DEVICE_IN=renoise.Midi.create_input_device(in_device_name,midi_callback)
end
end
end
end
local function akm_check_midi_on()
--AKM_INPUTS=renoise.Midi.available_input_devices()
for i=1,#renoise.Midi.available_input_devices() do
AKM_INPUTS[i]=(" %s"):format(renoise.Midi.available_input_devices()[i])
end
--[[
if not table.is_empty(AKM_INPUTS) then
vws.AKM_PP_DEVICE_IN.items=AKM_INPUTS
end
local function show_mess()
AKM_ON_OFF=true akm_on_off()
if (vws.AKM_PP_DEVICE_NAME.value==1) then
return rna:show_warning("AKM: The in device \"MIDIIN2 (KeyLab mkII 49)\" is not conected!\n\n"
.."Do you have the \"KeyLab mkII 49\" MIDI controller\nconnected correctly?")
end
if (vws.AKM_PP_DEVICE_NAME.value==2) then
return rna:show_warning("AKM: The in device \"MIDIIN2 (KeyLab mkII 61)\" is not conected!\n\n"
.."Do you have the \"KeyLab mkII 61\" MIDI controller\nconnected correctly?")
end
if (vws.AKM_PP_DEVICE_NAME.value==3) then
return rna:show_warning("AKM: The in device \"MIDIIN2 (KeyLab mkII 88)\" is not conected!\n\n"
.."Do you have the \"KeyLab mkII 88\" MIDI controller\nconnected correctly?")
end
end
]]
if (AKM_LOCK_IO_DEVICES) then
--selecte default number of in device
local in_device_name=AKM_INPUTS[1]
--print("AKM dev_in:",vws.AKM_PP_DEVICE_IN.value,in_device_name)
--AKM_ACTIVATE=true
akm_input_midi(string.sub(in_device_name,2))
end
end
akm_check_midi_on()
(You can copy this code in TestPad.lua and execute it there to try).
This code is lightened to work, but it is an excerpt from this tool. Can you see the entire LUA code after installing the tool? (Note: this tool will not work if you do not have the original device, an Arturia Keylab mkII)
The midi_callback(message) function With the midi_callback (message) function you can print incoming sysex messages. But first you must make sure that the “in_device_name” value (string) is available (the device is connected and bridged). The name of the device is exactly what appears here (device [1]):
By managing this data, you can make a tool react according to the hardware device.
I don’t know if there is any method to directly achieve incoming MIDI CC values through the API + LUA. But it would be interesting to know.
What exactly do you want CC values for? With the sysex data you can obtain the CC value, which corresponds to the second 2-digit value (message[2]). I believe.