libgig  4.4.1
gig Namespace Reference

Gigasampler/GigaStudio specific classes and definitions. More...

Classes

struct  buffer_t
 Pointer address and size of a buffer. More...
 
struct  crossfade_t
 Defines the envelope of a crossfade. More...
 
struct  dimension_def_t
 General dimension definition. More...
 
class  DimensionRegion
 Encapsulates articulation informations of a dimension region. More...
 
struct  eg_opt_t
 Defines behavior options for envelope generators (gig format extension). More...
 
class  Exception
 Will be thrown whenever a gig specific error occurs while trying to access a Gigasampler File. More...
 
class  File
 Provides convenient access to Gigasampler/GigaStudio .gig files. More...
 
class  Group
 Group of Gigasampler samples. More...
 
class  Instrument
 Provides access to a Gigasampler/GigaStudio instrument. More...
 
struct  leverage_ctrl_t
 Defines a controller that has a certain contrained influence on a particular synthesis parameter (used to define attenuation controller, EG1 controller and EG2 controller). More...
 
class  MidiRule
 Abstract base class for all MIDI rules. More...
 
class  MidiRuleAlternator
 MIDI rule to automatically cycle through specified sequences of different articulations. More...
 
class  MidiRuleCtrlTrigger
 MIDI rule for triggering notes by control change events. More...
 
class  MidiRuleLegato
 MIDI rule for instruments with legato samples. More...
 
class  MidiRuleUnknown
 A MIDI rule not yet implemented by libgig. More...
 
struct  playback_state_t
 Reflects the current playback state for a sample. More...
 
struct  range_t
 Lower and upper limit of a range. More...
 
class  Region
 Defines Region information of a Gigasampler/GigaStudio instrument. More...
 
class  Sample
 Encapsulates sample waves of Gigasampler/GigaStudio files used for playback. More...
 
class  Script
 Real-time instrument script (gig format extension). More...
 
class  ScriptGroup
 Group of instrument scripts (gig format extension). More...
 

Typedefs

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

Enumerations

enum  loop_type_t { loop_type_normal = 0x00000000, loop_type_bidirectional = 0x00000001, loop_type_backward = 0x00000002 }
 Standard types of sample loops. More...
 
enum  smpte_format_t {
  smpte_format_no_offset = 0x00000000, smpte_format_24_frames = 0x00000018, smpte_format_25_frames = 0x00000019, smpte_format_30_frames_dropping = 0x0000001D,
  smpte_format_30_frames = 0x0000001E
}
 Society of Motion Pictures and Television E time format. More...
 
enum  curve_type_t { curve_type_nonlinear = 0, curve_type_linear = 1, curve_type_special = 2, curve_type_unknown = 0xffffffff }
 Defines the shape of a function graph. More...
 
enum  lfo_wave_t { lfo_wave_sine = 0, lfo_wave_triangle = 1, lfo_wave_saw = 2, lfo_wave_square = 3 }
 Defines the wave form type used by an LFO (gig format extension). More...
 
enum  dim_bypass_ctrl_t { dim_bypass_ctrl_none, dim_bypass_ctrl_94, dim_bypass_ctrl_95 }
 Dimensions allow to bypass one of the following controllers. More...
 
enum  lfo3_ctrl_t {
  lfo3_ctrl_internal = 0x00, lfo3_ctrl_modwheel = 0x01, lfo3_ctrl_aftertouch = 0x02, lfo3_ctrl_internal_modwheel = 0x03,
  lfo3_ctrl_internal_aftertouch = 0x04
}
 Defines how LFO3 is controlled by. More...
 
enum  lfo2_ctrl_t {
  lfo2_ctrl_internal = 0x00, lfo2_ctrl_modwheel = 0x01, lfo2_ctrl_foot = 0x02, lfo2_ctrl_internal_modwheel = 0x03,
  lfo2_ctrl_internal_foot = 0x04
}
 Defines how LFO2 is controlled by. More...
 
enum  lfo1_ctrl_t {
  lfo1_ctrl_internal = 0x00, lfo1_ctrl_modwheel = 0x01, lfo1_ctrl_breath = 0x02, lfo1_ctrl_internal_modwheel = 0x03,
  lfo1_ctrl_internal_breath = 0x04
}
 Defines how LFO1 is controlled by. More...
 
