1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
|
//=========================================================
// MusE
// Linux Music Editor
// $Id: globals.h,v 1.10.2.11 2009/11/25 09:09:43 terminator356 Exp $
//
// (C) Copyright 1999/2000 Werner Schweer (ws@seh.de)
//
// 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; 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.
//
//=========================================================
#ifndef GLOBALS_H
#define GLOBALS_H
#include <sys/types.h>
#include "value.h"
#include "mtc.h"
#include <unistd.h>
class QString;
class QAction;
class QActionGroup;
class QStringList;
extern const float denormalBias;
extern int recFileNumber;
extern int sampleRate;
extern unsigned segmentSize;
extern unsigned fifoLength; // inversely proportional to segmentSize
extern int segmentCount;
extern bool overrideAudioOutput;
extern bool overrideAudioInput;
class QTimer;
extern QTimer* heartBeatTimer;
extern bool hIsB;
extern const signed char sharpTab[14][7];
extern const signed char flatTab[14][7];
extern QString museGlobalLib;
extern QString museGlobalShare;
extern QString museUser;
extern QString museProject;
extern QString museProjectInitPath;
extern QString configName;
extern QString configPath;
extern QString museInstruments;
extern QString museUserInstruments;
extern QString lastWavePath;
extern QString lastMidiPath;
extern bool debugMode;
extern bool midiInputTrace;
extern bool midiOutputTrace;
extern bool debugMsg;
extern bool heavyDebugMsg;
extern bool debugSync;
extern bool loadPlugins;
extern bool loadVST;
extern bool loadDSSI;
extern bool usePythonBridge;
extern bool useLASH;
extern bool realTimeScheduling;
extern int realTimePriority;
extern int midiRTPrioOverride;
/*
extern const char* midi_file_pattern[]; //!< File name pattern for midi files
extern const char* midi_file_save_pattern[]; //!< File name pattern for saving midi files
extern const char* med_file_pattern[]; //!< File name pattern for muse project files
extern const char* med_file_save_pattern[]; //!< File name pattern for saving muse project files
extern const char* image_file_pattern[]; //!< File name pattern for image files (gfx)
//extern const char* ctrl_file_pattern[]; //!< File name pattern for controller-files
extern const char* part_file_pattern[]; //!< File name pattern for part files
extern const char* part_file_save_pattern[]; //!< File name pattern for saving part files
//extern const char* plug_file_pattern[]; //!< File name pattern for plugin files
extern const char* preset_file_pattern[]; //!< File name pattern for plugin files
extern const char* preset_file_save_pattern[]; //!< File name pattern for saving plugin files
*/
extern const QStringList midi_file_pattern;
extern const QStringList midi_file_save_pattern;
extern const QStringList med_file_pattern;
extern const QStringList med_file_save_pattern;
extern const QStringList image_file_pattern;
//extern const QStringList ctrl_file_pattern;
extern const QStringList part_file_pattern;
extern const QStringList part_file_save_pattern;
extern const QStringList preset_file_pattern;
extern const QStringList preset_file_save_pattern;
extern const QStringList drum_map_file_pattern;
extern const QStringList drum_map_file_save_pattern;
extern const QStringList audio_file_pattern;
///extern Qt::ButtonState globalKeyState;
extern Qt::KeyboardModifiers globalKeyState;
extern int midiInputPorts; //!< receive from all devices
extern int midiInputChannel; //!< receive all channel
extern int midiRecordType; //!< receive all events
#define MIDI_FILTER_NOTEON 1
#define MIDI_FILTER_POLYP 2
#define MIDI_FILTER_CTRL 4
#define MIDI_FILTER_PROGRAM 8
#define MIDI_FILTER_AT 16
#define MIDI_FILTER_PITCH 32
#define MIDI_FILTER_SYSEX 64
extern int midiThruType; // transmit all events
extern int midiFilterCtrl1;
extern int midiFilterCtrl2;
extern int midiFilterCtrl3;
extern int midiFilterCtrl4;
#define CMD_RANGE_ALL 0
#define CMD_RANGE_SELECTED 1
#define CMD_RANGE_LOOP 2
extern QActionGroup* undoRedo;
extern QAction* undoAction;
extern QAction* redoAction;
extern QActionGroup* transportAction;
extern QAction* playAction;
extern QAction* startAction;
extern QAction* stopAction;
extern QAction* rewindAction;
extern QAction* forwardAction;
extern QAction* loopAction;
extern QAction* punchinAction;
extern QAction* punchoutAction;
extern QAction* recordAction;
extern QAction* panicAction;
//class AudioMixerApp;
class MusE;
//extern AudioMixerApp* audioMixer;
extern MusE* muse;
extern int preMeasures;
extern unsigned char measureClickNote;
extern unsigned char measureClickVelo;
extern unsigned char beatClickNote;
extern unsigned char beatClickVelo;
extern unsigned char clickChan;
extern unsigned char clickPort;
extern bool precountEnableFlag;
extern bool precountFromMastertrackFlag;
extern int precountSigZ;
extern int precountSigN;
extern bool precountPrerecord;
extern bool precountPreroll;
extern bool midiClickFlag;
extern bool audioClickFlag;
extern float audioClickVolume;
extern bool rcEnable;
extern unsigned char rcStopNote;
extern unsigned char rcRecordNote;
extern unsigned char rcGotoLeftMarkNote;
extern unsigned char rcPlayNote;
extern unsigned char rcSteprecNote;
extern bool midiSeqRunning;
extern bool automation;
// p3.3.55
#define JACK_MIDI_OUT_PORT_SUFFIX "_out"
#define JACK_MIDI_IN_PORT_SUFFIX "_in"
extern uid_t euid, ruid;
extern void doSetuid();
extern void undoSetuid();
extern bool checkAudioDevice();
extern bool getUniqueTmpfileName(QString subDir, QString ext, QString& newFilename);
#endif
|