from .helpers import parse_args, register_fonts, path parse_args() import kivy kivy.require("1.9.1") from kivy.app import App from kivy.uix.floatlayout import FloatLayout from kivy.uix.relativelayout import RelativeLayout from kivy.properties import ListProperty, StringProperty from kivy.core.window import Window from kivy.lang import Builder register_fonts() from .key import Key from .mapping import Mapping from .app_blocks.actionlist import * from .app_blocks.playlist import * class KeyList(RelativeLayout): keylist = ListProperty([]) first_key = StringProperty("") second_key = StringProperty("") third_key = StringProperty("") def append(self, value): self.keylist.insert(0, value) def on_keylist(self, instance, new_key_list): if len(self.keylist) > 0: self.first_key = self.keylist[0] if len(self.keylist) > 1: self.second_key = self.keylist[1] if len(self.keylist) > 2: self.third_key = self.keylist[2] class Screen(FloatLayout): pass class MusicSamplerApp(App): def build(self): Window.size = (913, 563) return Screen() def main(): Builder.load_file(path() + "/music_sampler.kv") MusicSamplerApp().run()