Coll -- output if no index found

    MaxMSP

    Anthony Prechtl's icon
    Anthony Prechtl's icon
    Anthony Prechtl
    Sep 03 2010 | 4:26 am
    I am trying to figure out how to get a bang or any other type of message from [coll] if you try to retrieve data at a certain index, but it does not have any data for that index. By itself, [coll] will simply do nothing if you send it an index value for which it has no data, but I need some way of knowing that it couldn't find any data for that index. Any suggestions would be greatly appreciated!
    Max Patcher
    In Max, select New From Clipboard.
    Show Text
    I tried to make an example patch (below). In this example, I want it to print the stored values, or "not found" if it doesn't find any value at the queried index.

    • Chris Muir's icon
      Chris Muir's icon
      Chris Muir
      Sep 03 2010 | 4:43 am
      Max Patcher
      In Max, select New From Clipboard.
      Here's a solution using onebang:
      Share
    • Anthony Prechtl's icon
      Anthony Prechtl's icon
      Anthony Prechtl
      Sep 03 2010 | 4:49 am
      Thanks, that's perfect, and very simple!
    • musinou's icon
      musinou's icon
      musinou
      Aug 19 2015 | 8:23 pm
      CHRIS MUIR, that is neat.