This file is indexed.

/usr/include/tse3/Mixer.h is in libtse3-dev 0.3.1-4.3ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
/*
 * @(#)Mixer.h 3.00 31 March 2000
 *
 * Copyright (c) 2000 Pete Goodliffe (pete@cthree.org)
 *
 * This file is part of TSE3 - the Trax Sequencer Engine version 3.00.
 *
 * This library is modifiable/redistributable under the terms of the GNU
 * General Public License.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; see the file COPYING. If not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 *
 */

#ifndef TSE3_MIXER_H
#define TSE3_MIXER_H

#include "tse3/listen/Mixer.h"

#include "tse3/Notifier.h"
#include "tse3/Midi.h"
#include "tse3/listen/Transport.h"

#include <cstddef>

namespace TSE3
{
    /**
     * The MixerChannel holds all @ref Mixer values for a particular MIDI
     * channel. It holds information on the current state of the following
     * MIDI parameters:
     * @li channel volume
     * @li pan
     * @li chorus
     * @li reverb
     * @li program
     * @li bank select MSB
     * @li bank select LSB
     *
     * @short   TSE3 MIDI port Mixing desk
     * @author  Pete Goodliffe
     * @version 3.00
     * @see     Mixer
     * @see     MixerChannel
     */
    class MixerChannel : public Notifier<MixerChannelListener>
    {
        public:

            /**
             * Returns this channel's volume value.
             *
             * @return Channel's volume value
             * @see    setVolume
             */
            unsigned int volume() const { return _volume; }

            /**
             * Sets the channel's volume value.
             *
             * @param v    New volume value
             * @param send Whether to send a MIDI command for this setting
             * @see   volume
             */
            void setVolume(unsigned int v, bool send = true);

            /**
             * Returns this channel's pan value.
             *
             * @return Channel's pan value
             * @see    setPan
             */
            unsigned int pan() const { return _volume; }

            /**
             * Sets the channel's pan value.
             *
             * @param p    New pan value
             * @param send Whether to send a MIDI command for this setting
             * @see   pan
             */
            void setPan(unsigned int p, bool send = true);

            /**
             * Returns this channel's chorus value.
             *
             * @return Channel's chorus value
             * @see    setChorus
             */
            unsigned int chorus() const { return _volume; }

            /**
             * Sets the channel's chorus value.
             *
             * @param c    New chorus value
             * @param send Whether to send a MIDI command for this setting
             * @see   chorus
             */
            void setChorus(unsigned int c, bool send = true);

            /**
             * Returns this channel's reverb value.
             *
             * @return Channel's reverb value
             * @see    setReverb
             */
            unsigned int reverb() const { return _volume; }

            /**
             * Sets the channel's reverb value.
             *
             * @param r    New reverb value
             * @param send Whether to send a MIDI command for this setting
             * @see   reverb
             */
            void setReverb(unsigned int r, bool send = true);

            /**
             * Returns this channel's program value.
             *
             * @return Channel's program value
             * @see    setProgram
             */
            unsigned int program() const { return _volume; }

            /**
             * Sets the channel's program value.
             *
             * @param p    New program value
             * @param send Whether to send a MIDI command for this setting
             * @see   program
             */
            void setProgram(unsigned int p, bool send = true);

            /**
             * Returns this channel's bank LSB value.
             *
             * @return Channel's bank select LSB value
             * @see    setBankLSB
             */
            unsigned int bankLSB() const { return _volume; }

            /**
             * Sets the channel's blank LSB value.
             *
             * @param b    New bank select LSB value
             * @param send Whether to send a MIDI command for this setting
             * @see   bankLSB
             */
            void setBankLSB(unsigned int b, bool send = true);

            /**
             * Returns this channel's bank MSB value.
             *
             * @return Channel's bank select MSB value
             * @see    setBankMSB
             */
            unsigned int bankMSB() const { return _volume; }

            /**
             * Sets the channel's bank MSB value.
             *
             * @param b    New bank select MSB value
             * @param send Whether to send a MIDI command for this setting
             * @see   bankMSB
             */
            void setBankMSB(unsigned int b, bool send = true);

            /**
             * Process a @ref MidiCommand for this MixerChannel.
             *
             * This will be called by the @ref MixerPort class if the
             * @ref MixerPort is given a @ref MidiCommand to process. (Indeed,
             * this will indirectly be called by sending an event to the
             * top-level @ref Mixer object).
             *
             * @param mc @ref MidiCommand to process
             */
            void command(MidiCommand mc);

            friend class MixerPort;

        private:

            /**
             * Creates a MixerChannel with default mixer parameters.
             */
            MixerChannel(MixerPort *mixerPort, unsigned int channel);
            virtual ~MixerChannel();

            MixerChannel(const MixerChannel &);
            MixerChannel &operator=(const MixerChannel &);

