/[svn]/libgig/trunk/src/gig.h
ViewVC logotype

Diff of /libgig/trunk/src/gig.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3933 by schoenebeck, Thu Jun 17 09:21:11 2021 UTC revision 3965 by schoenebeck, Sat Jun 19 16:55:33 2021 UTC
# Line 1231  namespace gig { Line 1231  namespace gig {
1231          public:          public:
1232              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.
1233    
1234              Script*  GetScript(uint index);              Script*  GetScript(size_t index);
1235              Script*  AddScript();              Script*  AddScript();
1236              void     DeleteScript(Script* pScript);              void     DeleteScript(Script* pScript);
1237          protected:          protected:
# Line 1245  namespace gig { Line 1245  namespace gig {
1245          private:          private:
1246              File*                pFile;              File*                pFile;
1247              RIFF::List*          pList; ///< 'RTIS' list chunk              RIFF::List*          pList; ///< 'RTIS' list chunk
1248              std::list<Script*>*  pScripts;              std::vector<Script*>* pScripts;
1249      };      };
1250    
1251      /** @brief Provides access to a Gigasampler/GigaStudio instrument.      /** @brief Provides access to a Gigasampler/GigaStudio instrument.
# Line 1284  namespace gig { Line 1284  namespace gig {
1284              range_t   DimensionKeyRange; ///< 0-127 (where 0 means C1 and 127 means G9)              range_t   DimensionKeyRange; ///< 0-127 (where 0 means C1 and 127 means G9)
1285    
1286    
1287              // derived methods from DLS::Resource              // derived methods
1288              using DLS::Resource::GetParent;              using DLS::Resource::GetParent;
1289                using DLS::Instrument::CountRegions;
1290              // overridden methods              // overridden methods
1291              Region*   GetRegionAt(size_t pos);              Region*   GetRegionAt(size_t pos);
1292              Region*   GetFirstRegion() LIBGIG_DEPRECATED_API("Use GetRegionAt() instead.");              Region*   GetFirstRegion() LIBGIG_DEPRECATED_API("Use GetRegionAt() instead.");
# Line 1303  namespace gig { Line 1304  namespace gig {
1304              MidiRuleAlternator*  AddMidiRuleAlternator();              MidiRuleAlternator*  AddMidiRuleAlternator();
1305              void      DeleteMidiRule(int i);              void      DeleteMidiRule(int i);
1306              // real-time instrument script methods              // real-time instrument script methods
1307              Script*   GetScriptOfSlot(uint index);              Script*   GetScriptOfSlot(size_t index);
1308              void      AddScriptSlot(Script* pScript, bool bypass = false);              void      AddScriptSlot(Script* pScript, bool bypass = false);
1309              void      SwapScriptSlots(uint index1, uint index2);              void      SwapScriptSlots(size_t index1, size_t index2);
1310              void      RemoveScriptSlot(uint index);              void      RemoveScriptSlot(size_t index);
1311              void      RemoveScript(Script* pScript);              void      RemoveScript(Script* pScript);
1312              uint      ScriptSlotCount() const;              size_t    ScriptSlotCount() const;
1313              bool      IsScriptSlotBypassed(uint index);              bool      IsScriptSlotBypassed(size_t index);
1314              void      SetScriptSlotBypassed(uint index, bool bBypass);              void      SetScriptSlotBypassed(size_t index, bool bBypass);
1315              bool      IsScriptPatchVariableSet(int slot, String variable);              bool      IsScriptPatchVariableSet(size_t slot, String variable);
1316              std::map<String,String> GetScriptPatchVariables(int slot);              std::map<String,String> GetScriptPatchVariables(size_t slot);
1317              String    GetScriptPatchVariable(int slot, String variable);              String    GetScriptPatchVariable(size_t slot, String variable);
1318              void      SetScriptPatchVariable(int slot, String variable, String value);              void      SetScriptPatchVariable(size_t slot, String variable, String value);
1319              void      UnsetScriptPatchVariable(int slot = -1, String variable = "");              void      UnsetScriptPatchVariable(ssize_t slot = -1, String variable = "");
1320          protected:          protected:
1321              Region*   RegionKeyTable[128]; ///< fast lookup for the corresponding Region of a MIDI key              Region*   RegionKeyTable[128]; ///< fast lookup for the corresponding Region of a MIDI key
1322    
# Line 1338  namespace gig { Line 1339  namespace gig {
1339              };              };
1340              typedef std::array<uint8_t,16> _UUID;              typedef std::array<uint8_t,16> _UUID;
1341              typedef std::map<String,String> _PatchVars;              typedef std::map<String,String> _PatchVars;
1342              typedef std::map<int,_PatchVars> _VarsBySlot;              typedef std::map<size_t,_PatchVars> _VarsBySlot;
1343              typedef std::map<_UUID,_VarsBySlot> _VarsByScript;              typedef std::map<_UUID,_VarsBySlot> _VarsByScript;
1344              MidiRule** pMidiRules;              MidiRule** pMidiRules;
1345              std::vector<_ScriptPooolEntry> scriptPoolFileOffsets;              std::vector<_ScriptPooolEntry> scriptPoolFileOffsets;
# Line 1447  namespace gig { Line 1448  namespace gig {
1448              Sample*     AddSample();              Sample*     AddSample();
1449              size_t      CountSamples();              size_t      CountSamples();
1450              void        DeleteSample(Sample* pSample);              void        DeleteSample(Sample* pSample);
1451              Instrument* GetFirstInstrument(); ///< Returns a pointer to the first <i>Instrument</i> object of the file, <i>NULL</i> otherwise.              Instrument* GetFirstInstrument() LIBGIG_DEPRECATED_API("Use GetInstrument() instead.");
1452              Instrument* GetNextInstrument();  ///< Returns a pointer to the next <i>Instrument</i> object of the file, <i>NULL</i> otherwise.              Instrument* GetNextInstrument() LIBGIG_DEPRECATED_API("Use GetInstrument() instead.");
1453              Instrument* GetInstrument(uint index, progress_t* pProgress = NULL);              Instrument* GetInstrument(size_t index, progress_t* pProgress = NULL);
1454              Instrument* AddInstrument();              Instrument* AddInstrument();
1455              Instrument* AddDuplicateInstrument(const Instrument* orig);              Instrument* AddDuplicateInstrument(const Instrument* orig);
1456              size_t      CountInstruments();              size_t      CountInstruments();
1457              void        DeleteInstrument(Instrument* pInstrument);              void        DeleteInstrument(Instrument* pInstrument);
1458              Group*      GetFirstGroup(); ///< Returns a pointer to the first <i>Group</i> object of the file, <i>NULL</i> otherwise.              Group*      GetFirstGroup() LIBGIG_DEPRECATED_API("Use GetGroup() instead.");
1459              Group*      GetNextGroup();  ///< Returns a pointer to the next <i>Group</i> object of the file, <i>NULL</i> otherwise.              Group*      GetNextGroup() LIBGIG_DEPRECATED_API("Use GetGroup() instead.");
1460              Group*      GetGroup(uint index);              Group*      GetGroup(size_t index);
1461              Group*      GetGroup(String name);              Group*      GetGroup(String name);
1462              Group*      AddGroup();              Group*      AddGroup();
1463              void        DeleteGroup(Group* pGroup);              void        DeleteGroup(Group* pGroup);
# Line 1464  namespace gig { Line 1465  namespace gig {
1465              void        SetAutoLoad(bool b);              void        SetAutoLoad(bool b);
1466              bool        GetAutoLoad();              bool        GetAutoLoad();
1467              void        AddContentOf(File* pFile);              void        AddContentOf(File* pFile);
1468              ScriptGroup* GetScriptGroup(uint index);              ScriptGroup* GetScriptGroup(size_t index);
1469              ScriptGroup* GetScriptGroup(const String& name);              ScriptGroup* GetScriptGroup(const String& name);
1470              ScriptGroup* AddScriptGroup();              ScriptGroup* AddScriptGroup();
1471              void        DeleteScriptGroup(ScriptGroup* pGroup);              void        DeleteScriptGroup(ScriptGroup* pGroup);
# Line 1492  namespace gig { Line 1493  namespace gig {
1493              friend class Group; // so Group can access protected member pRIFF              friend class Group; // so Group can access protected member pRIFF
1494              friend class ScriptGroup; // so ScriptGroup can access protected member pRIFF              friend class ScriptGroup; // so ScriptGroup can access protected member pRIFF
1495          private:          private:
1496              std::list<Group*>*          pGroups;              std::vector<Group*>*          pGroups;
1497              std::list<Group*>::iterator GroupsIterator;              std::vector<Group*>::iterator GroupsIterator;
1498              bool                        bAutoLoad;              bool                        bAutoLoad;
1499              std::list<ScriptGroup*>*    pScriptGroups;              std::vector<ScriptGroup*>*    pScriptGroups;
1500    
1501              bool UsesAnyGigFormatExtension() const;              bool UsesAnyGigFormatExtension() const;
1502      };      };

Legend:
Removed from v.3933  
changed lines
  Added in v.3965

  ViewVC Help
Powered by ViewVC