-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmidiclock.kv
62 lines (59 loc) · 1.66 KB
/
midiclock.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
#:set fs '20sp'
BoxLayout:
orientation: 'vertical'
padding: '10dp'
Image:
size_hint_y: 2
source: 'images/meris_on.png' if app.panel_led else 'images/meris_off.png'
Slider:
id: bpm_slider
size_hint_y: 10
orientation: 'vertical'
cursor_image: 'images/white_slider.png'
cursor_disabled_image: 'images/white_slider_disabled.png'
cursor_size: ('96dp', '96dp')
padding: dp(96/2 + 10)
min: 47
max: 500
value: 60
on_value:
app.mcg.shared_bpm.value = int(bpm_slider.value)
BoxLayout:
Label:
text: 'Range:'
font_size: fs
RangeSpinner:
id: slider_range
values: ['47-500', '400-1000','1200', '1500', '2000', '3000', '6000']
text: '47-500'
font_size: fs
on_text: self.set_min_max()
BoxLayout:
id: box
Label:
text: 'BPM:'
font_size: fs
BoxLayout:
orientation: 'vertical'
Label:
IntegerInput:
size_hint_y: None
text: str(int(bpm_slider.value))
multiline: False
font_size: fs
height: self.minimum_height
Label:
Spinner:
id: port_1
text: 'Select Midi Out'
values: app.midi_ports
font_size: fs
shorten: True
text_size: self.size
valign: 'center'
halign: 'center'
on_text: app.mcg.launch_process(port_1.text)
TapButton:
text: 'Tap'
font_size: fs
on_press: self.process_tap(bpm_slider, slider_range)