-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathState.py
More file actions
23 lines (20 loc) · 955 Bytes
/
State.py
File metadata and controls
23 lines (20 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class State_Singleton:
_instance = None
def __new__(cls, *args, **kwargs):
if not cls._instance:
cls._instance = super(State_Singleton, cls).__new__(cls, *args, **kwargs)
cls._instance.curr_chord_num = 0
cls._instance.prev_chord_notes = [60,64,67,71]
cls._instance.curr_chord_notes = [60,64,67,71] # starting chord for arp -> C
cls._instance.chord_variation_type = [0]
cls._instance.curr_bass_note = 60
cls._instance.auto_bass = False
cls._instance.auto_bass_type = [0]
cls._instance.root_note = 60
cls._instance.scale = 0 #==> Major
cls._instance.last_execution_time = 0
cls._instance.mute_chords = False
cls._instance.curr_beat = 0
cls._instance.curr_sub_beat = 0
return cls._instance
#def __init__(self): #this is called each time state is retrieved