In your patch, the Create nodes are assigned to the Update operation, which means they are running every frame. This implies that you are creating a new instance of
Hub, opening it with the
Open node and read its
Attached property, every frame.
I would insert a pad after the Create node and assign it to Create. This way, when your patch starts, the Create operation will be called only once, and the
Hub instance it creates will be stored in the pad. Then, you can call your
Attached operations from that pad.
But you might not want to call the
Open operation every frame, so you have two options here :
- either also assign it to Create so that when your patch starts, you create an instance of
Hub and open it right after
- or right click/configure the
Open node and select
Show Apply. This will create an
Apply input pin that just applies the operation when it’s banged. This way, you can
Open the device with a bang.
Might look like this :