Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

gig.h File Reference

#include "DLS.h"
#include <math.h>
#include <string.h>

Go to the source code of this file.

Namespaces

namespace  gig

Classes

struct  gig::range_t
 Lower and upper limit of a range. More...
struct  gig::buffer_t
 Pointer address and size of a buffer. More...
struct  gig::leverage_ctrl_t
 Defines a controller that has a certain contrained influence on a particular synthesis parameter (used to define attenuation controller, EG1 controller and EG2 controller). More...
struct  gig::dimension_def_t
 General dimension definition. More...
struct  gig::crossfade_t
 Defines the envelope of a crossfade. More...
struct  gig::playback_state_t
 Reflects the current playback state for a sample. More...
struct  gig::progress_t
 Used for indicating the progress of a certain task. More...
class  gig::DimensionRegion
 Encapsulates articulation information of a dimension region. More...
class  gig::Sample
 Encapsulates sample waves used for playback. More...
class  gig::Region
 Defines Region information of an Instrument. More...
class  gig::Instrument
 Provides all neccessary information for the synthesis of an Instrument. More...
class  gig::File
 Parses Gigasampler files and provides abstract access to the data. More...
class  gig::Exception
 Will be thrown whenever a gig specific error occurs while trying to access a Gigasampler File. More...

Defines

#define INITIAL_SAMPLE_BUFFER_SIZE   512000
 Initial size of the sample buffer which is used for decompression of compressed sample wave streams - this value should always be bigger than the biggest sample piece expected to be read by the sampler engine, otherwise the buffer size will be raised at runtime and thus the buffer reallocated which is time consuming and unefficient.
#define LIST_TYPE_3PRG   0x67727033
#define LIST_TYPE_3EWL   0x6C776533
#define CHUNK_ID_SMPL   0x6C706D73
#define CHUNK_ID_3GIX   0x78696733
#define CHUNK_ID_3EWA   0x61776533
#define CHUNK_ID_3LNK   0x6B6E6C33
#define CHUNK_ID_3EWG   0x67776533
#define CHUNK_ID_EWAV   0x76617765
#define GIG_EXP_DECODE(x)   (pow(1.000000008813822, x))
 (so far) every exponential paramater in the gig format has a basis of 1.000000008813822
#define GIG_PITCH_TRACK_EXTRACT(x)   (!(x & 0x01))
#define GIG_VCF_RESONANCE_CTRL_EXTRACT(x)   ((x >> 4) & 0x03)
#define GIG_EG_CTR_ATTACK_INFLUENCE_EXTRACT(x)   ((x >> 1) & 0x03)
#define GIG_EG_CTR_DECAY_INFLUENCE_EXTRACT(x)   ((x >> 3) & 0x03)
#define GIG_EG_CTR_RELEASE_INFLUENCE_EXTRACT(x)   ((x >> 5) & 0x03)

Typedefs

typedef std::string String
typedef leverage_ctrl_t attenuation_ctrl_t
 Defines controller influencing attenuation.
typedef leverage_ctrl_t eg1_ctrl_t
 Defines controller influencing envelope generator 1.
typedef leverage_ctrl_t eg2_ctrl_t
 Defines controller influencing envelope generator 2.

Enumerations

enum  loop_type_t { loop_type_normal = 0x00000000, loop_type_bidirectional = 0x00000001, loop_type_backward = 0x00000002 }
 Standard types of sample loops. More...
enum  smpte_format_t {
  smpte_format_no_offset = 0x00000000, smpte_format_24_frames = 0x00000018, smpte_format_25_frames = 0x00000019, smpte_format_30_frames_dropping = 0x0000001D,
  smpte_format_30_frames = 0x0000001E
}
 Society of Motion Pictures and Television E time format. More...
enum  curve_type_t { curve_type_nonlinear = 0, curve_type_linear = 1, curve_type_special = 2, curve_type_unknown = 0xffffffff }
 Defines the shape of a function graph. More...
enum  dim_bypass_ctrl_t { dim_bypass_ctrl_none, dim_bypass_ctrl_94, dim_bypass_ctrl_95 }
 Dimensions allow to bypass one of the following controllers. More...
