File: 07_basic_clock.py

package info (click to toggle)
python-renardo-lib 0.9.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,220 kB
  • sloc: python: 10,999; sh: 34; makefile: 7
file content (20 lines) | stat: -rw-r--r-- 574 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Tutorial 7: Clock Basics


# To stop all player objects, you can press Ctrl+.  (Hold Ctrl and hit the period)
# Which is a shortcut for the command:
Clock.clear()

# Change the tempo (this takes effect at the next bar) Default is 120.
Clock.bpm = 144

# To see what is scheduled to be played.
print(Clock)

# To see what the latency is
print(Clock.latency)

# Sometimes you want to know when the start of the next X beat cycle. To
# do this we use the 'mod' method. For example if we want to see when
# the start of the next 32 beat cycle is we can do
print(Clock.mod(32))