/[svn]/libgig/trunk/src/tools/gigdump.cpp
ViewVC logotype

Diff of /libgig/trunk/src/tools/gigdump.cpp

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

revision 2573 by schoenebeck, Thu May 22 15:17:09 2014 UTC revision 2609 by schoenebeck, Sun Jun 8 19:00:30 2014 UTC
# Line 40  void PrintVersion(); Line 40  void PrintVersion();
40  void PrintFileInformations(gig::File* gig);  void PrintFileInformations(gig::File* gig);
41  void PrintGroups(gig::File* gig);  void PrintGroups(gig::File* gig);
42  void PrintSamples(gig::File* gig);  void PrintSamples(gig::File* gig);
43    void PrintScripts(gig::File* gig);
44  void PrintInstruments(gig::File* gig);  void PrintInstruments(gig::File* gig);
45  void PrintRegions(gig::Instrument* instr);  void PrintRegions(gig::Instrument* instr);
46  void PrintUsage();  void PrintUsage();
# Line 73  int main(int argc, char *argv[]) Line 74  int main(int argc, char *argv[])
74          cout << endl;          cout << endl;
75          PrintSamples(gig);          PrintSamples(gig);
76          cout << endl;          cout << endl;
77            PrintScripts(gig);
78            cout << endl;
79          PrintInstruments(gig);          PrintInstruments(gig);
80          delete gig;          delete gig;
81          delete riff;          delete riff;
# Line 181  void PrintSamples(gig::File* gig) { Line 184  void PrintSamples(gig::File* gig) {
184      }      }
185  }  }
186    
187    void PrintScripts(gig::File* gig) {
188        cout << "ALL Available Real-Time Instrument Scripts (as there might be more than referenced by Instruments):" << endl;
189        for (int g = 0; gig->GetScriptGroup(g); ++g) {
190            gig::ScriptGroup* pGroup = gig->GetScriptGroup(g);
191            cout << "    Group " << g+1 << ") '" << pGroup->Name << "'\n";
192            for (int s = 0; pGroup->GetScript(s); ++s) {
193                gig::Script* pScript = pGroup->GetScript(s);
194                cout << "        Script " << s+1 << ") '" << pScript->Name << "':\n";
195                cout << "[START OF SCRIPT]\n";
196                cout << pScript->GetScriptAsText();
197                cout << "[END OF SCRIPT]\n";
198            }
199        }
200    }
201    
202  void PrintInstruments(gig::File* gig) {  void PrintInstruments(gig::File* gig) {
203      int instruments = 0;      int instruments = 0;
204      cout << "Available Instruments:" << endl;      cout << "Available Instruments:" << endl;
# Line 193  void PrintInstruments(gig::File* gig) { Line 211  void PrintInstruments(gig::File* gig) {
211          cout << "    Instrument " << instruments << ") " << name << ", ";          cout << "    Instrument " << instruments << ") " << name << ", ";
212    
213          cout << " MIDIBank=" << pInstrument->MIDIBank << ", MIDIProgram=" << pInstrument->MIDIProgram << endl;          cout << " MIDIBank=" << pInstrument->MIDIBank << ", MIDIProgram=" << pInstrument->MIDIProgram << endl;
214    
215            cout << "        ScriptSlots=" << pInstrument->ScriptSlotCount() << endl;
216            for (int s = 0; s < pInstrument->ScriptSlotCount(); ++s) {
217                gig::Script* pScript = pInstrument->GetScriptOfSlot(s);
218                string name = pScript->Name;
219                cout << "        ScriptSlot[" << s << "]='" << name << "'\n";
220            }
221    
222          PrintRegions(pInstrument);          PrintRegions(pInstrument);
223    
224          pInstrument = gig->GetNextInstrument();          pInstrument = gig->GetNextInstrument();

Legend:
Removed from v.2573  
changed lines
  Added in v.2609

  ViewVC Help
Powered by ViewVC