enum  lfo3_ctrl_t {
  lfo3_ctrl_internal = 0x00, lfo3_ctrl_modwheel = 0x01, lfo3_ctrl_aftertouch = 0x02, lfo3_ctrl_internal_modwheel = 0x03,
  lfo3_ctrl_internal_aftertouch = 0x04
}
 Defines how LFO3 is controlled by. More...
enum  lfo2_ctrl_t {
  lfo2_ctrl_internal = 0x00, lfo2_ctrl_modwheel = 0x01, lfo2_ctrl_foot = 0x02, lfo2_ctrl_internal_modwheel = 0x03,
  lfo2_ctrl_internal_foot = 0x04
}
 Defines how LFO2 is controlled by. More...
enum  lfo1_ctrl_t {
  lfo1_ctrl_internal = 0x00, lfo1_ctrl_modwheel = 0x01, lfo1_ctrl_breath = 0x02, lfo1_ctrl_internal_modwheel = 0x03,
  lfo1_ctrl_internal_breath = 0x04
}
 Defines how LFO1 is controlled by. More...
enum  vcf_cutoff_ctrl_t {
  vcf_cutoff_ctrl_none = 0x00, vcf_cutoff_ctrl_modwheel = 0x81, vcf_cutoff_ctrl_effect1 = 0x8c, vcf_cutoff_ctrl_effect2 = 0x8d,
  vcf_cutoff_ctrl_breath = 0x82, vcf_cutoff_ctrl_foot = 0x84, vcf_cutoff_ctrl_sustainpedal = 0xc0, vcf_cutoff_ctrl_softpedal = 0xc3,
  vcf_cutoff_ctrl_genpurpose7 = 0xd2, vcf_cutoff_ctrl_genpurpose8 = 0xd3, vcf_cutoff_ctrl_aftertouch = 0x80
}
 Defines how the filter cutoff frequency is controlled by. More...
enum  vcf_res_ctrl_t {
  vcf_res_ctrl_none = 0xffffffff, vcf_res_ctrl_genpurpose3 = 0, vcf_res_ctrl_genpurpose4 = 1, vcf_res_ctrl_genpurpose5 = 2,
  vcf_res_ctrl_genpurpose6 = 3
}
 Defines how the filter resonance is controlled by. More...
