Receive an event on global transport stop?

Iain Duncan's icon

It's prob in there somewhere, but I haven't found it yet! Anyone know how I can trigger something on the transport stopping? I can think of a really hack solution involving delaying a bang to a transport object to pick up the state flag change but I imagine there's some better way I'm not thinking of ... :-)

Valery_Kondakoff's icon

Something like this?

broc's icon

The phasor method works well but introduces some variable latency depending on the I/O vector size (about 10ms at size 512). So for good start/stop timing you need to choose the vector size as small as possible.

Iain Duncan's icon

Thanks! So am I understanding that correctly, in that the phasor stops on transport stop because of the lock attribute and then that is caught with the change~ object as no longer changing?

Valery_Kondakoff's icon

Change~ will output 0. only when phasor (and transport) is not running. Then we are comparing change~ output to 0. When the result of comparison goes from zero to non-zero that means transport was stopped. If the result goes from non-zero to zero - the transport was started.

Iain Duncan's icon

Thanks! So I take the delay we're talking about is that we will be waiting until one vector size of calculation after transport stop to notice no more action. In my case, that's no problem. Appreciate the help. :-)