            MixerPort     *mixerPort;
            unsigned int   channel;
            unsigned char  _volume;
            unsigned char  _pan;
            unsigned char  _chorus;
            unsigned char  _reverb;
            unsigned char  _program;
            unsigned char  _bankLSB;
            unsigned char  _bankMSB;
    };

    /**
     * The MixerPort hols all @ref Mixer values for a particular MIDI port.
     * It contains 16 @ref MixerChannel objects which hold the information
     * for each of the port's MIDI channels.
     *
     * @short   TSE3 MIDI port Mixing desk
     * @author  Pete Goodliffe
     * @version 3.00
     * @see     Mixer
     * @see     MixerChannel
     */
    class MixerPort : public Notifier<MixerPortListener>
    {
        public:

            /**
             * Returns this MixerPort's @ref MixerChannel object for the
             * specified channel.
             *
             * The value returned for an index that is out of range is
             * undefined. The @ref size method describes the valid
             * values.
             *
             * @param n Index
             * @return @ref MixerChannel for this MIDI channel number
             */
            MixerChannel *operator[](size_t n) { return mixerChannels[n]; }

            /**
             * Returns this ports's master volume value.
             *
             * @return Port's volume value
             * @see setVolume
             */
            unsigned int volume() const { return _volume; }

            /**
             * Sets the ports's master volume value.
             *
             * @param v    New volume value
             * @param send Whether to send a MIDI command for this setting
             * @see volume
             */
            void setVolume(unsigned int v, bool send = true);

            /**
             * Process a @ref MidiCommand.
             *
             * This accepts the specified event (which is for this port) and
             * sends it to the appropriate MixerChannel.
             *
             * This will be called by the @ref Mixer class if the @ref Mixer
             * is given a @ref MidiCommand to process.
             *
             * @param mc @ref MidiCommand to process
             */
            void command(MidiCommand mc);

            friend class Mixer;
            friend class MixerChannel;

        private:

            MixerPort(Mixer *mixer, unsigned int port);
            virtual ~MixerPort();

            MixerPort(const MixerPort &);
            MixerPort &operator=(const MixerPort &);

            /**
             * This method sends the given @ref MidiCommand to the
             * @ref Mixer object, filling in the port information.
             */
            void txCommand(MidiCommand mc);

            MixerChannel  *mixerChannels[16];
            Mixer         *mixer;
            unsigned int   port;
            unsigned char  _volume;
    };

    /**
     * The Mixer class acts in a similar way to a studio mixing desk - it
     * represents the values of all the knobs and sliders you might find (in
     * the MIDI realm). The values it stores include main volume, channel
     * volume, channel pan, channel reverb, etc.
     *
     * The values can be updated in real time according to MIDI input, MIDI
     * output, or both. Values can be altered and sent back out through MIDI
     * out.
     *
     * It contains a number of @ref MixerPort objects which hold the state for
     * each MIDI port in the system.
     *
     * @short   TSE3 Mixing desk
     * @author  Pete Goodliffe
     * @version 3.00
     * @see     MidiCommand
     * @see     MixerPort
     */
    class Mixer : public Notifier<MixerListener>,
                  public Listener<TransportListener>,
                  public TransportCallback
    {
        public:

            /**
             * The Mixer object is created with all values at GM default.
             *
             * @param noPorts The number of MIDI ports to hold mixing
             *                information for - you can get the appropriate
             *                value from the @ref MidiScheduler object
             */
            Mixer(size_t noPorts, Transport *transport);
            virtual ~Mixer();

            /**
             * Returns this Mixer's @ref MixerPort object for the specified
             * port.
             *
             * The value returned for an index that is out of range is
             * undefined. The @ref size method describes the valid
             * values.
             *
             * @param n Index
             * @return @ref MixerPort for this MIDI port number
             */
            MixerPort *operator[](size_t n) { return mixerPorts[n]; }

            /**
             * Process a @ref MidiCommand.
             *
             * This accepts the specified command, and sends it to the
             * appropriate MixerPort.
             *
             * @param mc @ref MidiCommand to process
             */
            void command(MidiCommand mc);

            /**
             * @reimplemented
             */
            virtual void Notifier_Deleted(Transport *);

            /**
             * @reimplemented
             */
            virtual void Transport_MidiIn(MidiCommand mc);

            /**
             * @reimplemented
             */
            virtual void Transport_MidiOut(MidiCommand mc);

            friend class MixerPort;

        private:

            Mixer(const Mixer &);
            Mixer &operator=(const Mixer &);

            /**
             * This method sends the given @ref MidiCommand to the
             * @ref Transport object.
             */
            void txCommand(MidiCommand mc);

            size_t      noPorts;
            MixerPort **mixerPorts;
            Transport  *transport;
            bool        _updateWithInput;
            bool        _updateWithOutput;
    };

}

#endif