enum  dimension_t {
  dimension_none = 0x00, dimension_samplechannel = 0x80, dimension_layer = 0x81, dimension_velocity = 0x82,
  dimension_channelaftertouch = 0x83, dimension_releasetrigger = 0x84, dimension_keyboard = 0x85, dimension_roundrobin = 0x86,
  dimension_random = 0x87, dimension_modwheel = 0x01, dimension_breath = 0x02, dimension_foot = 0x04,
  dimension_portamentotime = 0x05, dimension_effect1 = 0x0c, dimension_effect2 = 0x0d, dimension_genpurpose1 = 0x10,
  dimension_genpurpose2 = 0x11, dimension_genpurpose3 = 0x12, dimension_genpurpose4 = 0x13, dimension_sustainpedal = 0x40,
  dimension_portamento = 0x41, dimension_sostenutopedal = 0x42, dimension_softpedal = 0x43, dimension_genpurpose5 = 0x30,
  dimension_genpurpose6 = 0x31, dimension_genpurpose7 = 0x32, dimension_genpurpose8 = 0x33, dimension_effect1depth = 0x5b,
  dimension_effect2depth = 0x5c, dimension_effect3depth = 0x5d, dimension_effect4depth = 0x5e, dimension_effect5depth = 0x5f
}
 Defines the type of dimension, that is how the dimension zones (and thus how the dimension regions are selected by. More...
enum  split_type_t { split_type_normal, split_type_customvelocity, split_type_bit }
 Intended for internal usage: will be used to convert a dimension value into the corresponding dimension bit number. More...
enum  vcf_type_t {
  vcf_type_lowpass = 0x00, vcf_type_lowpassturbo = 0xff, vcf_type_bandpass = 0x01, vcf_type_highpass = 0x02,
  vcf_type_bandreject = 0x03
}
 Defines which frequencies are filtered by the VCF. More...


Define Documentation

#define CHUNK_ID_3EWA   0x61776533
 

Definition at line 53 of file gig.h.

Referenced by gig::DimensionRegion::DimensionRegion().

#define CHUNK_ID_3EWG   0x67776533
 

Definition at line 55 of file gig.h.

Referenced by gig::Instrument::Instrument().

#define CHUNK_ID_3GIX   0x78696733
 

Definition at line 52 of file gig.h.

Referenced by gig::Sample::Sample().

#define CHUNK_ID_3LNK   0x6B6E6C33
 

Definition at line 54 of file gig.h.

Referenced by gig::Region::Region().

#define CHUNK_ID_EWAV   0x76617765
 

Definition at line 56 of file gig.h.

Referenced by gig::Sample::Sample().

#define CHUNK_ID_SMPL   0x6C706D73
 

Definition at line 51 of file gig.h.

Referenced by gig::Sample::Sample().

#define GIG_EG_CTR_ATTACK_INFLUENCE_EXTRACT  )     ((x >> 1) & 0x03)
 

Definition at line 63 of file gig.h.

Referenced by gig::DimensionRegion::DimensionRegion().

#define GIG_EG_CTR_DECAY_INFLUENCE_EXTRACT  )     ((x >> 3) & 0x03)
 

Definition at line 64 of file gig.h.

Referenced by gig::DimensionRegion::DimensionRegion().

#define GIG_EG_CTR_RELEASE_INFLUENCE_EXTRACT  )     ((x >> 5) & 0x03)
 

Definition at line 65 of file gig.h.

Referenced by gig::DimensionRegion::DimensionRegion().

#define GIG_EXP_DECODE  )     (pow(1.000000008813822, x))
 

(so far) every exponential paramater in the gig format has a basis of 1.000000008813822

Definition at line 60 of file gig.h.

Referenced by gig::DimensionRegion::DimensionRegion().

#define GIG_PITCH_TRACK_EXTRACT  )     (!(x & 0x01))
 

Definition at line 61 of file gig.h.

Referenced by gig::DimensionRegion::DimensionRegion().

#define GIG_VCF_RESONANCE_CTRL_EXTRACT  )     ((x >> 4) & 0x03)
 

Definition at line 62 of file gig.h.

Referenced by gig::DimensionRegion::DimensionRegion().

#define INITIAL_SAMPLE_BUFFER_SIZE   512000
 

Initial size of the sample buffer which is used for decompression of compressed sample wave streams - this value should always be bigger than the biggest sample piece expected to be read by the sampler engine, otherwise the buffer size will be raised at runtime and thus the buffer reallocated which is time consuming and unefficient.

Definition at line 37 of file gig.h.

#define LIST_TYPE_3EWL   0x6C776533
 

Definition at line 50 of file gig.h.

#define LIST_TYPE_3PRG   0x67727033
 

Definition at line 49 of file gig.h.

Referenced by gig::Region::LoadDimensionRegions().


Typedef Documentation

typedef leverage_ctrl_t gig::attenuation_ctrl_t
 

Defines controller influencing attenuation.

See also:
leverage_ctrl_t

Definition at line 197 of file gig.h.

typedef leverage_ctrl_t gig::eg1_ctrl_t
 

Defines controller influencing envelope generator 1.

See also:
leverage_ctrl_t

Definition at line 204 of file gig.h.

typedef leverage_ctrl_t gig::eg2_ctrl_t
 

Defines controller influencing envelope generator 2.

See also:
leverage_ctrl_t

Definition at line 211 of file gig.h.

typedef std::string gig::String
 

Definition at line 70 of file gig.h.


Enumeration Type Documentation

enum curve_type_t
 

Defines the shape of a function graph.

Enumeration values:
curve_type_nonlinear 
curve_type_linear 
curve_type_special 
curve_type_unknown 

Definition at line 107 of file gig.h.

Referenced by gig::DimensionRegion::DimensionRegion().

enum dim_bypass_ctrl_t
 

Dimensions allow to bypass one of the following controllers.

Enumeration values:
dim_bypass_ctrl_none 
dim_bypass_ctrl_94  Effect 4 Depth (MIDI Controller 94).
dim_bypass_ctrl_95  Effect 5 Depth (MIDI Controller 95).

Definition at line 115 of file gig.h.

enum dimension_t
 

Defines the type of dimension, that is how the dimension zones (and thus how the dimension regions are selected by.

The number of dimension zones is always a power of two. All dimensions can have up to 32 zones (except the layer dimension with only up to 8 zones and the samplechannel dimension which currently allows only 2 zones).

Enumeration values:
dimension_none  Dimension not in use.
dimension_samplechannel  If used sample has more than one channel (thus is not mono).
dimension_layer  For layering of up to 8 instruments (and eventually crossfading of 2 or 4 layers).
dimension_velocity  Key Velocity (this is the only dimension where the ranges can exactly be defined).
dimension_channelaftertouch  Channel Key Pressure.
dimension_releasetrigger  Special dimension for triggering samples on releasing a key.
dimension_keyboard  Dimension for keyswitching.
dimension_roundrobin  Different samples triggered each time a note is played, dimension regions selected in sequence.
dimension_random  Different samples triggered each time a note is played, random order.
dimension_modwheel  Modulation Wheel (MIDI Controller 1).
dimension_breath  Breath Controller (Coarse, MIDI Controller 2).
dimension_foot  Foot Pedal (Coarse, MIDI Controller 4).
dimension_portamentotime  Portamento Time (Coarse, MIDI Controller 5).
dimension_effect1  Effect Controller 1 (Coarse, MIDI Controller 12).
dimension_effect2  Effect Controller 2 (Coarse, MIDI Controller 13).
dimension_genpurpose1  General Purpose Controller 1 (Slider, MIDI Controller 16).
dimension_genpurpose2  General Purpose Controller 2 (Slider, MIDI Controller 17).
dimension_genpurpose3  General Purpose Controller 3 (Slider, MIDI Controller 18).
dimension_genpurpose4  General Purpose Controller 4 (Slider, MIDI Controller 19).
dimension_sustainpedal  Sustain Pedal (MIDI Controller 64).
dimension_portamento  Portamento (MIDI Controller 65).
dimension_sostenutopedal  Sostenuto Pedal (MIDI Controller 66).
dimension_softpedal  Soft Pedal (MIDI Controller 67).
dimension_genpurpose5  General Purpose Controller 5 (Button, MIDI Controller 80).
dimension_genpurpose6  General Purpose Controller 6 (Button, MIDI Controller 81).
dimension_genpurpose7  General Purpose Controller 7 (Button, MIDI Controller 82).
dimension_genpurpose8  General Purpose Controller 8 (Button, MIDI Controller 83).
dimension_effect1depth  Effect 1 Depth (MIDI Controller 91).
dimension_effect2depth  Effect 2 Depth (MIDI Controller 92).
dimension_effect3depth  Effect 3 Depth (MIDI Controller 93).
dimension_effect4depth  Effect 4 Depth (MIDI Controller 94).
dimension_effect5depth  Effect 5 Depth (MIDI Controller 95).

Definition at line 220 of file gig.h.

Referenced by gig::Region::Region().

enum lfo1_ctrl_t
 

Defines how LFO1 is controlled by.

Enumeration values:
lfo1_ctrl_internal  Only internally controlled.
lfo1_ctrl_modwheel  Only controlled by external modulation wheel.
lfo1_ctrl_breath  Only controlled by external breath controller.
lfo1_ctrl_internal_modwheel  Controlled internally and by external modulation wheel.
lfo1_ctrl_internal_breath  Controlled internally and by external breath controller.

Definition at line 140 of file gig.h.

enum lfo2_ctrl_t
 

Defines how LFO2 is controlled by.

Enumeration values:
lfo2_ctrl_internal  Only internally controlled.
lfo2_ctrl_modwheel  Only controlled by external modulation wheel.
lfo2_ctrl_foot  Only controlled by external foot controller.
lfo2_ctrl_internal_modwheel  Controlled internally and by external modulation wheel.
lfo2_ctrl_internal_foot  Controlled internally and by external foot controller.

Definition at line 131 of file gig.h.

enum lfo3_ctrl_t
 

Defines how LFO3 is controlled by.

Enumeration values:
lfo3_ctrl_internal  Only internally controlled.
lfo3_ctrl_modwheel  Only controlled by external modulation wheel.
lfo3_ctrl_aftertouch  Only controlled by aftertouch controller.
lfo3_ctrl_internal_modwheel  Controlled internally and by external modulation wheel.
lfo3_ctrl_internal_aftertouch  Controlled internally and by aftertouch controller.

Definition at line 122 of file gig.h.

enum loop_type_t
 

Standard types of sample loops.

Enumeration values:
loop_type_normal  Loop forward (normal).
loop_type_bidirectional  Alternating loop (forward/backward, also known as Ping Pong).
loop_type_backward  Loop backward (reverse).

Definition at line 91 of file gig.h.

enum smpte_format_t
 

Society of Motion Pictures and Television E time format.

Enumeration values:
smpte_format_no_offset  no SMPTE offset
smpte_format_24_frames  24 frames per second
smpte_format_25_frames  25 frames per second
smpte_format_30_frames_dropping  30 frames per second with frame dropping (30 drop)
smpte_format_30_frames  30 frames per second

Definition at line 98 of file gig.h.

enum split_type_t
 

Intended for internal usage: will be used to convert a dimension value into the corresponding dimension bit number.

Enumeration values:
split_type_normal  dimension value between 0-127, no custom range of zones
split_type_customvelocity  a velocity dimension split with custom range definition for each zone (if a velocity dimension split has no custom defined zone ranges then it's also just of type split_type_normal)
split_type_bit  dimension values are already the sought bit number

Definition at line 259 of file gig.h.

enum vcf_cutoff_ctrl_t
 

Defines how the filter cutoff frequency is controlled by.

Enumeration values:
vcf_cutoff_ctrl_none 
vcf_cutoff_ctrl_modwheel  Modulation Wheel (MIDI Controller 1).
vcf_cutoff_ctrl_effect1  Effect Controller 1 (Coarse, MIDI Controller 12).
vcf_cutoff_ctrl_effect2  Effect Controller 2 (Coarse, MIDI Controller 13).
vcf_cutoff_ctrl_breath  Breath Controller (Coarse, MIDI Controller 2).
vcf_cutoff_ctrl_foot  Foot Pedal (Coarse, MIDI Controller 4).
vcf_cutoff_ctrl_sustainpedal  Sustain Pedal (MIDI Controller 64).
vcf_cutoff_ctrl_softpedal  Soft Pedal (MIDI Controller 67).
vcf_cutoff_ctrl_genpurpose7  General Purpose Controller 7 (Button, MIDI Controller 82).
vcf_cutoff_ctrl_genpurpose8  General Purpose Controller 8 (Button, MIDI Controller 83).
vcf_cutoff_ctrl_aftertouch  Key Pressure.

Definition at line 149 of file gig.h.

enum vcf_res_ctrl_t
 

Defines how the filter resonance is controlled by.

Enumeration values:
vcf_res_ctrl_none 
vcf_res_ctrl_genpurpose3  General Purpose Controller 3 (Slider, MIDI Controller 18).
vcf_res_ctrl_genpurpose4  General Purpose Controller 4 (Slider, MIDI Controller 19).
vcf_res_ctrl_genpurpose5  General Purpose Controller 5 (Button, MIDI Controller 80).
vcf_res_ctrl_genpurpose6  General Purpose Controller 6 (Button, MIDI Controller 81).

Definition at line 164 of file gig.h.

enum vcf_type_t
 

Defines which frequencies are filtered by the VCF.

Enumeration values:
vcf_type_lowpass 
vcf_type_lowpassturbo  More poles than normal lowpass.
vcf_type_bandpass 
vcf_type_highpass 
vcf_type_bandreject 

Definition at line 276 of file gig.h.


Generated on Fri Jul 29 22:07:47 2005 for libgig by  doxygen 1.3.9.1