User Tools

Site Tools


components_js

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
components_js [2019/02/24 15:58]
swiftb0y changed shiftComponent to shiftControl
components_js [2019/04/30 04:09] (current)
ronso Fx: document 'allowFocusWhenParametersHidden'
Line 488: Line 488:
  
 For the shift functionality to work, the shift button of your controller must be mapped to a function that calls the ''​shift''/''​unshift''​ methods of the EffectUnit on button press/​release. Also, if your controller sends different MIDI signals when shift is pressed, map those as well as the unshifted signals to the ''​input''​ method of each Component in your XML file. If the EffectUnit is a property of another [[#​ComponentContainer]] (for example a [[#Deck]]), calling ''​shift''​ and ''​unshift''​ on the parent ComponentContainer will recursively call it on the EffectUnit too (just like it will for any other ComponentContainer). For the shift functionality to work, the shift button of your controller must be mapped to a function that calls the ''​shift''/''​unshift''​ methods of the EffectUnit on button press/​release. Also, if your controller sends different MIDI signals when shift is pressed, map those as well as the unshifted signals to the ''​input''​ method of each Component in your XML file. If the EffectUnit is a property of another [[#​ComponentContainer]] (for example a [[#Deck]]), calling ''​shift''​ and ''​unshift''​ on the parent ComponentContainer will recursively call it on the EffectUnit too (just like it will for any other ComponentContainer).
 +
 +By default an effect can only be focused when the respective GUI unit is expanded: when the focus button of a collapsed unit is pressed, the GUI counterpart is expanded. Accordingly,​ units release the effect focus and switch back to Meta knob mapping as soon as an unit is collapsed.\\
 +However, there are situations when the on-screen parameters of a focused effect can safely stay hidden while the controller is mapped to the parameter knobs. Collapsed units show a focus indicator then. To enable this mode instatiate effect units with '​true'​ added after the effect unit numbers array. For example:
 +<​code=javascript>​
 +MyController.effectUnit = new components.EffectUnit([1,​ 3],true);
 +...
 +</​code>​
 +
  
 ==== Assignment switches ==== ==== Assignment switches ====
 Generally, most controllers should use [[#​EffectAssignmentButton]]s in [[#Deck]]s to enable effect units on decks. If you have a dedicated effects controller that does not manipulate decks, the enableOnChannelButtons provided by EffectUnit would be more appropriate. You can easily create these by calling ''​enableOnChannelButtons.addButton('​CHANNEL_NAME'​)''​ (do not put brackets around the Generally, most controllers should use [[#​EffectAssignmentButton]]s in [[#Deck]]s to enable effect units on decks. If you have a dedicated effects controller that does not manipulate decks, the enableOnChannelButtons provided by EffectUnit would be more appropriate. You can easily create these by calling ''​enableOnChannelButtons.addButton('​CHANNEL_NAME'​)''​ (do not put brackets around the
 CHANNEL_NAME) on the EffectUnit object, then define their ''​midi''​ properties. CHANNEL_NAME) on the EffectUnit object, then define their ''​midi''​ properties.
components_js.txt ยท Last modified: 2019/04/30 04:09 by ronso