A lot of midi controllers have a "shift" key, which effectively doubles
the number of buttons by allowing the user to hold the shift button
while pressing another to activate secondary behavior.  

Because the controller xml spec doesn't support buttons with
dual-functions, this means a lot of logic is in javascript files.  The
actual logic is pretty simple, but it means that any button that could
have two functions must be defined in the javascript file.  

While it's nice to have javascript to do advanced configuration, I think
that shift functions are common enough that they should be directly
supported.  I think it would be fairly straightforward to add support
for shift buttons inside the xml spec itself.

First, the xml file would have a basic button declaration for shift.
The shift buttons would just be simple pushbutton control objects:

<control>
 <status>0x80</status>
 <midino>0x04</midino>
 <group>[Master]</group>
 <key>shift_1</key>
 <options>
  <button/>
 </options>
</control>

We could have support for up to 4 shift buttons, although most
controllers only have 1.

Then, designating one button to do two things would be done by creating
two items for the same midi control and specifying a term in the
<options> tag of one of them.

<control>
 <status>0x80</status>
 <midino>0x14</midino>
 <group>[Channel1]</group>
 <key>hotcue_1_activate</key>
 <options>
  <button/>
 </options>
</control>

<control>
 <status>0x80</status>
 <midino>0x14</midino>
 <group>[Channel1]</group>
 <key>hotcue_1_clear</key>
 <options>
  <button/>
  <shift_1/>
 </options>
</control>


As far as implementing this in Mixxx, here's the todo:
* the midi code would need to support multiple mappings for one key
(insertMulti).
* If a midi button is pushed the midi code will get multiple
notifications, but only one will match the current shifted state.  The
midi code would just have to know about the shift_X control objects and
check their status when receiving the event.
* the learning wizard would need to be tweaked to understand and create
shifted functions.

I think this would fit in to Mixxx pretty easily, though it's not worth
delaying 1.11 for.  Existing controller configurations wouldn't be
broken, and new configurations could do clever things like having
shifted script activation.


And, of course, I wouldn't have to write any javascript for the
controller I'm working on right now :)

Owen


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Get Mixxx, the #1 Free MP3 DJ Mixing software Today
http://mixxx.org


Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Reply via email to