Script tool to map midi to groove value(s)

I have yet to add the global groove control in my MUC tool, therefore this matter interests me.

That said, you can add the midi mapping to any control object with midi_mapping (a string). Here’s an example for a button:

  vb:button{
    id="MUC_BT_EXTRA_DEV_REM",
    active=false,
    height=MUC.HEIGHT_2,
    width=MUC.HEIGHT_2,
    bitmap="ico/minus_ico.png",
    pressed=function() muc_bt_extra_dev_rem_repeat() end,   
    released=function() muc_bt_extra_dev_rem_repeat(true) end,
    midi_mapping=("Tools:%s:Button:Bottom (-) [Trigger]"):format(muc_abbreviated_title),
  },

Read the 164 to 224 lines of Renoise.ScriptingTool.API.lua for more information to “midi_mappings”…

Here’s an example for the same midi link as the previous button to appear in Renoise’s MIDI MAP window (see name):

  renoise.tool():add_midi_mapping{
    name=("Tools:%s:Button:Bottom (-) [Trigger]"):format(muc_abbreviated_title),
    invoke=function(message)
      if message:is_trigger() then
        if (MUC.ON_OFF) then
          vws.MUC_BT_EXTRA_DEV_REM.color=MUC_CLR.MARKER
          return muc_bt_extra_dev_rem_repeat(false), muc_view_panel_area(vws.MUC_PP_LIST_1.value)
        end
      else
        vws.MUC_BT_EXTRA_DEV_REM.color=MUC_CLR.DEFAULT
        return muc_bt_extra_dev_rem_repeat(true)
      end
    end
  }

“midi_mapping” and “name” must be the same string.

1 Like