This file is indexed.

/usr/include/swami/libswami/SwamiMidiEvent.h is in libswami-dev 2.0.0+svn389-1.

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
/*
 * SwamiMidiEvent.h - Header for MIDI event object
 *
 * Swami
 * Copyright (C) 1999-2010 Joshua "Element" Green <jgreen@users.sourceforge.net>
 *
 * 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 only.
 *
 * 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., 59 Temple Place - Suite 330, Boston, MA
 * 02111-1307, USA or point your web browser to http://www.gnu.org.
 */
#ifndef __SWAMI_MIDI_EVENT_H__
#define __SWAMI_MIDI_EVENT_H__

#include <glib.h>
#include <glib-object.h>

typedef struct _SwamiMidiEvent SwamiMidiEvent;
typedef struct _SwamiMidiEventNote SwamiMidiEventNote;
typedef struct _SwamiMidiEventControl SwamiMidiEventControl;

#define SWAMI_TYPE_MIDI_EVENT   (swami_midi_event_get_type ())

/* MIDI event type (in comments Control = SwamiMidiEventControl and
   Note = SwamiMidiEventNote) */
typedef enum
{
  SWAMI_MIDI_NONE,		/* NULL event */
  SWAMI_MIDI_NOTE,		/* a note interval (Note) */
  SWAMI_MIDI_NOTE_ON,		/* note on event (Note) */
  SWAMI_MIDI_NOTE_OFF,		/* note off event (Note) */
  SWAMI_MIDI_KEY_PRESSURE,	/* key pressure (Note) */
  SWAMI_MIDI_PITCH_BEND, /* pitch bend event -8192 - 8191 (Control) */
  SWAMI_MIDI_PROGRAM_CHANGE,	/* program change (Control) */
  SWAMI_MIDI_CONTROL,		/* 7 bit controller (Control) */
  SWAMI_MIDI_CONTROL14,		/* 14 bit controller (Control) */
  SWAMI_MIDI_CHAN_PRESSURE,	/* channel pressure (Control) */
  SWAMI_MIDI_RPN,		/* registered param (Control) */
  SWAMI_MIDI_NRPN,		/* non registered param (Control) */


  /* these are used as a convenience for swami_midi_event_set() but they
     should not appear in the event type field, they are handled by other
     events above */
  SWAMI_MIDI_BEND_RANGE,
  SWAMI_MIDI_BANK_SELECT
} SwamiMidiEventType;

/* structure defining parameters of a note event */
struct _SwamiMidiEventNote
{
  guint8 note;
  guint8 velocity; /* _NOTE_ON, _NOTE_OFF, _KEY_PRESSURE, or _NOTE events */
  guint8 off_velocity;		/* _NOTE event only */
  guint8 unused;
  guint duration;		/* for SWAMI_MIDI_NOTE event only */
};

/* some standard General MIDI custom controllers */
#define SWAMI_MIDI_CC_BANK_MSB		0
#define SWAMI_MIDI_CC_MODULATION	1
#define SWAMI_MIDI_CC_VOLUME		7
#define SWAMI_MIDI_CC_PAN		10
#define SWAMI_MIDI_CC_EXPRESSION	11
#define SWAMI_MIDI_CC_BANK_LSB		32
#define SWAMI_MIDI_CC_SUSTAIN		64
#define SWAMI_MIDI_CC_REVERB		91
#define SWAMI_MIDI_CC_CHORUS		93

/* standard registered parameter numbers */
#define SWAMI_MIDI_RPN_BEND_RANGE	0
#define SWAMI_MIDI_RPN_MASTER_TUNE	1

struct _SwamiMidiEventControl
{
  guint param;			/* control number */
  int value;			/* control value */
};

struct _SwamiMidiEvent
{
  SwamiMidiEventType type;
  int channel;	     /* most events send on a specific MIDI channel */

  union
  {
    SwamiMidiEventNote note;
    SwamiMidiEventControl control;
  } data;
};

GType swami_midi_event_get_type (void);
SwamiMidiEvent *swami_midi_event_new (void);
void swami_midi_event_free (SwamiMidiEvent *event);
SwamiMidiEvent *swami_midi_event_copy (SwamiMidiEvent *event);

void swami_midi_event_set (SwamiMidiEvent *event, SwamiMidiEventType type,
			   int channel, int param1, int param2);

void swami_midi_event_note_on (SwamiMidiEvent *event, int channel,
			       int note, int velocity);
void swami_midi_event_note_off (SwamiMidiEvent *event, int channel,
				int note, int velocity);
void swami_midi_event_bank_select (SwamiMidiEvent *event, int channel,
				   int bank);
void swami_midi_event_program_change (SwamiMidiEvent *event, int channel,
				      int program);
void swami_midi_event_bend_range (SwamiMidiEvent *event, int channel,
				  int cents);
void swami_midi_event_pitch_bend (SwamiMidiEvent *event, int channel,
				  int value);
void swami_midi_event_control (SwamiMidiEvent *event, int channel,
			       int ctrlnum, int value);
void swami_midi_event_control14 (SwamiMidiEvent *event, int channel,
				 int ctrlnum, int value);
void swami_midi_event_rpn (SwamiMidiEvent *event, int channel, int paramnum,
			   int value);
void swami_midi_event_nrpn (SwamiMidiEvent *event, int channel, int paramnum,
			    int value);

#endif