Forums > MaxMSP

compare lists with existing ones

Oct 13 2011 | 9:45 pm

Hi, i have a barcodescanner and related to scanned items i want to trigger one specific event (out of 100). so first barcode should get randomatic a number up to 100 (urn) and so forth with next barcodes, but the once used barcodes and the number assigned to it should be stored for a later use. therefore i have incoming lists: for each one i want to check if it has been used before and if no, a new number up to 100 should be triggered. if yes, the number that was used before for it should be triggered. i searched the forums, and tried something with coll and dump-message & zl compare, but i always get stack overflow…

  1. barcode.maxpat
Oct 13 2011 | 10:52 pm

Have a look at this patch that uses one [coll] for checking values and one [coll] for inputting new values. It also uses a technique to do one thing if the [coll] finds an entry and another if it doesn’t using the [gate] and [trigger] objects:

-- Pasted Max Patch, click to expand. --

Oct 14 2011 | 3:41 am

Thanks Luke,

works really great. i didn’t think about converting to symbol, but its perfect in this case.

Viewing 3 posts - 1 through 3 (of 3 total)

Forums > MaxMSP