/usr/include/libinstpatch-1.0/libinstpatch/IpatchDLS2Region.h is in libinstpatch-dev 1.0.0-7.
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 | /*
* libInstPatch
* 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 Lesser General Public License
* as published by the Free Software Foundation; version 2.1
* of the License only.
*
* This library 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser 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 or on the web at http://www.gnu.org.
*/
/**
* SECTION: IpatchDLS2Region
* @short_description: DLS region object
* @see_also: #IpatchDLSInst
* @stability: Stable
*
* DLS regions are child items of #IpatchDLSInst objects and define how an
* individual audio sample is synthesized in an instrument.
*/
#ifndef __IPATCH_DLS2_REGION_H__
#define __IPATCH_DLS2_REGION_H__
#include <stdarg.h>
#include <glib.h>
#include <glib-object.h>
#include <libinstpatch/IpatchItem.h>
#include <libinstpatch/IpatchDLS2Conn.h>
#include <libinstpatch/IpatchDLS2Sample.h>
/* forward type declarations */
typedef struct _IpatchDLS2Region IpatchDLS2Region;
typedef struct _IpatchDLS2RegionClass IpatchDLS2RegionClass;
typedef struct _IpatchDLS2ParamArray IpatchDLS2ParamArray;
#define IPATCH_TYPE_DLS2_REGION (ipatch_dls2_region_get_type ())
#define IPATCH_DLS2_REGION(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), IPATCH_TYPE_DLS2_REGION, \
IpatchDLS2Region))
#define IPATCH_DLS2_REGION_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), IPATCH_TYPE_DLS2_REGION, \
IpatchDLS2RegionClass))
#define IPATCH_IS_DLS2_REGION(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), IPATCH_TYPE_DLS2_REGION))
#define IPATCH_IS_DLS2_REGION_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), IPATCH_TYPE_DLS2_REGION))
#define IPATCH_DLS2_REGION_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), IPATCH_TYPE_DLS2_REGION, \
IpatchDLS2RegionClass))
/* standard fixed connection parameter enums */
typedef enum
{
IPATCH_DLS2_PARAM_MOD_LFO_FREQ,
IPATCH_DLS2_PARAM_MOD_LFO_DELAY,
IPATCH_DLS2_PARAM_VIB_LFO_FREQ,
IPATCH_DLS2_PARAM_VIB_LFO_DELAY,
IPATCH_DLS2_PARAM_VOL_EG_DELAY,
IPATCH_DLS2_PARAM_VOL_EG_ATTACK,
IPATCH_DLS2_PARAM_VOL_EG_HOLD,
IPATCH_DLS2_PARAM_VOL_EG_DECAY,
IPATCH_DLS2_PARAM_VOL_EG_SUSTAIN,
IP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11_TO_GAIN,
IPATCH_DLS2_PARAM_TUNE,
IPATCH_DLS2_PARAM_PITCH_WHEEL_RPN0_TO_PITCH,
IPATCH_DLS2_PARAM_NOTE_NUMBER_TO_PITCH,
IPATCH_DLS2_PARAM_RPN1_TO_PITCH,
IPATCH_DLS2_PARAM_VIB_LFO_TO_PITCH,
IPATCH_DLS2_PARAM_VIB_LFO_CC1_TO_PITCH,
IPATCH_DLS2_PARAM_VIB_LFO_CHANNEL_PRESS_TO_PITCH,
IPATCH_DLS2_PARAM_MOD_LFO_TO_PITCH,
IPATCH_DLS2_PARAM_MOD_LFO_CC1_TO_PITCH,
IPATCH_DLS2_PARAM_MOD_LFO_CHANNEL_PRESS_TO_PITCH,
IPATCH_DLS2_PARAM_MOD_EG_TO_PITCH,
IPATCH_DLS2_PARAM_PAN,
IPATCH_DLS2_PARAM_CC10_TO_PAN,
IPATCH_DLS2_PARAM_CC91_TO_REVERB_SEND,
IPATCH_DLS2_PARAM_REVERB_SEND,
IPATCH_DLS2_PARAM_CC93_TO_CHORUS_SEND,
IPATCH_DLS2_PARAM_CHORUS_SEND,
IPATCH_DLS2_PARAM_COUNT
} IpatchDLS2Param;
/* DLS2 parameters array */
struct _IpatchDLS2ParamArray
{
gint32 values[IPATCH_DLS2_PARAM_COUNT];
};
/* DLS2 region item */
struct _IpatchDLS2Region
{
IpatchItem parent_instance;
/*< private >*/
guint8 note_range_low; /* MIDI note range low value */
guint8 note_range_high; /* MIDI note range high value */
guint8 velocity_range_low; /* MIDI velocity range low value */
guint8 velocity_range_high; /* MIDI velocity range high value */
guint16 key_group; /* Exclusive key group number or 0 */
guint16 layer_group; /* layer group (descriptive only) */
guint16 phase_group; /* Phase locked group number or 0 */
guint16 channel; /* channel ID (IpatchDLS2RegionChannelType) */
IpatchDLS2Info *info; /* info string values */
IpatchDLS2SampleInfo *sample_info; /* sample info override or NULL */
IpatchDLS2Sample *sample; /* referenced sample */
IpatchDLS2ParamArray params; /* array of standard parameter connections */
GSList *conns; /* non-standard connections (modulators) */
};
struct _IpatchDLS2RegionClass
{
IpatchItemClass parent_class;
};
/* channel steering enum */
typedef enum
{
IPATCH_DLS2_REGION_CHANNEL_LEFT = 0,
IPATCH_DLS2_REGION_CHANNEL_RIGHT = 1,
IPATCH_DLS2_REGION_CHANNEL_CENTER = 2,
IPATCH_DLS2_REGION_CHANNEL_LOW_FREQ = 3,
IPATCH_DLS2_REGION_CHANNEL_SURROUND_LEFT = 4,
IPATCH_DLS2_REGION_CHANNEL_SURROUND_RIGHT = 5,
IPATCH_DLS2_REGION_CHANNEL_LEFT_OF_CENTER = 6,
IPATCH_DLS2_REGION_CHANNEL_RIGHT_OF_CENTER = 7,
IPATCH_DLS2_REGION_CHANNEL_SURROUND_CENTER = 8,
IPATCH_DLS2_REGION_CHANNEL_SIDE_LEFT = 9,
IPATCH_DLS2_REGION_CHANNEL_SIDE_RIGHT = 10,
IPATCH_DLS2_REGION_CHANNEL_TOP = 11,
IPATCH_DLS2_REGION_CHANNEL_TOP_FRONT_LEFT = 12,
IPATCH_DLS2_REGION_CHANNEL_TOP_FRONT_CENTER = 13,
IPATCH_DLS2_REGION_CHANNEL_TOP_FRONT_RIGHT = 14,
IPATCH_DLS2_REGION_CHANNEL_TOP_REAR_LEFT = 15,
IPATCH_DLS2_REGION_CHANNEL_TOP_REAR_CENTER = 16,
IPATCH_DLS2_REGION_CHANNEL_TOP_REAR_RIGHT = 17
} IpatchDLS2RegionChannelType;
/* mono audio alias */
#define IPATCH_DLS2_REGION_CHANNEL_MONO IPATCH_DLS2_REGION_CHANNEL_LEFT
/* Flags crammed into IpatchItem flags (ditched 2 - 16 bit flag fields) */
typedef enum
{
IPATCH_DLS2_REGION_SELF_NON_EXCLUSIVE = 1 << IPATCH_ITEM_UNUSED_FLAG_SHIFT,
IPATCH_DLS2_REGION_PHASE_MASTER = 1 << (IPATCH_ITEM_UNUSED_FLAG_SHIFT + 1),
IPATCH_DLS2_REGION_MULTI_CHANNEL = 1 << (IPATCH_ITEM_UNUSED_FLAG_SHIFT + 2),
IPATCH_DLS2_REGION_SAMPLE_INFO_OVERRIDE=1 << (IPATCH_ITEM_UNUSED_FLAG_SHIFT+3)
} IpatchDLS2RegionFlags;
#define IPATCH_DLS2_REGION_FLAG_MASK (0x0F << IPATCH_ITEM_UNUSED_FLAG_SHIFT)
/* 4 flags + 2 for expansion */
#define IPATCH_DLS2_REGION_UNUSED_FLAG_SHIFT (IPATCH_ITEM_UNUSED_FLAG_SHIFT + 6)
/* parameter info structure for IpatchDLS2Param_tables.c */
typedef struct
{
gint32 min; /* minimum value for this parameter (soft limit) */
gint32 max; /* maximum value for this parameter (soft limit) */
gint32 def; /* default value for this parameter */
guint unit; /* #IpatchUnitType */
char *label; /* text label for this parameter */
} IpatchDLS2ParamInfo;
GType ipatch_dls2_region_get_type (void);
IpatchDLS2Region *ipatch_dls2_region_new (void);
IpatchDLS2Region *ipatch_dls2_region_first (IpatchIter *iter);
IpatchDLS2Region *ipatch_dls2_region_next (IpatchIter *iter);
char *ipatch_dls2_region_get_info (IpatchDLS2Region *region, guint32 fourcc);
void ipatch_dls2_region_set_info (IpatchDLS2Region *region, guint32 fourcc,
const char *val);
void ipatch_dls2_region_set_sample (IpatchDLS2Region *region,
IpatchDLS2Sample *sample);
IpatchDLS2Sample *ipatch_dls2_region_get_sample (IpatchDLS2Region *region);
IpatchDLS2Sample *ipatch_dls2_region_peek_sample (IpatchDLS2Region *region);
void ipatch_dls2_region_set_note_range (IpatchDLS2Region *region,
int low, int high);
void ipatch_dls2_region_set_velocity_range (IpatchDLS2Region *region,
int low, int high);
gboolean ipatch_dls2_region_in_range (IpatchDLS2Region *region, int note,
int velocity);
void ipatch_dls2_region_set_param (IpatchDLS2Region *region,
IpatchDLS2Param param, gint32 val);
void ipatch_dls2_region_set_param_array (IpatchDLS2Region *region,
IpatchDLS2ParamArray *array);
GSList *ipatch_dls2_region_get_conns (IpatchDLS2Region *region);
void ipatch_dls2_region_set_conn (IpatchDLS2Region *region,
const IpatchDLS2Conn *conn);
void ipatch_dls2_region_unset_conn (IpatchDLS2Region *region,
const IpatchDLS2Conn *conn);
void ipatch_dls2_region_unset_all_conns (IpatchDLS2Region *region);
guint ipatch_dls2_region_conn_count (IpatchDLS2Region *region);
int ipatch_dls2_region_channel_map_stereo (IpatchDLS2RegionChannelType chan);
#endif
|