It would be nice to generalise the concept of a custom control to also allow the programmer to specify how to draw the contents of the detail window. This would allow to define e.g. a filter device with a popup controlling and showing the filter response (and adjusting it in realtime as pots are turned).
Thinking about this I think there would actually be two different types
- Like the XY-pad: control needs to redraw full popup window and needs to handle touch and pot events all by itself.
- Like the four stage ADSR: control needs to redraw top half of popup window whenever a value changes; bottom half is dealt with firmware and handles pot and touch events and shows values for pots automatically like e.g. the four stage ADSR does;
A custom control should have at most 8 values (so it works on Mini as well as mkI/II). On mkI/II there are mapped to middle four pots on each row. UI in webeditor similar to the four stage ADSR to specify MIDI info per control. If Message type is None then value not used, and no knob assigned in popup view.
- For additional flexibility allow to select either a dial, a button or a list as possible control type in the popup window
Allow a custom control to be controlled by more than one pot if the detail window is not shown (i.e when in normal page mode). The pots that could control it are defined by the width and height of the control. (Such controls should only span at most two rows, and only row 1+2, 3+4 or 5+6). Specify in the web editor which value is controlled by which pot.
Additional functions for the LUA interface for custom controls
- define control:setPopupPaintCallback(paintControlPopup)
to set the function to call to draw the (top half of the) popup window; also
called whenever one of the pots is changed- where paintControlPopup(control,value1,…,value8)
is passed the 8 values of the control and uses this to draw the contents of the popup window
- where paintControlPopup(control,value1,…,value8)
- define control:setPopupTouchCallback(touchControlPopup)
to handle touch events while popup is shown - define control:setPopupPotCallback(potControlPopup)
to handle pot events while popup is shown
And add additional fields in the webeditor (like the function and formatter callbacks) to specify these.



