-
Notifications
You must be signed in to change notification settings - Fork 0
/
instrumentrack.py
33 lines (25 loc) · 956 Bytes
/
instrumentrack.py
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
from kivy.app import App
from kivy.uix.scrollview import ScrollView
from kivy.properties import NumericProperty, ObjectProperty, StringProperty, ListProperty
from kivy.metrics import dp
from music_constants import standard_tuning
class InstrumentRack(ScrollView):
key_sig_title_bar = ObjectProperty(None)
root_note_idx = NumericProperty(0)
mode_filter = NumericProperty(0b111111111111)
notes_to_highlight = StringProperty("")
notes_or_octaves = StringProperty("")
scale_text = StringProperty("")
tuning = ListProperty(standard_tuning)
def fold(self, *args):
if self.height == dp(250):
self.height = dp(500)
self.top = self.key_sig_title_bar.y
else:
self.height = dp(250)
self.top = self.key_sig_title_bar.y
class InstrumentDisplayApp(App):
def build(self):
return InstrumentRack()
if __name__ == "__main__":
InstrumentDisplayApp().run()