gig.h
/***************************************************************************
* *
* libgig - C++ cross-platform Gigasampler format file access library *
* *
* Copyright (C) 2003-2025 by Christian Schoenebeck *
* <cuse@users.sourceforge.net> *
* *
* This library 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; either version 2 of the License, or *
* (at your option) any later version. *
* *
* 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
* MA 02111-1307 USA *
***************************************************************************/
#ifndef __GIG_H__
#define __GIG_H__
#include "DLS.h"
#include <vector>
#include <array> // since C++11
#ifndef __has_feature
# define __has_feature(x) 0
#endif
#ifndef HAVE_RTTI
# if __GXX_RTTI || __has_feature(cxx_rtti) || _CPPRTTI
# define HAVE_RTTI 1
# else
# define HAVE_RTTI 0
# endif
#endif
#if HAVE_RTTI
# include <typeinfo>
#else
# warning No RTTI available!
#endif
#if WORDS_BIGENDIAN
# define LIST_TYPE_3PRG 0x33707267
# define LIST_TYPE_3EWL 0x3365776C
# define LIST_TYPE_3GRI 0x33677269
# define LIST_TYPE_3GNL 0x33676E6C
# define LIST_TYPE_3LS 0x334c5320 // own gig format extension
# define LIST_TYPE_RTIS 0x52544953 // own gig format extension
# define LIST_TYPE_3DNM 0x33646e6d
# define CHUNK_ID_3GIX 0x33676978
# define CHUNK_ID_3EWA 0x33657761
# define CHUNK_ID_3LNK 0x336C6E6B
# define CHUNK_ID_3EWG 0x33657767
# define CHUNK_ID_EWAV 0x65776176
# define CHUNK_ID_3GNM 0x33676E6D
# define CHUNK_ID_EINF 0x65696E66
# define CHUNK_ID_3CRC 0x33637263
# define CHUNK_ID_SCRI 0x53637269 // own gig format extension
# define CHUNK_ID_LSNM 0x4c534e4d // own gig format extension
# define CHUNK_ID_SCSL 0x5343534c // own gig format extension
# define CHUNK_ID_SCPV 0x53435056 // own gig format extension
# define CHUNK_ID_LSDE 0x4c534445 // own gig format extension
# define CHUNK_ID_3DDP 0x33646470
#else // little endian
# define LIST_TYPE_3PRG 0x67727033
# define LIST_TYPE_3EWL 0x6C776533
# define LIST_TYPE_3GRI 0x69726733
# define LIST_TYPE_3GNL 0x6C6E6733
# define LIST_TYPE_3LS 0x20534c33 // own gig format extension
# define LIST_TYPE_RTIS 0x53495452 // own gig format extension
# define LIST_TYPE_3DNM 0x6d6e6433
# 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 CHUNK_ID_3GNM 0x6D6E6733
# define CHUNK_ID_EINF 0x666E6965
# define CHUNK_ID_3CRC 0x63726333
# define CHUNK_ID_SCRI 0x69726353 // own gig format extension
# define CHUNK_ID_LSNM 0x4d4e534c // own gig format extension
# define CHUNK_ID_SCSL 0x4c534353 // own gig format extension
# define CHUNK_ID_SCPV 0x56504353 // own gig format extension
# define CHUNK_ID_LSDE 0x4544534c // own gig format extension
# define CHUNK_ID_3DDP 0x70646433
#endif // WORDS_BIGENDIAN
#ifndef GIG_DECLARE_ENUM
# define GIG_DECLARE_ENUM(type, ...) enum type { __VA_ARGS__ }
#endif
// just symbol prototyping (since Serialization.h not included by default here)
namespace Serialization { class Archive; }
namespace gig {
typedef std::string String;
typedef RIFF::progress_t progress_t;
typedef RIFF::file_offset_t file_offset_t;
struct range_t {
uint8_t low;
uint8_t high;
};
struct buffer_t {
void* pStart;
file_offset_t Size;
file_offset_t NullExtensionSize;
buffer_t() {
pStart = NULL;
Size = 0;
NullExtensionSize = 0;
}
};
GIG_DECLARE_ENUM(loop_type_t,
loop_type_normal = 0x00000000,
loop_type_bidirectional = 0x00000001,
loop_type_backward = 0x00000002
);
GIG_DECLARE_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
);
GIG_DECLARE_ENUM(curve_type_t,
curve_type_nonlinear = 0,
curve_type_linear = 1,
curve_type_special = 2,
curve_type_unknown = 0xffffffff
);
GIG_DECLARE_ENUM(lfo_wave_t,
lfo_wave_sine = 0,
lfo_wave_triangle = 1,
lfo_wave_saw = 2,
lfo_wave_square = 3,
);
GIG_DECLARE_ENUM(dim_bypass_ctrl_t,
dim_bypass_ctrl_none,
dim_bypass_ctrl_94,
dim_bypass_ctrl_95
);
GIG_DECLARE_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
);
GIG_DECLARE_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
);
GIG_DECLARE_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
);
GIG_DECLARE_ENUM(vcf_cutoff_ctrl_t,
vcf_cutoff_ctrl_none = 0x00,
vcf_cutoff_ctrl_none2 = 0x01,
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
);
GIG_DECLARE_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
);
struct leverage_ctrl_t {
GIG_DECLARE_ENUM(type_t,
type_none = 0x00,
type_channelaftertouch = 0x2f,
type_velocity = 0xff,
type_controlchange = 0xfe
);
type_t type;
uint controller_number;
void serialize(Serialization::Archive* archive);
};
typedef leverage_ctrl_t attenuation_ctrl_t;
typedef leverage_ctrl_t eg1_ctrl_t;
typedef leverage_ctrl_t eg2_ctrl_t;
GIG_DECLARE_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_smartmidi = 0x88,
dimension_roundrobinkeyboard = 0x89,
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
);
GIG_DECLARE_ENUM(split_type_t,
split_type_normal,
split_type_bit
);
struct dimension_def_t {
dimension_t dimension;
uint8_t bits;
uint8_t zones;
split_type_t split_type;
float zone_size;
};
GIG_DECLARE_ENUM(vcf_type_t,
vcf_type_lowpass = 0x00,
vcf_type_lowpassturbo = 0xff,
vcf_type_bandpass = 0x01,
vcf_type_highpass = 0x02,
vcf_type_bandreject = 0x03,
vcf_type_lowpass_1p = 0x11,
vcf_type_lowpass_2p = 0x12,
vcf_type_lowpass_4p = 0x14,
vcf_type_lowpass_6p = 0x16,
vcf_type_highpass_1p = 0x21,
vcf_type_highpass_2p = 0x22,
vcf_type_highpass_4p = 0x24,
vcf_type_highpass_6p = 0x26,
vcf_type_bandpass_2p = 0x32,
vcf_type_bandreject_2p = 0x42
);
struct crossfade_t {
#if WORDS_BIGENDIAN
uint8_t out_end;
uint8_t out_start;
uint8_t in_end;
uint8_t in_start;
#else // little endian
uint8_t in_start;
uint8_t in_end;
uint8_t out_start;
uint8_t out_end;
#endif // WORDS_BIGENDIAN
void serialize(Serialization::Archive* archive);
};
struct playback_state_t {
file_offset_t position;
bool reverse;
file_offset_t loop_cycles_left;
};
struct eg_opt_t {
bool AttackCancel;
bool AttackHoldCancel;
bool Decay1Cancel;
bool Decay2Cancel;
bool ReleaseCancel;
eg_opt_t();
void serialize(Serialization::Archive* archive);
};
GIG_DECLARE_ENUM(sust_rel_trg_t,
sust_rel_trg_none = 0x00,
sust_rel_trg_maxvelocity = 0x01,
sust_rel_trg_keyvelocity = 0x02
);
// just symbol prototyping
class File;
class Instrument;
class Sample;
class Region;
class Group;
class Script;
class ScriptGroup;
class DimensionRegion : protected DLS::Sampler {
public:
uint8_t VelocityUpperLimit;
Sample* pSample;
// Sample Amplitude EG/LFO
uint16_t EG1PreAttack;
double EG1Attack;
double EG1Decay1;
double EG1Decay2;
bool EG1InfiniteSustain;
uint16_t EG1Sustain;
double EG1Release;
bool EG1Hold;
eg1_ctrl_t EG1Controller;
bool EG1ControllerInvert;
uint8_t EG1ControllerAttackInfluence;
uint8_t EG1ControllerDecayInfluence;
uint8_t EG1ControllerReleaseInfluence;
lfo_wave_t LFO1WaveForm;
double LFO1Frequency;
double LFO1Phase;
uint16_t LFO1InternalDepth;
uint16_t LFO1ControlDepth;
lfo1_ctrl_t LFO1Controller;
bool LFO1FlipPhase;
bool LFO1Sync;
// Filter Cutoff Frequency EG/LFO
uint16_t EG2PreAttack;
double EG2Attack;
double EG2Decay1;
double EG2Decay2;
bool EG2InfiniteSustain;
uint16_t EG2Sustain;
double EG2Release;
eg2_ctrl_t EG2Controller;
bool EG2ControllerInvert;
uint8_t EG2ControllerAttackInfluence;
uint8_t EG2ControllerDecayInfluence;
uint8_t EG2ControllerReleaseInfluence;
lfo_wave_t LFO2WaveForm;
double LFO2Frequency;
double LFO2Phase;
uint16_t LFO2InternalDepth;
uint16_t LFO2ControlDepth;
lfo2_ctrl_t LFO2Controller;
bool LFO2FlipPhase;
bool LFO2Sync;
// Sample Pitch EG/LFO
double EG3Attack;
int16_t EG3Depth;
lfo_wave_t LFO3WaveForm;
double LFO3Frequency;
double LFO3Phase;
int16_t LFO3InternalDepth;
int16_t LFO3ControlDepth;
lfo3_ctrl_t LFO3Controller;
bool LFO3FlipPhase;
bool LFO3Sync;
// Filter
bool VCFEnabled;
vcf_type_t VCFType;
vcf_cutoff_ctrl_t VCFCutoffController;
bool VCFCutoffControllerInvert;
uint8_t VCFCutoff;
curve_type_t VCFVelocityCurve;
uint8_t VCFVelocityScale;
uint8_t VCFVelocityDynamicRange;
uint8_t VCFResonance;
bool VCFResonanceDynamic;
vcf_res_ctrl_t VCFResonanceController;
bool VCFKeyboardTracking;
uint8_t VCFKeyboardTrackingBreakpoint;
// Key Velocity Transformations
curve_type_t VelocityResponseCurve;
uint8_t VelocityResponseDepth;
uint8_t VelocityResponseCurveScaling;
curve_type_t ReleaseVelocityResponseCurve;
uint8_t ReleaseVelocityResponseDepth;
uint8_t ReleaseTriggerDecay;
// Mix / Layer
crossfade_t Crossfade;
bool PitchTrack;
dim_bypass_ctrl_t DimensionBypass;
int8_t Pan;
bool SelfMask;
attenuation_ctrl_t AttenuationController;
bool InvertAttenuationController;
uint8_t AttenuationControllerThreshold;
uint8_t ChannelOffset;
bool SustainDefeat;
bool MSDecode;
uint16_t SampleStartOffset;
double SampleAttenuation;
uint8_t DimensionUpperLimits[8];
eg_opt_t EG1Options;
eg_opt_t EG2Options;
sust_rel_trg_t SustainReleaseTrigger;
bool NoNoteOffReleaseTrigger;
// derived attributes from DLS::Sampler
using DLS::Sampler::UnityNote;
using DLS::Sampler::FineTune;
using DLS::Sampler::Gain;
using DLS::Sampler::SampleLoops;
using DLS::Sampler::pSampleLoops;
// own methods
double GetVelocityAttenuation(uint8_t MIDIKeyVelocity);
double GetVelocityRelease(uint8_t MIDIKeyVelocity);
double GetVelocityCutoff(uint8_t MIDIKeyVelocity);
void SetVelocityResponseCurve(curve_type_t curve);
void SetVelocityResponseDepth(uint8_t depth);
void SetVelocityResponseCurveScaling(uint8_t scaling);
void SetReleaseVelocityResponseCurve(curve_type_t curve);
void SetReleaseVelocityResponseDepth(uint8_t depth);
void SetVCFCutoffController(vcf_cutoff_ctrl_t controller);
void SetVCFVelocityCurve(curve_type_t curve);
void SetVCFVelocityDynamicRange(uint8_t range);
void SetVCFVelocityScale(uint8_t scaling);
Region* GetParent() const;
// derived methods
using DLS::Sampler::AddSampleLoop;
using DLS::Sampler::DeleteSampleLoop;
// overridden methods
virtual void SetGain(int32_t gain) OVERRIDE;
virtual void UpdateChunks(progress_t* pProgress) OVERRIDE;
virtual void CopyAssign(const DimensionRegion* orig);
protected:
uint8_t* VelocityTable;
DimensionRegion(Region* pParent, RIFF::List* _3ewl);
DimensionRegion(RIFF::List* _3ewl, const DimensionRegion& src);
~DimensionRegion();
void CopyAssign(const DimensionRegion* orig, const std::map<Sample*,Sample*>* mSamples);
void serialize(Serialization::Archive* archive);
friend class Region;
friend class Serialization::Archive;
private:
typedef enum {
// official leverage controllers as they were defined in the original Gigasampler/GigaStudio format:
_lev_ctrl_none = 0x00,
_lev_ctrl_modwheel = 0x03,
_lev_ctrl_breath = 0x05,
_lev_ctrl_foot = 0x07,
_lev_ctrl_effect1 = 0x0d,
_lev_ctrl_effect2 = 0x0f,
_lev_ctrl_genpurpose1 = 0x11,
_lev_ctrl_genpurpose2 = 0x13,
_lev_ctrl_genpurpose3 = 0x15,
_lev_ctrl_genpurpose4 = 0x17,
_lev_ctrl_portamentotime = 0x0b,
_lev_ctrl_sustainpedal = 0x01,
_lev_ctrl_portamento = 0x19,
_lev_ctrl_sostenutopedal = 0x1b,
_lev_ctrl_softpedal = 0x09,
_lev_ctrl_genpurpose5 = 0x1d,
_lev_ctrl_genpurpose6 = 0x1f,
_lev_ctrl_genpurpose7 = 0x21,
_lev_ctrl_genpurpose8 = 0x23,
_lev_ctrl_effect1depth = 0x25,
_lev_ctrl_effect2depth = 0x27,
_lev_ctrl_effect3depth = 0x29,
_lev_ctrl_effect4depth = 0x2b,
_lev_ctrl_effect5depth = 0x2d,
_lev_ctrl_channelaftertouch = 0x2f,
_lev_ctrl_velocity = 0xff,
// format extension (these controllers are so far only supported by LinuxSampler & gigedit) they will *NOT* work with Gigasampler/GigaStudio !
// (the assigned values here are their official MIDI CC number plus the highest bit set):
_lev_ctrl_CC3_EXT = 0x83,
_lev_ctrl_CC6_EXT = 0x86,
_lev_ctrl_CC7_EXT = 0x87,
_lev_ctrl_CC8_EXT = 0x88,
_lev_ctrl_CC9_EXT = 0x89,
_lev_ctrl_CC10_EXT = 0x8a,
_lev_ctrl_CC11_EXT = 0x8b,
_lev_ctrl_CC14_EXT = 0x8e,
_lev_ctrl_CC15_EXT = 0x8f,
_lev_ctrl_CC20_EXT = 0x94,
_lev_ctrl_CC21_EXT = 0x95,
_lev_ctrl_CC22_EXT = 0x96,
_lev_ctrl_CC23_EXT = 0x97,
_lev_ctrl_CC24_EXT = 0x98,
_lev_ctrl_CC25_EXT = 0x99,
_lev_ctrl_CC26_EXT = 0x9a,
_lev_ctrl_CC27_EXT = 0x9b,
_lev_ctrl_CC28_EXT = 0x9c,
_lev_ctrl_CC29_EXT = 0x9d,
_lev_ctrl_CC30_EXT = 0x9e,
_lev_ctrl_CC31_EXT = 0x9f,
_lev_ctrl_CC68_EXT = 0xc4,
_lev_ctrl_CC69_EXT = 0xc5,
_lev_ctrl_CC70_EXT = 0xc6,
_lev_ctrl_CC71_EXT = 0xc7,
_lev_ctrl_CC72_EXT = 0xc8,
_lev_ctrl_CC73_EXT = 0xc9,
_lev_ctrl_CC74_EXT = 0xca,
_lev_ctrl_CC75_EXT = 0xcb,
_lev_ctrl_CC76_EXT = 0xcc,
_lev_ctrl_CC77_EXT = 0xcd,
_lev_ctrl_CC78_EXT = 0xce,
_lev_ctrl_CC79_EXT = 0xcf,
_lev_ctrl_CC84_EXT = 0xd4,
_lev_ctrl_CC85_EXT = 0xd5,
_lev_ctrl_CC86_EXT = 0xd6,
_lev_ctrl_CC87_EXT = 0xd7,
_lev_ctrl_CC89_EXT = 0xd9,
_lev_ctrl_CC90_EXT = 0xda,
_lev_ctrl_CC96_EXT = 0xe0,
_lev_ctrl_CC97_EXT = 0xe1,
_lev_ctrl_CC102_EXT = 0xe6,
_lev_ctrl_CC103_EXT = 0xe7,
_lev_ctrl_CC104_EXT = 0xe8,
_lev_ctrl_CC105_EXT = 0xe9,
_lev_ctrl_CC106_EXT = 0xea,
_lev_ctrl_CC107_EXT = 0xeb,
_lev_ctrl_CC108_EXT = 0xec,
_lev_ctrl_CC109_EXT = 0xed,
_lev_ctrl_CC110_EXT = 0xee,
_lev_ctrl_CC111_EXT = 0xef,
_lev_ctrl_CC112_EXT = 0xf0,
_lev_ctrl_CC113_EXT = 0xf1,
_lev_ctrl_CC114_EXT = 0xf2,
_lev_ctrl_CC115_EXT = 0xf3,
_lev_ctrl_CC116_EXT = 0xf4,
_lev_ctrl_CC117_EXT = 0xf5,
_lev_ctrl_CC118_EXT = 0xf6,
_lev_ctrl_CC119_EXT = 0xf7
} _lev_ctrl_t;
typedef std::map<uint32_t, double*> VelocityTableMap;
static size_t Instances;
static VelocityTableMap* pVelocityTables;
double* pVelocityAttenuationTable;
double* pVelocityReleaseTable;
double* pVelocityCutoffTable;
Region* pRegion;
leverage_ctrl_t DecodeLeverageController(_lev_ctrl_t EncodedController);
_lev_ctrl_t EncodeLeverageController(leverage_ctrl_t DecodedController);
double* GetReleaseVelocityTable(curve_type_t releaseVelocityResponseCurve, uint8_t releaseVelocityResponseDepth);
double* GetCutoffVelocityTable(curve_type_t vcfVelocityCurve, uint8_t vcfVelocityDynamicRange, uint8_t vcfVelocityScale, vcf_cutoff_ctrl_t vcfCutoffController);
double* GetVelocityTable(curve_type_t curveType, uint8_t depth, uint8_t scaling);
double* CreateVelocityTable(curve_type_t curveType, uint8_t depth, uint8_t scaling);
bool UsesAnyGigFormatExtension() const;
};
class Sample : public DLS::Sample {
public:
uint32_t Manufacturer;
uint32_t Product;
uint32_t SamplePeriod;
uint32_t MIDIUnityNote;
uint32_t FineTune;
smpte_format_t SMPTEFormat;
uint32_t SMPTEOffset;
uint32_t Loops;
uint32_t LoopID;
loop_type_t LoopType;
uint32_t LoopStart;
uint32_t LoopEnd;
uint32_t LoopSize;
uint32_t LoopFraction;
uint32_t LoopPlayCount;
bool Compressed;
uint32_t TruncatedBits;
bool Dithered;
// own methods
buffer_t LoadSampleData();
buffer_t LoadSampleData(file_offset_t SampleCount);
buffer_t LoadSampleDataWithNullSamplesExtension(uint NullSamplesCount);
buffer_t LoadSampleDataWithNullSamplesExtension(file_offset_t SampleCount, uint NullSamplesCount);
buffer_t GetCache();
// own static methods
static buffer_t CreateDecompressionBuffer(file_offset_t MaxReadSize);
static void DestroyDecompressionBuffer(buffer_t& DecompressionBuffer);
// overridden methods
void ReleaseSampleData();
void Resize(file_offset_t NewSize);
file_offset_t SetPos(file_offset_t SampleCount, RIFF::stream_whence_t Whence = RIFF::stream_start);
file_offset_t GetPos() const;
file_offset_t Read(void* pBuffer, file_offset_t SampleCount, buffer_t* pExternalDecompressionBuffer = NULL);
file_offset_t ReadAndLoop(void* pBuffer, file_offset_t SampleCount, playback_state_t* pPlaybackState, DimensionRegion* pDimRgn, buffer_t* pExternalDecompressionBuffer = NULL);
file_offset_t Write(void* pBuffer, file_offset_t SampleCount);
Group* GetGroup() const;
virtual void UpdateChunks(progress_t* pProgress) OVERRIDE;
void CopyAssignMeta(const Sample* orig);
void CopyAssignWave(const Sample* orig);
uint32_t GetWaveDataCRC32Checksum();
bool VerifyWaveData(uint32_t* pActually = NULL);
protected:
static size_t Instances;
static buffer_t InternalDecompressionBuffer;
Group* pGroup;
file_offset_t FrameOffset;
file_offset_t* FrameTable;
file_offset_t SamplePos;
file_offset_t SamplesInLastFrame;
file_offset_t WorstCaseFrameSize;
file_offset_t SamplesPerFrame;
buffer_t RAMCache;
unsigned long FileNo;
RIFF::Chunk* pCk3gix;
RIFF::Chunk* pCkSmpl;
uint32_t crc;
Sample(File* pFile, RIFF::List* waveList, file_offset_t WavePoolOffset, unsigned long fileNo = 0, int index = -1);
~Sample();
uint32_t CalculateWaveDataChecksum();
// Guess size (in bytes) of a compressed sample
inline file_offset_t GuessSize(file_offset_t samples) {
// 16 bit: assume all frames are compressed - 1 byte
// per sample and 5 bytes header per 2048 samples
// 24 bit: assume next best compression rate - 1.5
// bytes per sample and 13 bytes header per 256
// samples
const file_offset_t size =
BitDepth == 24 ? samples + (samples >> 1) + (samples >> 8) * 13
: samples + (samples >> 10) * 5;
// Double for stereo and add one worst case sample
// frame
return (Channels == 2 ? size << 1 : size) + WorstCaseFrameSize;
}
// Worst case amount of sample points that can be read with the
// given decompression buffer.
inline file_offset_t WorstCaseMaxSamples(buffer_t* pDecompressionBuffer) {
return (file_offset_t) ((float)pDecompressionBuffer->Size / (float)WorstCaseFrameSize * (float)SamplesPerFrame);
}
private:
void ScanCompressedSample();
friend class File;
friend class Region;
friend class Group; // allow to modify protected member pGroup
};
// TODO: <3dnl> list not used yet - not important though (just contains optional descriptions for the dimensions)
class Region : public DLS::Region {
public:
unsigned int Dimensions;
dimension_def_t pDimensionDefinitions[8];
uint32_t DimensionRegions;
DimensionRegion* pDimensionRegions[256];
unsigned int Layers;
// own methods
DimensionRegion* GetDimensionRegionByValue(const uint DimValues[8]);
DimensionRegion* GetDimensionRegionByBit(const uint8_t DimBits[8]);
int GetDimensionRegionIndexByValue(const uint DimValues[8]);
Sample* GetSample();
void AddDimension(dimension_def_t* pDimDef);
void DeleteDimension(dimension_def_t* pDimDef);
dimension_def_t* GetDimensionDefinition(dimension_t type);
void DeleteDimensionZone(dimension_t type, int zone);
void SplitDimensionZone(dimension_t type, int zone);
void SetDimensionType(dimension_t oldType, dimension_t newType);
// overridden methods
virtual void SetKeyRange(uint16_t Low, uint16_t High) OVERRIDE;
virtual void UpdateChunks(progress_t* pProgress) OVERRIDE;
virtual void CopyAssign(const Region* orig);
protected:
Region(Instrument* pInstrument, RIFF::List* rgnList);
void LoadDimensionRegions(RIFF::List* rgn);
void UpdateVelocityTable();
Sample* GetSampleFromWavePool(unsigned int WavePoolTableIndex, progress_t* pProgress = NULL);
void CopyAssign(const Region* orig, const std::map<Sample*,Sample*>* mSamples);
DimensionRegion* GetDimensionRegionByBit(const std::map<dimension_t,int>& DimCase);
~Region();
friend class Instrument;
private:
bool UsesAnyGigFormatExtension() const;
};
class MidiRule {
public:
virtual ~MidiRule() { }
protected:
virtual void UpdateChunks(uint8_t* pData) const = 0;
friend class Instrument;
};
class MidiRuleCtrlTrigger : public MidiRule {
public:
uint8_t ControllerNumber;
uint8_t Triggers;
struct trigger_t {
uint8_t TriggerPoint;
bool Descending;
uint8_t VelSensitivity;
uint8_t Key;
bool NoteOff;
uint8_t Velocity;
bool OverridePedal;
} pTriggers[32];
protected:
MidiRuleCtrlTrigger(RIFF::Chunk* _3ewg);
MidiRuleCtrlTrigger();
void UpdateChunks(uint8_t* pData) const OVERRIDE;
friend class Instrument;
};
class MidiRuleLegato : public MidiRule {
public:
uint8_t LegatoSamples;
bool BypassUseController;
uint8_t BypassKey;
uint8_t BypassController;
uint16_t ThresholdTime;
uint16_t ReleaseTime;
range_t KeyRange;
uint8_t ReleaseTriggerKey;
uint8_t AltSustain1Key;
uint8_t AltSustain2Key;
protected:
MidiRuleLegato(RIFF::Chunk* _3ewg);
MidiRuleLegato();
void UpdateChunks(uint8_t* pData) const OVERRIDE;
friend class Instrument;
};
class MidiRuleAlternator : public MidiRule {
public:
uint8_t Articulations;
String pArticulations[32];
range_t PlayRange;
uint8_t Patterns;
struct pattern_t {
String Name;
int Size;
const uint8_t& operator[](int i) const {
return data[i];
}
uint8_t& operator[](int i) {
return data[i];
}
private:
uint8_t data[32];
} pPatterns[32];
typedef enum {
selector_none,
selector_key_switch,
selector_controller
} selector_t;
selector_t Selector;
range_t KeySwitchRange;
uint8_t Controller;
bool Polyphonic;
bool Chained;
protected:
MidiRuleAlternator(RIFF::Chunk* _3ewg);
MidiRuleAlternator();
void UpdateChunks(uint8_t* pData) const OVERRIDE;
friend class Instrument;
};
class MidiRuleUnknown : public MidiRule {
protected:
MidiRuleUnknown() { }
void UpdateChunks(uint8_t* /*pData*/) const OVERRIDE { }
friend class Instrument;
};
class Script : protected DLS::Storage {
public:
enum Encoding_t {
ENCODING_ASCII = 0
};
enum Compression_t {
COMPRESSION_NONE = 0
};
enum Language_t {
LANGUAGE_NKSP = 0
};
String Name;
Compression_t Compression;
Encoding_t Encoding;
Language_t Language;
bool Bypass;
uint8_t Uuid[16];
String GetScriptAsText();
void SetScriptAsText(const String& text);
void SetGroup(ScriptGroup* pGroup);
ScriptGroup* GetGroup() const;
void CopyAssign(const Script* orig);
protected:
Script(ScriptGroup* group, RIFF::Chunk* ckScri);
virtual ~Script();
void UpdateChunks(progress_t* pProgress) OVERRIDE;
void DeleteChunks() OVERRIDE;
void RemoveAllScriptReferences();
void GenerateUuid();
friend class ScriptGroup;
friend class Instrument;
private:
ScriptGroup* pGroup;
RIFF::Chunk* pChunk;
std::vector<uint8_t> data;
uint32_t crc;
};
class ScriptGroup : protected DLS::Storage {
public:
String Name;
Script* GetScript(size_t index);
Script* AddScript();
void DeleteScript(Script* pScript);
protected:
ScriptGroup(File* file, RIFF::List* lstRTIS);
virtual ~ScriptGroup();
void LoadScripts();
virtual void UpdateChunks(progress_t* pProgress) OVERRIDE;
virtual void DeleteChunks() OVERRIDE;
friend class Script;
friend class File;
private:
File* pFile;
RIFF::List* pList;
std::vector<Script*>* pScripts;
};
class Instrument : protected DLS::Instrument {
public:
// derived attributes from DLS::Resource
using DLS::Resource::pInfo;
using DLS::Resource::pDLSID;
// derived attributes from DLS::Instrument
using DLS::Instrument::IsDrum;
using DLS::Instrument::MIDIBank;
using DLS::Instrument::MIDIBankCoarse;
using DLS::Instrument::MIDIBankFine;
using DLS::Instrument::MIDIProgram;
using DLS::Instrument::Regions;
// own attributes
int32_t Attenuation;
uint16_t EffectSend;
int16_t FineTune;
uint16_t PitchbendRange;
bool PianoReleaseMode;
range_t DimensionKeyRange;
// derived methods
using DLS::Resource::GetParent;
using DLS::Instrument::CountRegions;
// overridden methods
Region* GetRegionAt(size_t pos);
Region* GetFirstRegion() LIBGIG_DEPRECATED_API("Use GetRegionAt() instead.");
Region* GetNextRegion() LIBGIG_DEPRECATED_API("Use GetRegionAt() instead.");
Region* AddRegion();
void DeleteRegion(Region* pRegion);
void MoveTo(Instrument* dst);
virtual void UpdateChunks(progress_t* pProgress) OVERRIDE;
virtual void CopyAssign(const Instrument* orig);
// own methods
Region* GetRegion(unsigned int Key);
MidiRule* GetMidiRule(int i);
MidiRuleCtrlTrigger* AddMidiRuleCtrlTrigger();
MidiRuleLegato* AddMidiRuleLegato();
MidiRuleAlternator* AddMidiRuleAlternator();
void DeleteMidiRule(int i);
// real-time instrument script methods
Script* GetScriptOfSlot(size_t index);
void AddScriptSlot(Script* pScript, bool bypass = false);
void SwapScriptSlots(size_t index1, size_t index2);
void RemoveScriptSlot(size_t index);
void RemoveScript(Script* pScript);
size_t ScriptSlotCount() const;
bool IsScriptSlotBypassed(size_t index);
void SetScriptSlotBypassed(size_t index, bool bBypass);
bool IsScriptPatchVariableSet(size_t slot, String variable);
std::map<String,String> GetScriptPatchVariables(size_t slot);
String GetScriptPatchVariable(size_t slot, String variable);
void SetScriptPatchVariable(size_t slot, String variable, String value);
void UnsetScriptPatchVariable(ssize_t slot = -1, String variable = "");
protected:
Region* RegionKeyTable[128];
Instrument(File* pFile, RIFF::List* insList, progress_t* pProgress = NULL);
~Instrument();
void CopyAssign(const Instrument* orig, const std::map<Sample*,Sample*>* mSamples);
void UpdateRegionKeyTable();
void LoadScripts();
void UpdateScriptFileOffsets();
friend class File;
friend class Region; // so Region can call UpdateRegionKeyTable()
private:
struct _ScriptPooolEntry {
uint32_t fileOffset;
bool bypass;
};
struct _ScriptPooolRef {
Script* script;
bool bypass;
};
typedef std::array<uint8_t,16> _UUID;
typedef std::map<String,String> _PatchVars;
typedef std::map<size_t,_PatchVars> _VarsBySlot;
typedef std::map<_UUID,_VarsBySlot> _VarsByScript;
MidiRule** pMidiRules;
std::vector<_ScriptPooolEntry> scriptPoolFileOffsets;
std::vector<_ScriptPooolRef>* pScriptRefs;
_VarsByScript scriptVars;
_VarsByScript stripScriptVars();
bool ReferencesScriptWithUuid(const _UUID& uuid);
bool UsesAnyGigFormatExtension() const;
};
class Group : public DLS::Storage {
public:
String Name;
Sample* GetSample(size_t index);
Sample* GetFirstSample() LIBGIG_DEPRECATED_API("Use GetSample() instead.");
Sample* GetNextSample() LIBGIG_DEPRECATED_API("Use GetSample() instead.");
void AddSample(Sample* pSample);
protected:
Group(File* file, RIFF::Chunk* ck3gnm);
virtual ~Group();
virtual void UpdateChunks(progress_t* pProgress) OVERRIDE;
virtual void DeleteChunks() OVERRIDE;
void MoveAll();
friend class File;
private:
File* pFile;
RIFF::Chunk* pNameChunk;
size_t SamplesIterator;
};
class File : protected DLS::File {
public:
static const DLS::version_t VERSION_2;
static const DLS::version_t VERSION_3;
static const DLS::version_t VERSION_4;
// derived attributes from DLS::Resource
using DLS::Resource::pInfo;
using DLS::Resource::pDLSID;
// derived attributes from DLS::File
using DLS::File::pVersion;
using DLS::File::Instruments;
// derived methods from DLS::Resource
using DLS::Resource::GetParent;
// derived methods from DLS::File
using DLS::File::Save;
using DLS::File::GetFileName;
using DLS::File::SetFileName;
using DLS::File::GetRiffFile;
// overridden methods
File();
File(RIFF::File* pRIFF);
Sample* GetFirstSample(progress_t* pProgress = NULL) LIBGIG_DEPRECATED_API("Use GetSample() instead.");
Sample* GetNextSample() LIBGIG_DEPRECATED_API("Use GetSample() instead.");
Sample* GetSample(size_t index, progress_t* pProgress = NULL);
Sample* AddSample();
size_t CountSamples();
void DeleteSample(Sample* pSample);
Instrument* GetFirstInstrument() LIBGIG_DEPRECATED_API("Use GetInstrument() instead.");
Instrument* GetNextInstrument() LIBGIG_DEPRECATED_API("Use GetInstrument() instead.");
Instrument* GetInstrument(size_t index, progress_t* pProgress = NULL);
Instrument* AddInstrument();
Instrument* AddDuplicateInstrument(const Instrument* orig);
size_t CountInstruments();
void DeleteInstrument(Instrument* pInstrument);
Group* GetFirstGroup() LIBGIG_DEPRECATED_API("Use GetGroup() instead.");
Group* GetNextGroup() LIBGIG_DEPRECATED_API("Use GetGroup() instead.");
Group* GetGroup(size_t index);
Group* GetGroup(String name);
Group* AddGroup();
void DeleteGroup(Group* pGroup);
void DeleteGroupOnly(Group* pGroup);
void SetAutoLoad(bool b);
bool GetAutoLoad();
void AddContentOf(File* pFile);
ScriptGroup* GetScriptGroup(size_t index);
ScriptGroup* GetScriptGroup(const String& name);
ScriptGroup* AddScriptGroup();
void DeleteScriptGroup(ScriptGroup* pGroup);
virtual ~File();
virtual void UpdateChunks(progress_t* pProgress) OVERRIDE;
protected:
// overridden protected methods from DLS::File
virtual void LoadSamples() OVERRIDE;
virtual void LoadInstruments() OVERRIDE;
virtual void LoadGroups();
virtual void UpdateFileOffsets() OVERRIDE;
// own protected methods
virtual void LoadSamples(progress_t* pProgress);
virtual void LoadInstruments(progress_t* pProgress);
virtual void LoadScriptGroups();
void SetSampleChecksum(Sample* pSample, uint32_t crc);
uint32_t GetSampleChecksum(Sample* pSample);
uint32_t GetSampleChecksumByIndex(int index);
bool VerifySampleChecksumTable();
bool RebuildSampleChecksumTable();
int GetWaveTableIndexOf(gig::Sample* pSample);
friend class Region;
friend class Sample;
friend class Instrument;
friend class Group; // so Group can access protected member pRIFF
friend class ScriptGroup; // so ScriptGroup can access protected member pRIFF
private:
std::vector<Group*>* pGroups;
std::vector<Group*>::iterator GroupsIterator;
bool bAutoLoad;
std::vector<ScriptGroup*>* pScriptGroups;
bool UsesAnyGigFormatExtension() const;
};
class Exception : public DLS::Exception {
public:
Exception(String format, ...);
Exception(String format, va_list arg);
void PrintMessage() const;
protected:
Exception();
};
#if HAVE_RTTI
size_t enumCount(const std::type_info& type);
const char* enumKey(const std::type_info& type, size_t value);
bool enumKey(const std::type_info& type, String key);
const char** enumKeys(const std::type_info& type);
#endif // HAVE_RTTI
size_t enumCount(String typeName);
const char* enumKey(String typeName, size_t value);
bool enumKey(String typeName, String key);
const char** enumKeys(String typeName);
size_t enumValue(String key);
String libraryName();
String libraryVersion();
} // namespace gig
#endif // __GIG_H__
DLS::File::pVersion
version_t * pVersion
Points to a version_t structure if the file provided a version number else is set to NULL.
Definition DLS.h:566
DLS::File::SetFileName
void SetFileName(const String &name)
You may call this method store a future file name, so you don't have to to pass it to the Save() call...
Definition DLS.cpp:2040
DLS::File::Instruments
uint32_t Instruments
Reflects the number of available Instrument objects.
Definition DLS.h:567
DLS::File::Save
virtual void Save(const String &Path, progress_t *pProgress=NULL)
Save changes to another file.
Definition DLS.cpp:2294
DLS::File::GetRiffFile
RIFF::File * GetRiffFile()
Returns the underlying RIFF::File used for persistency of this DLS::File object.
Definition DLS.cpp:1999
DLS::File::GetFileName
String GetFileName()
File name of this DLS file.
Definition DLS.cpp:2032
DLS::Instrument::MIDIBankFine
uint8_t MIDIBankFine
Reflects the MIDI Bank number for MIDI Control Change 32 (bank 1 - 128).
Definition DLS.h:529
DLS::Instrument::MIDIBankCoarse
uint8_t MIDIBankCoarse
Reflects the MIDI Bank number for MIDI Control Change 0 (bank 1 - 128).
Definition DLS.h:528
DLS::Instrument::IsDrum
bool IsDrum
Indicates if the Instrument is a drum type, as they differ in the synthesis model of DLS from melodic...
Definition DLS.h:526
DLS::Instrument::Regions
uint32_t Regions
Reflects the number of Region defintions this Instrument has.
Definition DLS.h:531
DLS::Instrument::MIDIBank
uint16_t MIDIBank
Reflects combination of MIDIBankCoarse and MIDIBankFine (bank 1 - bank 16384). Do not change this val...
Definition DLS.h:527
DLS::Instrument::MIDIProgram
uint32_t MIDIProgram
Specifies the MIDI Program Change Number this Instrument should be assigned to.
Definition DLS.h:530
DLS::Instrument::CountRegions
size_t CountRegions()
Returns the amount of regions of this instrument.
Definition DLS.cpp:1419
DLS::Region
Defines Region information of an Instrument.
Definition DLS.h:493
DLS::Resource::pInfo
Info * pInfo
Points (in any case) to an Info object, providing additional, optional infos and comments.
Definition DLS.h:406
DLS::Resource::pDLSID
dlsid_t * pDLSID
Points to a dlsid_t structure if the file provided a DLS ID else is NULL.
Definition DLS.h:407
DLS::Sample
Encapsulates sample waves used for playback.
Definition DLS.h:457
DLS::Sample::BitDepth
uint16_t BitDepth
Size of each sample per channel (only if known sample data format is used, 0 otherwise).
Definition DLS.h:464
DLS::Sample::Channels
uint16_t Channels
Number of channels represented in the waveform data, e.g. 1 for mono, 2 for stereo (defaults to 1=mon...
Definition DLS.h:460
DLS::Sampler
Abstract base class which provides mandatory informations about sample players in general.
Definition DLS.h:425
DLS::Sampler::AddSampleLoop
void AddSampleLoop(sample_loop_t *pLoopDef)
Adds a new sample loop with the provided loop definition.
Definition DLS.cpp:759
DLS::Sampler::SampleLoops
uint32_t SampleLoops
Reflects the number of sample loops.
Definition DLS.h:432
DLS::Sampler::pSampleLoops
sample_loop_t * pSampleLoops
Points to the beginning of a sample loop array, or is NULL if there are no loops defined.
Definition DLS.h:433
DLS::Sampler::DeleteSampleLoop
void DeleteSampleLoop(sample_loop_t *pLoopDef)
Deletes an existing sample loop.
Definition DLS.cpp:781
DLS::Sampler::Gain
int32_t Gain
Definition DLS.h:429
DLS::Storage
Abstract base class for all classes using RIFF::Chunks for persistency.
Definition DLS.h:283
RIFF::Chunk
Ordinary RIFF Chunk.
Definition RIFF.h:186
RIFF::File
RIFF File.
Definition RIFF.h:314
RIFF::List
RIFF List Chunk.
Definition RIFF.h:262
Serialization::Archive
Destination container for serialization, and source container for deserialization.
Definition Serialization.h:1096
gig::DimensionRegion
Encapsulates articulation informations of a dimension region.
Definition gig.h:535
gig::DimensionRegion::VelocityResponseCurveScaling
uint8_t VelocityResponseCurveScaling
0 - 127 (usually you don't have to interpret this parameter, use GetVelocityAttenuation() instead).
Definition gig.h:610
gig::DimensionRegion::VCFCutoffController
vcf_cutoff_ctrl_t VCFCutoffController
Specifies which external controller has influence on the filter cutoff frequency.
Definition gig.h:596
gig::DimensionRegion::SetReleaseVelocityResponseDepth
void SetReleaseVelocityResponseDepth(uint8_t depth)
Updates the respective member variable and the lookup table / cache that depends on this value.
Definition gig.cpp:3190
gig::DimensionRegion::VelocityResponseDepth
uint8_t VelocityResponseDepth
Dynamic range of velocity affecting amplitude (0 - 4) (usually you don't have to interpret this param...
Definition gig.h:609
gig::DimensionRegion::EG2InfiniteSustain
bool EG2InfiniteSustain
If true, instead of going into Decay2 phase, Decay1 level will be hold until note will be released.
Definition gig.h:566
gig::DimensionRegion::SetVCFCutoffController
void SetVCFCutoffController(vcf_cutoff_ctrl_t controller)
Updates the respective member variable and the lookup table / cache that depends on this value.
Definition gig.cpp:3199
gig::DimensionRegion::EG2Controller
eg2_ctrl_t EG2Controller
MIDI Controller which has influence on filter cutoff EG parameters (attack, decay,...
Definition gig.h:569
gig::DimensionRegion::EG2Release
double EG2Release
Release time of the filter cutoff EG (0.000 - 60.000s).
Definition gig.h:568
gig::DimensionRegion::EG1Controller
eg1_ctrl_t EG1Controller
MIDI Controller which has influence on sample amplitude EG parameters (attack, decay,...
Definition gig.h:548
gig::DimensionRegion::VCFType
vcf_type_t VCFType
Defines the general filter characteristic (lowpass, highpass, bandpass, etc.).
Definition gig.h:595
gig::DimensionRegion::LFO3Phase
double LFO3Phase
[gig extension]: Phase displacement of the pitch LFO's wave form (0.0° - 360.0°).
Definition gig.h:587
gig::DimensionRegion::LFO3Sync
bool LFO3Sync
If set to true only one LFO should be used for all voices.
Definition gig.h:592
gig::DimensionRegion::VCFVelocityDynamicRange
uint8_t VCFVelocityDynamicRange
0x04 = lowest, 0x00 = highest .
Definition gig.h:601
gig::DimensionRegion::LFO3Controller
lfo3_ctrl_t LFO3Controller
MIDI Controller which controls the sample pitch LFO.
Definition gig.h:590
gig::DimensionRegion::EG1Decay1
double EG1Decay1
Decay time of the sample amplitude EG (0.000 - 60.000s).
Definition gig.h:542
gig::DimensionRegion::PitchTrack
bool PitchTrack
If true: sample will be pitched according to the key position (this will be disabled for drums for ex...
Definition gig.h:616
gig::DimensionRegion::SampleAttenuation
double SampleAttenuation
Sample volume (calculated from DLS::Sampler::Gain).
Definition gig.h:627
gig::DimensionRegion::VCFVelocityScale
uint8_t VCFVelocityScale
(0-127) Amount velocity controls VCF cutoff frequency (only if no other VCF cutoff controller is defi...
Definition gig.h:600
gig::DimensionRegion::CopyAssign
virtual void CopyAssign(const DimensionRegion *orig)
Make a (semi) deep copy of the DimensionRegion object given by orig and assign it to this object.
Definition gig.cpp:1842
gig::DimensionRegion::EG1ControllerDecayInfluence
uint8_t EG1ControllerDecayInfluence
Amount EG1 Controller has influence on the EG1 Decay time (0 - 3, where 0 means off).
Definition gig.h:551
gig::DimensionRegion::EG1Options
eg_opt_t EG1Options
[gig extension]: Behavior options which should be used for envelope generator 1 (volume amplitude EG)...
Definition gig.h:629
gig::DimensionRegion::EG2ControllerDecayInfluence
uint8_t EG2ControllerDecayInfluence
Amount EG2 Controller has influence on the EG2 Decay time (0 - 3, where 0 means off).
Definition gig.h:572
gig::DimensionRegion::EG1InfiniteSustain
bool EG1InfiniteSustain
If true, instead of going into Decay2 phase, Decay1 level will be hold until note will be released.
Definition gig.h:544
gig::DimensionRegion::EG2Decay1
double EG2Decay1
Decay time of the filter cutoff EG (0.000 - 60.000s).
Definition gig.h:564
gig::DimensionRegion::LFO1FlipPhase
bool LFO1FlipPhase
Inverts the polarity of the sample amplitude LFO wave, so it flips the wave form vertically.
Definition gig.h:559
gig::DimensionRegion::EG3Depth
int16_t EG3Depth
Depth of the sample pitch EG (-1200 - +1200).
Definition gig.h:584
gig::DimensionRegion::ChannelOffset
uint8_t ChannelOffset
Audio output where the audio signal of the dimension region should be routed to (0 - 9).
Definition gig.h:623
gig::DimensionRegion::pSample
Sample * pSample
Points to the Sample which is assigned to the dimension region.
Definition gig.h:538
gig::DimensionRegion::LFO1WaveForm
lfo_wave_t LFO1WaveForm
[gig extension]: The fundamental wave form to be used by the amplitude LFO, e.g. sine,...
Definition gig.h:553
gig::DimensionRegion::EG2ControllerAttackInfluence
uint8_t EG2ControllerAttackInfluence
Amount EG2 Controller has influence on the EG2 Attack time (0 - 3, where 0 means off).
Definition gig.h:571
gig::DimensionRegion::SetVCFVelocityScale
void SetVCFVelocityScale(uint8_t scaling)
Updates the respective member variable and the lookup table / cache that depends on this value.
Definition gig.cpp:3226
gig::DimensionRegion::LFO3WaveForm
lfo_wave_t LFO3WaveForm
[gig extension]: The fundamental wave form to be used by the pitch LFO, e.g. sine,...
Definition gig.h:585
gig::DimensionRegion::LFO3ControlDepth
int16_t LFO3ControlDepth
Controller depth of the sample pitch LFO (-1200 - +1200 cents).
Definition gig.h:589
gig::DimensionRegion::EG2ControllerReleaseInfluence
uint8_t EG2ControllerReleaseInfluence
Amount EG2 Controller has influence on the EG2 Release time (0 - 3, where 0 means off).
Definition gig.h:573
gig::DimensionRegion::EG1ControllerAttackInfluence
uint8_t EG1ControllerAttackInfluence
Amount EG1 Controller has influence on the EG1 Attack time (0 - 3, where 0 means off).
Definition gig.h:550
gig::DimensionRegion::SetReleaseVelocityResponseCurve
void SetReleaseVelocityResponseCurve(curve_type_t curve)
Updates the respective member variable and the lookup table / cache that depends on this value.
Definition gig.cpp:3181
gig::DimensionRegion::LFO2Controller
lfo2_ctrl_t LFO2Controller
MIDI Controlle which controls the filter cutoff LFO.
Definition gig.h:579
gig::DimensionRegion::VCFKeyboardTrackingBreakpoint
uint8_t VCFKeyboardTrackingBreakpoint
See VCFKeyboardTracking (0 - 127).
Definition gig.h:606
gig::DimensionRegion::VCFResonanceDynamic
bool VCFResonanceDynamic
If true: Increases the resonance Q according to changes of controllers that actually control the VCF ...
Definition gig.h:603
gig::DimensionRegion::LFO2Phase
double LFO2Phase
[gig extension]: Phase displacement of the filter cutoff LFO's wave form (0.0° - 360....
Definition gig.h:576
gig::DimensionRegion::DimensionUpperLimits
uint8_t DimensionUpperLimits[8]
gig3: defines the upper limit of the dimension values for this dimension region. In case you wondered...
Definition gig.h:628
gig::DimensionRegion::EG1ControllerReleaseInfluence
uint8_t EG1ControllerReleaseInfluence
Amount EG1 Controller has influence on the EG1 Release time (0 - 3, where 0 means off).
Definition gig.h:552
gig::DimensionRegion::VCFResonance
uint8_t VCFResonance
Firm internal filter resonance weight.
Definition gig.h:602
gig::DimensionRegion::EG1Sustain
uint16_t EG1Sustain
Sustain value of the sample amplitude EG (0 - 1000 permille).
Definition gig.h:545
gig::DimensionRegion::DimensionBypass
dim_bypass_ctrl_t DimensionBypass
If defined, the MIDI controller can switch on/off the dimension in realtime.
Definition gig.h:617
gig::DimensionRegion::EG2ControllerInvert
bool EG2ControllerInvert
Invert values coming from defined EG2 controller.
Definition gig.h:570
gig::DimensionRegion::SetVCFVelocityDynamicRange
void SetVCFVelocityDynamicRange(uint8_t range)
Updates the respective member variable and the lookup table / cache that depends on this value.
Definition gig.cpp:3217
gig::DimensionRegion::VelocityTable
uint8_t * VelocityTable
For velocity dimensions with custom defined zone ranges only: used for fast converting from velocity ...
Definition gig.h:663
gig::DimensionRegion::LFO1Sync
bool LFO1Sync
If set to true only one LFO should be used for all voices.
Definition gig.h:560
gig::DimensionRegion::EG1Attack
double EG1Attack
Attack time of the sample amplitude EG (0.000 - 60.000s).
Definition gig.h:541
gig::DimensionRegion::SetVelocityResponseCurve
void SetVelocityResponseCurve(curve_type_t curve)
Updates the respective member variable and the lookup table / cache that depends on this value.
Definition gig.cpp:3145
gig::DimensionRegion::AttenuationController
attenuation_ctrl_t AttenuationController
MIDI Controller which has influence on the volume level of the sample (or entire sample group).
Definition gig.h:620
gig::DimensionRegion::LFO1Phase
double LFO1Phase
[gig extension]: Phase displacement of the amplitude LFO's wave form (0.0° - 360.0°).
Definition gig.h:555
gig::DimensionRegion::UpdateChunks
virtual void UpdateChunks(progress_t *pProgress)
Apply dimension region settings to the respective RIFF chunks.
Definition gig.cpp:2014
gig::DimensionRegion::GetVelocityAttenuation
double GetVelocityAttenuation(uint8_t MIDIKeyVelocity)
Returns the correct amplitude factor for the given MIDIKeyVelocity.
Definition gig.cpp:3129
gig::DimensionRegion::LFO1Frequency
double LFO1Frequency
Frequency of the sample amplitude LFO (0.10 - 10.00 Hz).
Definition gig.h:554
gig::DimensionRegion::VelocityResponseCurve
curve_type_t VelocityResponseCurve
Defines a transformation curve to the incoming velocity values affecting amplitude (usually you don't...
Definition gig.h:608
gig::DimensionRegion::EG2Sustain
uint16_t EG2Sustain
Sustain value of the filter cutoff EG (0 - 1000 permille).
Definition gig.h:567
gig::DimensionRegion::LFO2ControlDepth
uint16_t LFO2ControlDepth
Controller depth influencing filter cutoff LFO pitch (0 - 1200).
Definition gig.h:578
gig::DimensionRegion::LFO2WaveForm
lfo_wave_t LFO2WaveForm
[gig extension]: The fundamental wave form to be used by the filter cutoff LFO, e....
Definition gig.h:574
gig::DimensionRegion::VCFKeyboardTracking
bool VCFKeyboardTracking
If true: VCF cutoff frequence will be dependend to the note key position relative to the defined brea...
Definition gig.h:605
gig::DimensionRegion::AttenuationControllerThreshold
uint8_t AttenuationControllerThreshold
0-127
Definition gig.h:622
gig::DimensionRegion::EG1Release
double EG1Release
Release time of the sample amplitude EG (0.000 - 60.000s).
Definition gig.h:546
gig::DimensionRegion::NoNoteOffReleaseTrigger
bool NoNoteOffReleaseTrigger
[gig extension]: If true then don't play a release trigger sample on MIDI note-off events.
Definition gig.h:632
gig::DimensionRegion::SetVelocityResponseCurveScaling
void SetVelocityResponseCurveScaling(uint8_t scaling)
Updates the respective member variable and the lookup table / cache that depends on this value.
Definition gig.cpp:3169
gig::DimensionRegion::VelocityUpperLimit
uint8_t VelocityUpperLimit
Defines the upper velocity value limit of a velocity split (only if an user defined limit was set,...
Definition gig.h:537
gig::DimensionRegion::EG1Hold
bool EG1Hold
If true, Decay1 stage should be postponed until the sample reached the sample loop start.
Definition gig.h:547
gig::DimensionRegion::ReleaseVelocityResponseDepth
uint8_t ReleaseVelocityResponseDepth
Dynamic range of release velocity affecting envelope time (0 - 4).
Definition gig.h:612
gig::DimensionRegion::ReleaseVelocityResponseCurve
curve_type_t ReleaseVelocityResponseCurve
Defines a transformation curve to the incoming release veloctiy values affecting envelope times.
Definition gig.h:611
gig::DimensionRegion::SetVCFVelocityCurve
void SetVCFVelocityCurve(curve_type_t curve)
Updates the respective member variable and the lookup table / cache that depends on this value.
Definition gig.cpp:3208
gig::DimensionRegion::EG1Decay2
double EG1Decay2
Only if EG1InfiniteSustain == false: 2nd decay stage time of the sample amplitude EG (0....
Definition gig.h:543
gig::DimensionRegion::InvertAttenuationController
bool InvertAttenuationController
Inverts the values coming from the defined Attenuation Controller.
Definition gig.h:621
gig::DimensionRegion::SampleStartOffset
uint16_t SampleStartOffset
Number of samples the sample start should be moved (0 - 2000).
Definition gig.h:626
gig::DimensionRegion::EG2Decay2
double EG2Decay2
Only if EG2InfiniteSustain == false: 2nd stage decay time of the filter cutoff EG (0....
Definition gig.h:565
gig::DimensionRegion::LFO1InternalDepth
uint16_t LFO1InternalDepth
Firm pitch of the sample amplitude LFO (0 - 1200 cents).
Definition gig.h:556
gig::DimensionRegion::EG1ControllerInvert
bool EG1ControllerInvert
Invert values coming from defined EG1 controller.
Definition gig.h:549
gig::DimensionRegion::LFO1Controller
lfo1_ctrl_t LFO1Controller
MIDI Controller which controls sample amplitude LFO.
Definition gig.h:558
gig::DimensionRegion::VCFCutoffControllerInvert
bool VCFCutoffControllerInvert
Inverts values coming from the defined cutoff controller.
Definition gig.h:597
gig::DimensionRegion::LFO3Frequency
double LFO3Frequency
Frequency of the sample pitch LFO (0.10 - 10.00 Hz).
Definition gig.h:586
gig::DimensionRegion::ReleaseTriggerDecay
uint8_t ReleaseTriggerDecay
0 - 8
Definition gig.h:613
gig::DimensionRegion::EG3Attack
double EG3Attack
Attack time of the sample pitch EG (0.000 - 10.000s).
Definition gig.h:583
gig::DimensionRegion::SetGain
virtual void SetGain(int32_t gain)
Updates the respective member variable and updates SampleAttenuation which depends on this value.
Definition gig.cpp:2000
gig::DimensionRegion::LFO2Frequency
double LFO2Frequency
Frequency of the filter cutoff LFO (0.10 - 10.00 Hz).
Definition gig.h:575
gig::DimensionRegion::SustainDefeat
bool SustainDefeat
If true: Sustain pedal will not hold a note.
Definition gig.h:624
gig::DimensionRegion::EG2Options
eg_opt_t EG2Options
[gig extension]: Behavior options which should be used for envelope generator 2 (filter cutoff EG).
Definition gig.h:630
gig::DimensionRegion::LFO2FlipPhase
bool LFO2FlipPhase
Inverts the polarity of the filter cutoff LFO wave, so it flips the wave form vertically.
Definition gig.h:580
gig::DimensionRegion::SustainReleaseTrigger
sust_rel_trg_t SustainReleaseTrigger
[gig extension]: Whether a sustain pedal up event shall play release trigger sample.
Definition gig.h:631
gig::DimensionRegion::MSDecode
bool MSDecode
Gigastudio flag: defines if Mid Side Recordings should be decoded.
Definition gig.h:625
gig::DimensionRegion::VCFEnabled
bool VCFEnabled
If filter should be used.
Definition gig.h:594
gig::DimensionRegion::LFO1ControlDepth
uint16_t LFO1ControlDepth
Controller depth influencing sample amplitude LFO pitch (0 - 1200 cents).
Definition gig.h:557
gig::DimensionRegion::Pan
int8_t Pan
Panorama / Balance (-64..0..63 <-> left..middle..right).
Definition gig.h:618
gig::DimensionRegion::SetVelocityResponseDepth
void SetVelocityResponseDepth(uint8_t depth)
Updates the respective member variable and the lookup table / cache that depends on this value.
Definition gig.cpp:3157
gig::DimensionRegion::LFO2Sync
bool LFO2Sync
If set to true only one LFO should be used for all voices.
Definition gig.h:581
gig::DimensionRegion::EG1PreAttack
uint16_t EG1PreAttack
Preattack value of the sample amplitude EG (0 - 1000 permille).
Definition gig.h:540
gig::DimensionRegion::SelfMask
bool SelfMask
If true: high velocity notes will stop low velocity notes at the same note, with that you can save vo...
Definition gig.h:619
gig::DimensionRegion::VCFCutoff
uint8_t VCFCutoff
Max. cutoff frequency.
Definition gig.h:598
gig::DimensionRegion::VCFVelocityCurve
curve_type_t VCFVelocityCurve
Defines a transformation curve for the incoming velocity values, affecting the VCF.
Definition gig.h:599
gig::DimensionRegion::EG2Attack
double EG2Attack
Attack time of the filter cutoff EG (0.000 - 60.000s).
Definition gig.h:563
gig::DimensionRegion::EG2PreAttack
uint16_t EG2PreAttack
Preattack value of the filter cutoff EG (0 - 1000 permille).
Definition gig.h:562
gig::DimensionRegion::LFO2InternalDepth
uint16_t LFO2InternalDepth
Firm pitch of the filter cutoff LFO (0 - 1200 cents).
Definition gig.h:577
gig::DimensionRegion::VCFResonanceController
vcf_res_ctrl_t VCFResonanceController
Specifies which external controller has influence on the filter resonance Q.
Definition gig.h:604
gig::DimensionRegion::LFO3InternalDepth
int16_t LFO3InternalDepth
Firm depth of the sample pitch LFO (-1200 - +1200 cents).
Definition gig.h:588
gig::DimensionRegion::LFO3FlipPhase
bool LFO3FlipPhase
[gig extension]: Inverts the polarity of the pitch LFO wave, so it flips the wave form vertically (NO...
Definition gig.h:591
gig::File
Provides convenient access to Gigasampler/GigaStudio .gig files.
Definition gig.h:1422
gig::File::UpdateChunks
virtual void UpdateChunks(progress_t *pProgress)
Apply all the gig file's current instruments, samples, groups and settings to the respective RIFF chu...
Definition gig.cpp:7209
gig::File::GetNextSample
Sample * GetNextSample()
Returns a pointer to the next Sample object of the file, NULL otherwise.
Definition gig.cpp:6341
gig::File::CountInstruments
size_t CountInstruments()
Returns the total amount of instruments of this gig file.
Definition gig.cpp:6589
gig::File::VERSION_3
static const DLS::version_t VERSION_3
Reflects Gigasampler file format version 3.0 (2003-03-31).
Definition gig.h:1425
gig::File::UpdateFileOffsets
virtual void UpdateFileOffsets()
Updates all file offsets stored all over the file.
Definition gig.cpp:7441
gig::File::AddScriptGroup
ScriptGroup * AddScriptGroup()
Add new instrument script group.
Definition gig.cpp:7148
gig::File::SetSampleChecksum
void SetSampleChecksum(Sample *pSample, uint32_t crc)
Updates the 3crc chunk with the checksum of a sample.
Definition gig.cpp:6822
gig::File::DeleteScriptGroup
void DeleteScriptGroup(ScriptGroup *pGroup)
Delete an instrument script group.
Definition gig.cpp:7167
gig::File::GetInstrument
Instrument * GetInstrument(size_t index, progress_t *pProgress=NULL)
Returns the instrument with the given index.
Definition gig.cpp:6602
gig::File::CountSamples
size_t CountSamples()
Returns the total amount of samples of this gig file.
Definition gig.cpp:6369
gig::File::AddInstrument
Instrument * AddInstrument()
Add a new instrument definition.
Definition gig.cpp:6644
gig::File::GetNextInstrument
Instrument * GetNextInstrument()
Returns a pointer to the next Instrument object of the file, NULL otherwise.
Definition gig.cpp:6575
gig::File::VERSION_2
static const DLS::version_t VERSION_2
Reflects Gigasampler file format version 2.0 (1998-06-28).
Definition gig.h:1424
gig::File::GetNextGroup
Group * GetNextGroup()
Returns a pointer to the next Group object of the file, NULL otherwise.
Definition gig.cpp:6988
gig::File::GetAutoLoad
bool GetAutoLoad()
Returns whether automatic loading is enabled.
Definition gig.cpp:7475
gig::File::DeleteInstrument
void DeleteInstrument(Instrument *pInstrument)
Delete an instrument.
Definition gig.cpp:6772
gig::File::GetSample
Sample * GetSample(size_t index, progress_t *pProgress=NULL)
Returns Sample object of index.
Definition gig.cpp:6354
gig::File::RebuildSampleChecksumTable
bool RebuildSampleChecksumTable()
Recalculates CRC32 checksums for all samples and rebuilds this gig file's checksum table with those n...
Definition gig.cpp:6918
gig::File::DeleteSample
void DeleteSample(Sample *pSample)
Delete a sample.
Definition gig.cpp:6409
gig::File::AddDuplicateInstrument
Instrument * AddDuplicateInstrument(const Instrument *orig)
Add a duplicate of an existing instrument.
Definition gig.cpp:6683
gig::File::GetScriptGroup
ScriptGroup * GetScriptGroup(size_t index)
Get instrument script group (by index).
Definition gig.cpp:7117
gig::File::GetFirstGroup
Group * GetFirstGroup()
Returns a pointer to the first Group object of the file, NULL otherwise.
Definition gig.cpp:6975
gig::File::GetFirstInstrument
Instrument * GetFirstInstrument()
Returns a pointer to the first Instrument object of the file, NULL otherwise.
Definition gig.cpp:6561
gig::File::AddContentOf
void AddContentOf(File *pFile)
Add content of another existing file.
Definition gig.cpp:6700
gig::File::VERSION_4
static const DLS::version_t VERSION_4
Reflects Gigasampler file format version 4.0 (2007-10-12).
Definition gig.h:1426
gig::File::GetGroup
Group * GetGroup(size_t index)
Returns the group with the given index.
Definition gig.cpp:7000
gig::File::AddSample
Sample * AddSample()
Add a new sample.
Definition gig.cpp:6382
gig::File::DeleteGroup
void DeleteGroup(Group *pGroup)
Delete a group and its samples.
Definition gig.cpp:7042
gig::File::DeleteGroupOnly
void DeleteGroupOnly(Group *pGroup)
Delete a group.
Definition gig.cpp:7069
gig::File::SetAutoLoad
void SetAutoLoad(bool b)
Enable / disable automatic loading.
Definition gig.cpp:7467
gig::File::GetFirstSample
Sample * GetFirstSample(progress_t *pProgress=NULL)
Returns a pointer to the first Sample object of the file, NULL otherwise.
Definition gig.cpp:6327
gig::File::VerifySampleChecksumTable
bool VerifySampleChecksumTable()
Checks whether the file's "3CRC" chunk was damaged.
Definition gig.cpp:6881
gig::Group
Group of Gigasampler samples.
Definition gig.h:1365
gig::Group::Group
Group(File *file, RIFF::Chunk *ck3gnm)
Constructor.
Definition gig.cpp:6071
gig::Group::GetSample
Sample * GetSample(size_t index)
Returns Sample object at index of this sample group.
Definition gig.cpp:6139
gig::Group::GetFirstSample
Sample * GetFirstSample()
Returns the first Sample of this Group.
Definition gig.cpp:6165
gig::Group::GetNextSample
Sample * GetNextSample()
Returns the next Sample of the Group.
Definition gig.cpp:6189
gig::Group::MoveAll
void MoveAll()
Move all members of this group to another group (preferably the 1st one except this).
Definition gig.cpp:6213
gig::Group::UpdateChunks
virtual void UpdateChunks(progress_t *pProgress)
Update chunks with current group settings.
Definition gig.cpp:6107
gig::Group::DeleteChunks
virtual void DeleteChunks()
Remove all RIFF chunks associated with this Group object.
Definition gig.cpp:6089
gig::Group::AddSample
void AddSample(Sample *pSample)
Move Sample given by pSample from another Group to this Group.
Definition gig.cpp:6203
gig::Group::Name
String Name
Stores the name of this Group.
Definition gig.h:1367
gig::Instrument
Provides access to a Gigasampler/GigaStudio instrument.
Definition gig.h:1266
gig::Instrument::UnsetScriptPatchVariable
void UnsetScriptPatchVariable(ssize_t slot=-1, String variable="")
Drop overridden initial value(s) for 'patch' variable(s).
Definition gig.cpp:5882
gig::Instrument::GetMidiRule
MidiRule * GetMidiRule(int i)
Returns a MIDI rule of the instrument.
Definition gig.cpp:5447
gig::Instrument::DeleteMidiRule
void DeleteMidiRule(int i)
Deletes a MIDI rule from the instrument.
Definition gig.cpp:5495
gig::Instrument::SetScriptSlotBypassed
void SetScriptSlotBypassed(size_t index, bool bBypass)
Defines whether execution shall be skipped.
Definition gig.cpp:5702
gig::Instrument::IsScriptPatchVariableSet
bool IsScriptPatchVariableSet(size_t slot, String variable)
Checks whether a certain script 'patch' variable value is set.
Definition gig.cpp:5748
gig::Instrument::CopyAssign
virtual void CopyAssign(const Instrument *orig)
Make a (semi) deep copy of the Instrument object given by orig and assign it to this object.
Definition gig.cpp:5978
gig::Instrument::SwapScriptSlots
void SwapScriptSlots(size_t index1, size_t index2)
Flip two script slots with each other (gig format extension).
Definition gig.cpp:5606
gig::Instrument::ScriptSlotCount
size_t ScriptSlotCount() const
Instrument's amount of script slots.
Definition gig.cpp:5662
gig::Instrument::FineTune
int16_t FineTune
in cents
Definition gig.h:1281
gig::Instrument::GetNextRegion
Region * GetNextRegion()
Returns the next Region of the instrument.
Definition gig.cpp:5344
gig::Instrument::Attenuation
int32_t Attenuation
in dB
Definition gig.h:1279
gig::Instrument::AddMidiRuleCtrlTrigger
MidiRuleCtrlTrigger * AddMidiRuleCtrlTrigger()
Adds the "controller trigger" MIDI rule to the instrument.
Definition gig.cpp:5456
gig::Instrument::GetScriptPatchVariables
std::map< String, String > GetScriptPatchVariables(size_t slot)
Get all overridden script 'patch' variables.
Definition gig.cpp:5782
gig::Instrument::AddMidiRuleAlternator
MidiRuleAlternator * AddMidiRuleAlternator()
Adds the alternator MIDI rule to the instrument.
Definition gig.cpp:5482
gig::Instrument::MoveTo
void MoveTo(Instrument *dst)
Move this instrument at the position before.
Definition gig.cpp:5401
gig::Instrument::GetScriptOfSlot
Script * GetScriptOfSlot(size_t index)
Get instrument script (gig format extension).
Definition gig.cpp:5545
gig::Instrument::AddMidiRuleLegato
MidiRuleLegato * AddMidiRuleLegato()
Adds the legato MIDI rule to the instrument.
Definition gig.cpp:5469
gig::Instrument::GetScriptPatchVariable
String GetScriptPatchVariable(size_t slot, String variable)
Get overridden initial value for 'patch' variable.
Definition gig.cpp:5814
gig::Instrument::PitchbendRange
uint16_t PitchbendRange
Number of semitones pitchbend controller can pitch (default is 2).
Definition gig.h:1282
gig::Instrument::DimensionKeyRange
range_t DimensionKeyRange
0-127 (where 0 means C1 and 127 means G9)
Definition gig.h:1284
gig::Instrument::GetRegion
Region * GetRegion(unsigned int Key)
Returns the appropriate Region for a triggered note.
Definition gig.cpp:5292
gig::Instrument::AddScriptSlot
void AddScriptSlot(Script *pScript, bool bypass=false)
Add new instrument script slot (gig format extension).
Definition gig.cpp:5586
gig::Instrument::RegionKeyTable
Region * RegionKeyTable[128]
fast lookup for the corresponding Region of a MIDI key
Definition gig.h:1321
gig::Instrument::UpdateChunks
virtual void UpdateChunks(progress_t *pProgress)
Apply Instrument with all its Regions to the respective RIFF chunks.
Definition gig.cpp:5106
gig::Instrument::RemoveScript
void RemoveScript(Script *pScript)
Remove reference to given Script (gig format extension).
Definition gig.cpp:5639
gig::Instrument::SetScriptPatchVariable
void SetScriptPatchVariable(size_t slot, String variable, String value)
Override initial value for 'patch' variable.
Definition gig.cpp:5841
gig::Instrument::GetFirstRegion
Region * GetFirstRegion()
Returns the first Region of the instrument.
Definition gig.cpp:5328
gig::Instrument::IsScriptSlotBypassed
bool IsScriptSlotBypassed(size_t index)
Whether script execution shall be skipped.
Definition gig.cpp:5682
gig::Instrument::RemoveScriptSlot
void RemoveScriptSlot(size_t index)
Remove script slot.
Definition gig.cpp:5621
gig::Instrument::GetRegionAt
Region * GetRegionAt(size_t pos)
Returns Region at supplied pos position within the region list of this instrument.
Definition gig.cpp:5313
gig::MidiRuleAlternator
MIDI rule to automatically cycle through specified sequences of different articulations.
Definition gig.h:1099
gig::MidiRuleAlternator::Controller
uint8_t Controller
CC number for controller selector.
Definition gig.h:1127
gig::MidiRuleAlternator::pPatterns
struct gig::MidiRuleAlternator::pattern_t pPatterns[32]
A pattern is a sequence of articulation numbers.
gig::MidiRuleAlternator::KeySwitchRange
range_t KeySwitchRange
Key range for key switch selector.
Definition gig.h:1126
gig::MidiRuleAlternator::Polyphonic
bool Polyphonic
If alternator should step forward only when all notes are off.
Definition gig.h:1129
gig::MidiRuleAlternator::Selector
selector_t Selector
Method by which pattern is chosen.
Definition gig.h:1125
gig::MidiRuleAlternator::Patterns
uint8_t Patterns
Number of alternator patterns.
Definition gig.h:1106
gig::MidiRuleAlternator::PlayRange
range_t PlayRange
Key range of the playable keys in the instrument.
Definition gig.h:1104
gig::MidiRuleAlternator::Articulations
uint8_t Articulations
Number of articulations in the instrument.
Definition gig.h:1101
gig::MidiRuleAlternator::pArticulations
String pArticulations[32]
Names of the articulations.
Definition gig.h:1102
gig::MidiRuleAlternator::Chained
bool Chained
If all patterns should be chained together.
Definition gig.h:1130
gig::MidiRuleCtrlTrigger
MIDI rule for triggering notes by control change events.
Definition gig.h:1026
gig::MidiRuleCtrlTrigger::ControllerNumber
uint8_t ControllerNumber
MIDI controller number.
Definition gig.h:1028
gig::MidiRuleCtrlTrigger::Triggers
uint8_t Triggers
Number of triggers.
Definition gig.h:1029
gig::MidiRuleLegato
MIDI rule for instruments with legato samples.
Definition gig.h:1067
gig::MidiRuleLegato::ThresholdTime
uint16_t ThresholdTime
Maximum time (ms) between two notes that should be played legato.
Definition gig.h:1073
gig::MidiRuleLegato::LegatoSamples
uint8_t LegatoSamples
Number of legato samples per key in each direction (always 12).
Definition gig.h:1069
gig::MidiRuleLegato::BypassKey
uint8_t BypassKey
Key to be used to bypass the sustain note.
Definition gig.h:1071
gig::MidiRuleLegato::AltSustain1Key
uint8_t AltSustain1Key
Key triggering alternate sustain samples.
Definition gig.h:1077
gig::MidiRuleLegato::BypassUseController
bool BypassUseController
If a controller should be used to bypass the sustain note.
Definition gig.h:1070
gig::MidiRuleLegato::AltSustain2Key
uint8_t AltSustain2Key
Key triggering a second set of alternate sustain samples.
Definition gig.h:1078
gig::MidiRuleLegato::ReleaseTime
uint16_t ReleaseTime
Release time.
Definition gig.h:1074
gig::MidiRuleLegato::KeyRange
range_t KeyRange
Key range for legato notes.
Definition gig.h:1075
gig::MidiRuleLegato::ReleaseTriggerKey
uint8_t ReleaseTriggerKey
Key triggering release samples.
Definition gig.h:1076
gig::MidiRuleLegato::BypassController
uint8_t BypassController
Controller to be used to bypass the sustain note.
Definition gig.h:1072
gig::MidiRule
Abstract base class for all MIDI rules.
Definition gig.h:1005
gig::Region
Defines Region information of a Gigasampler/GigaStudio instrument.
Definition gig.h:927
gig::Region::pDimensionRegions
DimensionRegion * pDimensionRegions[256]
Pointer array to the 32 (gig2) or 256 (gig3) possible dimension regions (reflects NULL for dimension ...
Definition gig.h:932
gig::Region::Dimensions
unsigned int Dimensions
Number of defined dimensions, do not alter!
Definition gig.h:929
gig::Region::pDimensionDefinitions
dimension_def_t pDimensionDefinitions[8]
Defines the five (gig2) or eight (gig3) possible dimensions (the dimension's controller and number of...
Definition gig.h:930
gig::Region::CopyAssign
virtual void CopyAssign(const Region *orig)
Make a (semi) deep copy of the Region object given by orig and assign it to this object.
Definition gig.cpp:4359
gig::Region::SetDimensionType
void SetDimensionType(dimension_t oldType, dimension_t newType)
Change type of an existing dimension.
Definition gig.cpp:4113
gig::Region::GetDimensionDefinition
dimension_def_t * GetDimensionDefinition(dimension_t type)
Searches in the current Region for a dimension of the given dimension type and returns the precise co...
Definition gig.cpp:4153
gig::Region::SplitDimensionZone
void SplitDimensionZone(dimension_t type, int zone)
Divide split zone of a dimension in two (increment zone amount).
Definition gig.cpp:3954
gig::Region::GetDimensionRegionByValue
DimensionRegion * GetDimensionRegionByValue(const uint DimValues[8])
Use this method in your audio engine to get the appropriate dimension region with it's articulation d...
Definition gig.cpp:4184
gig::Region::DeleteDimensionZone
void DeleteDimensionZone(dimension_t type, int zone)
Delete one split zone of a dimension (decrement zone amount).
Definition gig.cpp:3810
gig::Region::AddDimension
void AddDimension(dimension_def_t *pDimDef)
Einstein would have dreamed of it - create a new dimension.
Definition gig.cpp:3608
gig::Region::Layers
unsigned int Layers
Amount of defined layers (1 - 32). A value of 1 actually means no layering, a value > 1 means there i...
Definition gig.h:933
gig::Region::~Region
~Region()
Destructor.
Definition gig.cpp:4160
gig::Region::GetSample
Sample * GetSample()
Returns pointer address to the Sample referenced with this region.
Definition gig.cpp:4312
gig::Region::SetKeyRange
virtual void SetKeyRange(uint16_t Low, uint16_t High)
Modifies the key range of this Region and makes sure the respective chunks are in correct order.
Definition gig.cpp:3514
gig::Region::GetDimensionRegionByBit
DimensionRegion * GetDimensionRegionByBit(const uint8_t DimBits[8])
Returns the appropriate DimensionRegion for the given dimension bit numbers (zone index).
Definition gig.cpp:4293
gig::Region::DeleteDimension
void DeleteDimension(dimension_def_t *pDimDef)
Delete an existing dimension.
Definition gig.cpp:3720
gig::Region::UpdateChunks
virtual void UpdateChunks(progress_t *pProgress)
Apply Region settings and all its DimensionRegions to the respective RIFF chunks.
Definition gig.cpp:3399
gig::Region::DimensionRegions
uint32_t DimensionRegions
Total number of DimensionRegions this Region contains, do not alter!
Definition gig.h:931
gig::Sample
Encapsulates sample waves of Gigasampler/GigaStudio files used for playback.
Definition gig.h:814
gig::Sample::DestroyDecompressionBuffer
static void DestroyDecompressionBuffer(buffer_t &DecompressionBuffer)
Free decompression buffer, previously created with CreateDecompressionBuffer().
Definition gig.cpp:1390
gig::Sample::SamplesInLastFrame
file_offset_t SamplesInLastFrame
For compressed samples only: length of the last sample frame.
Definition gig.h:865
gig::Sample::LoopType
loop_type_t LoopType
Caution: Use the respective field in the DimensionRegion instead of this one! (Intended purpose: The ...
Definition gig.h:825
gig::Sample::Loops
uint32_t Loops
Caution: Use the respective field in the DimensionRegion instead of this one! (Intended purpose: Numb...
Definition gig.h:823
gig::Sample::VerifyWaveData
bool VerifyWaveData(uint32_t *pActually=NULL)
Checks the integrity of this sample's raw audio wave data.
Definition gig.cpp:1452
gig::Sample::LoopFraction
uint32_t LoopFraction
The fractional value specifies a fraction of a sample at which to loop. This allows a loop to be fine...
Definition gig.h:829
gig::Sample::FileNo
unsigned long FileNo
File number (> 0 when sample is stored in an extension file, 0 when it's in the gig).
Definition gig.h:869
gig::Sample::CopyAssignMeta
void CopyAssignMeta(const Sample *orig)
Make a (semi) deep copy of the Sample object given by orig (without the actual waveform data) and ass...
Definition gig.cpp:510
gig::Sample::LoopStart
uint32_t LoopStart
Caution: Use the respective field in the DimensionRegion instead of this one! (Intended purpose: The ...
Definition gig.h:826
gig::Sample::SMPTEOffset
uint32_t SMPTEOffset
The SMPTE Offset value specifies the time offset to be used for the synchronization / calibration to ...
Definition gig.h:822
gig::Sample::RAMCache
buffer_t RAMCache
Buffers samples (already uncompressed) in RAM.
Definition gig.h:868
gig::Sample::FrameTable
file_offset_t * FrameTable
For positioning within compressed samples only: stores the offset values for each frame.
Definition gig.h:863
gig::Sample::Product
uint32_t Product
Specifies the MIDI model ID defined by the manufacturer corresponding to the Manufacturer field....
Definition gig.h:817
gig::Sample::~Sample
~Sample()
Destructor.
Definition gig.cpp:1477
gig::Sample::LoopEnd
uint32_t LoopEnd
Caution: Use the respective field in the DimensionRegion instead of this one! (Intended purpose: The ...
Definition gig.h:827
gig::Sample::pGroup
Group * pGroup
pointer to the Group this sample belongs to (always not-NULL)
Definition gig.h:861
gig::Sample::WorstCaseFrameSize
file_offset_t WorstCaseFrameSize
For compressed samples only: size (in bytes) of the largest possible sample frame.
Definition gig.h:866
gig::Sample::CreateDecompressionBuffer
static buffer_t CreateDecompressionBuffer(file_offset_t MaxReadSize)
Allocates a decompression buffer for streaming (compressed) samples with Sample::Read().
Definition gig.cpp:1373
gig::Sample::Sample
Sample(File *pFile, RIFF::List *waveList, file_offset_t WavePoolOffset, unsigned long fileNo=0, int index=-1)
Constructor.
Definition gig.cpp:390
gig::Sample::Resize
void Resize(file_offset_t NewSize)
Resize sample.
Definition gig.cpp:866
gig::Sample::SamplePos
file_offset_t SamplePos
For compressed samples only: stores the current position (in sample points).
Definition gig.h:864
gig::Sample::FrameOffset
file_offset_t FrameOffset
Current offset (sample points) in current sample frame (for decompression only).
Definition gig.h:862
gig::Sample::Compressed
bool Compressed
If the sample wave is compressed (probably just interesting for instrument and sample editors,...
Definition gig.h:831
gig::Sample::GetGroup
Group * GetGroup() const
Returns pointer to the Group this Sample belongs to.
Definition gig.cpp:1407
gig::Sample::MIDIUnityNote
uint32_t MIDIUnityNote
Specifies the musical note at which the sample will be played at it's original sample rate.
Definition gig.h:819
gig::Sample::crc
uint32_t crc
Reflects CRC-32 checksum of the raw sample data at the last time when the sample's raw wave form data...
Definition gig.h:872
gig::Sample::LoadSampleData
buffer_t LoadSampleData()
Loads (and uncompresses if needed) the whole sample wave into RAM.
Definition gig.cpp:706
gig::Sample::CopyAssignWave
void CopyAssignWave(const Sample *orig)
Should be called after CopyAssignMeta() and File::Save() sequence.
Definition gig.cpp:546
gig::Sample::SMPTEFormat
smpte_format_t SMPTEFormat
Specifies the Society of Motion Pictures and Television E time format used in the following SMPTEOffs...
Definition gig.h:821
gig::Sample::GetPos
file_offset_t GetPos() const
Returns the current position in the sample (in sample points).
Definition gig.cpp:926
gig::Sample::Instances
static size_t Instances
Number of instances of class Sample.
Definition gig.h:859
gig::Sample::SetPos
file_offset_t SetPos(file_offset_t SampleCount, RIFF::stream_whence_t Whence=RIFF::stream_start)
Sets the position within the sample (in sample points, not in bytes).
Definition gig.cpp:892
gig::Sample::GetWaveDataCRC32Checksum
uint32_t GetWaveDataCRC32Checksum()
Returns the CRC-32 checksum of the sample's raw wave form data at the time when this sample's wave fo...
Definition gig.cpp:1423
gig::Sample::ReadAndLoop
file_offset_t ReadAndLoop(void *pBuffer, file_offset_t SampleCount, playback_state_t *pPlaybackState, DimensionRegion *pDimRgn, buffer_t *pExternalDecompressionBuffer=NULL)
Reads SampleCount number of sample points from the position stored in pPlaybackState into the buffer ...
Definition gig.cpp:965
gig::Sample::Dithered
bool Dithered
For 24-bit compressed samples only: if dithering was used during compression with bit reduction.
Definition gig.h:833
gig::Sample::Read
file_offset_t Read(void *pBuffer, file_offset_t SampleCount, buffer_t *pExternalDecompressionBuffer=NULL)
Reads SampleCount number of sample points from the current position into the buffer pointed by pBuffe...
Definition gig.cpp:1140
gig::Sample::LoopID
uint32_t LoopID
Specifies the unique ID that corresponds to one of the defined cue points in the cue point list (only...
Definition gig.h:824
gig::Sample::InternalDecompressionBuffer
static buffer_t InternalDecompressionBuffer
Buffer used for decompression of samples, and only if no external decompression buffer was supplied.
Definition gig.h:860
gig::Sample::SamplePeriod
uint32_t SamplePeriod
Specifies the duration of time that passes during the playback of one sample in nanoseconds (normally...
Definition gig.h:818
gig::Sample::LoopPlayCount
uint32_t LoopPlayCount
Number of times the loop should be played (a value of 0 = infinite).
Definition gig.h:830
gig::Sample::LoadSampleDataWithNullSamplesExtension
buffer_t LoadSampleDataWithNullSamplesExtension(uint NullSamplesCount)
Loads (and uncompresses if needed) the whole sample wave into RAM.
Definition gig.cpp:755
gig::Sample::ReleaseSampleData
void ReleaseSampleData()
Frees the cached sample from RAM if loaded with LoadSampleData() previously.
Definition gig.cpp:829
gig::Sample::UpdateChunks
virtual void UpdateChunks(progress_t *pProgress)
Apply sample and its settings to the respective RIFF chunks.
Definition gig.cpp:574
gig::Sample::Write
file_offset_t Write(void *pBuffer, file_offset_t SampleCount)
Write sample wave data.
Definition gig.cpp:1329
gig::Sample::Manufacturer
uint32_t Manufacturer
Specifies the MIDI Manufacturer's Association (MMA) Manufacturer code for the sampler intended to rec...
Definition gig.h:816
gig::Sample::TruncatedBits
uint32_t TruncatedBits
For 24-bit compressed samples only: number of bits truncated during compression (0,...
Definition gig.h:832
gig::Sample::GetCache
buffer_t GetCache()
Returns current cached sample points.
Definition gig.cpp:814
gig::Sample::FineTune
uint32_t FineTune
Specifies the fraction of a semitone up from the specified MIDI unity note field. A value of 0x800000...
Definition gig.h:820
gig::Sample::SamplesPerFrame
file_offset_t SamplesPerFrame
For compressed samples only: number of samples in a full sample frame.
Definition gig.h:867
gig::Sample::LoopSize
uint32_t LoopSize
Caution: Use the respective fields in the DimensionRegion instead of this one! (Intended purpose: Len...
Definition gig.h:828
gig::ScriptGroup
Group of instrument scripts (gig format extension).
Definition gig.h:1230
gig::ScriptGroup::DeleteScript
void DeleteScript(Script *pScript)
Delete an instrument script.
Definition gig.cpp:4892
gig::ScriptGroup::AddScript
Script * AddScript()
Add new instrument script.
Definition gig.cpp:4875
gig::ScriptGroup::Name
String Name
Name of this script group. For example to be displayed in an instrument editor.
Definition gig.h:1232
gig::ScriptGroup::GetScript
Script * GetScript(size_t index)
Get instrument script.
Definition gig.cpp:4858
gig::Script
Real-time instrument script (gig format extension).
Definition gig.h:1179
gig::Script::Compression
Compression_t Compression
Whether the script was/should be compressed, and if so, which compression algorithm shall be used.
Definition gig.h:1192
gig::Script::Compression_t
Compression_t
Definition gig.h:1184
gig::Script::COMPRESSION_NONE
@ COMPRESSION_NONE
Is not compressed at all (default).
Definition gig.h:1185
gig::Script::SetGroup
void SetGroup(ScriptGroup *pGroup)
Move this script from its current ScriptGroup to another ScriptGroup given by pGroup.
Definition gig.cpp:4746
gig::Script::Language
Language_t Language
Programming language and dialect the script is written in.
Definition gig.h:1194
gig::Script::Encoding
Encoding_t Encoding
Format the script's source code text is encoded with.
Definition gig.h:1193
gig::Script::Uuid
uint8_t Uuid[16]
Persistent Universally Unique Identifier of this script, which remains identical after any changes to...
Definition gig.h:1196
gig::Script::Encoding_t
Encoding_t
Definition gig.h:1181
gig::Script::ENCODING_ASCII
@ ENCODING_ASCII
Standard 8 bit US ASCII character encoding (default).
Definition gig.h:1182
gig::Script::UpdateChunks
void UpdateChunks(progress_t *pProgress)
Apply this script to the respective RIFF chunks.
Definition gig.cpp:4681
gig::Script::Language_t
Language_t
Definition gig.h:1187
gig::Script::LANGUAGE_NKSP
@ LANGUAGE_NKSP
NKSP stands for "Is Not KSP" (default). Refer to the NKSP Reference Manual for details about this scr...
Definition gig.h:1188
gig::Script::Bypass
bool Bypass
Global bypass: if enabled, this script shall not be executed by the sampler for any instrument.
Definition gig.h:1195
gig::Script::Name
String Name
Arbitrary name of the script, which may be displayed i.e. in an instrument editor.
Definition gig.h:1191
gig::Script::DeleteChunks
void DeleteChunks()
Remove all RIFF chunks associated with this Script object.
Definition gig.cpp:4669
gig::Script::SetScriptAsText
void SetScriptAsText(const String &text)
Replaces the current script with the new script source code text given by text.
Definition gig.cpp:4655
gig::Script::GetScriptAsText
String GetScriptAsText()
Returns the current script (i.e.
Definition gig.cpp:4642
gig::Script::CopyAssign
void CopyAssign(const Script *orig)
Make a (semi) deep copy of the Script object given by orig and assign it to this object.
Definition gig.cpp:4770
gig::Script::GetGroup
ScriptGroup * GetGroup() const
Returns the script group this script currently belongs to.
Definition gig.cpp:4759
gig::Script::GenerateUuid
void GenerateUuid()
Generate a new Universally Unique Identifier (UUID) for this script.
Definition gig.cpp:4719
DLS
DLS specific classes and definitions.
Definition DLS.h:108
RIFF
RIFF specific classes and definitions.
Definition RIFF.h:101
RIFF::stream_whence_t
stream_whence_t
File stream position dependent to these relations.
Definition RIFF.h:128
RIFF::file_offset_t
uint64_t file_offset_t
Type used by libgig for handling file positioning during file I/O tasks.
Definition RIFF.h:111
Serialization
Serialization / deserialization framework.
Definition gig.h:98
gig
Gigasampler/GigaStudio specific classes and definitions.
Definition gig.h:101
gig::enumValue
size_t enumValue(String key)
Numeric value of enum constant.
Definition typeinfo.cpp:219
gig::dim_bypass_ctrl_t
dim_bypass_ctrl_t
Dimensions allow to bypass one of the following controllers.
Definition gig.h:183
gig::dim_bypass_ctrl_94
@ dim_bypass_ctrl_94
Effect 4 Depth (MIDI Controller 94).
Definition gig.h:183
gig::dim_bypass_ctrl_95
@ dim_bypass_ctrl_95
Effect 5 Depth (MIDI Controller 95).
Definition gig.h:183
gig::dim_bypass_ctrl_none
@ dim_bypass_ctrl_none
No controller bypass.
Definition gig.h:183
gig::vcf_res_ctrl_t
vcf_res_ctrl_t
Defines how the filter resonance is controlled by.
Definition gig.h:250
gig::vcf_res_ctrl_genpurpose5
@ vcf_res_ctrl_genpurpose5
General Purpose Controller 5 (Button, MIDI Controller 80).
Definition gig.h:250
gig::vcf_res_ctrl_none
@ vcf_res_ctrl_none
No MIDI controller assigned for filter resonance.
Definition gig.h:250
gig::vcf_res_ctrl_genpurpose3
@ vcf_res_ctrl_genpurpose3
General Purpose Controller 3 (Slider, MIDI Controller 18).
Definition gig.h:250
gig::vcf_res_ctrl_genpurpose6
@ vcf_res_ctrl_genpurpose6
General Purpose Controller 6 (Button, MIDI Controller 81).
Definition gig.h:250
gig::vcf_res_ctrl_genpurpose4
@ vcf_res_ctrl_genpurpose4
General Purpose Controller 4 (Slider, MIDI Controller 19).
Definition gig.h:250
gig::libraryName
String libraryName()
Returns the name of this C++ library.
Definition gig.cpp:7535
gig::smpte_format_t
smpte_format_t
Society of Motion Pictures and Television E time format.
Definition gig.h:145
gig::smpte_format_30_frames
@ smpte_format_30_frames
30 frames per second
Definition gig.h:145
gig::smpte_format_24_frames
@ smpte_format_24_frames
24 frames per second
Definition gig.h:145
gig::smpte_format_no_offset
@ smpte_format_no_offset
no SMPTE offset
Definition gig.h:145
gig::smpte_format_25_frames
@ smpte_format_25_frames
25 frames per second
Definition gig.h:145
gig::smpte_format_30_frames_dropping
@ smpte_format_30_frames_dropping
30 frames per second with frame dropping (30 drop)
Definition gig.h:145
gig::curve_type_t
curve_type_t
Defines the shape of a function graph.
Definition gig.h:156
gig::curve_type_nonlinear
@ curve_type_nonlinear
Non-linear curve type.
Definition gig.h:156
gig::curve_type_unknown
@ curve_type_unknown
Unknown curve type.
Definition gig.h:156
gig::curve_type_linear
@ curve_type_linear
Linear curve type.
Definition gig.h:156
gig::curve_type_special
@ curve_type_special
Special curve type.
Definition gig.h:156
gig::lfo1_ctrl_t
lfo1_ctrl_t
Defines how LFO1 is controlled by.
Definition gig.h:219
gig::lfo1_ctrl_breath
@ lfo1_ctrl_breath
Only controlled by external breath controller.
Definition gig.h:219
gig::lfo1_ctrl_modwheel
@ lfo1_ctrl_modwheel
Only controlled by external modulation wheel.
Definition gig.h:219
gig::lfo1_ctrl_internal_modwheel
@ lfo1_ctrl_internal_modwheel
Controlled internally and by external modulation wheel.
Definition gig.h:219
gig::lfo1_ctrl_internal_breath
@ lfo1_ctrl_internal_breath
Controlled internally and by external breath controller.
Definition gig.h:219
gig::lfo1_ctrl_internal
@ lfo1_ctrl_internal
Only internally controlled.
Definition gig.h:219
gig::sust_rel_trg_t
sust_rel_trg_t
Defines behaviour of release triggered sample(s) on sustain pedal up event.
Definition gig.h:482
gig::sust_rel_trg_maxvelocity
@ sust_rel_trg_maxvelocity
Play release trigger sample(s) on sustain pedal up, and simply use 127 as MIDI velocity for playback.
Definition gig.h:482
gig::sust_rel_trg_none
@ sust_rel_trg_none
No release triggered sample(s) are played on sustain pedal up (default).
Definition gig.h:482
gig::enumKeys
const char ** enumKeys(String typeName)
All element names of enum type.
Definition typeinfo.cpp:323
gig::eg1_ctrl_t
leverage_ctrl_t eg1_ctrl_t
Defines controller influencing envelope generator 1.
Definition gig.h:290
gig::vcf_cutoff_ctrl_t
vcf_cutoff_ctrl_t
Defines how the filter cutoff frequency is controlled by.
Definition gig.h:238
gig::vcf_cutoff_ctrl_none2
@ vcf_cutoff_ctrl_none2
The difference between none and none2 is unknown.
Definition gig.h:238
gig::vcf_cutoff_ctrl_softpedal
@ vcf_cutoff_ctrl_softpedal
Soft Pedal (MIDI Controller 67).
Definition gig.h:238
gig::vcf_cutoff_ctrl_aftertouch
@ vcf_cutoff_ctrl_aftertouch
Key Pressure.
Definition gig.h:238
gig::vcf_cutoff_ctrl_foot
@ vcf_cutoff_ctrl_foot
Foot Pedal (Coarse, MIDI Controller 4).
Definition gig.h:238
gig::vcf_cutoff_ctrl_genpurpose8
@ vcf_cutoff_ctrl_genpurpose8
General Purpose Controller 8 (Button, MIDI Controller 83).
Definition gig.h:238
gig::vcf_cutoff_ctrl_effect2
@ vcf_cutoff_ctrl_effect2
Effect Controller 2 (Coarse, MIDI Controller 13).
Definition gig.h:238
gig::vcf_cutoff_ctrl_genpurpose7
@ vcf_cutoff_ctrl_genpurpose7
General Purpose Controller 7 (Button, MIDI Controller 82).
Definition gig.h:238
gig::vcf_cutoff_ctrl_effect1
@ vcf_cutoff_ctrl_effect1
Effect Controller 1 (Coarse, MIDI Controller 12).
Definition gig.h:238
gig::vcf_cutoff_ctrl_breath
@ vcf_cutoff_ctrl_breath
Breath Controller (Coarse, MIDI Controller 2).
Definition gig.h:238
gig::vcf_cutoff_ctrl_sustainpedal
@ vcf_cutoff_ctrl_sustainpedal
Sustain Pedal (MIDI Controller 64).
Definition gig.h:238
gig::vcf_cutoff_ctrl_modwheel
@ vcf_cutoff_ctrl_modwheel
Modulation Wheel (MIDI Controller 1).
Definition gig.h:238
gig::vcf_cutoff_ctrl_none
@ vcf_cutoff_ctrl_none
No MIDI controller assigned for filter cutoff frequency.
Definition gig.h:238
gig::enumCount
size_t enumCount(String typeName)
Amount of elements in given enum type.
Definition typeinfo.cpp:190
gig::lfo_wave_t
lfo_wave_t
Defines the wave form type used by an LFO (gig format extension).
Definition gig.h:173
gig::lfo_wave_square
@ lfo_wave_square
Square wave form.
Definition gig.h:173
gig::lfo_wave_triangle
@ lfo_wave_triangle
Triangle wave form.
Definition gig.h:173
gig::lfo_wave_sine
@ lfo_wave_sine
Sine (sinus) wave form (this is the default wave form).
Definition gig.h:173
gig::lfo_wave_saw
@ lfo_wave_saw
Saw (up) wave form (saw down wave form can be achieved by flipping the phase).
Definition gig.h:173
gig::split_type_t
split_type_t
Intended for internal usage: will be used to convert a dimension value into the corresponding dimensi...
Definition gig.h:354
gig::split_type_bit
@ split_type_bit
dimension values are already the sought bit number
Definition gig.h:354
gig::split_type_normal
@ split_type_normal
dimension value between 0-127
Definition gig.h:354
gig::libraryVersion
String libraryVersion()
Returns version of this C++ library.
Definition gig.cpp:7543
gig::attenuation_ctrl_t
leverage_ctrl_t attenuation_ctrl_t
Defines controller influencing attenuation.
Definition gig.h:283
gig::loop_type_t
loop_type_t
Standard types of sample loops.
Definition gig.h:133
gig::loop_type_bidirectional
@ loop_type_bidirectional
Alternating loop (forward/backward, also known as Ping Pong).
Definition gig.h:133
gig::loop_type_backward
@ loop_type_backward
Loop backward (reverse).
Definition gig.h:133
gig::loop_type_normal
@ loop_type_normal
Loop forward (normal).
Definition gig.h:133
gig::lfo3_ctrl_t
lfo3_ctrl_t
Defines how LFO3 is controlled by.
Definition gig.h:195
gig::lfo3_ctrl_internal_aftertouch
@ lfo3_ctrl_internal_aftertouch
Controlled internally and by aftertouch controller.
Definition gig.h:195
gig::lfo3_ctrl_internal_modwheel
@ lfo3_ctrl_internal_modwheel
Controlled internally and by external modulation wheel.
Definition gig.h:195
gig::lfo3_ctrl_aftertouch
@ lfo3_ctrl_aftertouch
Only controlled by aftertouch controller.
Definition gig.h:195
gig::lfo3_ctrl_modwheel
@ lfo3_ctrl_modwheel
Only controlled by external modulation wheel.
Definition gig.h:195
gig::lfo3_ctrl_internal
@ lfo3_ctrl_internal
Only internally controlled.
Definition gig.h:195
gig::lfo2_ctrl_t
lfo2_ctrl_t
Defines how LFO2 is controlled by.
Definition gig.h:207
gig::lfo2_ctrl_internal
@ lfo2_ctrl_internal
Only internally controlled.
Definition gig.h:207
gig::lfo2_ctrl_modwheel
@ lfo2_ctrl_modwheel
Only controlled by external modulation wheel.
Definition gig.h:207
gig::lfo2_ctrl_internal_modwheel
@ lfo2_ctrl_internal_modwheel
Controlled internally and by external modulation wheel.
Definition gig.h:207
gig::lfo2_ctrl_foot
@ lfo2_ctrl_foot
Only controlled by external foot controller.
Definition gig.h:207
gig::lfo2_ctrl_internal_foot
@ lfo2_ctrl_internal_foot
Controlled internally and by external foot controller.
Definition gig.h:207
gig::eg2_ctrl_t
leverage_ctrl_t eg2_ctrl_t
Defines controller influencing envelope generator 2.
Definition gig.h:297
gig::enumKey
const char * enumKey(String typeName, size_t value)
Enum constant name of numeric value.
Definition typeinfo.cpp:280
gig::dimension_t
dimension_t
Defines the type of dimension, that is how the dimension zones (and thus how the dimension regions ar...
Definition gig.h:343
gig::dimension_keyboard
@ dimension_keyboard
Dimension for keyswitching.
Definition gig.h:343
gig::dimension_genpurpose5
@ dimension_genpurpose5
General Purpose Controller 5 (Button, MIDI Controller 80).
Definition gig.h:343
gig::dimension_genpurpose8
@ dimension_genpurpose8
General Purpose Controller 8 (Button, MIDI Controller 83).
Definition gig.h:343
gig::dimension_roundrobinkeyboard
@ dimension_roundrobinkeyboard
Different samples triggered each time a note is played, any key advances the counter.
Definition gig.h:343
gig::dimension_samplechannel
@ dimension_samplechannel
If used sample has more than one channel (thus is not mono).
Definition gig.h:343
gig::dimension_effect1
@ dimension_effect1
Effect Controller 1 (Coarse, MIDI Controller 12).
Definition gig.h:343
gig::dimension_smartmidi
@ dimension_smartmidi
For MIDI tools like legato and repetition mode.
Definition gig.h:343
gig::dimension_breath
@ dimension_breath
Breath Controller (Coarse, MIDI Controller 2).
Definition gig.h:343
gig::dimension_genpurpose2
@ dimension_genpurpose2
General Purpose Controller 2 (Slider, MIDI Controller 17).
Definition gig.h:343
gig::dimension_effect5depth
@ dimension_effect5depth
Effect 5 Depth (MIDI Controller 95).
Definition gig.h:343
gig::dimension_genpurpose4
@ dimension_genpurpose4
General Purpose Controller 4 (Slider, MIDI Controller 19).
Definition gig.h:343
gig::dimension_releasetrigger
@ dimension_releasetrigger
Special dimension for triggering samples on releasing a key.
Definition gig.h:343
gig::dimension_effect3depth
@ dimension_effect3depth
Effect 3 Depth (MIDI Controller 93).
Definition gig.h:343
gig::dimension_sustainpedal
@ dimension_sustainpedal
Sustain Pedal (MIDI Controller 64).
Definition gig.h:343
gig::dimension_genpurpose7
@ dimension_genpurpose7
General Purpose Controller 7 (Button, MIDI Controller 82).
Definition gig.h:343
gig::dimension_foot
@ dimension_foot
Foot Pedal (Coarse, MIDI Controller 4).
Definition gig.h:343
gig::dimension_effect2
@ dimension_effect2
Effect Controller 2 (Coarse, MIDI Controller 13).
Definition gig.h:343
gig::dimension_portamento
@ dimension_portamento
Portamento (MIDI Controller 65).
Definition gig.h:343
gig::dimension_softpedal
@ dimension_softpedal
Soft Pedal (MIDI Controller 67).
Definition gig.h:343
gig::dimension_velocity
@ dimension_velocity
Key Velocity (this is the only dimension in gig2 where the ranges can exactly be defined).
Definition gig.h:343
gig::dimension_random
@ dimension_random
Different samples triggered each time a note is played, random order.
Definition gig.h:343
gig::dimension_effect1depth
@ dimension_effect1depth
Effect 1 Depth (MIDI Controller 91).
Definition gig.h:343
gig::dimension_none
@ dimension_none
Dimension not in use.
Definition gig.h:343
gig::dimension_portamentotime
@ dimension_portamentotime
Portamento Time (Coarse, MIDI Controller 5).
Definition gig.h:343
gig::dimension_sostenutopedal
@ dimension_sostenutopedal
Sostenuto Pedal (MIDI Controller 66).
Definition gig.h:343
gig::dimension_effect2depth
@ dimension_effect2depth
Effect 2 Depth (MIDI Controller 92).
Definition gig.h:343
gig::dimension_modwheel
@ dimension_modwheel
Modulation Wheel (MIDI Controller 1).
Definition gig.h:343
gig::dimension_roundrobin
@ dimension_roundrobin
Different samples triggered each time a note is played, dimension regions selected in sequence.
Definition gig.h:343
gig::dimension_genpurpose3
@ dimension_genpurpose3
General Purpose Controller 3 (Slider, MIDI Controller 18).
Definition gig.h:343
gig::dimension_layer
@ dimension_layer
For layering of up to 8 instruments (and eventually crossfading of 2 or 4 layers).
Definition gig.h:343
gig::dimension_effect4depth
@ dimension_effect4depth
Effect 4 Depth (MIDI Controller 94).
Definition gig.h:343
gig::dimension_genpurpose6
@ dimension_genpurpose6
General Purpose Controller 6 (Button, MIDI Controller 81).
Definition gig.h:343
gig::dimension_channelaftertouch
@ dimension_channelaftertouch
Channel Key Pressure.
Definition gig.h:343
gig::dimension_genpurpose1
@ dimension_genpurpose1
General Purpose Controller 1 (Slider, MIDI Controller 16).
Definition gig.h:343
gig::vcf_type_t
vcf_type_t
Audio filter types.
Definition gig.h:396
gig::vcf_type_lowpass_1p
@ vcf_type_lowpass_1p
[gig extension]: 1-pole lowpass filter type (LinuxSampler).
Definition gig.h:396
gig::vcf_type_lowpassturbo
@ vcf_type_lowpassturbo
More poles than normal lowpass (GigaStudio).
Definition gig.h:396
gig::vcf_type_highpass_1p
@ vcf_type_highpass_1p
[gig extension]: 1-pole highpass filter type (LinuxSampler).
Definition gig.h:396
gig::vcf_type_bandpass
@ vcf_type_bandpass
Bandpass filter type (GigaStudio).
Definition gig.h:396
gig::vcf_type_bandreject
@ vcf_type_bandreject
Band reject filter type (GigaStudio).
Definition gig.h:396
gig::vcf_type_lowpass_6p
@ vcf_type_lowpass_6p
[gig extension]: 6-pole lowpass filter type (LinuxSampler).
Definition gig.h:396
gig::vcf_type_highpass_2p
@ vcf_type_highpass_2p
[gig extension]: 2-pole highpass filter type (LinuxSampler).
Definition gig.h:396
gig::vcf_type_highpass
@ vcf_type_highpass
Highpass filter type (GigaStudio).
Definition gig.h:396
gig::vcf_type_lowpass_2p
@ vcf_type_lowpass_2p
[gig extension]: 2-pole lowpass filter type (LinuxSampler).
Definition gig.h:396
gig::vcf_type_highpass_4p
@ vcf_type_highpass_4p
[gig extension]: 4-pole highpass filter type (LinuxSampler).
Definition gig.h:396
gig::vcf_type_lowpass_4p
@ vcf_type_lowpass_4p
[gig extension]: 4-pole lowpass filter type (LinuxSampler).
Definition gig.h:396
gig::vcf_type_bandreject_2p
@ vcf_type_bandreject_2p
[gig extension]: 2-pole bandreject filter type (LinuxSampler).
Definition gig.h:396
gig::vcf_type_lowpass
@ vcf_type_lowpass
Standard lowpass filter type (GigaStudio).
Definition gig.h:396
gig::vcf_type_highpass_6p
@ vcf_type_highpass_6p
[gig extension]: 6-pole highpass filter type (LinuxSampler).
Definition gig.h:396
gig::vcf_type_bandpass_2p
@ vcf_type_bandpass_2p
[gig extension]: 2-pole bandpass filter type (LinuxSampler).
Definition gig.h:396
DLS::version_t
Quadtuple version number ("major.minor.release.build").
Definition DLS.h:115
RIFF::progress_t
Used for indicating the progress of a certain task.
Definition RIFF.h:167
gig::buffer_t
Pointer address and size of a buffer.
Definition gig.h:114
gig::buffer_t::NullExtensionSize
file_offset_t NullExtensionSize
The buffer might be bigger than the actual data, if that's the case that unused space at the end of t...
Definition gig.h:117
gig::buffer_t::pStart
void * pStart
Points to the beginning of the buffer.
Definition gig.h:115
gig::buffer_t::Size
file_offset_t Size
Size of the actual data in the buffer in bytes.
Definition gig.h:116
gig::crossfade_t
Defines the envelope of a crossfade.
Definition gig.h:405
gig::crossfade_t::in_end
uint8_t in_end
End position of fade in.
Definition gig.h:413
gig::crossfade_t::in_start
uint8_t in_start
Start position of fade in.
Definition gig.h:412
gig::crossfade_t::out_end
uint8_t out_end
End postition of fade out.
Definition gig.h:415
gig::crossfade_t::out_start
uint8_t out_start
Start position of fade out.
Definition gig.h:414
gig::dimension_def_t
General dimension definition.
Definition gig.h:357
gig::dimension_def_t::dimension
dimension_t dimension
Specifies which source (usually a MIDI controller) is associated with the dimension.
Definition gig.h:358
gig::dimension_def_t::zones
uint8_t zones
Number of zones the dimension has.
Definition gig.h:360
gig::dimension_def_t::bits
uint8_t bits
Number of "bits" (1 bit = 2 splits/zones, 2 bit = 4 splits/zones, 3 bit = 8 splits/zones,...
Definition gig.h:359
gig::dimension_def_t::zone_size
float zone_size
Intended for internal usage: reflects the size of each zone (128/zones) for normal split types only,...
Definition gig.h:362
gig::dimension_def_t::split_type
split_type_t split_type
Intended for internal usage: will be used to convert a dimension value into the corresponding dimensi...
Definition gig.h:361
gig::eg_opt_t
Defines behavior options for envelope generators (gig format extension).
Definition gig.h:451
gig::eg_opt_t::AttackHoldCancel
bool AttackHoldCancel
Whether the "attack hold" stage is cancelled when receiving a note-off (default: true).
Definition gig.h:453
gig::eg_opt_t::Decay1Cancel
bool Decay1Cancel
Whether the "decay 1" stage is cancelled when receiving a note-off (default: true).
Definition gig.h:454
gig::eg_opt_t::ReleaseCancel
bool ReleaseCancel
Whether the "release" stage is cancelled when receiving a note-on (default: true).
Definition gig.h:456
gig::eg_opt_t::AttackCancel
bool AttackCancel
Whether the "attack" stage is cancelled when receiving a note-off (default: true).
Definition gig.h:452
gig::eg_opt_t::Decay2Cancel
bool Decay2Cancel
Whether the "decay 2" stage is cancelled when receiving a note-off (default: true).
Definition gig.h:455
gig::leverage_ctrl_t
Defines a controller that has a certain contrained influence on a particular synthesis parameter (use...
Definition gig.h:260
gig::leverage_ctrl_t::type_t
type_t
Defines possible controllers.
Definition gig.h:270
gig::leverage_ctrl_t::type_none
@ type_none
No controller defined.
Definition gig.h:270
gig::leverage_ctrl_t::type_velocity
@ type_velocity
Key Velocity.
Definition gig.h:270
gig::leverage_ctrl_t::type_controlchange
@ type_controlchange
Ordinary MIDI control change controller, see field 'controller_number'.
Definition gig.h:270
gig::leverage_ctrl_t::type_channelaftertouch
@ type_channelaftertouch
Channel Key Pressure.
Definition gig.h:270
gig::leverage_ctrl_t::controller_number
uint controller_number
MIDI controller number if this controller is a control change controller, 0 otherwise.
Definition gig.h:273
gig::leverage_ctrl_t::type
type_t type
Controller type.
Definition gig.h:272
gig::playback_state_t
Reflects the current playback state for a sample.
Definition gig.h:422
gig::playback_state_t::reverse
bool reverse
If playback direction is currently backwards (in case there is a pingpong or reverse loop defined).
Definition gig.h:424
gig::playback_state_t::loop_cycles_left
file_offset_t loop_cycles_left
How many times the loop has still to be passed, this value will be decremented with each loop cycle.
Definition gig.h:425
gig::playback_state_t::position
file_offset_t position
Current position within the sample.
Definition gig.h:423
gig::range_t
Lower and upper limit of a range.
Definition gig.h:108
gig::range_t::high
uint8_t high
High value of range.
Definition gig.h:110
gig::range_t::low
uint8_t low
Low value of range.
Definition gig.h:109