2 # -*- coding: utf-8 -*-
8 time
= float(jack
.get_current_transport_frame()) / jack
.get_sample_rate()
9 print "current time: %f s" % time
11 #testing state set/get
13 state
= jack
.get_transport_state()
15 jack
.TransportStopped
:"stopped",
16 jack
.TransportRolling
:"rolling",
17 jack
.TransportStarting
:"starting"
19 print("current state is %i (%s)"% (state
, statename
))
21 #testing position set/get
22 from time
import sleep
23 jack
.attach("transporter.py")
24 print ("getting current time")
26 print ("going to frame 0")
27 jack
.transport_locate(0)
30 print ("getting current time")
34 print ("going to 6 sec")
35 jack
.transport_locate(jack
.get_sample_rate()*6)
38 print ("getting current time")
41 print ("TransportStopped: %i" % jack
.TransportStopped
)
42 print ("TransportRolling: %i" % jack
.TransportRolling
)
43 print ("TransportStarting: %i" % jack
.TransportStarting
)
47 jack
.transport_start()