-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsymphonium.kv
148 lines (136 loc) · 3.28 KB
/
symphonium.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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#:import w kivy.core.window
#root
FloatLayout:
Label:
text: 'loading...'
<Button,Label>
font_name: "Data/font/kiwischoolhandwritingregular.ttf"
font_size: '24sp'
<Pad>:
canvas:
Color:
rgb: (1, 1, 1)
Color:
rgba: self.color
Rectangle:
pos: self.pos
size: self.size
source: getattr(self, 'background_%s_%s' % (self.state, self.playing))
<SplashScreen>:
background: background
title: title
AnchorLayout:
on_touch_down: app.showMain()
Scatter:
id: background
do_rotation: False
do_translation: False
do_scale: False
Image:
source: 'Data/images/music-notes-hd-wallpapers.jpg'
width: root.width
height: root.height
allow_stretch: True
keep_ratio: False
Label:
id: title
color: [0, 0, 0, 0.9]
font_name: "Data/font/FREEBSC_.ttf"
text: ' Symphonium'
font_size: '182sp'
<MainScreen>:
grid: grid
BoxLayout:
orientation: 'horizontal'
BoxLayout:
orientation: 'vertical'
Label:
color: [0.9, 0.9, 0.9, 1]
font_name: "Data/font/FREEBSC_.ttf"
text: ' Symphonium'
font_size: '50sp'
Label:
text: 'BPM: %d' % app.bpm
Button:
text: 'Tempo up'
on_press: app.tempo_up()
Button:
text: 'Tempo down'
on_press: app.tempo_down()
Button:
text: 'Continue' if app.paused else 'Pause'
on_press: app.toggle_pause()
Button:
text: 'Clear'
on_press: app.reset()
Button:
text: 'Transpose up'
on_press: app.transpose_up()
Button:
text: 'Transpose down'
on_press: app.transpose_down()
Button:
text: 'Intrument: %s' % app.instrument
on_press: app.instrument_list.open()
Button:
text: 'Load song'
on_press: app.preset_list.open()
Button:
text: 'Game of life (%s)' % ( 'on' if app.game_of_life else 'off')
on_press: app.toggle_game_of_life()
Button:
text: 'Help'
on_press: app.help.open()
BoxLayout:
orientation: 'vertical'
size_hint: .1,1
StackLayout:
id: grid
orientation: 'lr-bt'
size_hint: None, None
width: min(w.Window.height, w.Window.width)
height: min(w.Window.height, w.Window.width)
<PresetList>:
size_hint: (0.5, 0.5)
BoxLayout:
orientation: 'vertical'
Button:
text: 'Song 1'
on_press: app.load_preset('song1')
Button:
text: 'Song 2'
on_press: app.load_preset('song2')
Button:
text: 'Game of life 1'
on_press: app.load_preset('game1')
Button:
text: 'Game of life 2'
on_press: app.load_preset('game2')
Button:
text: 'Game of life 3'
on_press: app.load_preset('game3')
<InstrumentList>:
size_hint: (0.5, 0.3)
BoxLayout:
orientation: 'vertical'
Button:
text: 'Kalimba'
on_press: app.load_kalimba(); root.dismiss()
Button:
text: 'Oud'
on_press: app.load_oud(); root.dismiss()
<Help>:
size_hint: (0.8, 0.8)
BoxLayout:
orientation: 'vertical'
Label:
color: [0.9, 0.9, 0.9, 1]
font_name: "Data/font/FREEBSC_.ttf"
text: ' Symphonium'
font_size: '72sp'
Label:
text: 'Press cells from the matrix to play the notes from a scale.\n\nFor the Kalimba instrument, the scale is a pentatonic.\n\nFor the oud instrument, the scale is a byzantine.'
Button:
size_hint: (1.0, 0.2)
text: 'Back'
on_press: root.dismiss()