├── README.md └── gma3_library └── datapools └── plugins ├── MA3 OSC FEEDBACK.lua └── MA3 OSC FEEDBACK.xml /README.md: -------------------------------------------------------------------------------- 1 | # MA3_OSC_FEEDBACK 2 | Plugin send osc feedback on grandma3 3 | 4 | 5 | This is a plugin that provides feedback on the status of executors/faders in the grand ma3 system. 6 | 7 | The original version of the plugin was created by Mr-Button, with my modifications, and the final version was written by Andreas from MAforum (Thank you very much!) 8 | 9 | The enabled plugin checks every half second for changes in the ma3 system for the executor/fader/encoder on the current page and sends them via OSC. 10 | 11 | In this plugin, the following numbers are entered in the table - 201-215. 12 | 13 | If you want, you can add the remaining numbers (e.g., from another wing , or encoders 301-315). 14 | 15 | local executor_table = {201,202,203,204,205,206,207,208,209,210,211,212,213,214,215} 16 | 17 | 18 | 19 | Second line 20 | 21 | local osc_config = 1 22 | 23 | This means that the selected OSC IN/OUT settings will be used for sending - the first position. 24 | 25 | If you want to send OSC on a different port, add the appropriate entry in OSC IN/OUT, and change to 26 | 27 | local osc_config = 2 28 | 29 | Have fun! 30 | -------------------------------------------------------------------------------- /gma3_library/datapools/plugins/MA3 OSC FEEDBACK.lua: -------------------------------------------------------------------------------- 1 | local executor_table = {201,202,203,204,205,206,207,208,209,210,211,212,213,214,215} 2 | local osc_config = 1 3 | local history_fader, history_status = {}, {} 4 | local osc_template = 'SendOSC %i "/%s%i,i,%i"' 5 | local enabled = false 6 | local Printf, Echo, GetExecutor, Cmd, ipairs, mfloor = Printf, Echo, GetExecutor, Cmd, ipairs, math.floor 7 | 8 | local function send_osc(etype, exec_no, value) 9 | -- Printf(osc_template:format(osc_config, etype, exec_no, value)) 10 | Cmd(osc_template:format(osc_config, etype, exec_no, value)) 11 | end 12 | 13 | local function poll(exec_no) 14 | local exec = GetExecutor(exec_no) 15 | local value = exec and mfloor(exec:GetFader{}) or 0 16 | local last_value = history_fader[exec_no] 17 | local status = exec and exec.Object and exec.Object:HasActivePlayback() and 1 or 0 18 | local last_status = history_status[exec_no] 19 | if value ~= last_value then 20 | send_osc('Fader', exec_no, value) 21 | history_fader[exec_no] = value 22 | end 23 | if status ~= last_status then 24 | send_osc('Key', exec_no, status) 25 | history_status[exec_no] = status 26 | end 27 | end 28 | 29 | local function mainloop() 30 | while enabled do 31 | for _, exec_no in ipairs(executor_table) do poll(exec_no) end 32 | coroutine.yield(0.5) 33 | end 34 | end 35 | 36 | local function maintoggle() 37 | if enabled then 38 | enabled = false 39 | else 40 | enabled = true 41 | history_fader, history_status = {}, {} 42 | mainloop() 43 | end 44 | end 45 | 46 | return maintoggle 47 | -------------------------------------------------------------------------------- /gma3_library/datapools/plugins/MA3 OSC FEEDBACK.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | --------------------------------------------------------------------------------