Output specific symbol (text) upon receiving a certain number

    Aug 16 2019 | 2:05 pm
    Hey all,
    I'm not seeing/finding the obvious and easy answer to this small problem.
    I have a dial object which outputs numbers from 0 to 5. The numbers are being used on a selector object. What second object do I have to attach to the dial to output some arbitrary text to e.g. the print object? In my "example" I want to output "zero" when a 0 is sent, "foobar" when a 1 is sent, etc.:
    Thank you for helping Timo

    • Aug 16 2019 | 2:44 pm
      Use a [coll @embed 1] object. The syntax is input, output. See the help file for more information. Example: 0, 0; 1, foobar; 2, other_message; ...
    • Aug 16 2019 | 4:19 pm
      Thank you! That did the trick.
      File waveForms.txt: 0, Off; 1, Sine; 2, Triangle; 4, Square; 3, Saw;
    • Aug 17 2019 | 10:07 pm
      Any reason to use a separate txt file for the list? If you use the coll object with the "@embed 1" attribute as recommended, the list is saved inside the Max patch. On a side note, if you want to also control the list directly, instead of slider you could use other UI objects, such as umenu or tab.
    • Aug 18 2019 | 3:35 pm
      Hey! I switched to [coll @embed 1]. Here's my complete patch. Would love your feedback. There are definitly parts that could be implemented in easier and more straightforward ways.