pattr uniqeid for 4 cameras

F_Dos's icon

i have the following patch that should store the id of each camera so it will remember it in everytime I open the patch. It worked great until some days ago one of the camera went blank everytime (it seems like the id of it changed)

it make me wonder if there is something wrong in the names I gave to the [getattr] and [pattr] objects?

I have the same name [getattr uniqueid] repeated 4 times

but 4 different names:

[pattr cam_uniqueid1 @thru 2]

[pattr cam_uniqueid2 @thru 2]

[pattr cam_uniqueid3 @thru 2]

[pattr cam_uniqueid4 @thru 2]

Max Patch
Copy patch and select New From Clipboard in Max.

F_Dos's icon

I checked the above patch with 4 identical but different cameras and it seems to work also when I close and reopen max as well the computer itself. This make me wonder what could make the problem I'm facing on the other computer with other 4 identical cameras?

Rob Ramirez's icon

the first thing I would check is if the ID did in fact change. otherwise, while the logic seems ok, it also seems overly complicated. can you just store the IDs in the object box as an attribute argument?

F_Dos's icon

the first thing I would check is if the ID did in fact change.

The id is the camera itself or the usb port of the computer where the camera is connected to?

what could cause it change the id?

can you just store the IDs in the object box as an attribute argument?

what do you mean by that?