gtklick-0.6.4/0000755000175000017500000000000011336075333011255 5ustar dasdasgtklick-0.6.4/bin/0000755000175000017500000000000011336074640012025 5ustar dasdasgtklick-0.6.4/bin/gtklick0000644000175000017500000000127111336074640013401 0ustar dasdas#!/usr/bin/env python # -*- coding: utf-8 -*- # # gtklick # # Copyright (C) 2008-2010 Dominic Sacré # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. from gtklick.gtklick import GTKlick import sys import os.path bin_dir = os.path.abspath(os.path.dirname(sys.argv[0])) share_dir = os.path.join(os.path.split(bin_dir)[0], 'share/gtklick') locale_dir = os.path.join(os.path.split(bin_dir)[0], 'share/locale') app = GTKlick(sys.argv[1:], share_dir, locale_dir) app.run() gtklick-0.6.4/NEWS0000644000175000017500000000340111336074640011752 0ustar dasdas2010-02-14: gtklick 0.6.4 * Updated spanish translation. * Removed unnecessary checks for runtime depencies from setup.py. 2010-01-28: gtklick 0.6.3 * Added spanish translation by Pablo Fernández. 2009-07-09: gtklick 0.6.2 * Added russian translation, thanks to Damir Abdullin. * Slightly changed the program icon to make it more visible on a dark background. 2009-01-29: gtklick 0.6.1 * Changed keyboard shortcuts for tempo, volume and start/stop to work without the Ctrl key. * Added a menu icon. 2009-01-24: gtklick 0.6.0 * Fixed a bug that caused a crash at startup. * Fixed a crash when removing JACK ports in the preferences dialog. * Added support for gettext, and a german translation. Translations for other languages are welcome. 2009-01-14: gtklick 0.5.0 * Added capability to load custom audio samples, and to change the sound's pitch. * Changed the speed trainer so that the regular tempo setting is now the upper limit. * klick 0.11.0 or later is now required. 2008-12-03: gtklick 0.4.0 * Allow manual selection of JACK ports to connect to. * Some minor fixes. 2008-10-24: gtklick 0.3.0 * It's now possible to save and restore profiles. * Lots of minor bugfixes and cleanup. 2008-10-17: gtklick 0.2.0 * Added speed trainer and pattern editor. 2008-08-17: gtklick 0.1.3 * Work around a GTK quirk that prevented the about dialog from showing up. 2008-08-14: gtklick 0.1.2 * Terminate klick correctly on file->quit from the main menu. * Some code cleanup. 2008-08-13: gtklick 0.1.1 * Increased timeout when starting klick, to work around some liblo strangeness (slow startup under certain circumstances, e.g. with avahi-daemon running). 2008-08-11: gtklick 0.1.0 * Initial release. gtklick-0.6.4/setup.py0000755000175000017500000000461511336074640013000 0ustar dasdas#!/usr/bin/env python from distutils.core import setup from distutils.dep_util import newer from distutils.log import info from distutils.command.build import build from distutils.command.install_data import install_data from distutils.command.clean import clean import sys import subprocess import glob import os import shutil if sys.hexversion < 0x02050000: sys.exit("sorry, python 2.5 or higher is required") try: subprocess.Popen(['msgfmt'], stderr=subprocess.PIPE) except OSError: sys.exit("couldn't run msgfmt, please make sure gettext is installed") mo_files = [] class build_with_i18n(build): def run(self): for po in glob.glob('po/*.po'): lang = os.path.basename(po)[:-3] mo_dir = os.path.join(self.build_base, 'locale', lang, 'LC_MESSAGES') mo = os.path.join(mo_dir, 'gtklick.mo') if not os.path.isdir(mo_dir): info("creating %s" % mo_dir) os.makedirs(mo_dir) if newer(po, mo): info("compiling %s to %s" % (po, mo)) subprocess.Popen(['msgfmt', '-o', mo, po]) lang_dir = os.path.join('share', 'locale', lang, 'LC_MESSAGES') mo_files.append((lang_dir, [mo])) build.run(self) class install_data_with_i18n(install_data): def run(self): self.data_files.extend(mo_files) install_data.run(self) class clean_with_i18n(clean): def run(self): clean.run(self) locale_dir = os.path.join(self.build_base, 'locale') if self.all and os.path.exists(locale_dir): info("removing %s (and everything under it)" % locale_dir) try: shutil.rmtree(locale_dir) except: pass setup( name = 'gtklick', version = '0.6.4', author = 'Dominic Sacre', author_email = 'dominic.sacre@gmx.de', url = 'http://das.nasophon.de/gtklick/', description = 'a simple GTK metronome based on klick', license = 'GPL', scripts = ['bin/gtklick'], packages = ['gtklick'], data_files = [ ('share/gtklick', ['share/gtklick.glade', 'share/gtklick.png']), ('share/applications', ['share/gtklick.desktop']), ('share/pixmaps', ['share/gtklick.xpm', 'share/gtklick.png']), ], cmdclass = { 'build': build_with_i18n, 'install_data': install_data_with_i18n, 'clean': clean_with_i18n, } ) gtklick-0.6.4/README0000644000175000017500000000052211330420311012114 0ustar dasdasgtklick - a simple GTK metronome based on klick Copyright (C) 2008-2010 Dominic Sacré Requirements: ============= * klick >= 0.11.0 [http://das.nasophon.de/klick/] * pyliblo >= 0.7.0 [http://das.nasophon.de/pyliblo/] * Python >= 2.5 * PyGTK Installation: ============= ./setup.py build ./setup.py install gtklick-0.6.4/share/0000755000175000017500000000000011225227622012354 5ustar dasdasgtklick-0.6.4/share/gtklick.desktop0000644000175000017500000000023111137747723015406 0ustar dasdas[Desktop Entry] Name=gtklick Comment=A Simple Metronome Exec=gtklick Icon=gtklick Type=Application Terminal=false Categories=AudioVideo;Audio;Music;GTK; gtklick-0.6.4/share/gtklick.xpm0000644000175000017500000000466111225227622014541 0ustar dasdas/* XPM */ static char * gtklick_xpm[] = { "32 32 85 1", " c None", ". c #F9F9F9", "+ c #BCBCBC", "@ c #B7B7B7", "# c #B0B0B0", "$ c #FFFFFF", "% c #666666", "& c #000000", "* c #F0F0F0", "= c #555555", "- c #090909", "; c #777777", "> c #989898", ", c #A0A0A0", "' c #A9A9A9", ") c #010101", "! c #373737", "~ c #FAFAFA", "{ c #181818", "] c #686868", "^ c #D4D4D4", "/ c #757575", "( c #EBEBEB", "_ c #282828", ": c #747474", "< c #050505", "[ c #272727", "} c #383838", "| c #7D7D7D", "1 c #525252", "2 c #999999", "3 c #393939", "4 c #EEEEEE", "5 c #0A0A0A", "6 c #CECECE", "7 c #0C0C0C", "8 c #5C5C5C", "9 c #717171", "0 c #BDBDBD", "a c #2C2C2C", "b c #FCFCFC", "c c #202020", "d c #CACACA", "e c #020202", "f c #808080", "g c #696969", "h c #9A9A9A", "i c #DDDDDD", "j c #F7F7F7", "k c #101010", "l c #636363", "m c #434343", "n c #A6A6A6", "o c #E9E9E9", "p c #232323", "q c #A4A4A4", "r c #454545", "s c #B8B8B8", "t c #030303", "u c #F4F4F4", "v c #0F0F0F", "w c #E1E1E1", "x c #767676", "y c #676767", "z c #828282", "A c #333333", "B c #C6C6C6", "C c #FEFEFE", "D c #222222", "E c #C8C8C8", "F c #2A2A2A", "G c #C0C0C0", "H c #8C8C8C", "I c #5E5E5E", "J c #E4E4E4", "K c #040404", "L c #F1F1F1", "M c #0B0B0B", "N c #4E4E4E", "O c #9C9C9C", "P c #AFAFAF", "Q c #3A3A3A", "R c #909090", "S c #8B8B8B", "T c #DFDFDF", " ", " ", " .+@@@@# ", " $%&&&&&&& ", " *= *-&&&&&&&& ", " $;&& $>&& ,&& ", " ')&& $!&& ~{&& ", " ]&& ^&& /&& ", " (_&& $:&& ^&& ", " +<&[.{&& $}&& ", " |&&1&& 2&& ", " 3&&&& 45&& ", " 67&&& 8&& ", " $9&&& 0&& ", " $a&&& bc&& ", " $d&&e&& f&& ", " $g&&h&&& ie& ", " jk&& l&& $m&& ", " $n&& op&& q&& ", " $r&& st&& uv&& ", " we& x&& y&& ", " $z&& A&& B&& ", " CD&& E-&& $F&& ", " $G&& z&& H&& ", " $I&& JK& ", " LM&& $N&& ", " $O&& P&& ", " $Q&vRRRRRRRRRRRRRRRRRRRRSe&& ", " T&&&&&&&&&&&&&&&&&&&&&&&&&&& ", " &&&&&&&&&&&&&&&&&&&&&&&&&&& ", " ", " "}; gtklick-0.6.4/share/gtklick.png0000644000175000017500000000315511225227622014516 0ustar dasdasPNG  IHDR00WsRGB'IDAThYYlUf2](4,))!8 $S `ibC_*b54Cbmć MRCCX[6L2C;k~Cnnrɹs6|=2D`<dx^F#p:{W\tM3<n{lUUzzzbᮮ_CN,B$|I;vg4!DBvq$H2;;{4!X+Hr"++x+IɓvCqqqu8fnN4I&`BzZB,F6:u޽{\p @ $ma"˓ofnf ^oWQQ BVSlfGGfL˗/3##CvAH</^,b $Ν p]ѩ +W0&r9zztXvZ#@:_dUU,?H|ΖAua;33sq$  {}˖-!+ҒIV;vl,X={UmW^UQ^V0~ƍ#._N"dII|o]s ?>Zp.jkke7$iIE"~V|/ivǒtl޼Y 7f,Y򛘮{%ɡ,~V>}Z 5 $ʢ)XLғ+#d$~xw-x[o dMMM$yg *_ uLzZIN>]jkk͕NVGh=H*$[ZZ"mcDF=0uuu4JwBVWWFGϟUcw@Ѫ3wٳL_q\w Ic&ٺ|rUSWI.^F"I-c/\0Zz? 8Hk֬>P2jeo>I)S󎈥S*HR>ɓ'nIw~Iz/U$mۦ6`isssPnsPt:#[!^Y{(iit"*3n֮]+/d?$Ϝ9#$}ѢE*TކL&dYYYxťum"kNLi,/}}Z,I{2u?U[nTޏ5s9$[֯_*oN6?^eU1& M}{9!8BJV|ȉctbfΜ)Gq#B[nڷ /Oh}MFd2UjF6N֬ݻjBt jwfY,8@^^ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 5 About gtklick False center-on-parent True dialog window_main False 0.6.4 Copyright © 2008-2010 Dominic Sacré http://das.nasophon.de/gtklick/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Dominic Sacré <dominic.sacre@gmx.de> Damir Abdullin <damir@mimas.ru> (ru) Pablo Fernández <pablo.fbus@gmail.com> (es) Dominic Sacré <dominic.sacre@gmx.de> (de) gtklick.png True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 2 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK end False end 0 GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 5 Preferences False center-on-parent True dialog True True window_main False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 8 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 6 6 6 6 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _Square True True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True True 0 S_ine True True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True True radio_sound_square 1 _Noise True True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True True radio_sound_square 2 Acoustic _bell / click True True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True True radio_sound_square 3 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 2 C_ustom: True True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True True radio_sound_square 4 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 24 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 2 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Audio file for accented beats False False Select audio file for accented beats 24 0 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Audio file for normal beats False False Select audio file for normal beats 24 1 5 0 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False 10 1 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 6 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _Pitch: True scale_pitch_accented False 0 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 4 True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Pitch of accented beats delayed 0 -12 12 1 1 0 True 0 bottom False 4 0 True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Pitch of normal beats delayed 0 -12 12 1 1 0 True 0 bottom False 4 1 1 False 2 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK <b>Sound</b> True label_item 1 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 6 6 6 6 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 2 _Automatically connect to soundcard output True True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True True 0 C_onnect to these ports: True True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True True radio_connect_auto 1 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 24 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 6 True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK automatic automatic in True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False False False 0 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 6 True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Add new JACK connection True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-add False False 0 True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Remove selected connection True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-remove False False 1 False False 1 2 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK <b>Output</b> True label_item 2 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK end gtk-close True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True False False 0 False end 0 GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtklick False gtklick.png True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _File True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-quit True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _Edit True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-preferences True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _View True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Tempo _markings True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _Speed trainer True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _Meter True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _Pattern True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK P_rofiles True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _Help True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _Keyboard Shortcuts True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True False True gtk-dialog-info gtk-about True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True False 0 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 8 8 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0.029999999329447746 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 4 8 8 8 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 8 192 True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 120 40 240 1 10 0 0 False 0 True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 3 4 1 120 1 999 1 10 0 True True if-valid False 1 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 T_ap True True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True False 2 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK <b>_Tempo</b> True True spin_tempo label_item False 0 GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0.029999999329447746 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 4 8 8 8 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 6 Ena_ble True True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True 0 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 1 Sta_rt: True spin_tempo_start 1 True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Start tempo 3 4 1 120 1 999 1 10 0 True True if-valid False 2 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 1 _Increment: True spin_tempo_increment 3 True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Tempo increment in BPM per bar 5 4 1 0.5 -9.9900000000000002 9.9900000000000002 0.01 0.10000000000000001 0 2 True True if-valid False 4 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK <b>Spee_d trainer</b> True True check_speedtrainer_enable label_item 1 GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0.029999999329447746 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 4 8 8 8 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 2 4 6 6 True Eve_n True True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True True _2/4 True True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True True radio_meter_even 1 2 _3/4 True True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True True radio_meter_even 2 3 _4/4 True True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True True radio_meter_even 3 4 _Other: True True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True True radio_meter_even 1 2 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 2 True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 3 3 1 4 1 128 1 10 0 True True False 0 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK / False 3 1 True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 3 3 1 4 1 32 0.5 10 0 True True False 2 1 4 1 2 GTK_FILL True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK <b>_Meter</b> True True label_item False 2 GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0.029999999329447746 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 4 8 8 8 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True 0 True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Reset pattern none False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-undo False False 1 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK <b>_Pattern</b> True True label_item 3 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 6 24 24 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 48 True True True True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 1 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0.11999999731779099 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-media-play 0 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK <b>_Start</b> True True 1 0 GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0.11999999731779099 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-media-stop 0 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK <b>_Stop</b> True True 1 1 0 64 True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Volume 1 0 1 0.01 0.10000000000000001 0 False False 1 False 4 False 0 GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 8 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0.079999998211860657 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 4 8 8 8 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 6 128 True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK automatic automatic in 0 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Create new profile (Ctrl+N) False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-add 0 True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Delete profile (Ctrl+D) False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-remove 1 True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Save profile (Ctrl+S) False True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-save 2 True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Rename profile (Ctrl+E) True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-edit 3 False 1 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK <b>Profi_les</b> True True label_item 0 1 False 1 GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 5 Keyboard shortcuts center-on-parent dialog window_main True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 2 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 8 8 Space Start / stop → Tempo + 1 ← Tempo - 1 ↑ Tempo + 10 ↓ Tempo - 10 PgUp Tempo × 2 PgDn Tempo / 2 Return Tap tempo +/= Volume up - Volume down True 1 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK end gtk-close True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True False False 0 False end 0 gtklick-0.6.4/gtklick/0000755000175000017500000000000011336074640012705 5ustar dasdasgtklick-0.6.4/gtklick/gtklick_config.py0000644000175000017500000001503611336074640016241 0ustar dasdas# -*- coding: utf-8 -*- # # gtklick # # Copyright (C) 2008-2010 Dominic Sacré # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. import ConfigParser import os.path import gobject import re import itertools def make_property(section, option, type_): def getter(self): if type_ is int: try: return self.parser.getint(section, option) except ValueError: # this is only here because i fucked up return int(self.parser.getfloat(section, option)) elif type_ is float: return self.parser.getfloat(section, option) elif type_ is bool: return self.parser.getboolean(section, option) elif type_ is str: return self.parser.get(section, option) def setter(self, value): self.parser.set(section, option, str(type_(value))) return property(getter, setter) class GTKlickConfig(object): prefs_autoconnect = make_property('preferences', 'autoconnect', bool) prefs_connect_ports = make_property('preferences', 'connect_ports', str) prefs_sound = make_property('preferences', 'sound', int) prefs_sound_accented = make_property('preferences', 'sound_accented', str) prefs_sound_normal = make_property('preferences', 'sound_normal', str) prefs_pitch_accented = make_property('preferences', 'pitch_accented', float) prefs_pitch_normal = make_property('preferences', 'pitch_normal', float) view_markings = make_property('view', 'markings', bool) view_meter = make_property('view', 'meter', bool) view_speedtrainer = make_property('view', 'speedtrainer', bool) view_pattern = make_property('view', 'pattern', bool) view_profiles = make_property('view', 'profiles', bool) tempo = make_property('state', 'tempo', int) speedtrainer = make_property('state', 'speedtrainer', bool) tempo_increment = make_property('state', 'tempo_increment', float) tempo_start = make_property('state', 'tempo_start', int) beats = make_property('state', 'beats', int) denom = make_property('state', 'denom', int) pattern = make_property('state', 'pattern', str) volume = make_property('state', 'volume', float) def __init__(self): self.cfgfile = os.path.expanduser('~/.gtklickrc') self.parser = ConfigParser.SafeConfigParser() self.parser.add_section('preferences') self.parser.add_section('view') self.parser.add_section('state') # default values, overridden by read() self.prefs_autoconnect = False self.prefs_connect_ports = '' self.prefs_sound = 0 self.prefs_sound_accented = "" self.prefs_sound_normal = "" self.prefs_pitch_accented = 0.0 self.prefs_pitch_normal = 0.0 self.view_markings = False self.view_meter = True self.view_speedtrainer = False self.view_pattern = False self.view_profiles = False self.tempo = 120 self.speedtrainer = False self.tempo_increment = 0.2 self.tempo_start = 120 self.beats = 4 self.denom = 0 self.pattern = '' self.volume = 1.0 self.prof_re = re.compile('^profile_[0-9]+$') def read(self): self.parser.read(self.cfgfile) self.convert_older_format('state') def write(self): self.parser.write(open(self.cfgfile, 'w')) def get_profiles(self): sections = (x for x in self.parser.sections() if re.match(self.prof_re, x)) numbers = sorted(int(x.split('_')[1]) for x in sections) profiles = [] for n in numbers: try: s = 'profile_%d' % n self.convert_older_format(s) p = Profile( self.parser.get(s, 'name'), self.parser.getint(s, 'tempo'), self.parser.getboolean(s, 'speedtrainer'), self.parser.getfloat(s, 'tempo_increment'), self.parser.getint(s, 'tempo_start'), self.parser.getint(s, 'beats'), self.parser.getint(s, 'denom'), self.parser.get(s, 'pattern') ) profiles.append(p) except: # silently ignore invalid profiles pass return profiles def set_profiles(self, profiles): # store all profiles in config parser for n, p in itertools.izip(itertools.count(), profiles): s = 'profile_%d' % n try: self.parser.add_section(s) except ConfigParser.DuplicateSectionError: pass self.parser.set(s, 'name', p.name) self.parser.set(s, 'tempo', str(p.tempo)) self.parser.set(s, 'speedtrainer', str(p.speedtrainer)) self.parser.set(s, 'tempo_increment', str(p.tempo_increment)) self.parser.set(s, 'tempo_start', str(p.tempo_start)) self.parser.set(s, 'beats', str(p.beats)) self.parser.set(s, 'denom', str(p.denom)) self.parser.set(s, 'pattern', p.pattern) # remove unused profile sections for s in self.parser.sections(): if re.match(self.prof_re, s) and int(s.split('_')[1]) >= len(profiles): self.parser.remove_section(s) def convert_older_format(self, section): # convert tempo_limit (pre 0.5) -> tempo_start if self.parser.has_option(section, 'tempo_limit'): self.parser.set(section, 'tempo_start', str(self.parser.getint(section, 'tempo'))) if self.parser.getboolean(section, 'speedtrainer'): self.parser.set(section, 'tempo', str(self.parser.getint(section, 'tempo_limit'))) self.parser.remove_option(section, 'tempo_limit') class Profile(gobject.GObject): def __init__(self, name, tempo, speedtrainer, tempo_increment, tempo_start, beats, denom, pattern): gobject.GObject.__init__(self) self.name = name self.tempo = tempo self.speedtrainer = speedtrainer self.tempo_increment = tempo_increment self.tempo_start = tempo_start self.beats = beats self.denom = denom self.pattern = pattern gtklick-0.6.4/gtklick/profiles_pane.py0000644000175000017500000001777011336074640016121 0ustar dasdas# -*- coding: utf-8 -*- # # gtklick # # Copyright (C) 2008-2010 Dominic Sacré # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. import gtk import gobject import cgi import gtklick_config import misc class ProfilesPane: def __init__(self, mainwin): self.mainwin = mainwin wtree.signal_autoconnect({ 'on_profile_add': self.on_profile_add, 'on_profile_remove': self.on_profile_remove, 'on_profile_save': self.on_profile_save, 'on_profile_rename': self.on_profile_rename, }) # create treeview. doing this within glade somehow breaks dnd. weird... self.treeview = gtk.TreeView() self.treeview.set_headers_visible(False) self.treeview.set_enable_search(False) self.treeview.set_reorderable(True) widgets['scrolledwindow_profiles'].add(self.treeview) widgets['label_frame_profiles'].set_mnemonic_widget(self.treeview) self.treeview.show() # create model self.model = gtk.ListStore(str, gtklick_config.Profile) self.treeview.set_model(self.model) # create renderer/column self.renderer = gtk.CellRendererText() self.column = gtk.TreeViewColumn(None, self.renderer, markup=0) self.treeview.append_column(self.column) # connect signals self.treeview.get_selection().connect('changed', self.on_selection_changed) self.treeview.connect('row-activated', self.on_row_activated) # create a weak reference to the callback function, to prevent cyclic references. # sometimes PyGTK astounds me... self.renderer.connect('edited', misc.weakref_method(self.on_cell_edited)) self.model.connect('row-changed', self.on_row_changed) self.model.connect('row-deleted', self.on_row_deleted) self.enable_buttons(False) self.idle = misc.run_idle_once(self.idle_handler) self.track_changes = False # populate treeview with profiles from config file for p in config.get_profiles(): self.model.append([cgi.escape(p.name), p]) self.mainwin.state_changed_callback = self.state_changed_callback def on_row_activated(self, w, path, view_column): # reset profile name self.model[path][0] = cgi.escape(self.model[path][1].name) i = self.model.get_iter(path) self.activate_profile(i) def on_selection_changed(self, selection): # reset all profile names, since we don't know which one was previously selected for p in self.model: p[0] = cgi.escape(p[1].name) i = selection.get_selected()[1] if i: self.activate_profile(i) self.enable_buttons(True) else: self.idle.queue() def on_cell_edited(self, cell, path, new_text): self.model[path][0] = cgi.escape(new_text) self.model[path][1].name = new_text # renaming finished, make cell non-editable again self.renderer.set_property('editable', False) def on_row_changed(self, w, path, i): # enable/disable buttons and save profiles. doing this in an idle callback seems to be # the only way to avoid spurious calls while the treeview is in an intermediate state self.idle.queue() def on_row_deleted(self, w, path): self.idle.queue() def on_profile_add(self, b): i = self.model.append(["unnamed", self.current_profile("unnamed")]) # temporarily make cells editable self.renderer.set_property('editable', True) self.treeview.set_cursor(self.model.get_path(i), self.column, start_editing=True) def on_profile_remove(self, b): selection = self.treeview.get_selection() i = selection.get_selected()[1] if i: misc.treeview_remove(self.model, selection, i) # this is needed when removing a newly added profile before 'edited' has been sent self.renderer.set_property('editable', False) def on_profile_save(self, b): selection = self.treeview.get_selection() i = selection.get_selected()[1] if i: path = self.model.get_path(i) # replace selected profile self.model[path][0] = cgi.escape(self.model[path][1].name) self.model[path][1] = self.current_profile(self.model[path][1].name) def on_profile_rename(self, b): selection = self.treeview.get_selection() i = selection.get_selected()[1] if i: # temporarily make cell editable self.renderer.set_property('editable', True) self.treeview.set_cursor(self.model.get_path(i), self.column, start_editing=True) def activate_profile(self, i): v = self.model.get_value(i, 1) # ignore state changes while activating the profile self.track_changes = False # sending and receiving all OSC messages takes, uhm... so we need to wait at least... oh well... gobject.timeout_add(500, lambda: setattr(self, 'track_changes', True)) klick.send('/simple/set_tempo', v.tempo) widgets['spin_tempo_increment'].set_value(v.tempo_increment) widgets['check_speedtrainer_enable'].set_active(v.speedtrainer) klick.send('/simple/set_tempo_increment', v.tempo_increment if v.speedtrainer else 0.0) klick.send('/simple/set_tempo_start', v.tempo_start) if v.denom: misc.do_quietly(lambda: widgets['radio_meter_other'].set_active(True)) else: # focus any radio button other than "other" misc.do_quietly(lambda: widgets['radio_meter_44'].set_active(True)) klick.send('/simple/set_meter', v.beats, v.denom if v.denom else 4) klick.send('/simple/set_pattern', v.pattern) # show all relevant frames if v.speedtrainer: widgets['item_view_speedtrainer'].set_active(True) if (v.beats, v.denom) != (0, 4): widgets['item_view_meter'].set_active(True) if v.pattern != '': widgets['item_view_pattern'].set_active(True) def current_profile(self, name): # create profile from the current state of the GUI if widgets['radio_meter_other'].get_active(): beats = int(widgets['spin_meter_beats'].get_value()) denom = int(widgets['spin_meter_denom'].get_value()) else: beats = 0 if widgets['radio_meter_even'].get_active() else \ 2 if widgets['radio_meter_24'].get_active() else \ 3 if widgets['radio_meter_34'].get_active() else 4 denom = 0 return gtklick_config.Profile( name, int(widgets['spin_tempo'].get_value()), widgets['check_speedtrainer_enable'].get_active(), widgets['spin_tempo_increment'].get_value(), int(widgets['spin_tempo_start'].get_value()), beats, denom, self.mainwin.get_pattern() ) def enable_buttons(self, enable): widgets['btn_profile_remove'].set_sensitive(enable) widgets['btn_profile_save'].set_sensitive(enable) widgets['btn_profile_rename'].set_sensitive(enable) def idle_handler(self): # enable buttons only if a profile is selected i = self.treeview.get_selection().get_selected()[1] self.enable_buttons(bool(i)) # save all profiles self.save_profiles() def save_profiles(self): # save all profiles, write config file config.set_profiles([i[1] for i in self.model]) config.write() def state_changed_callback(self): selection = self.treeview.get_selection() i = selection.get_selected()[1] if i and self.track_changes: path = self.model.get_path(i) self.model[path][0] = "%s" % cgi.escape(self.model[path][1].name) gtklick-0.6.4/gtklick/misc.py0000644000175000017500000001036311336074640014215 0ustar dasdas# -*- coding: utf-8 -*- # # gtklick # # Copyright (C) 2008-2010 Dominic Sacré # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. import gtk import gtk.keysyms import gobject import inspect import weakref, new block = False # decorator: don't call function while gtk signals are blocked def gui_callback(f): def g(self, *args): global block # FIXME: it may be a bad idea to discard arbitrary signals if not block: return f(self, *args) return g # decorator: enclose the function in threads_enter() / threads_leave() to safely call # gtk functions, and block gtk signals while the function is running def osc_callback(f): def g(self, *args): global block try: gtk.gdk.threads_enter() block = True #print args[0], args[1] # call function with the correct number of arguments, to allow osc callbacks to omit # some of pyliblo's callback arguments if inspect.getargspec(f)[1] == None: n = len(inspect.getargspec(f)[0]) - 1 r = f(self, *args[0:n]) else: r = f(self, *args) return r finally: block = False gtk.gdk.threads_leave() return g # block gtk signals while calling function f def do_quietly(f): global block try: block = True return f() finally: block = False class weakref_method: def __init__(self, f): self.inst = weakref.ref(f.im_self) self.func = f.im_func def __call__(self, *args, **kwargs): f = new.instancemethod(self.func, self.inst(), self.inst().__class__) return f(*args, **kwargs) # calls function once when going idle, blocking redundant calls class run_idle_once: def __init__(self, call): self.call = call self.pending = False def queue(self): if not self.pending: self.pending = True gobject.idle_add(self.call_wrapper) def call_wrapper(self): self.pending = False self.call() return False class TristateCheckButton(gtk.CheckButton): def __init__(self, label): gtk.CheckButton.__init__(self, label) self.connect('button-release-event', self.on_button_released) self.connect('key-press-event', self.on_key_pressed) def get_state(self): if self.get_inconsistent(): return 1 elif self.get_active(): return 2 else: return 0 def set_state(self, state): toggle = self.get_inconsistent() != (state == 1) and self.get_active() == (state != 0) self.set_inconsistent(state == 1) self.set_active(state != 0) if toggle: # emit "toggled" manually if "active" didn't change, but "inconsistent" did self.toggled() def on_button_released(self, b, ev): s = ev.get_state() if s & gtk.gdk.CONTROL_MASK: if s & gtk.gdk.BUTTON1_MASK: self.set_state(2) elif s & gtk.gdk.BUTTON2_MASK: self.set_state(1) elif s & gtk.gdk.BUTTON3_MASK: self.set_state(0) else: if s & gtk.gdk.BUTTON1_MASK: self.set_state((self.get_state() - 1) % 3) elif s & gtk.gdk.BUTTON2_MASK: self.set_state(1 if self.get_state() == 2 else 2) elif s & gtk.gdk.BUTTON3_MASK: self.set_state(1 if self.get_state() == 0 else 0) self.queue_draw() return True def on_key_pressed(self, b, ev): if ev.keyval == gtk.keysyms.space: self.set_state((self.get_state() - 1) % 3) self.queue_draw() return True else: return False def treeview_remove(model, selection, i): path = model.get_path(i) model.remove(i) # select next item selection.select_path(path) if not selection.path_is_selected(path): row = path[0]-1 if row >= 0: selection.select_path(row) gtklick-0.6.4/gtklick/preferences_dialog.py0000644000175000017500000001777311336074640017116 0ustar dasdas# -*- coding: utf-8 -*- # # gtklick # # Copyright (C) 2008-2010 Dominic Sacré # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. import gtk import math from klick_backend import make_method from misc import gui_callback, osc_callback import misc class PreferencesDialog: def __init__(self): wtree.signal_autoconnect({ 'on_sound_square_toggled': (self.on_sound_toggled, 0), 'on_sound_sine_toggled': (self.on_sound_toggled, 1), 'on_sound_noise_toggled': (self.on_sound_toggled, 2), 'on_sound_click_toggled': (self.on_sound_toggled, 3), 'on_sound_custom_toggled': (self.on_sound_toggled, -1), 'on_accented_selection_changed':self.on_sound_selection_changed, 'on_normal_selection_changed': self.on_sound_selection_changed, 'on_pitch_accented_changed': self.on_pitch_changed, 'on_pitch_normal_changed': self.on_pitch_changed, 'on_pitch_format_value': self.on_pitch_format_value, 'on_connect_auto_toggled': (self.on_connect_toggled, True), 'on_connect_manual_toggled': (self.on_connect_toggled, False), 'on_connect_add': self.on_connect_add, 'on_connect_remove': self.on_connect_remove, 'on_preferences_delete_event': self.on_delete_event, 'on_preferences_close': self.on_close, }) widgets['vbox_filechoosers'].set_sensitive(config.prefs_sound == -1) # build JACK connection treeview self.treeview_ports = widgets['treeview_connect_ports'] self.model_ports = gtk.ListStore(str) self.treeview_ports.set_model(self.model_ports) self.model_avail = gtk.ListStore(str) renderer = gtk.CellRendererCombo() renderer.set_property('model', self.model_avail) renderer.set_property('text-column', 0) renderer.set_property('editable', True) self.column = gtk.TreeViewColumn(None, renderer, text=0) self.treeview_ports.append_column(self.column) self.treeview_ports.get_selection().connect('changed', self.on_connect_selection_changed) renderer.connect('editing-started', self.on_connect_editing_started) renderer.connect('editing-canceled', self.on_connect_editing_canceled) renderer.connect('edited', self.on_connect_cell_edited) self.model_ports.connect('row-deleted', lambda w, p: self.update_connect_ports()) widgets['btn_connect_remove'].set_sensitive(False) self.ports_avail = [] klick.register_methods(self) # GUI callbacks def on_delete_event(self, w, ev): widgets['dialog_preferences'].hide() return 1 def on_close(self, b): widgets['dialog_preferences'].hide() @gui_callback def on_sound_toggled(self, b, data): if b.get_active(): widgets['vbox_filechoosers'].set_sensitive(data == -1) if data >= 0: klick.send('/config/set_sound', data) else: a = widgets['filechooser_accented'].get_filename() b = widgets['filechooser_normal'].get_filename() if a and b: klick.send('/config/set_sound', a, b) else: # set silent klick.send('/config/set_sound', -1) @gui_callback def on_sound_selection_changed(self, chooser): a = widgets['filechooser_accented'].get_filename() b = widgets['filechooser_normal'].get_filename() if a and b: klick.send('/config/set_sound', a, b) else: # set silent klick.send('/config/set_sound', -1) @gui_callback def on_pitch_changed(self, r): klick.send('/config/set_sound_pitch', 2 ** (widgets['scale_pitch_accented'].get_value() / 12), 2 ** (widgets['scale_pitch_normal'].get_value() / 12) ) def on_pitch_format_value(self, scale, value): return ('+%d' if value > 0.0 else '%d') % value @gui_callback def on_connect_toggled(self, b, data): if b.get_active(): widgets['hbox_connect_manual'].set_sensitive(data == False) if data: klick.send('/config/disconnect_all') klick.send('/config/autoconnect') else: self.update_connect_ports() config.prefs_autoconnect = data def on_connect_add(self, b): if not all(x[0] for x in self.model_ports): return i = self.model_ports.append(['']) self.treeview_ports.set_cursor(self.model_ports.get_path(i), self.column, start_editing=True) def on_connect_remove(self, b): selection = self.treeview_ports.get_selection() i = selection.get_selected()[1] if i: misc.treeview_remove(self.model_ports, selection, i) self.update_connect_ports() def on_connect_selection_changed(self, selection): i = selection.get_selected()[1] widgets['btn_connect_remove'].set_sensitive(bool(i)) def on_connect_editing_started(self, cell, editable, path): klick.send('/config/get_available_ports') def on_connect_editing_canceled(self, cell): selection = self.treeview_ports.get_selection() i = selection.get_selected()[1] if i and not self.model_ports.get_value(i, 0): self.model_ports.remove(i) def on_connect_cell_edited(self, cell, path, new_text): if new_text: self.model_ports[path][0] = new_text else: self.model_ports.remove(self.model_ports.get_iter(path)) self.update_connect_ports() def update_connect_ports(self): ports = [x[0] for x in self.model_ports] klick.send('/config/disconnect_all') klick.send('/config/connect', *ports) config.prefs_connect_ports = '\0'.join(ports) # OSC callbacks @make_method('/config/sound', 'i') @osc_callback def sound_cb(self, path, args): sound = args[0] if sound < 0 or sound > 3: return w = ('radio_sound_square', 'radio_sound_sine', 'radio_sound_noise', 'radio_sound_click')[sound] widgets[w].set_active(True) config.prefs_sound = sound @make_method('/config/sound', 'ss') @osc_callback def sound_custom_cb(self, path, args): widgets['radio_sound_custom'].set_active(True) if args[0] != widgets['filechooser_accented'].get_filename(): widgets['filechooser_accented'].set_filename(args[0]) if args[1] != widgets['filechooser_normal'].get_filename(): widgets['filechooser_normal'].set_filename(args[1]) config.prefs_sound = -1 config.prefs_sound_accented = args[0] config.prefs_sound_normal = args[1] @make_method('/config/sound_pitch', 'ff') @osc_callback def sound_pitch_cb(self, path, args): v = round(math.log(args[0], 2) * 12) w = round(math.log(args[1], 2) * 12) widgets['scale_pitch_accented'].set_value(v) widgets['scale_pitch_normal'].set_value(w) config.prefs_pitch_accented = v config.prefs_pitch_normal = w @make_method('/config/available_ports', None) @osc_callback def available_ports_cb(self, path, args): if args != self.ports_avail: self.ports_avail = args self.model_avail.clear() for x in self.ports_avail: self.model_avail.append([x]) @make_method('/config/sound_loading_failed', 's') @osc_callback def sound_loading_failed_cb(self, path, args): klick.send('/config/set_sound', -1) m = gtk.MessageDialog(widgets['dialog_preferences'], 0, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, _("couldn't load file '%s'.") % args[0]) m.run() m.destroy() gtklick-0.6.4/gtklick/main_window.py0000644000175000017500000004120011336074640015567 0ustar dasdas# -*- coding: utf-8 -*- # # gtklick # # Copyright (C) 2008-2010 Dominic Sacré # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. import gtk import gtk.keysyms import time import math import itertools from klick_backend import make_method from misc import gui_callback, osc_callback import misc class MainWindow: def __init__(self): # why doesn't glade do this? widgets['spin_meter_beats'].set_value(4) widgets['spin_meter_denom'].set_value(4) wtree.signal_autoconnect({ # main menu 'on_file_quit': self.on_file_quit, 'on_edit_preferences': self.on_edit_preferences, 'on_view_markings_toggled': self.on_view_markings_toggled, 'on_view_speedtrainer_toggled': self.on_view_speedtrainer_toggled, 'on_view_meter_toggled': self.on_view_meter_toggled, 'on_view_pattern_toggled': self.on_view_pattern_toggled, 'on_view_profiles_toggled': self.on_view_profiles_toggled, 'on_help_shortcuts': self.on_help_shortcuts, 'on_help_about': self.on_help_about, # tempo 'on_tempo_scale_changed': self.on_tempo_changed, 'on_tempo_spin_changed': self.on_tempo_changed, 'on_tap_tempo': self.on_tap_tempo, 'on_tempo_format_value': self.on_tempo_format_value, # speed trainer 'on_speedtrainer_enable_toggled': self.on_speedtrainer_enable_toggled, 'on_tempo_increment_changed': self.on_tempo_increment_changed, 'on_tempo_start_changed': self.on_tempo_start_changed, # meter 'on_meter_even_toggled': (self.on_meter_toggled, (0, 4)), 'on_meter_24_toggled': (self.on_meter_toggled, (2, 4)), 'on_meter_34_toggled': (self.on_meter_toggled, (3, 4)), 'on_meter_44_toggled': (self.on_meter_toggled, (4, 4)), 'on_meter_other_toggled': (self.on_meter_toggled, None), 'on_meter_beats_changed': self.on_meter_beats_changed, 'on_meter_denom_changed': self.on_meter_denom_changed, # pattern 'on_pattern_reset': self.on_pattern_reset, # others 'on_start_stop': self.on_start_stop, 'on_volume_changed': self.on_volume_changed, 'on_window_main_delete_event': self.on_delete_event, 'on_window_main_key_press_event': self.on_key_press_event, }) widgets['item_view_markings'].set_active(config.view_markings) widgets['item_view_meter'].set_active(config.view_meter) widgets['item_view_speedtrainer'].set_active(config.view_speedtrainer) widgets['item_view_pattern'].set_active(config.view_pattern) widgets['item_view_profiles'].set_active(config.view_profiles) self.pattern_buttons = [] # create one button now to avoid window size changes later on self.readjust_pattern_table(1) self.state_changed = misc.run_idle_once(lambda: self.state_changed_callback()) self.state_changed_callback = None klick.register_methods(self) # GUI callbacks def on_delete_event(self, w, ev): klick.quit() gtk.main_quit() def on_file_quit(self, i): widgets['window_main'].destroy() klick.quit() gtk.main_quit() def on_edit_preferences(self, i): widgets['dialog_preferences'].show() def on_view_markings_toggled(self, i): widgets['scale_tempo'].set_draw_value(i.get_active()) config.view_markings = i.get_active() def on_view_speedtrainer_toggled(self, i): b = i.get_active() widgets['frame_speedtrainer'].set_property('visible', b) config.view_speedtrainer = b def on_view_meter_toggled(self, i): b = i.get_active() widgets['frame_meter'].set_property('visible', b) config.view_meter = b if not b: self.set_meter(0, 4) def on_view_pattern_toggled(self, i): b = i.get_active() widgets['frame_pattern'].set_property('visible', b) config.view_pattern = b if not b: klick.send('/simple/set_pattern', '') def on_view_profiles_toggled(self, i): b = i.get_active() widgets['vbox_profiles'].set_property('visible', b) config.view_profiles = b def on_help_shortcuts(self, i): shortcuts = widgets['dialog_shortcuts'] shortcuts.run() shortcuts.hide() def on_help_about(self, i): about = widgets['dialog_about'] try: # d'oh! about.set_program_name("gtklick") except AttributeError: pass about.run() about.hide() @gui_callback def on_tempo_changed(self, r): klick.send('/simple/set_tempo', int(r.get_value())) @gui_callback def on_tap_tempo(self, b): klick.send('/simple/tap', ('d', time.time())) def on_tempo_format_value(self, scale, value): if value < 40: return "Larghissimo" elif value < 56: return "Largo" elif value < 66: return "Larghetto" elif value < 76: return "Adagio" elif value < 108: return "Andante" elif value < 120: return "Moderato" elif value < 168: return "Allegro" elif value < 200: return "Presto" else: return "Prestissimo" @gui_callback def on_speedtrainer_enable_toggled(self, b): a = b.get_active() widgets['spin_tempo_increment'].set_sensitive(a) widgets['spin_tempo_start'].set_sensitive(a) config.speedtrainer = a if a: klick.send('/simple/set_tempo_increment', widgets['spin_tempo_increment'].get_value()) klick.send('/simple/set_tempo_start', int(widgets['spin_tempo_start'].get_value())) else: widgets['spin_tempo_increment'].select_region(0, 0) widgets['spin_tempo_start'].select_region(0, 0) klick.send('/simple/set_tempo_increment', 0.0) @gui_callback def on_tempo_increment_changed(self, b): klick.send('/simple/set_tempo_increment', b.get_value()) @gui_callback def on_tempo_start_changed(self, b): klick.send('/simple/set_tempo_start', int(b.get_value())) @gui_callback def on_meter_toggled(self, b, data): if b.get_active(): if data != None: self.set_meter(data[0], data[1]) else: self.set_meter(int(widgets['spin_meter_beats'].get_value()), int(widgets['spin_meter_denom'].get_value())) @gui_callback def on_meter_beats_changed(self, b): self.set_meter(int(widgets['spin_meter_beats'].get_value()), int(widgets['spin_meter_denom'].get_value())) @gui_callback def on_meter_denom_changed(self, b): v = b.get_value() # make sure value is a power of two if v == config.denom: return elif v == config.denom - 0.5: # down arrow (step_inc is 0.5) denom = 2 ** (math.log(config.denom, 2) - 1) elif v == config.denom + 0.5: # up arrow denom = 2 ** (math.log(config.denom, 2) + 1) else: # keyboard input: use next power of two denom = 1 while denom < v: denom *= 2 b.set_value(denom) config.denom = denom self.set_meter(int(widgets['spin_meter_beats'].get_value()), int(widgets['spin_meter_denom'].get_value())) def set_meter(self, beats, denom): if len(self.pattern_buttons): # make "even" meter non-emphasized by default if beats == 0: self.pattern_buttons[0].set_state(1) elif beats != 0 and config.beats == 0: self.pattern_buttons[0].set_state(2) klick.send('/simple/set_meter', beats, denom) self.readjust_pattern_table(beats) klick.send('/simple/set_pattern', self.get_pattern(beats)) @gui_callback def on_pattern_button_toggled(self, b): klick.send('/simple/set_pattern', self.get_pattern()) @gui_callback def on_pattern_reset(self, b): klick.send('/simple/set_pattern', '') @gui_callback def on_start_stop(self, b): if widgets['align_stop'].get_property('visible'): klick.send('/metro/stop') else: klick.send('/metro/start') @gui_callback def on_volume_changed(self, r): klick.send('/config/set_volume', r.get_value()) @gui_callback def on_key_press_event(self, widget, event): key = event.keyval focus = widgets['window_main'].get_focus() # make escape remove focus from spinbuttons if event.keyval == gtk.keysyms.Escape and isinstance(focus, gtk.SpinButton): widgets['window_main'].set_focus(None) return True # don't allow shortcuts in spinbuttons and entrys if isinstance(focus, (gtk.SpinButton, gtk.Entry)): return False # use keys with ctrl modifier to get default GTK behaviour if event.state & gtk.gdk.CONTROL_MASK and \ key in (gtk.keysyms.Left, gtk.keysyms.Right, gtk.keysyms.Down, gtk.keysyms.Up, gtk.keysyms.space, gtk.keysyms.Return): event.state &= ~gtk.gdk.CONTROL_MASK return False # tempo shortcuts if key in (gtk.keysyms.Left, gtk.keysyms.Right, gtk.keysyms.Down, gtk.keysyms.Up, gtk.keysyms.Page_Down, gtk.keysyms.Page_Up): tempo = int(widgets['spin_tempo'].get_value()) if key == gtk.keysyms.Left: tempo -= 1 elif key == gtk.keysyms.Right: tempo += 1 elif key == gtk.keysyms.Down: tempo -= 10 elif key == gtk.keysyms.Up: tempo += 10 elif key == gtk.keysyms.Page_Down: tempo /= 2 elif key == gtk.keysyms.Page_Up: tempo *= 2 tempo = min(max(tempo, 1), 999) klick.send('/simple/set_tempo', tempo) return True # volume shortcuts elif key in (gtk.keysyms.plus, gtk.keysyms.equal, gtk.keysyms.KP_Add, gtk.keysyms.minus, gtk.keysyms.KP_Subtract): volume = widgets['scale_volume'].get_value() if key in (gtk.keysyms.minus, gtk.keysyms.KP_Subtract): volume -= 0.1 elif key in (gtk.keysyms.plus, gtk.keysyms.equal, gtk.keysyms.KP_Add): volume += 0.1 volume = min(max(volume, 0.0), 1.0) klick.send('/config/set_volume', volume) return True # start/stop elif key == gtk.keysyms.space: if widgets['align_stop'].get_property('visible'): klick.send('/metro/stop') else: klick.send('/metro/start') return True # tap tempo elif key == gtk.keysyms.Return: klick.send('/simple/tap', ('d', time.time())) return True return False # OSC callbacks @make_method('/simple/tempo', 'f') @osc_callback def simple_tempo_cb(self, path, args): tempo = args[0] changed = tempo != config.tempo widgets['scale_tempo'].set_value(int(tempo)) widgets['spin_tempo'].set_value(int(tempo)) config.tempo = tempo if changed: self.state_changed.queue() @make_method('/simple/tempo_increment', 'f') @osc_callback def simple_tempo_increment_cb(self, path, args): tempo_increment = args[0] changed = tempo_increment != config.tempo_increment if tempo_increment: widgets['spin_tempo_increment'].set_value(tempo_increment) config.tempo_increment = tempo_increment if changed: self.state_changed.queue() @make_method('/simple/tempo_start', 'f') @osc_callback def simple_tempo_start_cb(self, path, args): tempo_start = args[0] changed = tempo_start != config.tempo_start widgets['spin_tempo_start'].set_value(int(tempo_start)) config.tempo_start = tempo_start if changed: self.state_changed.queue() @make_method('/simple/current_tempo', 'f') @osc_callback def simple_current_tempo_cb(self, path, args): if args[0]: widgets['window_main'].set_title("gtklick - " + str(int(args[0]))) else: widgets['window_main'].set_title("gtklick") @make_method('/simple/meter', 'ii') @osc_callback def simple_meter_cb(self, path, args): beats, denom = args changed = beats != config.beats or denom != config.denom if beats in (0, 2, 3, 4) and denom == 4 and not widgets['radio_meter_other'].get_active(): # standard meter widgets['hbox_meter_spins'].set_sensitive(False) widgets['spin_meter_beats'].select_region(0, 0) widgets['spin_meter_denom'].select_region(0, 0) if beats == 0: widgets['radio_meter_even'].set_active(True) elif beats == 2: widgets['radio_meter_24'].set_active(True) elif beats == 3: widgets['radio_meter_34'].set_active(True) elif beats == 4: widgets['radio_meter_44'].set_active(True) config.beats = beats config.denom = 0 else: # custom meter widgets['radio_meter_other'].set_active(True) widgets['hbox_meter_spins'].set_sensitive(True) widgets['spin_meter_beats'].set_value(beats) widgets['spin_meter_denom'].set_value(denom) config.beats = beats config.denom = denom # set active radio button as mnemonic widget w = [x for x in widgets['radio_meter_other'].get_group() if x.get_active()][0] widgets['label_frame_meter'].set_mnemonic_widget(w) self.readjust_pattern_table(beats) if changed: self.state_changed.queue() @make_method('/simple/pattern', 's') @osc_callback def simple_pattern_cb(self, path, args): pattern = args[0] if len(pattern) != len(self.pattern_buttons) or not all(x in '.xX' for x in pattern): # invalid pattern, use default pattern = self.default_pattern(config.beats) changed = pattern != config.pattern for p, b in itertools.izip(pattern, self.pattern_buttons): b.set_state('.xX'.index(p)) config.pattern = pattern if changed: self.state_changed.queue() @make_method('/metro/active', 'i') @osc_callback def simple_active_cb(self, path, args): if args[0]: widgets['align_start'].hide() widgets['align_stop'].show() else: widgets['align_stop'].hide() widgets['align_start'].show() @make_method('/config/volume', 'f') @osc_callback def config_volume_cb(self, path, args): widgets['scale_volume'].set_value(args[0]) config.volume = args[0] def readjust_pattern_table(self, beats): n = max(1, beats) table = widgets['table_pattern'] if n < len(self.pattern_buttons): # reduce table size for b in self.pattern_buttons[n:]: self.pattern_buttons.remove(b) table.remove(b) table.resize(max((n-1)//6 + 1, 2), 6) elif n > len(self.pattern_buttons): # increase table size table.resize(max((n-1)//6 + 1, 2), 6) for x in range(len(self.pattern_buttons), n): b = misc.TristateCheckButton(str(x+1)) b.set_state(2 if x == 0 else 1) b.connect('toggled', self.on_pattern_button_toggled) row, col = x // 6, x % 6 table.attach(b, col, col + 1, row, row + 1) self.pattern_buttons.append(b) if x == 0: widgets['label_frame_pattern'].set_mnemonic_widget(b) b.show() def get_pattern(self, beats=None): if beats == None: beats = config.beats pattern = ''.join('.xX'[s] for s in (n.get_state() for n in self.pattern_buttons)) return pattern if pattern != self.default_pattern(beats) else '' def default_pattern(self, beats): return 'X' + 'x'*(beats-1) if beats > 0 else 'x' gtklick-0.6.4/gtklick/__init__.py0000644000175000017500000000000011045205014014770 0ustar dasdasgtklick-0.6.4/gtklick/klick_backend.py0000644000175000017500000000726111336074640016031 0ustar dasdas# -*- coding: utf-8 -*- # # gtklick # # Copyright (C) 2008-2010 Dominic Sacré # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. import liblo import subprocess import sys import threading KLICK_PATH = 'klick' MIN_KLICK_VERSION = (0,11,0) START_TIMEOUT = 10 class KlickBackendError: def __init__(self, msg): self.msg = msg def __str__(self): return self.msg class make_method(liblo.make_method): def __init__(self, path, types): liblo.make_method.__init__(self, '/klick' + path, types) class KlickBackend(liblo.ServerThread): def __init__(self, name, port, return_port, connect, verbose): self.addr = None self.version = None self.ready = threading.Event() self.check_version() # call base class c'tor and start OSC server liblo.ServerThread.__init__(self, return_port) self.start() if not connect: # start klick process try: args = [ KLICK_PATH, '-n', name, '-R', self.get_url() ] if port: args += ['-o', str(port)] if verbose: args += ['-L'] self.process = subprocess.Popen(args) except OSError, e: raise KlickBackendError(_("failed to start klick: %s") % e.strerror) # wait for klick to send /klick/ready if not self.wait(): raise KlickBackendError(_("timeout while waiting for klick to start")) else: self.process = None # check if klick is running liblo.ServerThread.send(self, port, '/klick/check') if not self.wait(): raise KlickBackendError(_("can't connect to klick")) # register as client self.send('/register_client') def __del__(self): self.quit() def quit(self): if self.addr: self.send('/unregister_client') if self.process: self.send('/quit') def check_version(self): try: output = subprocess.Popen([KLICK_PATH, '-V'], stdout=subprocess.PIPE).communicate()[0] except OSError, e: raise KlickBackendError(_("failed to start klick: %s\nplease make sure klick is installed.") % e.strerror) try: version_string = output.split()[1] self.version = tuple(int(x) for x in version_string.split('.')) if self.version < MIN_KLICK_VERSION: raise KlickBackendError(_("your version of klick is too old (%s).\nplease upgrade to klick %d.%d.%d or later.") % ((version_string,) + MIN_KLICK_VERSION)) except ValueError: # let's hope for the best print "couldn't parse klick version" def get_version(self): return self.version def check_process(self): return self.process and self.process.poll() == None def wait(self): for n in range(START_TIMEOUT): self.ready.wait(1) if self.addr: if n > 0: sys.stdout.write("\n") return True sys.stdout.write(".") sys.stdout.flush() sys.stdout.write("\n") return False def send(self, path, *args): liblo.ServerThread.send(self, self.addr, '/klick' + path, *args) @make_method('/ready', '') def ready_cb(self, path, args, types, src): self.addr = src self.ready.set() gtklick-0.6.4/gtklick/gtklick.py0000644000175000017500000001623311336074640014714 0ustar dasdas#!/usr/bin/env python # -*- coding: utf-8 -*- # # gtklick # # Copyright (C) 2008-2010 Dominic Sacré # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. import pygtk pygtk.require('2.0') import gtk import gtk.glade import gobject import getopt import sys import os.path import weakref import gettext import locale import __builtin__ __builtin__._ = gettext.gettext import klick_backend import gtklick_config import main_window import profiles_pane import preferences_dialog import misc class GTKlick: def __init__(self, args, share_dir, locale_dir): try: locale.setlocale(locale.LC_ALL, '') except locale.Error: # don't crash when run with unsupported locale pass for m in gettext, gtk.glade: m.bindtextdomain('gtklick', locale_dir) m.textdomain('gtklick') self.config = None self.parse_cmdline(args) gtk.gdk.threads_init() try: self.setup(share_dir) if not self.connect: self.restore_config() else: self.query_config() except klick_backend.KlickBackendError, e: self.error_message(e.msg) sys.exit(1) # start timer to check if klick is still running if self.klick.process: self.timer = gobject.timeout_add(1000, misc.weakref_method(self.check_klick)) def __del__(self): if self.config: self.config.write() # parse command line arguments def parse_cmdline(self, args): self.port = None self.return_port = None self.connect = False self.verbose = False try: r = getopt.getopt(args, 'o:q:r:Lh'); for opt, arg in r[0]: if opt == '-o': self.port = arg self.connect = False elif opt == '-q': self.port = arg self.connect = True elif opt == '-r': self.return_port = arg elif opt == '-L': self.verbose = True elif opt == '-h': self.print_help() sys.exit(0) except getopt.GetoptError, e: sys.exit(e.msg) def print_help(self): print _("Usage:\n" \ " gtklick [ options ]\n" \ "\n" \ "Options:\n" \ " -o port OSC port to start klick with\n" \ " -q port OSC port of running klick instance to connect to\n" \ " -r port OSC port to be used for gtklick\n" \ " -h show this help") # create windows, config, and klick backend def setup(self, share_dir): self.wtree = gtk.glade.XML(os.path.join(share_dir, 'gtklick.glade')) # explicitly call base class method, because get_name() is overridden in AboutDialog. stupid GTK... self.widgets = dict([(gtk.Widget.get_name(w), w) for w in self.wtree.get_widget_prefix('')]) self.config = gtklick_config.GTKlickConfig() # load config from file self.config.read() # start klick process self.klick = klick_backend.KlickBackend('gtklick', self.port, self.return_port, self.connect, self.verbose) # make "globals" known in other modules for m in (main_window, profiles_pane, preferences_dialog): m.wtree = self.wtree m.widgets = self.widgets m.klick = weakref.proxy(self.klick) m.config = weakref.proxy(self.config) # the actual windows are created by glade, this basically just connects GUI and OSC callbacks self.win = main_window.MainWindow() self.profiles = profiles_pane.ProfilesPane(self.win) self.prefs = preferences_dialog.PreferencesDialog() #self.klick.add_method(None, None, self.fallback) # restore settings from config file. # many settings are just sent to klick, and the OSC notifications will take care of the rest def restore_config(self): # port connections if len(self.config.prefs_connect_ports): ports = self.config.prefs_connect_ports.split('\0') for p in ports: self.prefs.model_ports.append([p]) else: ports = [] if self.config.prefs_autoconnect: misc.do_quietly(lambda: self.widgets['radio_connect_auto'].set_active(True)) self.klick.send('/config/autoconnect') else: misc.do_quietly(lambda: self.widgets['radio_connect_manual'].set_active(True)) self.klick.send('/config/connect', *ports) # sound / volume if self.config.prefs_sound >= 0: self.klick.send('/config/set_sound', self.config.prefs_sound) else: self.klick.send('/config/set_sound', self.config.prefs_sound_accented, self.config.prefs_sound_normal) self.klick.send('/config/set_sound_pitch', 2 ** (self.config.prefs_pitch_accented / 12.0), 2 ** (self.config.prefs_pitch_normal / 12.0) ) self.klick.send('/config/set_volume', self.config.volume) # metronome state misc.do_quietly(lambda: ( self.widgets['check_speedtrainer_enable'].set_active(self.config.speedtrainer), self.widgets['spin_tempo_increment'].set_value(self.config.tempo_increment), self.widgets['radio_meter_other'].set_active(self.config.denom != 0) )) self.widgets['spin_tempo_increment'].set_sensitive(self.config.speedtrainer) self.widgets['spin_tempo_start'].set_sensitive(self.config.speedtrainer) self.klick.send('/simple/set_tempo', self.config.tempo) self.klick.send('/simple/set_tempo_increment', self.config.tempo_increment if self.config.speedtrainer else 0.0) self.klick.send('/simple/set_tempo_start', self.config.tempo_start) self.klick.send('/simple/set_meter', self.config.beats, self.config.denom if self.config.denom else 4) self.klick.send('/simple/set_pattern', self.config.pattern) # get current settings from running klick instance def query_config(self): self.klick.send('/query') # start the whole thing def run(self): self.widgets['window_main'].show() gtk.main() # check if klick is still running def check_klick(self): if not self.klick.check_process(): self.error_message(_("klick seems to have been killed, can't continue without it")) sys.exit(1) return True def fallback(self, path, args, types, src): print "message not handled:", path, args, src.get_url() def error_message(self, msg): m = gtk.MessageDialog(self.wtree.get_widget('window_main'), 0, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, msg) m.set_title(_("gtklick error")) m.run() m.destroy() if __name__ == '__main__': app = GTKlick(sys.argv[1:], 'share', 'build/locale') app.run() gtklick-0.6.4/COPYING0000644000175000017500000004310311045205014012275 0ustar dasdas GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. gtklick-0.6.4/PKG-INFO0000644000175000017500000000037211336075333012354 0ustar dasdasMetadata-Version: 1.0 Name: gtklick Version: 0.6.4 Summary: a simple GTK metronome based on klick Home-page: http://das.nasophon.de/gtklick/ Author: Dominic Sacre Author-email: dominic.sacre@gmx.de License: GPL Description: UNKNOWN Platform: UNKNOWN gtklick-0.6.4/po/0000755000175000017500000000000011207073426011671 5ustar dasdasgtklick-0.6.4/po/ru.po0000644000175000017500000002064411207073426012665 0ustar dasdas# German translations for PACKAGE package. # Copyright (C) 2009 THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # Dominic Sacré , 2009. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2009-05-27 22:46+0100\n" "PO-Revision-Date: 2009-05-27 06:06+0100\n" "Last-Translator: Damir Abdullin \n" "Language-Team: Russian\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: share/gtklick.glade.h:1 msgid "Output" msgstr "Выход" #: share/gtklick.glade.h:2 msgid "Profi_les" msgstr "Профили" #: share/gtklick.glade.h:3 msgid "Sound" msgstr "Звук" #: share/gtklick.glade.h:4 msgid "Spee_d trainer" msgstr "Тренер скорости" #: share/gtklick.glade.h:5 msgid "_Meter" msgstr "Размер" #: share/gtklick.glade.h:6 msgid "_Pattern" msgstr "Шаблон" #: share/gtklick.glade.h:7 msgid "_Start" msgstr "Старт" #: share/gtklick.glade.h:8 msgid "_Stop" msgstr "Стоп" #: share/gtklick.glade.h:9 msgid "_Tempo" msgstr "Темп" #: share/gtklick.glade.h:10 msgid "About gtklick" msgstr "О программе gtklick" #: share/gtklick.glade.h:11 msgid "Acoustic _bell / click" msgstr "Звонок / щелчок" #: share/gtklick.glade.h:12 msgid "Add new JACK connection" msgstr "Добавить порт JACK" #: share/gtklick.glade.h:13 msgid "Audio file for accented beats" msgstr "Звуковой файл для сильной доли" #: share/gtklick.glade.h:14 msgid "Audio file for normal beats" msgstr "Звуковой файл для слабой доли" #: share/gtklick.glade.h:15 msgid "C_onnect to these ports:" msgstr "Подключить к этим портам:" #: share/gtklick.glade.h:16 msgid "C_ustom:" msgstr "Польозвательский:" #: share/gtklick.glade.h:17 msgid "Create new profile (Ctrl+N)" msgstr "Создать новый профиль (Ctrl+N)" #: share/gtklick.glade.h:18 msgid "Delete profile (Ctrl+D)" msgstr "Удалить профиль (Ctrl+D)" #: share/gtklick.glade.h:19 msgid "Ena_ble" msgstr "Включить" #: share/gtklick.glade.h:20 msgid "Eve_n" msgstr "Обычный" #: share/gtklick.glade.h:21 msgid "Keyboard shortcuts" msgstr "Горячие клавиши" #: share/gtklick.glade.h:22 msgid "P_rofiles" msgstr "Профили" #: share/gtklick.glade.h:23 msgid "Pitch of accented beats" msgstr "Уровень сильной доли" #: share/gtklick.glade.h:24 msgid "Pitch of normal beats" msgstr "Уровень слабой доли" #: share/gtklick.glade.h:25 msgid "Preferences" msgstr "Настройки" #: share/gtklick.glade.h:26 msgid "Remove selected connection" msgstr "Удалить выбранное соединение" #: share/gtklick.glade.h:27 msgid "Rename profile (Ctrl+E)" msgstr "Переименовать профиль (Ctrl+E)" #: share/gtklick.glade.h:28 msgid "Reset pattern" msgstr "Сбросить шаблон" #: share/gtklick.glade.h:29 msgid "S_ine" msgstr "Синусоида" #: share/gtklick.glade.h:30 msgid "Save profile (Ctrl+S)" msgstr "Сохранить профиль (Ctrl+S)" #: share/gtklick.glade.h:31 msgid "Select audio file for accented beats" msgstr "Выбрать звуковой файл для сильной доли" #: share/gtklick.glade.h:32 msgid "Select audio file for normal beats" msgstr "Выбрать звуковой файл для слабой доли" #: share/gtklick.glade.h:33 msgid "" "Space\t\tStart / stop\n" "\n" "→\t\t\tTempo + 1\n" "←\t\t\tTempo - 1\n" "↑\t\t\tTempo + 10\n" "↓\t\t\tTempo - 10\n" "PgUp \t\tTempo × 2\n" "PgDn \t\tTempo / 2\n" "\n" "Return\t\tTap tempo\n" "\n" "+/= \t\tVolume up\n" "-\t\t\tVolume down" msgstr "" "Пробел\t\tСтарт / Стоп\n" "\n" "→\t\t\tТемп + 1\n" "←\t\t\tТемп - 1\n" "↑\t\t\tТемп + 10\n" "↓\t\t\tТемп - 10\n" "PgUp ↑\t\tТемп × 2\n" "PgDn ↓\t\tТемп / 2\n" "\n" "Enter\t\tВыбрать темп\n" "\n" "+\t\t\tГромче\n" "-\t\t\tТише" #: share/gtklick.glade.h:46 msgid "Sta_rt:" msgstr "Старт:" #: share/gtklick.glade.h:47 msgid "Start tempo" msgstr "Начальный темп" #: share/gtklick.glade.h:48 msgid "T_ap" msgstr "Выбрать" #: share/gtklick.glade.h:49 msgid "Tempo _markings" msgstr "Название темпа" #: share/gtklick.glade.h:50 msgid "Tempo increment in BPM per bar" msgstr "Увеличение темпа на BPM" #: share/gtklick.glade.h:51 msgid "Volume" msgstr "Громкость" #: share/gtklick.glade.h:52 msgid "_2/4" msgstr "" #: share/gtklick.glade.h:53 msgid "_3/4" msgstr "" #: share/gtklick.glade.h:54 msgid "_4/4" msgstr "" #: share/gtklick.glade.h:55 msgid "_Automatically connect to soundcard output" msgstr "Автоматически соединяться с выходом звуковой карты" #: share/gtklick.glade.h:56 msgid "_Edit" msgstr "Правка" #: share/gtklick.glade.h:57 msgid "_File" msgstr "Файл" #: share/gtklick.glade.h:58 msgid "_Help" msgstr "Помощь" #: share/gtklick.glade.h:59 msgid "_Increment:" msgstr "Увеличить:" #: share/gtklick.glade.h:60 msgid "_Keyboard Shortcuts" msgstr "Горячие клавиши" #: share/gtklick.glade.h:61 msgid "_Meter" msgstr "Размер" #: share/gtklick.glade.h:62 msgid "_Noise" msgstr "Шум" #: share/gtklick.glade.h:63 msgid "_Other:" msgstr "Другой:" #: share/gtklick.glade.h:64 msgid "_Pattern" msgstr "Шаблон" #: share/gtklick.glade.h:65 msgid "_Pitch:" msgstr "Уровень:" #: share/gtklick.glade.h:66 msgid "_Speed trainer" msgstr "Тренер скорости" #: share/gtklick.glade.h:67 msgid "_Square" msgstr "Квадрат" #: share/gtklick.glade.h:68 msgid "_View" msgstr "Вид" #: share/gtklick.glade.h:69 msgid "gtklick" msgstr "gtklick" #: gtklick/gtklick.py:99 msgid "" "Usage:\n" " gtklick [ options ]\n" "\n" "Options:\n" " -o port OSC port to start klick with\n" " -q port OSC port of running klick instance to connect to\n" " -r port OSC port to be used for gtklick\n" " -h show this help" msgstr "" "Использование:\n" " gtklick [ опции ]\n" "\n" "Опции:\n" " -o port OSC-порт, с которым нужно запустить klick\n" " -q port OSC-порт запущенного klick, к которому можно соединиться\n" " -r port OSC-порт, используемый для gktlick\n" " -h Показать эту справку" #: gtklick/gtklick.py:193 msgid "klick seems to have been killed, can't continue without it" msgstr "Кажется, процесс klick убит, невозможно продолжать без него" #: gtklick/gtklick.py:202 msgid "gtklick error" msgstr "Ошибка в gtklick" #: gtklick/klick_backend.py:58 #, python-format msgid "failed to start klick: %s" msgstr "Не удалось запустить klick: %s" #: gtklick/klick_backend.py:61 msgid "timeout while waiting for klick to start" msgstr "Истекло время ожидания запуска klick" #: gtklick/klick_backend.py:67 msgid "can't connect to klick" msgstr "Не получается соединиться с klick" #: gtklick/klick_backend.py:85 #, python-format msgid "" "failed to start klick: %s\n" "please make sure klick is installed." msgstr "" "Не удалось запустить klick: %s\n" "Пожалуйста, проверьте корректность установки klick" #: gtklick/klick_backend.py:90 #, python-format msgid "" "your version of klick is too old (%s).\n" "please upgrade to klick %d.%d.%d or later." msgstr "" "Ваша версия klick старая (%s).\n" "Пожалуйста, обновите до версии %d.%d.%d или более поздней." #: gtklick/preferences_dialog.py:216 #, python-format msgid "couldn't load file '%s'." msgstr "Не удалось загрузить файл '%s'." gtklick-0.6.4/po/gtklick.pot0000644000175000017500000001252211140422444014041 0ustar dasdas# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2009-01-29 22:46+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: share/gtklick.glade.h:1 msgid "Output" msgstr "" #: share/gtklick.glade.h:2 msgid "Profi_les" msgstr "" #: share/gtklick.glade.h:3 msgid "Sound" msgstr "" #: share/gtklick.glade.h:4 msgid "Spee_d trainer" msgstr "" #: share/gtklick.glade.h:5 msgid "_Meter" msgstr "" #: share/gtklick.glade.h:6 msgid "_Pattern" msgstr "" #: share/gtklick.glade.h:7 msgid "_Start" msgstr "" #: share/gtklick.glade.h:8 msgid "_Stop" msgstr "" #: share/gtklick.glade.h:9 msgid "_Tempo" msgstr "" #: share/gtklick.glade.h:10 msgid "About gtklick" msgstr "" #: share/gtklick.glade.h:11 msgid "Acoustic _bell / click" msgstr "" #: share/gtklick.glade.h:12 msgid "Add new JACK connection" msgstr "" #: share/gtklick.glade.h:13 msgid "Audio file for accented beats" msgstr "" #: share/gtklick.glade.h:14 msgid "Audio file for normal beats" msgstr "" #: share/gtklick.glade.h:15 msgid "C_onnect to these ports:" msgstr "" #: share/gtklick.glade.h:16 msgid "C_ustom:" msgstr "" #: share/gtklick.glade.h:17 msgid "Create new profile (Ctrl+N)" msgstr "" #: share/gtklick.glade.h:18 msgid "Delete profile (Ctrl+D)" msgstr "" #: share/gtklick.glade.h:19 msgid "Ena_ble" msgstr "" #: share/gtklick.glade.h:20 msgid "Eve_n" msgstr "" #: share/gtklick.glade.h:21 msgid "Keyboard shortcuts" msgstr "" #: share/gtklick.glade.h:22 msgid "P_rofiles" msgstr "" #: share/gtklick.glade.h:23 msgid "Pitch of accented beats" msgstr "" #: share/gtklick.glade.h:24 msgid "Pitch of normal beats" msgstr "" #: share/gtklick.glade.h:25 msgid "Preferences" msgstr "" #: share/gtklick.glade.h:26 msgid "Remove selected connection" msgstr "" #: share/gtklick.glade.h:27 msgid "Rename profile (Ctrl+E)" msgstr "" #: share/gtklick.glade.h:28 msgid "Reset pattern" msgstr "" #: share/gtklick.glade.h:29 msgid "S_ine" msgstr "" #: share/gtklick.glade.h:30 msgid "Save profile (Ctrl+S)" msgstr "" #: share/gtklick.glade.h:31 msgid "Select audio file for accented beats" msgstr "" #: share/gtklick.glade.h:32 msgid "Select audio file for normal beats" msgstr "" #: share/gtklick.glade.h:33 msgid "" "Space\t\tStart / stop\n" "\n" "→\t\t\tTempo + 1\n" "←\t\t\tTempo - 1\n" "↑\t\t\tTempo + 10\n" "↓\t\t\tTempo - 10\n" "PgUp \t\tTempo × 2\n" "PgDn \t\tTempo / 2\n" "\n" "Return\t\tTap tempo\n" "\n" "+/= \t\tVolume up\n" "-\t\t\tVolume down" msgstr "" #: share/gtklick.glade.h:46 msgid "Sta_rt:" msgstr "" #: share/gtklick.glade.h:47 msgid "Start tempo" msgstr "" #: share/gtklick.glade.h:48 msgid "T_ap" msgstr "" #: share/gtklick.glade.h:49 msgid "Tempo _markings" msgstr "" #: share/gtklick.glade.h:50 msgid "Tempo increment in BPM per bar" msgstr "" #: share/gtklick.glade.h:51 msgid "Volume" msgstr "" #: share/gtklick.glade.h:52 msgid "_2/4" msgstr "" #: share/gtklick.glade.h:53 msgid "_3/4" msgstr "" #: share/gtklick.glade.h:54 msgid "_4/4" msgstr "" #: share/gtklick.glade.h:55 msgid "_Automatically connect to soundcard output" msgstr "" #: share/gtklick.glade.h:56 msgid "_Edit" msgstr "" #: share/gtklick.glade.h:57 msgid "_File" msgstr "" #: share/gtklick.glade.h:58 msgid "_Help" msgstr "" #: share/gtklick.glade.h:59 msgid "_Increment:" msgstr "" #: share/gtklick.glade.h:60 msgid "_Keyboard Shortcuts" msgstr "" #: share/gtklick.glade.h:61 msgid "_Meter" msgstr "" #: share/gtklick.glade.h:62 msgid "_Noise" msgstr "" #: share/gtklick.glade.h:63 msgid "_Other:" msgstr "" #: share/gtklick.glade.h:64 msgid "_Pattern" msgstr "" #: share/gtklick.glade.h:65 msgid "_Pitch:" msgstr "" #: share/gtklick.glade.h:66 msgid "_Speed trainer" msgstr "" #: share/gtklick.glade.h:67 msgid "_Square" msgstr "" #: share/gtklick.glade.h:68 msgid "_View" msgstr "" #: share/gtklick.glade.h:69 msgid "gtklick" msgstr "" #: gtklick/gtklick.py:99 msgid "" "Usage:\n" " gtklick [ options ]\n" "\n" "Options:\n" " -o port OSC port to start klick with\n" " -q port OSC port of running klick instance to connect to\n" " -r port OSC port to be used for gtklick\n" " -h show this help" msgstr "" #: gtklick/gtklick.py:193 msgid "klick seems to have been killed, can't continue without it" msgstr "" #: gtklick/gtklick.py:202 msgid "gtklick error" msgstr "" #: gtklick/klick_backend.py:58 #, python-format msgid "failed to start klick: %s" msgstr "" #: gtklick/klick_backend.py:61 msgid "timeout while waiting for klick to start" msgstr "" #: gtklick/klick_backend.py:67 msgid "can't connect to klick" msgstr "" #: gtklick/klick_backend.py:85 #, python-format msgid "" "failed to start klick: %s\n" "please make sure klick is installed." msgstr "" #: gtklick/klick_backend.py:90 #, python-format msgid "" "your version of klick is too old (%s).\n" "please upgrade to klick %d.%d.%d or later." msgstr "" #: gtklick/preferences_dialog.py:216 #, python-format msgid "couldn't load file '%s'." msgstr "" gtklick-0.6.4/po/es.po0000644000175000017500000001642111336075243012646 0ustar dasdas# Spanish translations for gtklick package # Traducciones al español para el paquete gtklick. # Copyright (C) 2009 THE gtklick'S COPYRIGHT HOLDER # This file is distributed under the same license as the gtklick package. # Pablo , 2009. # msgid "" msgstr "" "Project-Id-Version: gtklick 0.6.2\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2009-01-29 22:46+0100\n" "PO-Revision-Date: 2010-01-31 19:31+0100\n" "Last-Translator: Pablo Fernández \n" "Language-Team: Spanish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: share/gtklick.glade.h:1 msgid "Output" msgstr "Salida" #: share/gtklick.glade.h:2 msgid "Profi_les" msgstr "Perfi_les" #: share/gtklick.glade.h:3 msgid "Sound" msgstr "Sonido" #: share/gtklick.glade.h:4 msgid "Spee_d trainer" msgstr "Práctica de velocida_d" #: share/gtklick.glade.h:5 msgid "_Meter" msgstr "_Medida" #: share/gtklick.glade.h:6 msgid "_Pattern" msgstr "_Patrón" #: share/gtklick.glade.h:7 msgid "_Start" msgstr "Arrancar" #: share/gtklick.glade.h:8 msgid "_Stop" msgstr "Parar" #: share/gtklick.glade.h:9 msgid "_Tempo" msgstr "_Tempo" #: share/gtklick.glade.h:10 msgid "About gtklick" msgstr "Acerca de gtklick" #: share/gtklick.glade.h:11 msgid "Acoustic _bell / click" msgstr "Cam_pana / click" #: share/gtklick.glade.h:12 msgid "Add new JACK connection" msgstr "Añadir nueva conexión JACK" #: share/gtklick.glade.h:13 msgid "Audio file for accented beats" msgstr "Archivo de audio para golpes acentuados" #: share/gtklick.glade.h:14 msgid "Audio file for normal beats" msgstr "Archivo de audio para golpes normales" #: share/gtklick.glade.h:15 msgid "C_onnect to these ports:" msgstr "Co_nectar a estos puertos:" #: share/gtklick.glade.h:16 msgid "C_ustom:" msgstr "P_ersonalizado:" #: share/gtklick.glade.h:17 msgid "Create new profile (Ctrl+N)" msgstr "Crear nuevo perfil (Ctrl+N)" #: share/gtklick.glade.h:18 msgid "Delete profile (Ctrl+D)" msgstr "Eliminar perfil (Ctrl+D)" #: share/gtklick.glade.h:19 msgid "Ena_ble" msgstr "Ha_bilitar" #: share/gtklick.glade.h:20 msgid "Eve_n" msgstr "U_niforme" #: share/gtklick.glade.h:21 msgid "Keyboard shortcuts" msgstr "Atajos de teclado" #: share/gtklick.glade.h:22 msgid "P_rofiles" msgstr "Pe_rfiles" #: share/gtklick.glade.h:23 msgid "Pitch of accented beats" msgstr "Tono de golpes acentuados" #: share/gtklick.glade.h:24 msgid "Pitch of normal beats" msgstr "Tono de golpes normales" #: share/gtklick.glade.h:25 msgid "Preferences" msgstr "Preferencias" #: share/gtklick.glade.h:26 msgid "Remove selected connection" msgstr "Soltar conexión seleccionada" #: share/gtklick.glade.h:27 msgid "Rename profile (Ctrl+E)" msgstr "Renombrar perfil (Ctrl+E)" #: share/gtklick.glade.h:28 msgid "Reset pattern" msgstr "Restaurar patrón" #: share/gtklick.glade.h:29 msgid "S_ine" msgstr "_Senoidal" #: share/gtklick.glade.h:30 msgid "Save profile (Ctrl+S)" msgstr "Guardar perfil (Ctrl+S)" #: share/gtklick.glade.h:31 msgid "Select audio file for accented beats" msgstr "Seleccionar archivo de audio para golpes acentuados" #: share/gtklick.glade.h:32 msgid "Select audio file for normal beats" msgstr "Seleccionar archivo de audio para golpes normales" #: share/gtklick.glade.h:33 msgid "" "Space\t\tStart / stop\n" "\n" "→\t\t\tTempo + 1\n" "←\t\t\tTempo - 1\n" "↑\t\t\tTempo + 10\n" "↓\t\t\tTempo - 10\n" "PgUp \t\tTempo × 2\n" "PgDn \t\tTempo / 2\n" "\n" "Return\t\tTap tempo\n" "\n" "+/= \t\tVolume up\n" "-\t\t\tVolume down" msgstr "" "Espacio\t\tArrancar / Parar\n" "\n" "→\t\t\tTempo + 1\n" "←\t\t\tTempo - 1\n" "↑\t\t\tTempo + 10\n" "↓\t\t\tTempo - 10\n" "Re Pág \t\tTempo × 2\n" "Av Pág \t\tTempo / 2\n" "\n" "Enter\t\tPulsar tempo\n" "\n" "+/= \t\tSubir volumen\n" "-\t\t\tBajar volumen" #: share/gtklick.glade.h:46 msgid "Sta_rt:" msgstr "_Inicio" #: share/gtklick.glade.h:47 msgid "Start tempo" msgstr "Tempo inicial" #: share/gtklick.glade.h:48 msgid "T_ap" msgstr "P_ulsar" #: share/gtklick.glade.h:49 msgid "Tempo _markings" msgstr "_Marcas de tempo" #: share/gtklick.glade.h:50 msgid "Tempo increment in BPM per bar" msgstr "Incremento de tempo en BPM por compás" #: share/gtklick.glade.h:51 msgid "Volume" msgstr "Volumen" #: share/gtklick.glade.h:52 msgid "_2/4" msgstr "_2/4" #: share/gtklick.glade.h:53 msgid "_3/4" msgstr "_3/4" #: share/gtklick.glade.h:54 msgid "_4/4" msgstr "_4/4" #: share/gtklick.glade.h:55 msgid "_Automatically connect to soundcard output" msgstr "C_onectar automáticamente a salida de tarjeta" #: share/gtklick.glade.h:56 msgid "_Edit" msgstr "_Editar" #: share/gtklick.glade.h:57 msgid "_File" msgstr "_Archivo" #: share/gtklick.glade.h:58 msgid "_Help" msgstr "A_yuda" #: share/gtklick.glade.h:59 msgid "_Increment:" msgstr "_Incremento:" #: share/gtklick.glade.h:60 msgid "_Keyboard Shortcuts" msgstr "_Atajos de teclado" #: share/gtklick.glade.h:61 msgid "_Meter" msgstr "_Medida" #: share/gtklick.glade.h:62 msgid "_Noise" msgstr "_Ruido" #: share/gtklick.glade.h:63 msgid "_Other:" msgstr "_Otra:" #: share/gtklick.glade.h:64 msgid "_Pattern" msgstr "_Patrón" #: share/gtklick.glade.h:65 msgid "_Pitch:" msgstr "_Tono:" #: share/gtklick.glade.h:66 msgid "_Speed trainer" msgstr "Práctica de velocida_d" #: share/gtklick.glade.h:67 msgid "_Square" msgstr "C_uadrada" #: share/gtklick.glade.h:68 msgid "_View" msgstr "_Ver" #: share/gtklick.glade.h:69 msgid "gtklick" msgstr "gtklick" #: gtklick/gtklick.py:99 msgid "" "Usage:\n" " gtklick [ options ]\n" "\n" "Options:\n" " -o port OSC port to start klick with\n" " -q port OSC port of running klick instance to connect to\n" " -r port OSC port to be used for gtklick\n" " -h show this help" msgstr "" "Uso:\n" " gtklick [ opciones ]\n" "\n" "Opciones:\n" " -o puerto puerto OSC para iniciar klick\n" " -q puerto puerto OSC de instancia operativa de klick para conectar a\n" " -r puerto puerto OSC para ser usado por gtklick\n" " -h enseñar esta ayuda" #: gtklick/gtklick.py:193 msgid "klick seems to have been killed, can't continue without it" msgstr "Parece que klick ha petado. Imposible continuar sin él" #: gtklick/gtklick.py:202 msgid "gtklick error" msgstr "Error gtklick" #: gtklick/klick_backend.py:58 #, python-format msgid "failed to start klick: %s" msgstr "Falló iniciar klick: %s" #: gtklick/klick_backend.py:61 msgid "timeout while waiting for klick to start" msgstr "timeout esperando a que iniciara klick" #: gtklick/klick_backend.py:67 msgid "can't connect to klick" msgstr "no se puede conectar a klick" #: gtklick/klick_backend.py:85 #, python-format msgid "" "failed to start klick: %s\n" "please make sure klick is installed." msgstr "" "Falló iniciar klick: %s\n" "Asegúrese de que klick está instalado." #: gtklick/klick_backend.py:90 #, python-format msgid "" "your version of klick is too old (%s).\n" "please upgrade to klick %d.%d.%d or later." msgstr "" "Su versión de klick es demasiado antigua (%s).\n" "Por favor, actualícela a klick %d.%d.%d o posterior" #: gtklick/preferences_dialog.py:216 #, python-format msgid "couldn't load file '%s'." msgstr "No se pudo cargar archivo '%s'." gtklick-0.6.4/po/de.po0000644000175000017500000001630111140422444012614 0ustar dasdas# German translations for PACKAGE package. # Copyright (C) 2009 THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # Dominic Sacré , 2009. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2009-01-29 22:46+0100\n" "PO-Revision-Date: 2009-01-16 06:06+0100\n" "Last-Translator: Dominic Sacré \n" "Language-Team: German\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: share/gtklick.glade.h:1 msgid "Output" msgstr "Ausgang" #: share/gtklick.glade.h:2 msgid "Profi_les" msgstr "Profi_le" #: share/gtklick.glade.h:3 msgid "Sound" msgstr "Klang" #: share/gtklick.glade.h:4 msgid "Spee_d trainer" msgstr "T_empo-Trainer" #: share/gtklick.glade.h:5 msgid "_Meter" msgstr "Ta_ktart" #: share/gtklick.glade.h:6 msgid "_Pattern" msgstr "_Muster" #: share/gtklick.glade.h:7 msgid "_Start" msgstr "_Start" #: share/gtklick.glade.h:8 msgid "_Stop" msgstr "_Stop" #: share/gtklick.glade.h:9 msgid "_Tempo" msgstr "_Tempo" #: share/gtklick.glade.h:10 msgid "About gtklick" msgstr "Über gtklick" #: share/gtklick.glade.h:11 msgid "Acoustic _bell / click" msgstr "_Glocke / Klick" #: share/gtklick.glade.h:12 msgid "Add new JACK connection" msgstr "Neue JACK-Verbindung hinzufügen" #: share/gtklick.glade.h:13 msgid "Audio file for accented beats" msgstr "Audio-Datei für betonte Schläge" #: share/gtklick.glade.h:14 msgid "Audio file for normal beats" msgstr "Audio-Datei für unbetonte Schläge" #: share/gtklick.glade.h:15 msgid "C_onnect to these ports:" msgstr "Mit _diesen Ports verbinden:" #: share/gtklick.glade.h:16 msgid "C_ustom:" msgstr "_Benutzerdefiniert:" #: share/gtklick.glade.h:17 msgid "Create new profile (Ctrl+N)" msgstr "Neues Profil erstellen (Strg+N)" #: share/gtklick.glade.h:18 msgid "Delete profile (Ctrl+D)" msgstr "Profil löschen (Strg+D)" #: share/gtklick.glade.h:19 msgid "Ena_ble" msgstr "Akti_v" #: share/gtklick.glade.h:20 msgid "Eve_n" msgstr "Glei_ch" #: share/gtklick.glade.h:21 msgid "Keyboard shortcuts" msgstr "Tastenkombinationen" #: share/gtklick.glade.h:22 msgid "P_rofiles" msgstr "P_rofile" #: share/gtklick.glade.h:23 msgid "Pitch of accented beats" msgstr "Tonhöhe von betonten Schlägen" #: share/gtklick.glade.h:24 msgid "Pitch of normal beats" msgstr "Tonhöhe von unbetonten Schlägen" #: share/gtklick.glade.h:25 msgid "Preferences" msgstr "Einstellungen" #: share/gtklick.glade.h:26 msgid "Remove selected connection" msgstr "Ausgewählte Verbindung entfernen" #: share/gtklick.glade.h:27 msgid "Rename profile (Ctrl+E)" msgstr "Profil umbenennen (Strg+E)" #: share/gtklick.glade.h:28 msgid "Reset pattern" msgstr "Muster zurücksetzen" #: share/gtklick.glade.h:29 msgid "S_ine" msgstr "_Sinus" #: share/gtklick.glade.h:30 msgid "Save profile (Ctrl+S)" msgstr "Profil speichern (Strg+S)" #: share/gtklick.glade.h:31 msgid "Select audio file for accented beats" msgstr "Audio-Datei für betonte Schläge auswählen" #: share/gtklick.glade.h:32 msgid "Select audio file for normal beats" msgstr "Audio-Datei für unbetonte Schläge auswählen" #: share/gtklick.glade.h:33 msgid "" "Space\t\tStart / stop\n" "\n" "→\t\t\tTempo + 1\n" "←\t\t\tTempo - 1\n" "↑\t\t\tTempo + 10\n" "↓\t\t\tTempo - 10\n" "PgUp \t\tTempo × 2\n" "PgDn \t\tTempo / 2\n" "\n" "Return\t\tTap tempo\n" "\n" "+/= \t\tVolume up\n" "-\t\t\tVolume down" msgstr "" "Leertaste\tStart / stop\n" "\n" "→\t\t\tTempo + 1\n" "←\t\t\tTempo - 1\n" "↑\t\t\tTempo + 10\n" "↓\t\t\tTempo - 10\n" "Bild ↑\t\tTempo × 2\n" "Bild ↓\t\tTempo / 2\n" "\n" "Eingabe\t\tTempo klopfen\n" "\n" "+\t\t\tLauter\n" "-\t\t\tLeiser" #: share/gtklick.glade.h:46 msgid "Sta_rt:" msgstr "Sta_rt:" #: share/gtklick.glade.h:47 msgid "Start tempo" msgstr "Anfangstempo" #: share/gtklick.glade.h:48 msgid "T_ap" msgstr "Klo_pfen" #: share/gtklick.glade.h:49 msgid "Tempo _markings" msgstr "_Tempobezeichnungen" #: share/gtklick.glade.h:50 msgid "Tempo increment in BPM per bar" msgstr "Tempo-Zunahme in BPM pro Takt" #: share/gtklick.glade.h:51 msgid "Volume" msgstr "Lautstärke" #: share/gtklick.glade.h:52 msgid "_2/4" msgstr "" #: share/gtklick.glade.h:53 msgid "_3/4" msgstr "" #: share/gtklick.glade.h:54 msgid "_4/4" msgstr "" #: share/gtklick.glade.h:55 msgid "_Automatically connect to soundcard output" msgstr "_Automatisch mit Soundkarten-Ausgang verbinden" #: share/gtklick.glade.h:56 msgid "_Edit" msgstr "_Bearbeiten" #: share/gtklick.glade.h:57 msgid "_File" msgstr "_Datei" #: share/gtklick.glade.h:58 msgid "_Help" msgstr "_Hilfe" #: share/gtklick.glade.h:59 msgid "_Increment:" msgstr "Stei_gerung:" #: share/gtklick.glade.h:60 msgid "_Keyboard Shortcuts" msgstr "Tasten_kombinationen" #: share/gtklick.glade.h:61 msgid "_Meter" msgstr "Ta_ktart" #: share/gtklick.glade.h:62 msgid "_Noise" msgstr "" #: share/gtklick.glade.h:63 msgid "_Other:" msgstr "Andere:" #: share/gtklick.glade.h:64 msgid "_Pattern" msgstr "_Muster" #: share/gtklick.glade.h:65 msgid "_Pitch:" msgstr "_Tonhöhe:" #: share/gtklick.glade.h:66 msgid "_Speed trainer" msgstr "T_empo-Trainer" #: share/gtklick.glade.h:67 msgid "_Square" msgstr "_Rechteck" #: share/gtklick.glade.h:68 msgid "_View" msgstr "_Ansicht" #: share/gtklick.glade.h:69 msgid "gtklick" msgstr "" #: gtklick/gtklick.py:99 msgid "" "Usage:\n" " gtklick [ options ]\n" "\n" "Options:\n" " -o port OSC port to start klick with\n" " -q port OSC port of running klick instance to connect to\n" " -r port OSC port to be used for gtklick\n" " -h show this help" msgstr "" "Aufruf:\n" " gtklick [ optionen ]\n" "\n" "Optionen:\n" " -o port OSC Port auf dem klick gestartet wird\n" " -q port OSC Port einer laufenden klick-Instanz\n" " -r port OSC Port für gtklick\n" " -h diese Hilfe anzeigen" #: gtklick/gtklick.py:193 msgid "klick seems to have been killed, can't continue without it" msgstr "klick scheint getötet worden zu sein, kann so nicht weitermachen" #: gtklick/gtklick.py:202 msgid "gtklick error" msgstr "gtklick Fehler" #: gtklick/klick_backend.py:58 #, python-format msgid "failed to start klick: %s" msgstr "Konnte klick nicht starten: %s" #: gtklick/klick_backend.py:61 msgid "timeout while waiting for klick to start" msgstr "Zeitüberschreitung beim Starten von klick" #: gtklick/klick_backend.py:67 msgid "can't connect to klick" msgstr "Kann keine Verbindung zu klick herstellen" #: gtklick/klick_backend.py:85 #, python-format msgid "" "failed to start klick: %s\n" "please make sure klick is installed." msgstr "" "Konnte klick nicht starten: %s\n" "Bitte stellen Sie sicher, daß klick installiert ist" #: gtklick/klick_backend.py:90 #, python-format msgid "" "your version of klick is too old (%s).\n" "please upgrade to klick %d.%d.%d or later." msgstr "" "Ihre Version von klick ist zu alt (%s).\n" "Bitte aktualisieren sie auf klick %d.%d.%d oder neuer." #: gtklick/preferences_dialog.py:216 #, python-format msgid "couldn't load file '%s'." msgstr "Datei '%s' konnte nicht geladen werden."