Get current beat

beat  

Returns the beat value for the current thread/live_loop. Beats are advanced only by calls to sleep and sync. Beats are distinct from virtual time (the value obtained by calling vt) in that it has no notion of rate. It is just essentially a counter for sleeps. After a sync, the beat is overridden with the beat value from the thread which called cue.

Introduced in v2.10

Example

# Example 1

use_bpm 120 
puts beat   
sleep 1
puts beat   
use_bpm 2000
sleep 2
puts beat   



#=> The initial beat does not start at 0
#=> 109252.703125
 
#=> 109253.703125
# Changing the BPM makes no difference
 
#=> 109255.703125