enum  vcf_cutoff_ctrl_t {
  vcf_cutoff_ctrl_none = 0x00, vcf_cutoff_ctrl_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
}
 Defines how the filter cutoff frequency is controlled by. More...
 
enum  vcf_res_ctrl_t {
  vcf_res_ctrl_none = 0xffffffff, vcf_res_ctrl_genpurpose3 = 0, vcf_res_ctrl_genpurpose4 = 1, vcf_res_ctrl_genpurpose5 = 2,
  vcf_res_ctrl_genpurpose6 = 3
}
 Defines how the filter resonance is controlled by. More...
 
enum  dimension_t {
  dimension_none = 0x00, dimension_samplechannel = 0x80, dimension_layer = 0x81, dimension_velocity = 0x82,
  dimension_channelaftertouch = 0x83, dimension_releasetrigger = 0x84, dimension_keyboard = 0x85, dimension_roundrobin = 0x86,
  dimension_random = 0x87, dimension_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
}
 Defines the type of dimension, that is how the dimension zones (and thus how the dimension regions are selected by. More...
 
enum  split_type_t { split_type_normal, split_type_bit }
 Intended for internal usage: will be used to convert a dimension value into the corresponding dimension bit number. More...
 
enum  vcf_type_t {
  vcf_type_lowpass = 0x00, vcf_type_lowpassturbo = 0xff, vcf_type_bandpass = 0x01, vcf_type_highpass = 0x02,
  vcf_type_bandreject = 0x03, 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
}
 Audio filter types. More...
 
enum  sust_rel_trg_t { sust_rel_trg_none = 0x00, sust_rel_trg_maxvelocity = 0x01, sust_rel_trg_keyvelocity = 0x02 }
 Defines behaviour of release triggered sample(s) on sustain pedal up event. More...
 

Functions

size_t enumCount (String typeName)
 Amount of elements in given enum type. More...
 
const char * enumKey (String typeName, size_t value)
 Enum constant name of numeric value. More...
 
bool enumKey (String typeName, String key)
 Check if enum element exists. More...
 
const char ** enumKeys (String typeName)
 All element names of enum type. More...
 
size_t enumValue (String key)
 Numeric value of enum constant. More...
 
String libraryName ()
 Returns the name of this C++ library. More...
 
String libraryVersion ()
 Returns version of this C++ library. More...
 
std::array< uint8_t, 16 > _UUIDFromCArray (const uint8_t *pData)
 type cast (by copy) uint8_t[16] -> std::array<uint8_t,16>
 
size_t enumCount (const std::type_info &type)
 Amount of elements in given enum type. More...
 
bool enumKey (const std::type_info &type, String key)
 Check if enum element exists. More...
 
const char * enumKey (const std::type_info &type, size_t value)
 Enum constant name of numeric value. More...
 
const char ** enumKeys (const std::type_info &type)
 All element names of enum type. More...
 

Detailed Description

Gigasampler/GigaStudio specific classes and definitions.

Typedef Documentation

◆ attenuation_ctrl_t

Defines controller influencing attenuation.

See also
leverage_ctrl_t

Definition at line 283 of file gig.h.

◆ eg1_ctrl_t

Defines controller influencing envelope generator 1.

See also
leverage_ctrl_t

Definition at line 290 of file gig.h.

◆ eg2_ctrl_t

Defines controller influencing envelope generator 2.

See also
leverage_ctrl_t

Definition at line 297 of file gig.h.

Enumeration Type Documentation

◆ curve_type_t

Defines the shape of a function graph.

See also
enumCount(), enumKey(), enumKeys(), enumValue()
Enumerator
curve_type_nonlinear 

Non-linear curve type.

curve_type_linear 

Linear curve type.

curve_type_special 

Special curve type.

curve_type_unknown 

Unknown curve type.

Definition at line 156 of file gig.h.

◆ dim_bypass_ctrl_t

Dimensions allow to bypass one of the following controllers.

See also
enumCount(), enumKey(), enumKeys(), enumValue()
Enumerator
dim_bypass_ctrl_none 

No controller bypass.

dim_bypass_ctrl_94 

Effect 4 Depth (MIDI Controller 94)

dim_bypass_ctrl_95 

Effect 5 Depth (MIDI Controller 95)

Definition at line 183 of file gig.h.

◆ dimension_t

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

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

See also
enumCount(), enumKey(), enumKeys(), enumValue()
Enumerator
dimension_none 

Dimension not in use.

dimension_samplechannel 

If used sample has more than one channel (thus is not mono).

dimension_layer 

For layering of up to 8 instruments (and eventually crossfading of 2 or 4 layers).

dimension_velocity 

Key Velocity (this is the only dimension in gig2 where the ranges can exactly be defined).

dimension_channelaftertouch 

Channel Key Pressure.

dimension_releasetrigger 

Special dimension for triggering samples on releasing a key.

dimension_keyboard 

Dimension for keyswitching.

dimension_roundrobin 

Different samples triggered each time a note is played, dimension regions selected in sequence.

dimension_random 

Different samples triggered each time a note is played, random order.

dimension_smartmidi 

For MIDI tools like legato and repetition mode.

dimension_roundrobinkeyboard 

Different samples triggered each time a note is played, any key advances the counter.

dimension_modwheel 

Modulation Wheel (MIDI Controller 1)

dimension_breath 

Breath Controller (Coarse, MIDI Controller 2)

dimension_foot 

Foot Pedal (Coarse, MIDI Controller 4)

dimension_portamentotime 

Portamento Time (Coarse, MIDI Controller 5)

dimension_effect1 

Effect Controller 1 (Coarse, MIDI Controller 12)

dimension_effect2 

Effect Controller 2 (Coarse, MIDI Controller 13)

dimension_genpurpose1 

General Purpose Controller 1 (Slider, MIDI Controller 16)

dimension_genpurpose2 

General Purpose Controller 2 (Slider, MIDI Controller 17)

dimension_genpurpose3 

General Purpose Controller 3 (Slider, MIDI Controller 18)

dimension_genpurpose4 

General Purpose Controller 4 (Slider, MIDI Controller 19)

dimension_sustainpedal 

Sustain Pedal (MIDI Controller 64)

dimension_portamento 

Portamento (MIDI Controller 65)

dimension_sostenutopedal 

Sostenuto Pedal (MIDI Controller 66)

dimension_softpedal 

Soft Pedal (MIDI Controller 67)

dimension_genpurpose5 

General Purpose Controller 5 (Button, MIDI Controller 80)

dimension_genpurpose6 

General Purpose Controller 6 (Button, MIDI Controller 81)

dimension_genpurpose7 

General Purpose Controller 7 (Button, MIDI Controller 82)

dimension_genpurpose8 

General Purpose Controller 8 (Button, MIDI Controller 83)

dimension_effect1depth 

Effect 1 Depth (MIDI Controller 91)

dimension_effect2depth 

Effect 2 Depth (MIDI Controller 92)

dimension_effect3depth 

Effect 3 Depth (MIDI Controller 93)

dimension_effect4depth 

Effect 4 Depth (MIDI Controller 94)

dimension_effect5depth 

Effect 5 Depth (MIDI Controller 95)

Definition at line 343 of file gig.h.

◆ lfo1_ctrl_t

Defines how LFO1 is controlled by.

See also
enumCount(), enumKey(), enumKeys(), enumValue()
Enumerator
lfo1_ctrl_internal 

Only internally controlled.

lfo1_ctrl_modwheel 

Only controlled by external modulation wheel.

lfo1_ctrl_breath 

Only controlled by external breath controller.

lfo1_ctrl_internal_modwheel 

Controlled internally and by external modulation wheel.

lfo1_ctrl_internal_breath 

Controlled internally and by external breath controller.

Definition at line 219 of file gig.h.

◆ lfo2_ctrl_t

Defines how LFO2 is controlled by.

See also
enumCount(), enumKey(), enumKeys(), enumValue()
Enumerator
lfo2_ctrl_internal 

Only internally controlled.

lfo2_ctrl_modwheel 

Only controlled by external modulation wheel.

lfo2_ctrl_foot 

Only controlled by external foot controller.

lfo2_ctrl_internal_modwheel 

Controlled internally and by external modulation wheel.

lfo2_ctrl_internal_foot 

Controlled internally and by external foot controller.

Definition at line 207 of file gig.h.

◆ lfo3_ctrl_t

Defines how LFO3 is controlled by.

See also
enumCount(), enumKey(), enumKeys(), enumValue()
Enumerator
lfo3_ctrl_internal 

Only internally controlled.

lfo3_ctrl_modwheel 

Only controlled by external modulation wheel.

lfo3_ctrl_aftertouch 

Only controlled by aftertouch controller.

lfo3_ctrl_internal_modwheel 

Controlled internally and by external modulation wheel.

lfo3_ctrl_internal_aftertouch 

Controlled internally and by aftertouch controller.

Definition at line 195 of file gig.h.

◆ lfo_wave_t

Defines the wave form type used by an LFO (gig format extension).

This is a gig format extension. The original Gigasampler/GigaStudio software always used a sine (sinus) wave form for all its 3 LFOs, so this was not configurable in the original gig format. Accordingly setting any other wave form than sine (sinus) will be ignored by the original Gigasampler/GigaStudio software.

See also
enumCount(), enumKey(), enumKeys(), enumValue()
Enumerator
lfo_wave_sine 

Sine (sinus) wave form (this is the default wave form).

lfo_wave_triangle 

Triangle wave form.

lfo_wave_saw 

Saw (up) wave form (saw down wave form can be achieved by flipping the phase).

lfo_wave_square 

Square wave form.

Definition at line 173 of file gig.h.

◆ loop_type_t

Standard types of sample loops.

See also
enumCount(), enumKey(), enumKeys(), enumValue()
Enumerator
loop_type_normal 

Loop forward (normal)

loop_type_bidirectional 

Alternating loop (forward/backward, also known as Ping Pong)

loop_type_backward 

Loop backward (reverse)

Definition at line 133 of file gig.h.

◆ smpte_format_t

Society of Motion Pictures and Television E time format.

See also
enumCount(), enumKey(), enumKeys(), enumValue()
Enumerator
smpte_format_no_offset 

no SMPTE offset

smpte_format_24_frames 

24 frames per second

smpte_format_25_frames 

25 frames per second

smpte_format_30_frames_dropping 

30 frames per second with frame dropping (30 drop)

smpte_format_30_frames 

30 frames per second

Definition at line 145 of file gig.h.

◆ split_type_t

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

See also
enumCount(), enumKey(), enumKeys(), enumValue()
Enumerator
split_type_normal 

dimension value between 0-127

split_type_bit 

dimension values are already the sought bit number

Definition at line 354 of file gig.h.

◆ sust_rel_trg_t

Defines behaviour of release triggered sample(s) on sustain pedal up event.

This option defines whether a sustain pedal up event (CC#64) would cause release triggered samples to be played (if any).

Note: This option is an extension to the original gig file format, so this option is not available with the original Gigasampler/GigaStudio software! Currently only LinuxSampler and gigedit support this option!

By default (which equals the original Gigasampler/GigaStudio behaviour) no release triggered samples are played if the sustain pedal is released. So usually in the gig format release triggered samples are only played on MIDI note-off events.

See also
enumCount(), enumKey(), enumKeys(), enumValue()
Enumerator
sust_rel_trg_none 

No release triggered sample(s) are played on sustain pedal up (default).

sust_rel_trg_maxvelocity 

Play release trigger sample(s) on sustain pedal up, and simply use 127 as MIDI velocity for playback.

sust_rel_trg_keyvelocity 

Play release trigger sample(s) on sustain pedal up, and use the key`s last MIDI note-on velocity for playback.

Definition at line 482 of file gig.h.

◆ vcf_cutoff_ctrl_t

Defines how the filter cutoff frequency is controlled by.

See also
enumCount(), enumKey(), enumKeys(), enumValue()
Enumerator
vcf_cutoff_ctrl_none 

No MIDI controller assigned for filter cutoff frequency.

vcf_cutoff_ctrl_none2 

The difference between none and none2 is unknown.

vcf_cutoff_ctrl_modwheel 

Modulation Wheel (MIDI Controller 1)

vcf_cutoff_ctrl_effect1 

Effect Controller 1 (Coarse, MIDI Controller 12)

vcf_cutoff_ctrl_effect2 

Effect Controller 2 (Coarse, MIDI Controller 13)

vcf_cutoff_ctrl_breath 

Breath Controller (Coarse, MIDI Controller 2)

vcf_cutoff_ctrl_foot 

Foot Pedal (Coarse, MIDI Controller 4)

vcf_cutoff_ctrl_sustainpedal 

Sustain Pedal (MIDI Controller 64)

vcf_cutoff_ctrl_softpedal 

Soft Pedal (MIDI Controller 67)

vcf_cutoff_ctrl_genpurpose7 

General Purpose Controller 7 (Button, MIDI Controller 82)

vcf_cutoff_ctrl_genpurpose8 

General Purpose Controller 8 (Button, MIDI Controller 83)

vcf_cutoff_ctrl_aftertouch 

Key Pressure.

Definition at line 238 of file gig.h.

◆ vcf_res_ctrl_t

Defines how the filter resonance is controlled by.

See also
enumCount(), enumKey(), enumKeys(), enumValue()
Enumerator
vcf_res_ctrl_none 

No MIDI controller assigned for filter resonance.

vcf_res_ctrl_genpurpose3 

General Purpose Controller 3 (Slider, MIDI Controller 18)

vcf_res_ctrl_genpurpose4 

General Purpose Controller 4 (Slider, MIDI Controller 19)

vcf_res_ctrl_genpurpose5 

General Purpose Controller 5 (Button, MIDI Controller 80)

vcf_res_ctrl_genpurpose6 

General Purpose Controller 6 (Button, MIDI Controller 81)

Definition at line 250 of file gig.h.

◆ vcf_type_t

Audio filter types.

The first 5 filter types are the ones which exist in GigaStudio, and which are very accurately modeled on LinuxSampler side such that they would sound with LinuxSampler exactly as with GigaStudio.

The other filter types listed here are extensions to the gig format and are LinuxSampler specific filter type implementations. Note that none of these are duplicates of the GigaStudio filter types. For instance vcf_type_lowpass (GigaStudio) and vcf_type_lowpass_2p (LinuxSampler) are both lowpass filters with 2 poles, however they do sound differently.

See also
enumCount(), enumKey(), enumKeys(), enumValue()
Enumerator
vcf_type_lowpass 

Standard lowpass filter type (GigaStudio).

vcf_type_lowpassturbo 

More poles than normal lowpass (GigaStudio).

vcf_type_bandpass 

Bandpass filter type (GigaStudio).

vcf_type_highpass 

Highpass filter type (GigaStudio).

vcf_type_bandreject 

Band reject filter type (GigaStudio).

vcf_type_lowpass_1p 

[gig extension]: 1-pole lowpass filter type (LinuxSampler).

vcf_type_lowpass_2p 

[gig extension]: 2-pole lowpass filter type (LinuxSampler).

vcf_type_lowpass_4p 

[gig extension]: 4-pole lowpass filter type (LinuxSampler).

vcf_type_lowpass_6p 

[gig extension]: 6-pole lowpass filter type (LinuxSampler).

vcf_type_highpass_1p 

[gig extension]: 1-pole highpass filter type (LinuxSampler).

vcf_type_highpass_2p 

[gig extension]: 2-pole highpass filter type (LinuxSampler).

vcf_type_highpass_4p 

[gig extension]: 4-pole highpass filter type (LinuxSampler).

vcf_type_highpass_6p 

[gig extension]: 6-pole highpass filter type (LinuxSampler).

vcf_type_bandpass_2p 

[gig extension]: 2-pole bandpass filter type (LinuxSampler).

vcf_type_bandreject_2p 

[gig extension]: 2-pole bandreject filter type (LinuxSampler).

Definition at line 396 of file gig.h.

Function Documentation

◆ enumCount() [1/2]

size_t gig::enumCount ( const std::type_info &  type)

Amount of elements in given enum type.

Returns the amount of elements of the enum type given by type. If the requested enum type is unknown, then this function returns 0 instead.

Use the typeid() keyword of C++ to get a std::type_info object.

Parameters
type- enum type of interest
Returns
enum's amount of elements

Definition at line 206 of file typeinfo.cpp.

References enumCount().

◆ enumCount() [2/2]

size_t gig::enumCount ( String  typeName)

Amount of elements in given enum type.

Returns the amount of elements of the enum type with raw C++ type name typeName. If the requested enum type is unknown, then this function returns 0 instead.

Note: you MUST pass the raw C++ type name, not a demangled human readable C++ type name. On doubt use the overloaded function which takes a std::type_info as argument instead.

Parameters
typeName- raw C++ type name of enum
Returns
enum's amount of elements

Definition at line 190 of file typeinfo.cpp.

References enumCount().

Referenced by enumCount().

◆ enumKey() [1/4]

bool gig::enumKey ( const std::type_info &  type,
String  key 
)

Check if enum element exists.

Checks whether the enum constant with name key of requested enum type exists. If either the requested enum type or enum constant is unknown, then this function returns false instead.

Use the typeid() keyword of C++ to get a std::type_info object.

Parameters
type- enum type of interest
key- name of enum constant
Returns
true if requested enum element exists

Definition at line 257 of file typeinfo.cpp.

References enumKey().

◆ enumKey() [2/4]

const char* gig::enumKey ( const std::type_info &  type,
size_t  value 
)

Enum constant name of numeric value.

Returns the enum constant name (a.k.a. enum element name) for the given numeric value and the given enum type. If either the requested enum type or enum constant numeric value is unknown, then this function returns NULL instead.

If the requested enum type contains several enum elements with the requested numeric enum value, then this function will simply return one of them, it is undefined which one it would return exactly in this case.

Use the typeid() keyword of C++ to get a std::type_info object.

Parameters
type- enum type of interest
value- numeric value of sought enum constant
Returns
true if requested enum element exists

Definition at line 305 of file typeinfo.cpp.

References enumKey().

◆ enumKey() [3/4]

const char * gig::enumKey ( String  typeName,
size_t  value 
)

Enum constant name of numeric value.

Returns the enum constant name (a.k.a. enum element name) for the given numeric value and the enum type with raw C++ enum type name typeName. If either the requested enum type or enum constant numeric value is unknown, then this function returns NULL instead.

If the requested enum type contains several enum elements with the requested numeric enum value, then this function will simply return one of them, it is undefined which one it would return exactly in this case.

Note: you MUST pass the raw C++ type name, not a demangled human readable C++ type name. On doubt use the overloaded function which takes a std::type_info as argument instead.

Parameters
typeName- raw C++ type name of enum
value- numeric value of sought enum constant
Returns
true if requested enum element exists

Definition at line 280 of file typeinfo.cpp.

References enumKey().

Referenced by enumKey().

◆ enumKey() [4/4]

bool gig::enumKey ( String  typeName,
String  key 
)

Check if enum element exists.

Checks whether the enum constant with name key of enum type with raw C++ enum type name typeName exists. If either the requested enum type or enum constant is unknown, then this function returns false instead.

Note: you MUST pass the raw C++ type name, not a demangled human readable C++ type name. On doubt use the overloaded function which takes a std::type_info as argument instead.

Parameters
typeName- raw C++ type name of enum
key- name of enum constant
Returns
true if requested enum element exists

Definition at line 239 of file typeinfo.cpp.

References enumKey().

◆ enumKeys() [1/2]

const char** gig::enumKeys ( const std::type_info &  type)

All element names of enum type.

Returns a NULL terminated array of C strings of all enum constant names of the given enum type. If the requested enum type is unknown, then this function returns NULL instead.

Use the typeid() keyword of C++ to get a std::type_info object.

Parameters
type- enum type of interest
Returns
list of all enum element names

Definition at line 342 of file typeinfo.cpp.

References enumKeys().

◆ enumKeys() [2/2]

const char ** gig::enumKeys ( String  typeName)

All element names of enum type.

Returns a NULL terminated array of C strings of all enum constant names of the given enum type with raw C++ enum type name typeName. If the requested enum type is unknown, then this function returns NULL instead.

Note: you MUST pass the raw C++ type name, not a demangled human readable C++ type name. On doubt use the overloaded function which takes a std::type_info as argument instead.

Parameters
typeName- raw C++ type name of enum
Returns
list of all enum element names

Definition at line 323 of file typeinfo.cpp.

References enumKeys().

Referenced by enumKeys().

◆ enumValue()

size_t gig::enumValue ( String  key)

Numeric value of enum constant.

Returns the numeric value (assigned at library compile time) to the enum constant with given name. If the requested enum constant is unknown, then this function returns 0 instead.

Parameters
key- enum constant name
Returns
enum constant's numeric value

Definition at line 219 of file typeinfo.cpp.

References enumValue().

Referenced by enumValue().

◆ libraryName()

String gig::libraryName ( )

Returns the name of this C++ library.

This is usually "libgig" of course. This call is equivalent to RIFF::libraryName() and DLS::libraryName().

Definition at line 7535 of file gig.cpp.

◆ libraryVersion()

String gig::libraryVersion ( )

Returns version of this C++ library.

This call is equivalent to RIFF::libraryVersion() and DLS::libraryVersion().

Definition at line 7543 of file gig.cpp.