1 /*
2     TiMidity -- Experimental MIDI to WAVE converter
3     Copyright (C) 1995 Tuukka Toivonen <toivonen@clinet.fi>
4 
5     This program is free software; you can redistribute it and/or modify
6     it under the terms of the Perl Artistic License, available in COPYING.
7  */
8 
9 /* Return values for ControlMode.read */
10 
11 #define RC_ERROR -1
12 #define RC_NONE 0
13 #define RC_QUIT 1
14 #define RC_NEXT 2
15 #define RC_PREVIOUS 3 /* Restart this song at beginning, or the previous
16 			 song if we're less than a second into this one. */
17 #define RC_FORWARD 4
18 #define RC_BACK 5
19 #define RC_JUMP 6
20 #define RC_TOGGLE_PAUSE 7 /* Pause/continue */
21 #define RC_RESTART 8 /* Restart song at beginning */
22 
23 #define RC_PAUSE 9 /* Really pause playing */
24 #define RC_CONTINUE 10 /* Continue if paused */
25 #define RC_REALLY_PREVIOUS 11 /* Really go to the previous song */
26 #define RC_CHANGE_VOLUME 12
27 #define RC_LOAD_FILE 13		/* Load a new midifile */
28 #define RC_TUNE_END 14		/* The tune is over, play it again sam? */
29 
30 #define CMSG_INFO	0
31 #define CMSG_WARNING	1
32 #define CMSG_ERROR	2
33 #define CMSG_FATAL	3
34 #define CMSG_TRACE	4
35 #define CMSG_TIME	5
36 #define CMSG_TOTAL	6
37 #define CMSG_FILE	7
38 #define CMSG_TEXT	8
39 
40 #define VERB_NORMAL	0
41 #define VERB_VERBOSE	1
42 #define VERB_NOISY	2
43 #define VERB_DEBUG	3
44 #define VERB_DEBUG_SILLY	4
45 
46 typedef struct {
47   char *id_name, id_character;
48   int verbosity, trace_playing, opened;
49 
50   int (*open)(int using_stdin, int using_stdout);
51   void (*pass_playing_list)(int number_of_files, char *list_of_files[]);
52   void (*close)(void);
53   int (*read)(int32 *valp);
54   int (*cmsg)(int type, int verbosity_level, char *fmt, ...);
55 
56   void (*refresh)(void);
57   void (*reset)(void);
58   void (*file_name)(char *name);
59   void (*total_time)(int tt);
60   void (*current_time)(int ct);
61 
62   void (*note)(int v);
63   void (*master_volume)(int mv);
64   void (*program)(int channel, int val); /* val<0 means drum set -val */
65   void (*volume)(int channel, int val);
66   void (*expression)(int channel, int val);
67   void (*panning)(int channel, int val);
68   void (*sustain)(int channel, int val);
69   void (*pitch_bend)(int channel, int val);
70 
71 } ControlMode;
72 
73 extern ControlMode *ctl_list[], *ctl;
74 extern char timidity_error[];
75