aboutsummaryrefslogtreecommitdiff
path: root/musicsampler.kv
diff options
context:
space:
mode:
Diffstat (limited to 'musicsampler.kv')
-rw-r--r--musicsampler.kv787
1 files changed, 0 insertions, 787 deletions
diff --git a/musicsampler.kv b/musicsampler.kv
deleted file mode 100644
index 4a44069..0000000
--- a/musicsampler.kv
+++ /dev/null
@@ -1,787 +0,0 @@
1#:import math math
2#:import h helpers
3
4<Key>:
5 pad_col_sep: 0 if not self.pad_cols else self.parent.pad_x
6 pad_cols: False
7
8 y: (self.parent.top-self.parent.y) - (self.row) * self.parent.key_size - (self.row - 1) * self.parent.key_sep
9 x: (self.col - 1) * self.parent.key_size + int(self.col - 1) * self.parent.key_sep + self.pad_col_sep
10 size_hint: None, None
11 line_color: 120/255, 120/255, 120/255, 1
12 enabled: True
13 line_width: 2
14 row: 1
15 col: 0
16 key_code: 0
17 key_sym: ""
18 key_width: 1
19 key_height: 1
20 width: self.key_width * (self.parent.key_size + self.parent.key_sep) - self.parent.key_sep
21 height: self.key_height * (self.parent.key_size + self.parent.key_sep) - self.parent.key_sep
22 canvas.before:
23 Color:
24 rgba: self.color
25 RoundedRectangle:
26 pos: self.x, self.y
27 size: self.size
28 canvas:
29 Color:
30 rgba: self.line_color
31 Line:
32 rounded_rectangle: self.x + self.line_width, self.y + self.line_width, self.width - 2 * self.line_width, self.height - 2 * self.line_width, 10
33 width: self.line_width
34 Label:
35 id: key_label
36 font_name: h.path() + "fonts/Ubuntu-B.ttf"
37 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size))
38 color: 0, 0, 0, 1
39 text: self.parent.key_sym
40 text_size: self.parent.width,self.font_size
41 shorten: True
42 shorten_from: "right"
43 split_str: ""
44 center_x: self.parent.x + self.texture_size[0] /2 + 5
45 center_y: self.parent.y + self.parent.height - self.texture_size[1] /2 - 5
46 Label:
47 id: key_description_title
48 font_name: h.path() + "fonts/Ubuntu-Regular.ttf"
49 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size / 2))
50 color: 0, 0, 0, 1
51 text: self.parent.description_title
52 text_size: self.parent.width - 2*self.parent.line_width, self.font_size
53 halign: "right"
54 valign: "middle"
55 center_x: self.parent.x + self.texture_size[0] /2
56 center_y: self.parent.y + self.parent.height - self.texture_size[1] /2 - 5
57 Label:
58 id: key_description
59 font_name: h.path() + "fonts/Ubuntu-Regular.ttf"
60 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size / 2))
61 color: 0, 0, 0, 1
62 text: "\n".join(self.parent.description)
63 text_size: 2 * self.parent.width,self.parent.height - key_label.font_size
64 halign: "left"
65 valign: "middle"
66 pos: self.parent.x + 2 * self.parent.line_width + 2, self.parent.y
67 size_hint: None, None
68 size: 2 * self.parent.width - 2 * self.parent.line_width, self.parent.height - key_label.font_size
69
70<Screen>:
71 canvas:
72 Color:
73 rgba: 229/255, 228/255, 226/255, 1
74 Rectangle:
75 pos: 0, 0
76 size: self.width, self.height
77
78 key_size: int( (3 * self.width - 16) / 56)
79 key_sep: int( self.key_size / 24)
80 key_pad_sep: int( self.key_size / 7) + 1
81
82 border: (self.width - self.key_size * 18 - self.key_sep * 16 - self.key_pad_sep)/ 2
83
84 mapping_height: self.key_size * 6 + self.key_sep * 5
85 mapping_width: self.key_size * 18 + self.key_sep * 16 + self.key_pad_sep
86 mapping_x: self.border
87 mapping_y: self.top - self.mapping_height - self.border
88 action_list_height: self.height - self.mapping_height - 3 * self.border
89 action_list_width: 3 * self.width / 4
90 action_list_x: self.border
91 action_list_y: self.border
92 play_list_height: self.action_list_height
93 play_list_width: self.width - self.action_list_width - 3* self.border
94 play_list_y: self.border
95 play_list_x: self.action_list_width + 2 * self.border
96
97 min_height: min(mock_symbola.height, mock_ubuntu_regular.height, mock_ubuntu_bold.height)
98 symbola_line_height: self.min_height / max(mock_symbola.height,1)
99 ubuntu_regular_line_height: self.min_height / max(mock_ubuntu_regular.height,1)
100 ubuntu_bold_line_height: self.min_height / max(mock_ubuntu_bold.height,1)
101 Label:
102 id: mock_symbola
103 font_name: h.path() + "fonts/Symbola.ttf"
104 font_size: math.ceil(2 * math.sqrt(self.parent.key_size or 10))
105 color: 0, 0, 0, 0
106 text: "A"
107 text_size: None, None
108 size_hint: None, None
109 size: self.texture_size
110 Label:
111 id: mock_ubuntu_regular
112 font_name: h.path() + "fonts/Ubuntu-Regular.ttf"
113 font_size: math.ceil(2 * math.sqrt(self.parent.key_size or 10))
114 color: 0, 0, 0, 0
115 text: "A"
116 text_size: None, None
117 size_hint: None, None
118 size: self.texture_size
119 Label:
120 id: mock_ubuntu_bold
121 font_name: h.path() + "fonts/Ubuntu-B.ttf"
122 font_size: math.ceil(2 * math.sqrt(self.parent.key_size or 10))
123 color: 0, 0, 0, 0
124 text: "A"
125 text_size: None, None
126 size_hint: None, None
127 size: self.texture_size
128
129 Mapping:
130 id: Mapping
131 pos: self.parent.mapping_x, self.parent.mapping_y
132 size: self.parent.mapping_width, self.parent.mapping_height
133
134 key_size: self.parent.key_size
135 key_sep: self.parent.key_sep
136 key_pad_sep: self.parent.key_pad_sep
137 pad_x: self.key_size * 15 + 14 * self.key_sep + self.key_pad_sep
138 ActionList:
139 id: ActionList
140 pos: self.parent.action_list_x, self.parent.action_list_y
141 size: self.parent.action_list_width, self.parent.action_list_height
142 PlayList:
143 id: PlayList
144 pos: self.parent.play_list_x, self.parent.play_list_y
145 size: self.parent.play_list_width, self.parent.play_list_height
146
147<ActionList>:
148 size_hint: None, None
149 canvas:
150 Color:
151 rgba: 250./255, 250./255, 250./255, 1
152 Rectangle:
153 pos: 0, 0
154 size: self.width, self.height
155
156 Label:
157 id: action_list_title
158 font_name: h.path() + "fonts/Ubuntu-B.ttf"
159 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
160 color: 0, 0, 0, 1
161 text: self.parent.action_title
162 text_size: None, self.parent.height
163 halign: "left"
164 valign: "top"
165 size_hint: None, None
166 size: self.texture_size[0], self.parent.height
167 Label:
168 id: action_list_icons
169 font_name: h.path() + "fonts/Symbola.ttf"
170 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
171 line_height: self.parent.parent.symbola_line_height or 1
172 color: 0, 0, 0, 1
173 text: "\n".join(map(lambda x: x[0], self.parent.action_list))
174 text_size: None, self.parent.height
175 halign: "left"
176 valign: "top"
177 size_hint: None, None
178 size: self.texture_size[0], self.parent.height - 3 * self.line_height * self.font_size
179 Label:
180 id: action_list_names
181 font_name: h.path() + "fonts/Ubuntu-Regular.ttf"
182 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
183 line_height: self.parent.parent.ubuntu_regular_line_height or 1
184 color: 0, 0, 0, 1
185 text: "\n".join(map(lambda x: x[1], self.parent.action_list))
186 text_size: None, self.parent.height
187 halign: "left"
188 valign: "top"
189 size_hint: None, None
190 pos: 15, self.y
191 size: self.texture_size[0], self.parent.height - 3 * self.line_height * self.font_size
192
193<PlayList>:
194 size_hint: None, None
195 canvas:
196 Color:
197 rgba: 250./255, 250./255, 250./255, 1
198 Rectangle:
199 pos: 0, 0
200 size: self.width, self.height
201
202 Label:
203 id: playlist_icons
204 font_name: h.path() + "fonts/Symbola.ttf"
205 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
206 line_height: self.parent.parent.symbola_line_height or 1
207 color: 0, 0, 0, 1
208 text: "\n".join(map(lambda x: x[0], self.parent.playlist))
209 text_size: None, self.parent.height
210 halign: "left"
211 valign: "top"
212 size_hint: None, None
213 size: self.texture_size[0], self.parent.height
214 Label:
215 id: playlist_names
216 font_name: h.path() + "fonts/Ubuntu-Regular.ttf" # FIXME: Mettre en gras quand c'est en cours
217 line_height: self.parent.parent.ubuntu_regular_line_height or 1
218 font_size: math.ceil(2 * math.sqrt(self.parent.parent.key_size or 10))
219 color: 0, 0, 0, 1
220 text: "\n".join(map(lambda x: x[1], self.parent.playlist))
221 text_size: None, self.parent.height
222 halign: "left"
223 valign: "top"
224 size_hint: None, None
225 pos: 15, self.y
226 size: self.texture_size[0], self.parent.height
227
228<Mapping>:
229 size_hint: None, None
230 key_size: 48
231 key_sep: 2
232 key_pad_sep: 7
233 pad_x: 755
234 canvas:
235 Color:
236 rgba: 250./255, 250./255, 250./255, 1
237 Rectangle:
238 pos: 0, 0
239 size: self.width, self.height
240 Key:
241 id: Key_27
242 key_code: 27
243 key_sym: "ESC"
244 row: 1
245 col: 1
246 Key:
247 id: Key_282
248 key_code: 282
249 key_sym: "F1"
250 row: 1
251 col: 3
252 Key:
253 id: Key_283
254 key_code: 283
255 key_sym: "F2"
256 row: 1
257 col: 4
258 Key:
259 id: Key_284
260 key_code: 284
261 key_sym: "F3"
262 row: 1
263 col: 5
264 Key:
265 id: Key_285
266 key_code: 285
267 key_sym: "F4"
268 row: 1
269 col: 6
270
271 Key:
272 id: Key_286
273 key_code: 286
274 key_sym: "F5"
275 row: 1
276 col: 7.5
277 Key:
278 id: Key_287
279 key_code: 287
280 key_sym: "F6"
281 row: 1
282 col: 8.5
283 Key:
284 id: Key_288
285 key_code: 288
286 key_sym: "F7"
287 row: 1
288 col: 9.5
289 Key:
290 id: Key_289
291 key_code: 289
292 key_sym: "F8"
293 row: 1
294 col: 10.5
295
296 Key:
297 id: Key_290
298 key_code: 290
299 key_sym: "F9"
300 row: 1
301 col: 12
302 Key:
303 id: Key_291
304 key_code: 291
305 key_sym: "F10"
306 row: 1
307 col: 13
308 Key:
309 id: Key_292
310 key_code: 292
311 key_sym: "F11"
312 row: 1
313 col: 14
314 Key:
315 id: Key_293
316 key_code: 293
317 key_sym: "F12"
318 row: 1
319 col: 15
320
321 Key:
322 id: Key_178
323 key_code: 178
324 key_sym: "ยฒ"
325 row: 2
326 col: 1
327 Key:
328 id: Key_38
329 key_code: 38
330 key_sym: "&"
331 row: 2
332 col: 2
333 Key:
334 id: Key_233
335 key_code: 233
336 key_sym: "รฉ"
337 row: 2
338 col: 3
339 Key:
340 id: Key_34
341 key_code: 34
342 key_sym: '"'
343 row: 2
344 col: 4
345 Key:
346 id: Key_39
347 key_code: 39
348 key_sym: "'"
349 row: 2
350 col: 5
351 Key:
352 id: Key_40
353 key_code: 40
354 key_sym: "("
355 row: 2
356 col: 6
357 Key:
358 id: Key_45
359 key_code: 45
360 key_sym: "-"
361 row: 2
362 col: 7
363 Key:
364 id: Key_232
365 key_code: 232
366 key_sym: "รจ"
367 row: 2
368 col: 8
369 Key:
370 id: Key_95
371 key_code: 95
372 key_sym: "_"
373 row: 2
374 col: 9
375 Key:
376 id: Key_231
377 key_code: 231
378 key_sym: "รง"
379 row: 2
380 col: 10
381 Key:
382 id: Key_224
383 key_code: 224
384 key_sym: "ร "
385 row: 2
386 col: 11
387 Key:
388 id: Key_41
389 key_code: 41
390 key_sym: ")"
391 row: 2
392 col: 12
393 Key:
394 id: Key_61
395 key_code: 61
396 key_sym: "="
397 row: 2
398 col: 13
399 Key:
400 id: Key_8
401 key_code: 8
402 key_sym: "<-"
403 row: 2
404 col: 14
405 key_width: 2
406 Key:
407 id: Key_9
408 key_code: 9
409 key_sym: "tab"
410 row: 3
411 col: 1
412 key_width: 1.48
413 Key:
414 id: Key_97
415 key_code: 97
416 key_sym: "a"
417 row: 3
418 col: 2.5
419 Key:
420 id: Key_122
421 key_code: 122
422 key_sym: "z"
423 row: 3
424 col: 3.5
425 Key:
426 id: Key_101
427 key_code: 101
428 key_sym: "e"
429 row: 3
430 col: 4.5
431 Key:
432 id: Key_114
433 key_code: 114
434 key_sym: "r"
435 row: 3
436 col: 5.5
437 Key:
438 id: Key_116
439 key_code: 116
440 key_sym: "t"
441 row: 3
442 col: 6.5
443 Key:
444 id: Key_121
445 key_code: 121
446 key_sym: "y"
447 row: 3
448 col: 7.5
449 Key:
450 id: Key_117
451 key_code: 117
452 key_sym: "u"
453 row: 3
454 col: 8.5
455 Key:
456 id: Key_105
457 key_code: 105
458 key_sym: "i"
459 row: 3
460 col: 9.5
461 Key:
462 id: Key_111
463 key_code: 111
464 key_sym: "o"
465 row: 3
466 col: 10.5
467 Key:
468 id: Key_112
469 key_code: 112
470 key_sym: "p"
471 row: 3
472 col: 11.5
473 Key:
474 id: Key_94
475 key_code: 94
476 key_sym: "^"
477 row: 3
478 col: 12.5
479 Key:
480 id: Key_36
481 key_code: 36
482 key_sym: "$"
483 row: 3
484 col: 13.5
485 Key:
486 id: Key_13
487 key_code: 13
488 key_sym: "Enter"
489 row: 4
490 col: 14.8
491 key_width: 1.23
492 key_height: 2
493 Key:
494 id: Key_301
495 key_code: 301
496 key_sym: "CAPS"
497 row: 4
498 col: 1
499 key_width: 1.75
500 line_width: 1
501 enabled: False
502
503 Key:
504 id: Key_113
505 key_code: 113
506 key_sym: "q"
507 row: 4
508 col: 2.8
509 Key:
510 id: Key_115
511 key_code: 115
512 key_sym: "s"
513 row: 4
514 col: 3.8
515 Key:
516 id: Key_100
517 key_code: 100
518 key_sym: "d"
519 row: 4
520 col: 4.8
521 Key:
522 id: Key_102
523 key_code: 102
524 key_sym: "f"
525 row: 4
526 col: 5.8
527 Key:
528 id: Key_103
529 key_code: 103
530 key_sym: "g"
531 row: 4
532 col: 6.8
533 Key:
534 id: Key_104
535 key_code: 104
536 key_sym: "h"
537 row: 4
538 col: 7.8
539 Key:
540 id: Key_106
541 key_code: 106
542 key_sym: "j"
543 row: 4
544 col: 8.8
545 Key:
546 id: Key_107
547 key_code: 107
548 key_sym: "k"
549 row: 4
550 col: 9.8
551 Key:
552 id: Key_108
553 key_code: 108
554 key_sym: "l"
555 row: 4
556 col: 10.8
557 Key:
558 id: Key_109
559 key_code: 109
560 key_sym: "m"
561 row: 4
562 col: 11.8
563 Key:
564 id: Key_249
565 key_code: 249
566 key_sym: "รน"
567 row: 4
568 col: 12.8
569 Key:
570 id: Key_42
571 key_code: 42
572 key_sym: "*"
573 row: 4
574 col: 13.8
575 Key:
576 id: Key_304
577 key_code: 304
578 key_sym: "LShift"
579 row: 5
580 col: 1
581 key_width: 1.3
582 line_width: 1
583 enabled: False
584 Key:
585 id: Key_60
586 key_code: 60
587 key_sym: "<"
588 row: 5
589 col: 2.3
590 Key:
591 id: Key_119
592 key_code: 119
593 key_sym: "w"
594 row: 5
595 col: 3.3
596 Key:
597 id: Key_120
598 key_code: 120
599 key_sym: "x"
600 row: 5
601 col: 4.3
602 Key:
603 id: Key_99
604 key_code: 99
605 key_sym: "c"
606 row: 5
607 col: 5.3
608 Key:
609 id: Key_118
610 key_code: 118
611 key_sym: "v"
612 row: 5
613 col: 6.3
614 Key:
615 id: Key_98
616 key_code: 98
617 key_sym: "b"
618 row: 5
619 col: 7.3
620 Key:
621 id: Key_110
622 key_code: 110
623 key_sym: "n"
624 row: 5
625 col: 8.3
626 Key:
627 id: Key_44
628 key_code: 44
629 key_sym: ","
630 row: 5
631 col: 9.3
632 Key:
633 id: Key_59
634 key_code: 59
635 key_sym: ";"
636 row: 5
637 col: 10.3
638 Key:
639 id: Key_58
640 key_code: 58
641 key_sym: ":"
642 row: 5
643 col: 11.3
644 Key:
645 id: Key_33
646 key_code: 33
647 key_sym: "!"
648 row: 5
649 col: 12.3
650 Key:
651 id: Key_303
652 key_code: 303
653 key_sym: "RShift"
654 row: 5
655 col: 13.3
656 key_width: 2.7
657 line_width: 1
658 enabled: False
659 Key:
660 id: Key_306
661 key_code: 306
662 key_sym: "LCtrl"
663 row: 6
664 col: 1
665 key_width: 1.3
666 line_width: 1
667 enabled: False
668 Key:
669 id: Key_311
670 key_code: 311
671 key_sym: "LSuper"
672 row: 6
673 col: 3.3
674 line_width: 1
675 enabled: False
676 Key:
677 id: Key_308
678 key_code: 308
679 key_sym: "LAlt"
680 row: 6
681 col: 4.3
682 line_width: 1
683 enabled: False
684 Key:
685 id: Key_32
686 key_code: 32
687 key_sym: "Espace"
688 row: 6
689 col: 5.3
690 key_width: 5
691 Key:
692 id: Key_313
693 key_code: 313
694 key_sym: "AltGr"
695 row: 6
696 col: 10.3
697 line_width: 1
698 enabled: False
699 Key:
700 id: Key_314
701 key_code: 314
702 key_sym: "Compose"
703 row: 6
704 col: 11.3
705 line_width: 1
706 enabled: False
707 Key:
708 id: Key_305
709 key_code: 305
710 key_sym: "RCtrl"
711 row: 6
712 col: 12.3
713 key_width: 1.3
714 line_width: 1
715 enabled: False
716
717
718 Key:
719 id: Key_277
720 key_code: 277
721 key_sym: "ins"
722 row: 2
723 col: 1
724 pad_cols: True
725 Key:
726 id: Key_278
727 key_code: 278
728 key_sym: "home"
729 row: 2
730 col: 2
731 pad_cols: True
732 Key:
733 id: Key_280
734 key_code: 280
735 key_sym: "pg_u"
736 row: 2
737 col: 3
738 pad_cols: True
739 Key:
740 id: Key_127
741 key_code: 127
742 key_sym: "del"
743 row: 3
744 col: 1
745 pad_cols: True
746 Key:
747 id: Key_279
748 key_code: 279
749 key_sym: "end"
750 row: 3
751 col: 2
752 pad_cols: True
753 Key:
754 id: Key_281
755 key_code: 281
756 key_sym: "pg_d"
757 row: 3
758 col: 3
759 pad_cols: True
760 Key:
761 id: Key_273
762 key_code: 273
763 key_sym: "up"
764 row: 5
765 col: 2
766 pad_cols: True
767 Key:
768 id: Key_274
769 key_code: 274
770 key_sym: "down"
771 row: 6
772 col: 2
773 pad_cols: True
774 Key:
775 id: Key_276
776 key_code: 276
777 key_sym: "left"
778 row: 6
779 col: 1
780 pad_cols: True
781 Key:
782 id: Key_275
783 key_code: 275
784 key_sym: "right"
785 row: 6
786 col: 3
787 pad_cols: True