-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdemo_0_framework.py
More file actions
36 lines (26 loc) · 952 Bytes
/
demo_0_framework.py
File metadata and controls
36 lines (26 loc) · 952 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from modtrack import tracker
import pygame
#################################################################
#PLAY DEFAULT SAMPLES AND TRACK
#################################################################
#init the tracker module
screen=tracker.init(0x40,(100,100))
#make default/internal pattern
tracker.make_pattern()
#play pattern
tracker.play_pattern()
#################################################################
#PLAY WHILE USER DOES NOT QUIT PROGRAM
#################################################################
while True:#player.isAlive():
for event in pygame.event.get():
#Key event
if event.type == pygame.KEYDOWN:
#Close window
if event.key==pygame.K_ESCAPE:
tracker.abort_play()
quit()
# Window Close Button
if event.type == pygame.QUIT:
tracker.abort_play()
quit()