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/13 08:29] – Updated 'Include Snippets' _kimozaic_tips_and_tricks [2020/07/30 19:01] – [Multi-Line Pad Labels] Added Dynamic Letters for Labeling _ki
Line 1: Line 1:
 ====== Mozaic: Scripting Tips & Tricks ====== ====== Mozaic: Scripting Tips & Tricks ======
-~~NOTOC~~ {{tag>Mozaic midi_scripting}}+~~NOTOC~~ {{tag>Mozaic midi_scripting tips_and_tricks}}
  
 This wiki page contains programming tips & tricks for [[mozaic_plugin_engine|Mozaic]] This wiki page contains programming tips & tricks for [[mozaic_plugin_engine|Mozaic]]
Line 161: Line 161:
  
 \\  \\ 
 +===== 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
 +</code>
 +
 ===== Use the SHIFT Button to toggle to HELP View ===== ===== Use the SHIFT Button to toggle to HELP View =====
 <html><p align = "right"><small><i>From -ki</i></small></p></html> <html><p align = "right"><small><i>From -ki</i></small></p></html>
Line 378: Line 397:
 <html><p align = "right"><small><i>From -ki</i></small></p></html> <html><p align = "right"><small><i>From -ki</i></small></p></html>
  
-On PatchStorage you can find several 'Include Snippets' that cover specifc problems and that are intended to be appended your own scipt code.+On PatchStorage you can find several 'Include Snippets' that cover specific programming problems and that are intended to be appended your own scipt code.
  
-I tried to make them as 'developer-friendlyas possible and also did extensive testing on each of these includes. The documentation wiki pages  +The snippets can be seen as 'well tested library functions'. For the current available include snippets, you copy their main code to the end of you script and call one or two initialization event functions in your @OnLoad 
-show the snippets source which should be easier to read than inside Mozaic.+The snippet in turn will later call event that you need to define in your code (callbacks).  
 +All of the current available snippets need a timer event to do their work, the snippets are coded in a way that allows to also to work with a timer event that you defined in your script
  
-The snippets can be seen as 'well tested library functions'.+I tried to make them as 'developer-friendlyas possible and also did extensive testing on each of them. The documentation wiki pages show the snippets source at the bottom since its easier to read on the wiki than inside Mozaic.
  
-^PatchStorage  ^Wiki ^Level ^Info ^ +^PatchStorage  ^Wiki ^OnLoad ^Other ^Callbacks ^Info ^ 
-| [[https://patchstorage.com/pad-manager-include/|Pad & Shift Manager]] | not yetEasy Add multi-pad or SHIFT single-tab/double-tab/hold interaction to your scripts +| [[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/migration-manager-include/|Migration Manager]] | [[mozaic_include_migration_mananger|Dokumentation]] | Complex | Migrate script parameters between different script versions |+| [[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 |
  • mozaic_tips_and_tricks.txt
  • Last modified: 2024/04/23 19:07
  • by _ki