Mercurial > code > home > repos > light9
comparison bin/keyboardcomposer @ 394:0c33ea7d523d
keyboardcomposer: sliders default to true
author | David McClosky <dmcc@bigasterisk.com> |
---|---|
date | Sat, 16 Jun 2007 01:21:33 +0000 |
parents | e43dcabbf9ba |
children | 8a028b896913 |
comparison
equal
deleted
inserted
replaced
393:e43dcabbf9ba | 394:0c33ea7d523d |
---|---|
66 def launch_subcomposer(self, *args): | 66 def launch_subcomposer(self, *args): |
67 subprocess.Popen(["bin/subcomposer", self.name]) | 67 subprocess.Popen(["bin/subcomposer", self.name]) |
68 | 68 |
69 class KeyboardComposer(Frame, SubClient): | 69 class KeyboardComposer(Frame, SubClient): |
70 def __init__(self, root, submasters, current_sub_levels=None, | 70 def __init__(self, root, submasters, current_sub_levels=None, |
71 hw_sliders=False): | 71 hw_sliders=True): |
72 Frame.__init__(self, root, bg='black') | 72 Frame.__init__(self, root, bg='black') |
73 SubClient.__init__(self) | 73 SubClient.__init__(self) |
74 self.submasters = submasters | 74 self.submasters = submasters |
75 self.name_to_subtk = {} | 75 self.name_to_subtk = {} |
76 self.current_sub_levels = {} | 76 self.current_sub_levels = {} |
396 | 396 |
397 if __name__ == "__main__": | 397 if __name__ == "__main__": |
398 parser = OptionParser() | 398 parser = OptionParser() |
399 parser.add_option('--nonpersistent', action="store_true", | 399 parser.add_option('--nonpersistent', action="store_true", |
400 help="don't load or save levels") | 400 help="don't load or save levels") |
401 parser.add_option('--sliders', action='store_true', | 401 parser.add_option('--no-sliders', action='store_true', |
402 help="attach to hardware sliders") | 402 help="attach to hardware sliders") |
403 opts, args = parser.parse_args() | 403 opts, args = parser.parse_args() |
404 | 404 |
405 s = Submasters() | 405 s = Submasters() |
406 | 406 |
408 tl = toplevelat("Keyboard Composer", existingtoplevel=root) | 408 tl = toplevelat("Keyboard Composer", existingtoplevel=root) |
409 | 409 |
410 startLevels = None | 410 startLevels = None |
411 if opts.nonpersistent: | 411 if opts.nonpersistent: |
412 startLevels = {} | 412 startLevels = {} |
413 kc = KeyboardComposer(tl, s, startLevels, hw_sliders=opts.sliders) | 413 kc = KeyboardComposer(tl, s, startLevels, hw_sliders=not opts.no_sliders) |
414 kc.pack(fill=BOTH, expand=1) | 414 kc.pack(fill=BOTH, expand=1) |
415 | 415 |
416 for helpline in ["Bindings: B3 mute; C-l edit levels in subcomposer"]: | 416 for helpline in ["Bindings: B3 mute; C-l edit levels in subcomposer"]: |
417 tk.Label(root,text=helpline, font="Helvetica -12 italic", | 417 tk.Label(root,text=helpline, font="Helvetica -12 italic", |
418 anchor='w').pack(side='top',fill='x') | 418 anchor='w').pack(side='top',fill='x') |