I assume you have either Cantabile Performer since you mentioned you have states. If that is so then you can set up transport position bindings for your state changes.
I hope this helps get you started. Post any questions you might have and we’ll get it going.