Differences
This shows you the differences between two versions of the page.
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' _ki | mozaic_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> | + | ~~NOTOC~~ {{tag> |
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 ===== | ||
+ | < | ||
+ | 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‘. | ||
+ | |||
+ | < | ||
+ | @OnLoad | ||
+ | ShowLayout 2 | ||
+ | ABCDEFG | ||
+ | |||
+ | for i = 0 to 15 | ||
+ | row = 1 + (i>7) | ||
+ | id = i%8 | ||
+ | if (id < 7) | ||
+ | LabelPad i, {Pad },(NoteName ABCDEFG[id], | ||
+ | endif | ||
+ | endfor | ||
+ | @End | ||
+ | </ | ||
+ | |||
===== Use the SHIFT Button to toggle to HELP View ===== | ===== Use the SHIFT Button to toggle to HELP View ===== | ||
< | < | ||
Line 378: | Line 397: | ||
< | < | ||
- | On PatchStorage you can find several ' | + | On PatchStorage you can find several ' |
- | I tried to make them as 'developer-friendly' | + | 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 | + | The snippet in turn will later call event that you need to define in your code (callbacks). |
+ | All of the current available | ||
- | The snippets can be seen as 'well tested library functions'. | + | I tried to make them as 'developer-friendly' |
- | ^PatchStorage | + | ^PatchStorage |
- | | [[https:// | + | | [[https:// |
- | | [[https:// | + | | [[https:// |
+ | | [[https:// |