1#!/usr/bin/wish -f 2# 3# TiMidity++ -- MIDI to WAVE converter and player 4# Copyright (C) 1999-2002 Masanao Izumo <mo@goice.co.jp> 5# Copyright (C) 1995 Tuukka Toivonen <tt@cgs.fi> 6# 7# This program is free software; you can redistribute it and/or modify 8# it under the terms of the GNU General Public License as published by 9# the Free Software Foundation; either version 2 of the License, or 10# (at your option) any later version. 11# 12# This program is distributed in the hope that it will be useful, 13# but WITHOUT ANY WARRANTY; without even the implied warranty of 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15# GNU General Public License for more details. 16# 17# You should have received a copy of the GNU General Public License 18# along with this program; if not, write to the Free Software 19# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20# 21# 22# TkMidity -- Tcl/Tk Interface for TiMidity 23# written by Takashi IWAI 24# 25# Version 1.3; Dec. 5, 1995 26# 27 28 29# system path and configuration file path 30set TclRoot %TCL_DIR% 31set bitmap_path %TCL_DIR%/bitmaps 32set ConfigFile "~/.tkmidity" 33 34# append library path 35lappend auto_path $TclRoot 36 37# 38# window fonts 39# 40 41option add *menu*font "-adobe-helvetica-bold-r-normal--12-*" 42option add *body.curfile.font "-adobe-helvetica-bold-o-normal--18-*" 43option add *body.file*font "-adobe-helvetica-medium-r-normal--14-*" 44option add *body*label.font "-adobe-times-bold-i-normal--18-*" 45option add *body*Scale.font "-adobe-times-medium-i-normal--14-*" 46option add *body.text*font "-adobe-helvetica-medium-r-normal--14-*" 47 48# 49# main routine 50# 51 52InitGlobal 53LoadConfig 54InitCmdLine $argc $argv 55 56CreateWindow 57AppendMsg "TiMidity Tcl/Tk Version\n written by Takashi Iwai\n" 58 59init-random [pid] 60 61if {$Stat(new_tcltk)} { 62 fileevent stdin readable HandleInput 63} else { 64 addinput -read stdin HandleInput 65} 66 67if {$Config(AutoStart)} { PlayCmd } 68tkwait window . 69 70# send quit message to the main process before die... 71WriteMsg "QUIT" 72WriteMsg "ZAPP" 73exit 0 74 75# end of file 76