mozaic_tips_and_tricks

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
mozaic_tips_and_tricks [2020/07/23 02:30] – [Include Snippets] _kimozaic_tips_and_tricks [2020/08/13 07:54] – Added Long & Short Pad and Shift deteciotn by wim _ki
Line 10: Line 10:
   * [[#Store three unsigned Bytes into a single Variable]]   * [[#Store three unsigned Bytes into a single Variable]]
   * [[#Some Best Practice Tips]]   * [[#Some Best Practice Tips]]
 +  * [[#Detect Long or Short Pad Taps]]
 +  * [[#Detect Long or Short SHIFT Button Taps]]
   * [[#Multi-Line Pad Labels]]   * [[#Multi-Line Pad Labels]]
 +  * [[#Dynamic Letters for Labeling]]
   * [[#Use the SHIFT Button to toggle to HELP View]]   * [[#Use the SHIFT Button to toggle to HELP View]]
   * [[#Use a Knob to toggle 16 Pads View to HELP View]]   * [[#Use a Knob to toggle 16 Pads View to HELP View]]
Line 144: Line 147:
 </code> </code>
  
 +
 +\\ 
 +===== Detect Long or Short Pad Taps =====
 +<html><p align = "right"><small><i>From wim</i></small></p></html>
 +
 +<code>
 +@OnLoad
 +  FillArray downStart,0,16
 +  pressTime = 250
 +@End
 +
 +@OnPadDown
 +  downStart[LastPad] = SystemTime
 +@End
 +
 +@OnPadUp
 +  pad = LastPad
 +  if SystemTime - downStart[pad] < pressTime
 +    Log {Short tap pad }, pad
 +  else
 +    Log {Long tap pad }, pad
 +  endif
 +@End
 +</code>
 +
 +\\ 
 +
 +===== Detect Long or Short SHIFT Button Taps =====
 +<html><p align = "right"><small><i>From wim</i></small></p></html>
 +
 +<code>
 +@OnLoad
 +  shiftStart = 0
 +  pressTime  = 250
 +@End
 +
 +@OnShiftDown
 +  shiftStart = SystemTime
 +@End
 +
 +@OnShiftUp
 +  if SystemTime - shiftStart < pressTime
 +    Log {Short tap SHIFT}
 +  else
 +    Log {Long  tap SHIFT}
 +  endif
 +@End
 +</code>
  
 \\  \\ 
Line 157: Line 208:
   LabelPad 0,{Line 1},{                     },{Line 2}   LabelPad 0,{Line 1},{                     },{Line 2}
   LabelPad 1,{Upper},{ -------------- },{Lower}   LabelPad 1,{Upper},{ -------------- },{Lower}
 +@End
 +</code>
 +
 +\\ 
 +===== Dynamic Letters for Labeling =====
 +<html><p align = "right"><small><i>From -ki</i></small></p></html>
 +The NoteName function of Moazic can be used to dynamically output the letters A-G inside the label string definitions of Knobs, Pads or Logs. This allows to construct labels like ‚Bank A‘ to ‚Bank D‘, or ‚Preset A-1‘ to ‚Preset F-8‘.
 +
 +<code>
 +@OnLoad
 +  ShowLayout 2
 +  ABCDEFG   = [9,11,0,2,4,5,7]
 +
 +  for i = 0 to 15
 +    row = 1 + (i>7)
 +    id  = i%8
 +    if (id < 7)
 +      LabelPad i, {Pad },(NoteName ABCDEFG[id],NO),    },{Row },row
 +    endif
 +  endfor
 @End @End
 </code> </code>
Line 388: Line 459:
 ^PatchStorage  ^Wiki ^OnLoad ^Other ^Callbacks ^Info ^ ^PatchStorage  ^Wiki ^OnLoad ^Other ^Callbacks ^Info ^
 | [[https://patchstorage.com/pad-manager-include/|Pad & Shift Manager]] | [[mozaic_include_pad_and_shift_manager|Documentation]]| optional vars \\ one call| - | 2 | Detect single-/double-/triple-tap and hold interactions for pads or shift| | [[https://patchstorage.com/pad-manager-include/|Pad & Shift Manager]] | [[mozaic_include_pad_and_shift_manager|Documentation]]| optional vars \\ one call| - | 2 | Detect single-/double-/triple-tap and hold interactions for pads or shift|
-| [[https://patchstorage.com/active-notes-tracker/|Active Notes Tracker]] | [[mozaic_include_active_notes_tracker|Documentation]] | one call | note-on / note-off events | - | Manages a list of active notes, velocities and durations for each channel |+| [[https://patchstorage.com/active-notes-tracker/|Active Notes Tracker]] | [[mozaic_include_active_notes_tracker|Documentation]] | optional var \\ one call | note-on / note-off \\ events | - | Manages a list of active notes, velocities and durations for each channel |
 | [[https://patchstorage.com/migration-manager-include/|Migration Manager]] | [[mozaic_include_migration_mananger|Documentation]] | two calls| - | 4 | Migrate script parameters between different script versions | | [[https://patchstorage.com/migration-manager-include/|Migration Manager]] | [[mozaic_include_migration_mananger|Documentation]] | two calls| - | 4 | Migrate script parameters between different script versions |
  • mozaic_tips_and_tricks.txt
  • Last modified: 2024/04/23 19:07
  • by _ki