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…
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. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 824.3oc2XtsbaBCDF9Z7SgFtNMiVg3TuqOGcxjALpNJCV3AjaygIu6ED3Dhq IbPHk1dgMiVXj90G+6JIddiiaZwCrJWzWQeG4377FGGUnl.Ncscb2m7v17jJ 0i4JX+pH8d2qZukj8fTE9PIWHOE8GEBYE+IVyc.x03tvhi6KNJyYRUOcJJOS 0A0c5W.Z+dPjrW0Cteqjmje5NGRjauiK1caIaqrU3DHndLPj.ZyEO0+D70Xz MuMvbwowEZh8xlMM+c0Dmz6YUUI6X+wrdaNKobVyZnKZaH4iGXsyAW2WUaOf 3uHd3G1hCeENTMfngvAYA3ntCRYyadSFZdqrMH2zDwtKi.hVdBZifP9302SL Phv1h7bTkrnjMK9PGzWbUueWDP3EAH.qrGjnXEfhu1+CATWvpjexxtsdXq6m aSjxRd5QYaADmW4jiKq1enTHVEPQ1UhuGJYGXhrEf34k5Qi0Bqs0hh7slu6o bz8Ebw5jTNnYiFoEUZyFiFIajrdTQVT839zhbSZT70BIPXW9msLJGKE0CN1N UuoKaEcHHnObf+q7KdKCIgpJJ.1yx9EIJGktdkUFzp.A5jGAwpKgisN15wkc IRFBPfAsJfmVHIr0pPsW1CBi3qZgklKWjLDsRhnp5JAXqYVr9tBAPK.Q7+2Z Wgx5Lwbz7Ja6Mh2aX1p0NtiTqlEEYuSoFiBQAHeCVnZY6Jr6Dp9JTPMv4TGB H.hf7LJPBV3gVIeN.oAGTiBjktOP7moCgZPfPzoFx7Ah5Iby4hy+ZepAoI96 oTUwwxsml.m9NLn2FnLVkjKRj7BQuGp4C306gtimkwD8+Xe64YGpOkprSDna t36ropIJcBZ5LgOplfPe0pddsawl7VKMUq+TDKddhs9bRMpKRcbI.nu1RSs1 rDW8Rpi7116cOjoeaC3o3.8rpCToIxHZhZWMc1vM.m.6xIhAd2AQdM9cHD2y 8qZoqZgonVhcIXvDxHo1s9KLImVf84zXZh5a2LxoT5u4Sq921ZmJMYuJ7mgf AzTrc4TrAV1dMplBq79dzTSSp.+LwTWI8vnd02Cizt7N0DRMH1DRMv.RkP.S H0HSH0vIX.pa7xleCDoJt0C -----------end_max5_patcher-----------
works really great. i didn’t think about converting to symbol, but its perfect in this case.
Forums > MaxMSP