433 |
GIG_DECLARE_ENUM(sust_rel_trg_t, |
GIG_DECLARE_ENUM(sust_rel_trg_t, |
434 |
sust_rel_trg_none = 0x00, /**< No release triggered sample(s) are played on sustain pedal up (default). */ |
sust_rel_trg_none = 0x00, /**< No release triggered sample(s) are played on sustain pedal up (default). */ |
435 |
sust_rel_trg_maxvelocity = 0x01, /**< Play release trigger sample(s) on sustain pedal up, and simply use 127 as MIDI velocity for playback. */ |
sust_rel_trg_maxvelocity = 0x01, /**< Play release trigger sample(s) on sustain pedal up, and simply use 127 as MIDI velocity for playback. */ |
436 |
sust_rel_trg_keyvelocity = 0x02, /**< Play release trigger sample(s) on sustain pedal up, and use the key's last MIDI note-on velocity for playback. */ |
sust_rel_trg_keyvelocity = 0x02 /**< Play release trigger sample(s) on sustain pedal up, and use the key's last MIDI note-on velocity for playback. */ |
437 |
); |
); |
438 |
|
|
439 |
// just symbol prototyping |
// just symbol prototyping |
577 |
eg_opt_t EG1Options; ///< [gig extension]: Behavior options which should be used for envelope generator 1 (volume amplitude EG). |
eg_opt_t EG1Options; ///< [gig extension]: Behavior options which should be used for envelope generator 1 (volume amplitude EG). |
578 |
eg_opt_t EG2Options; ///< [gig extension]: Behavior options which should be used for envelope generator 2 (filter cutoff EG). |
eg_opt_t EG2Options; ///< [gig extension]: Behavior options which should be used for envelope generator 2 (filter cutoff EG). |
579 |
sust_rel_trg_t SustainReleaseTrigger; ///< [gig extension]: Whether a sustain pedal up event shall play release trigger sample. |
sust_rel_trg_t SustainReleaseTrigger; ///< [gig extension]: Whether a sustain pedal up event shall play release trigger sample. |
580 |
|
bool NoNoteOffReleaseTrigger; ///< [gig extension]: If @c true then don't play a release trigger sample on MIDI note-off events. |
581 |
|
|
582 |
// derived attributes from DLS::Sampler |
// derived attributes from DLS::Sampler |
583 |
using DLS::Sampler::UnityNote; |
using DLS::Sampler::UnityNote; |
604 |
using DLS::Sampler::AddSampleLoop; |
using DLS::Sampler::AddSampleLoop; |
605 |
using DLS::Sampler::DeleteSampleLoop; |
using DLS::Sampler::DeleteSampleLoop; |
606 |
// overridden methods |
// overridden methods |
607 |
virtual void SetGain(int32_t gain); |
virtual void SetGain(int32_t gain) OVERRIDE; |
608 |
virtual void UpdateChunks(progress_t* pProgress); |
virtual void UpdateChunks(progress_t* pProgress) OVERRIDE; |
609 |
virtual void CopyAssign(const DimensionRegion* orig); |
virtual void CopyAssign(const DimensionRegion* orig); |
610 |
protected: |
protected: |
611 |
uint8_t* VelocityTable; ///< For velocity dimensions with custom defined zone ranges only: used for fast converting from velocity MIDI value to dimension bit number. |
uint8_t* VelocityTable; ///< For velocity dimensions with custom defined zone ranges only: used for fast converting from velocity MIDI value to dimension bit number. |
797 |
file_offset_t ReadAndLoop(void* pBuffer, file_offset_t SampleCount, playback_state_t* pPlaybackState, DimensionRegion* pDimRgn, buffer_t* pExternalDecompressionBuffer = NULL); |
file_offset_t ReadAndLoop(void* pBuffer, file_offset_t SampleCount, playback_state_t* pPlaybackState, DimensionRegion* pDimRgn, buffer_t* pExternalDecompressionBuffer = NULL); |
798 |
file_offset_t Write(void* pBuffer, file_offset_t SampleCount); |
file_offset_t Write(void* pBuffer, file_offset_t SampleCount); |
799 |
Group* GetGroup() const; |
Group* GetGroup() const; |
800 |
virtual void UpdateChunks(progress_t* pProgress); |
virtual void UpdateChunks(progress_t* pProgress) OVERRIDE; |
801 |
void CopyAssignMeta(const Sample* orig); |
void CopyAssignMeta(const Sample* orig); |
802 |
void CopyAssignWave(const Sample* orig); |
void CopyAssignWave(const Sample* orig); |
803 |
uint32_t GetWaveDataCRC32Checksum(); |
uint32_t GetWaveDataCRC32Checksum(); |
891 |
void SplitDimensionZone(dimension_t type, int zone); |
void SplitDimensionZone(dimension_t type, int zone); |
892 |
void SetDimensionType(dimension_t oldType, dimension_t newType); |
void SetDimensionType(dimension_t oldType, dimension_t newType); |
893 |
// overridden methods |
// overridden methods |
894 |
virtual void SetKeyRange(uint16_t Low, uint16_t High); |
virtual void SetKeyRange(uint16_t Low, uint16_t High) OVERRIDE; |
895 |
virtual void UpdateChunks(progress_t* pProgress); |
virtual void UpdateChunks(progress_t* pProgress) OVERRIDE; |
896 |
virtual void CopyAssign(const Region* orig); |
virtual void CopyAssign(const Region* orig); |
897 |
protected: |
protected: |
898 |
Region(Instrument* pInstrument, RIFF::List* rgnList); |
Region(Instrument* pInstrument, RIFF::List* rgnList); |
985 |
protected: |
protected: |
986 |
MidiRuleCtrlTrigger(RIFF::Chunk* _3ewg); |
MidiRuleCtrlTrigger(RIFF::Chunk* _3ewg); |
987 |
MidiRuleCtrlTrigger(); |
MidiRuleCtrlTrigger(); |
988 |
void UpdateChunks(uint8_t* pData) const; |
void UpdateChunks(uint8_t* pData) const OVERRIDE; |
989 |
friend class Instrument; |
friend class Instrument; |
990 |
}; |
}; |
991 |
|
|
1025 |
protected: |
protected: |
1026 |
MidiRuleLegato(RIFF::Chunk* _3ewg); |
MidiRuleLegato(RIFF::Chunk* _3ewg); |
1027 |
MidiRuleLegato(); |
MidiRuleLegato(); |
1028 |
void UpdateChunks(uint8_t* pData) const; |
void UpdateChunks(uint8_t* pData) const OVERRIDE; |
1029 |
friend class Instrument; |
friend class Instrument; |
1030 |
}; |
}; |
1031 |
|
|
1077 |
protected: |
protected: |
1078 |
MidiRuleAlternator(RIFF::Chunk* _3ewg); |
MidiRuleAlternator(RIFF::Chunk* _3ewg); |
1079 |
MidiRuleAlternator(); |
MidiRuleAlternator(); |
1080 |
void UpdateChunks(uint8_t* pData) const; |
void UpdateChunks(uint8_t* pData) const OVERRIDE; |
1081 |
friend class Instrument; |
friend class Instrument; |
1082 |
}; |
}; |
1083 |
|
|
1097 |
class MidiRuleUnknown : public MidiRule { |
class MidiRuleUnknown : public MidiRule { |
1098 |
protected: |
protected: |
1099 |
MidiRuleUnknown() { } |
MidiRuleUnknown() { } |
1100 |
void UpdateChunks(uint8_t* pData) const { } |
void UpdateChunks(uint8_t* pData) const OVERRIDE { } |
1101 |
friend class Instrument; |
friend class Instrument; |
1102 |
}; |
}; |
1103 |
|
|
1121 |
* - <a href="http://doc.linuxsampler.org/Instrument_Scripts/NKSP_Language/Reference/">NKSP Reference Manual</a> |
* - <a href="http://doc.linuxsampler.org/Instrument_Scripts/NKSP_Language/Reference/">NKSP Reference Manual</a> |
1122 |
* - <a href="http://doc.linuxsampler.org/Gigedit/Managing_Scripts">Using Instrument Scripts with Gigedit</a> |
* - <a href="http://doc.linuxsampler.org/Gigedit/Managing_Scripts">Using Instrument Scripts with Gigedit</a> |
1123 |
*/ |
*/ |
1124 |
class Script { |
class Script : protected DLS::Storage { |
1125 |
public: |
public: |
1126 |
enum Encoding_t { |
enum Encoding_t { |
1127 |
ENCODING_ASCII = 0 ///< Standard 8 bit US ASCII character encoding (default). |
ENCODING_ASCII = 0 ///< Standard 8 bit US ASCII character encoding (default). |
1147 |
protected: |
protected: |
1148 |
Script(ScriptGroup* group, RIFF::Chunk* ckScri); |
Script(ScriptGroup* group, RIFF::Chunk* ckScri); |
1149 |
virtual ~Script(); |
virtual ~Script(); |
1150 |
void UpdateChunks(progress_t* pProgress); |
void UpdateChunks(progress_t* pProgress) OVERRIDE; |
1151 |
|
void DeleteChunks() OVERRIDE; |
1152 |
void RemoveAllScriptReferences(); |
void RemoveAllScriptReferences(); |
1153 |
friend class ScriptGroup; |
friend class ScriptGroup; |
1154 |
friend class Instrument; |
friend class Instrument; |
1170 |
* not available in the GigaStudio 4 software. It is currently only |
* not available in the GigaStudio 4 software. It is currently only |
1171 |
* supported by LinuxSampler and gigedit. |
* supported by LinuxSampler and gigedit. |
1172 |
*/ |
*/ |
1173 |
class ScriptGroup { |
class ScriptGroup : protected DLS::Storage { |
1174 |
public: |
public: |
1175 |
String Name; ///< Name of this script group. For example to be displayed in an instrument editor. |
String Name; ///< Name of this script group. For example to be displayed in an instrument editor. |
1176 |
|
|
1181 |
ScriptGroup(File* file, RIFF::List* lstRTIS); |
ScriptGroup(File* file, RIFF::List* lstRTIS); |
1182 |
virtual ~ScriptGroup(); |
virtual ~ScriptGroup(); |
1183 |
void LoadScripts(); |
void LoadScripts(); |
1184 |
void UpdateChunks(progress_t* pProgress); |
virtual void UpdateChunks(progress_t* pProgress) OVERRIDE; |
1185 |
|
virtual void DeleteChunks() OVERRIDE; |
1186 |
friend class Script; |
friend class Script; |
1187 |
friend class File; |
friend class File; |
1188 |
private: |
private: |
1235 |
Region* AddRegion(); |
Region* AddRegion(); |
1236 |
void DeleteRegion(Region* pRegion); |
void DeleteRegion(Region* pRegion); |
1237 |
void MoveTo(Instrument* dst); |
void MoveTo(Instrument* dst); |
1238 |
virtual void UpdateChunks(progress_t* pProgress); |
virtual void UpdateChunks(progress_t* pProgress) OVERRIDE; |
1239 |
virtual void CopyAssign(const Instrument* orig); |
virtual void CopyAssign(const Instrument* orig); |
1240 |
// own methods |
// own methods |
1241 |
Region* GetRegion(unsigned int Key); |
Region* GetRegion(unsigned int Key); |
1289 |
* there is always at least one Group in a .gig file, no matter if you |
* there is always at least one Group in a .gig file, no matter if you |
1290 |
* created one yet or not. |
* created one yet or not. |
1291 |
*/ |
*/ |
1292 |
class Group { |
class Group : public DLS::Storage { |
1293 |
public: |
public: |
1294 |
String Name; ///< Stores the name of this Group. |
String Name; ///< Stores the name of this Group. |
1295 |
|
|
1299 |
protected: |
protected: |
1300 |
Group(File* file, RIFF::Chunk* ck3gnm); |
Group(File* file, RIFF::Chunk* ck3gnm); |
1301 |
virtual ~Group(); |
virtual ~Group(); |
1302 |
virtual void UpdateChunks(progress_t* pProgress); |
virtual void UpdateChunks(progress_t* pProgress) OVERRIDE; |
1303 |
|
virtual void DeleteChunks() OVERRIDE; |
1304 |
void MoveAll(); |
void MoveAll(); |
1305 |
friend class File; |
friend class File; |
1306 |
private: |
private: |
1363 |
using DLS::File::Save; |
using DLS::File::Save; |
1364 |
using DLS::File::GetFileName; |
using DLS::File::GetFileName; |
1365 |
using DLS::File::SetFileName; |
using DLS::File::SetFileName; |
1366 |
|
using DLS::File::GetRiffFile; |
1367 |
// overridden methods |
// overridden methods |
1368 |
File(); |
File(); |
1369 |
File(RIFF::File* pRIFF); |
File(RIFF::File* pRIFF); |
1395 |
ScriptGroup* AddScriptGroup(); |
ScriptGroup* AddScriptGroup(); |
1396 |
void DeleteScriptGroup(ScriptGroup* pGroup); |
void DeleteScriptGroup(ScriptGroup* pGroup); |
1397 |
virtual ~File(); |
virtual ~File(); |
1398 |
virtual void UpdateChunks(progress_t* pProgress); |
virtual void UpdateChunks(progress_t* pProgress) OVERRIDE; |
1399 |
protected: |
protected: |
1400 |
// overridden protected methods from DLS::File |
// overridden protected methods from DLS::File |
1401 |
virtual void LoadSamples(); |
virtual void LoadSamples() OVERRIDE; |
1402 |
virtual void LoadInstruments(); |
virtual void LoadInstruments() OVERRIDE; |
1403 |
virtual void LoadGroups(); |
virtual void LoadGroups(); |
1404 |
virtual void UpdateFileOffsets(); |
virtual void UpdateFileOffsets() OVERRIDE; |
1405 |
// own protected methods |
// own protected methods |
1406 |
virtual void LoadSamples(progress_t* pProgress); |
virtual void LoadSamples(progress_t* pProgress); |
1407 |
virtual void LoadInstruments(progress_t* pProgress); |
virtual void LoadInstruments(progress_t* pProgress); |