compare lists with existing ones

Oct 13, 2011 at 9:45pm

compare lists with existing ones

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…

Attachments:
  1. barcode.maxpat
#59270
Oct 13, 2011 at 10:52pm

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. –
#213030
Oct 14, 2011 at 3:41am

Thanks Luke,

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

#213031

You must be logged in to reply to this topic.