-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.kv
122 lines (112 loc) · 3.31 KB
/
main.kv
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<MainPage>:
keysigtitlebar: keysigtitlebar
fretboard: instrumentrack.fretboard
piano: instrumentrack.piano
songbuilder: songbuilder
songplayer: songplayer
KeySigTitleBar:
id: keysigtitlebar
key_sig_text: keysigchooser.key_sig_text
root_note_idx: keysigchooser.root_note_idx
mode_filter: keysigchooser.mode_filter
scale_text: scaleoptionschooser.scale_text
notes_to_highlight: scaleoptionschooser.notes_to_highlight
notes_or_octaves: scaleoptionschooser.notes_or_octaves
InstrumentRack:
id: instrumentrack
top: keysigtitlebar.y
key_sig_title_bar: keysigtitlebar
root_note_idx: keysigchooser.root_note_idx
mode_filter: keysigchooser.mode_filter
notes_to_highlight: scaleoptionschooser.notes_to_highlight
notes_or_octaves: scaleoptionschooser.notes_or_octaves
scale_text: scaleoptionschooser.scale_text
tuning: tuner.tuning
SongPlayer:
id: songplayer
instrument_rack: instrumentrack
top: self.top_prop
Tuner:
id: tuner
Metronome:
id: metronome
KeySigChooser:
id: keysigchooser
ScaleOptionsChooser:
id: scaleoptionschooser
ChordDisplay:
id: chorddisplay
instrument_rack: instrumentrack
root_note_idx: keysigchooser.root_note_idx
mode_filter: keysigchooser.mode_filter
tuner_tuning: tuner.tuning
SongBuilder:
id: songbuilder
height: root.height - 50
# Toolbar
ToolbarToggleButton:
id: btn1
text: 'Tuner'
pos: (0, 0)
group: 'current_tool'
on_state: tuner.slide(self.state)
ToolbarToggleButton:
id: btn2
text: 'Metronome'
x: btn1.right
group: 'current_tool'
on_state: metronome.slide(self.state)
ToolbarToggleButton:
id: btn3
text: 'Choose Key Signature'
x: btn2.right
group: 'current_tool'
on_state: keysigchooser.slide(self.state)
ToolbarToggleButton:
id: btn4
text: 'Highlight Options'
x: btn3.right
group: 'current_tool'
on_state: scaleoptionschooser.slide(self.state)
ToolbarToggleButton:
id: btn5
text: 'Show Chord Display'
x: btn4.right
group: 'current_tool'
on_state: chorddisplay.slide(keysigtitlebar, self.state)
ToolbarButton:
id: btn6
text: 'Show Piano'
x: btn5.right
on_press: instrumentrack.fold()
ToolbarButton:
id: btn7
text: 'Song Builder'
x: btn6.right
on_press: songbuilder.slide(keysigtitlebar)
ToolbarButton:
id: btn8
text: 'Song Library'
x: btn7.right
on_press: songplayer.show_song_library()
ToolbarButton:
id: btn9
text: 'Log in to Spotify'
x: btn8.right
on_press: root.show_spotify_login_popup()
ToolbarButton:
id: btn10
text: 'Play Song'
x: btn9.right
on_press: root.play(songplayer)
ToolbarButton:
id: btn11
text: 'Stop Song'
x: btn10.right
on_press: root.stop(songplayer)
<ToolbarButton@Button>:
size_hint: [None, None]
size: [150, 50]
<ToolbarToggleButton@ToggleButton>:
size_hint: [None, None]
size: [150, 50]