h6. [[SoundScheduler]] h6(. » [[SoundScheduler SWI Calls|SWI Calls]] h6((. » Sound_QBeat h2. Sound_QBeat h5. (SWI &401C6) |_<^{width:4em}. Entry | | |<^. R0 |<^. 0 to return current beat number | ||<^. -1 to return current bar length | ||<^. <-1 to disable beat counter and set bar length 0 | ||<^. +N to enable beat counter with bar length N (counts 0 to N-1) | |_<^{width:4em}. Exit | | |<^. R0 |<^. current beat number (R0 = 0 on entry), otherwise the previous bar length| h4. Use Sets or reads the beat counter or bar length. The simplest use of this call is to read either the current value of the beat counter or the current bar length. When the beat counter is disabled both it and the bar length are reset to zero. All scheduling occurs relative to the time the scheduling call is issued. When the beat counter is enabled it is reset to zero. It then increments, resetting every time it reaches the programmed bar length (N–1). Scheduling using [[Sound_QSchedule]] then occurs relative to the last bar reset; however, scheduling using [[*QSound]] is still relative to the time the command is issued.