Dynamic Pad Label

Mozaic has no string variables. You can only feed a combination of numeric variables and string constants into the Label and Log functions. This is an example of the code needed to label ONE pad with text based on the settings of FOUR knobs each having FOUR possible settings. Be warned, theres a lot of code…

One comments on “Dynamic Pad Label
  • -ki on said:

    I can fully understand your pain ;-)

    .

    With my two proposed functions all the 681 lines of code you needed for that if-cascade would collapse into just two:

    …. SetStringConstant 0,{B},{T},{A},{S}

    …. LabelPad Register, {Part Registers },(GetConstant RegisterVal[0]),{.},(GetConstant RegisterVal[1]),{.},(GetConstant RegisterVal[2]),{.},(GetConstant RegisterVal[3])

    The second line wouldn‘t be that long, if a) your variable name was shorter and b) the ‚GetConstant‘ function name would be shorter, like when using ‚String‘ and ‚SetString‘ as new names

    …. LabelPad Register, {Part Registers },(String reg[0]),{.},(String reg[1]),{.},(String reg[2]),{.},(String reg[3])

  • Leave a Reply

    • Platform:
    • Category: Other
    • Revision: 1.0
    • License: The Unlicense
    • Modified: 4 years ago
    • Views: 83
      Likes: 1
      Downloads: 11
    Download
    Chat