"All events" hook for controller?

Mod your Mixxx: Share your controller mappings, keyboard mappings, skin and script tweaks here!

Moderators: garth, User Customization Moderators

"All events" hook for controller?

Postby gargantuanprism » Mon May 11, 2020 12:45 am

Is there any way to assign a function in a controller script for *all* MIDI events? I have a custom controller with 5 rotary encoders and I'd rather deal with filtering the messages in a JS function instead of having to create a separate function assignment for each one in the XML.
gargantuanprism
 
Posts: 2
Joined: Mon May 11, 2020 12:42 am

Re: "All events" hook for controller?

Postby JosepMa » Mon May 11, 2020 8:16 pm

If you are asking if you can tell Mixxx to use the same javascript function for different controllers and filter which one you're changing in the javascript, then yes, that is possible.
Just set the same function name on each mapped control on the XML file. The javascript method can distinguish using the midichan, control and status variables (or the group if they map to different groups )
function(midichan, control, value, status, group)

If you mean if there is a way to not set each control that you want to map in the XML file, then that is currently not possible.
It will be in a future version that hasn't been started yet.
JosepMa
 
Posts: 888
Joined: Sat Oct 10, 2015 7:02 pm

Re: "All events" hook for controller?

Postby gargantuanprism » Thu May 14, 2020 6:38 pm

ok, thanks. yeah, i was just hoping to be able to have a smaller XML file that didn't require filtering on <midino>. my current one is pretty redundant:

Code: Select all
<control>
            <group>[Master]</group>
            <key>PicoControl.encoder</key>
            <status>0xB0</status>
            <midino>0x01</midino>
            <options>
               <Script-Binding/>
            </options>
         </control>
         <control>
            <group>[Master]</group>
            <key>PicoControl.encoder</key>
            <status>0xB0</status>
            <midino>0x02</midino>
            <options>
               <Script-Binding/>
            </options>
         </control>
         <control>
            <group>[Master]</group>
            <key>PicoControl.encoder</key>
            <status>0xB0</status>
            <midino>0x03</midino>
            <options>
               <Script-Binding/>
            </options>
         </control>
         <control>
            <group>[Master]</group>
            <key>PicoControl.encoder</key>
            <status>0xB0</status>
            <midino>0x04</midino>
            <options>
               <Script-Binding/>
            </options>
         </control>
         <control>
            <group>[Master]</group>
            <key>PicoControl.encoder</key>
            <status>0xB0</status>
            <midino>0x05</midino>
            <options>
               <Script-Binding/>
            </options>
         </control>
gargantuanprism
 
Posts: 2
Joined: Mon May 11, 2020 12:42 am


Return to User Customizations

Who is online

Users browsing this forum: No registered users and 6 guests