timidity_controls.h

Go to the documentation of this file.
00001 /*
00002 
00003     TiMidity -- Experimental MIDI to WAVE converter
00004     Copyright (C) 1995 Tuukka Toivonen <toivonen@clinet.fi>
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019 
00020     controls.h
00021 */
00022 
00023 #ifdef USE_TIMIDITY_MIDI
00024 
00025 #ifndef TIMIDITY_CONTROLS_H_INCLUDED
00026 #define TIMIDITY_CONTROLS_H_INCLUDED
00027 
00028 #include "timidity.h"
00029 
00030 #ifdef NS_TIMIDITY
00031 namespace NS_TIMIDITY {
00032 #endif
00033 
00034 /* Return values for ControlMode.read */
00035 
00036 #define TM_RC_ERROR -1
00037 #define TM_RC_NONE 0
00038 #define TM_RC_QUIT 1
00039 #define TM_RC_NEXT 2
00040 #define TM_RC_PREVIOUS 3 /* Restart this song at beginning, or the previous
00041                          song if we're less than a second into this one. */
00042 #define TM_RC_FORWARD 4
00043 #define TM_RC_BACK 5
00044 #define TM_RC_JUMP 6
00045 #define TM_RC_TOGGLE_PAUSE 7 /* Pause/continue */
00046 #define TM_RC_RESTART 8 /* Restart song at beginning */
00047 
00048 #define TM_RC_PAUSE 9 /* Really pause playing */
00049 #define TM_RC_CONTINUE 10 /* Continue if paused */
00050 #define TM_RC_REALLY_PREVIOUS 11 /* Really go to the previous song */
00051 #define TM_RC_CHANGE_VOLUME 12
00052 #define TM_RC_LOAD_FILE 13              /* Load a new midifile */
00053 #define TM_RC_TUNE_END 14               /* The tune is over, play it again sam? */
00054 
00055 #define CMSG_INFO       0
00056 #define CMSG_WARNING    1
00057 #define CMSG_ERROR      2
00058 #define CMSG_FATAL      3
00059 #define CMSG_TRACE      4
00060 #define CMSG_TIME       5
00061 #define CMSG_TOTAL      6
00062 #define CMSG_FILE       7
00063 #define CMSG_TEXT       8
00064 
00065 #define VERB_NORMAL     0
00066 #define VERB_VERBOSE    1
00067 #define VERB_NOISY      2
00068 #define VERB_DEBUG      3
00069 #define VERB_DEBUG_SILLY        4
00070 
00071 struct ControlMode {
00072   char *id_name, id_character;
00073   int verbosity, trace_playing, opened;
00074 
00075   int (*open)(int using_stdin, int using_stdout);
00076   void (*pass_playing_list)(int number_of_files, char *list_of_files[]);
00077   void (*close)(void);
00078   int (*read)(sint32 *valp);
00079   int (*cmsg)(int type, int verbosity_level, char *fmt, ...);
00080 
00081   void (*refresh)(void);
00082   void (*reset)(void);
00083   void (*file_name)(char *name);
00084   void (*total_time)(int tt);
00085   void (*current_time)(int ct);
00086 
00087   void (*note)(int v);
00088   void (*master_volume)(int mv);
00089   void (*program)(int channel, int val); /* val<0 means drum set -val */
00090   void (*volume)(int channel, int val);
00091   void (*expression)(int channel, int val);
00092   void (*panning)(int channel, int val);
00093   void (*sustain)(int channel, int val);
00094   void (*pitch_bend)(int channel, int val);
00095   
00096 };
00097 
00098 extern ControlMode *ctl_list[], *ctl; 
00099 extern char timidity_error[];
00100 
00101 #ifdef NS_TIMIDITY
00102 };
00103 #endif
00104 
00105 #endif
00106 
00107 #endif //USE_TIMIDITY_MIDI

Generated on Fri Jul 27 22:27:43 2007 for pentagram by  doxygen 1.4.7