The problem seems related to what's going on in my remote_deliver_midi() function within my custom Oxygen Pro 61 remote script. Removing some code that delivers MIDI messages to update LED states of buttons on my hardware seems to avoid the error, but I do not understand why or what part of this is causing an error to begin with. Remote's debugger doesn't seem to work either, the remote.trace() functions appears to do absolutely nothing so I'm completely confused on what the issue is. It's really bugging me.
Here's an excerpt of code within remote_deliver_midi() that may be causing a problem:
Code: Select all
if g_mode_button_state == 1 then
--check each led state on hardware, comparing with current bank and buttons mode set to "rec"
for i, led in ipairs(g_fader_button_led_states) do
local rec_index = bank_offset(i,8)
local rec_state = g_rec_leds[rec_index]
-- led bool != rec boolean => set led bool equal to rec bool, then pass led midi message to hardware
if led ~= rec_state then
g_fader_button_led_states[i] = g_rec_leds[rec_index]
table.insert(ret_events,remote.make_midi(make_button_midi_hex_string(g_rec_leds[rec_index], g_fader_button_hex[i])))
end
if led == #g_fader_button_led_states then g_mode_button_state_old = g_mode_button_state end
end
end
I wrote this script many months ago and only recently noticed this error happening.
"unknown problem" tells me nothing about what the issue could be, so I thought I would ask here in case anyone has a better grasp of Remote Scripting.
Sorry if this is the wrong place for this thread.