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

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

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

revision 240 by schoenebeck, Wed Sep 15 13:37:12 2004 UTC revision 511 by schoenebeck, Thu May 5 13:49:53 2005 UTC
# Line 2  Line 2 
2   *                                                                         *   *                                                                         *
3   *   libgig - C++ cross-platform Gigasampler format file loader library    *   *   libgig - C++ cross-platform Gigasampler format file loader library    *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003, 2004 by Christian Schoenebeck                     *   *   Copyright (C) 2003-2005 by Christian Schoenebeck                      *
6   *                               <cuse@users.sourceforge.net>              *   *                              <cuse@users.sourceforge.net>               *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 90  void PrintSamples(gig::File* gig) { Line 90  void PrintSamples(gig::File* gig) {
90                  case gig::loop_type_backward:       cout << "reverse)";  break;                  case gig::loop_type_backward:       cout << "reverse)";  break;
91              }              }
92              cout << ", LoopFraction=" << pSample->LoopFraction << ", Start=" << pSample->LoopStart << ", End=" << pSample->LoopEnd;              cout << ", LoopFraction=" << pSample->LoopFraction << ", Start=" << pSample->LoopStart << ", End=" << pSample->LoopEnd;
93                cout << ", LoopPlayCount=" << pSample->LoopPlayCount;
94          }          }
95          cout << ", Length=" << pSample->SamplesTotal << " Compressed=" << ((pSample->Compressed) ? "true" : "false") << endl;          cout << ", Length=" << pSample->SamplesTotal << " Compressed=" << ((pSample->Compressed) ? "true" : "false") << endl;
96          pSample = gig->GetNextSample();          pSample = gig->GetNextSample();
# Line 131  void PrintRegions(gig::Instrument* instr Line 132  void PrintRegions(gig::Instrument* instr
132              cout << "<NO_VALID_SAMPLE_REFERENCE> ";              cout << "<NO_VALID_SAMPLE_REFERENCE> ";
133          }          }
134          cout << "            KeyRange=" << pRegion->KeyRange.low << "-" << pRegion->KeyRange.high << ", ";          cout << "            KeyRange=" << pRegion->KeyRange.low << "-" << pRegion->KeyRange.high << ", ";
135          cout << "VelocityRange=" << pRegion->VelocityRange.low << "-" << pRegion->VelocityRange.high << ", Layer=" << pRegion->Layer << endl;          cout << "VelocityRange=" << pRegion->VelocityRange.low << "-" << pRegion->VelocityRange.high << ", Layers=" << pRegion->Layers << endl;
136          cout << "            Loops=" << pRegion->SampleLoops << endl;          cout << "            Loops=" << pRegion->SampleLoops << endl;
137          cout << "            Dimensions=" << pRegion->Dimensions << endl;          cout << "            Dimensions=" << pRegion->Dimensions << endl;
138          for (int iDimension = 0; iDimension < pRegion->Dimensions; iDimension++) {          for (int iDimension = 0; iDimension < pRegion->Dimensions; iDimension++) {
# Line 144  void PrintRegions(gig::Instrument* instr Line 145  void PrintRegions(gig::Instrument* instr
145                  case gig::dimension_samplechannel: // If used sample has more than one channel (thus is not mono).                  case gig::dimension_samplechannel: // If used sample has more than one channel (thus is not mono).
146                      cout << "SAMPLECHANNEL";                      cout << "SAMPLECHANNEL";
147                      break;                      break;
148                  case gig::dimension_layer: // For layering of up to 8 instruments (and eventually crossfading of 2 or 4 layers).                  case gig::dimension_layer: { // For layering of up to 8 instruments (and eventually crossfading of 2 or 4 layers).
149                      gig::crossfade_t crossfade = pRegion->pDimensionRegions[iDimension]->Crossfade;                      gig::crossfade_t crossfade = pRegion->pDimensionRegions[iDimension]->Crossfade;
150                      cout << "LAYER (Crossfade in_start=" << (int) crossfade.in_start << ",in_end=" << (int) crossfade.in_end << ",out_start=" << (int) crossfade.out_start << ",out_end=" << (int) crossfade.out_end << ")";                      cout << "LAYER (Crossfade in_start=" << (int) crossfade.in_start << ",in_end=" << (int) crossfade.in_end << ",out_start=" << (int) crossfade.out_start << ",out_end=" << (int) crossfade.out_end << ")";
151                      break;                      break;
152                    }
153                  case gig::dimension_velocity: // Key Velocity (this is the only dimension where the ranges can exactly be defined).                  case gig::dimension_velocity: // Key Velocity (this is the only dimension where the ranges can exactly be defined).
154                      cout << "VELOCITY";                      cout << "VELOCITY";
155                      break;                      break;
# Line 160  void PrintRegions(gig::Instrument* instr Line 162  void PrintRegions(gig::Instrument* instr
162                  case gig::dimension_keyboard: // Key Position                  case gig::dimension_keyboard: // Key Position
163                      cout << "KEYBOARD";                      cout << "KEYBOARD";
164                      break;                      break;
165                    case gig::dimension_roundrobin: // Different samples triggered each time a note is played, dimension regions selected in sequence
166                        cout << "ROUNDROBIN";
167                        break;
168                    case gig::dimension_random: // Different samples triggered each time a note is played, random order
169                        cout << "RANDOM";
170                        break;
171                  case gig::dimension_modwheel: // Modulation Wheel (MIDI Controller 1)                  case gig::dimension_modwheel: // Modulation Wheel (MIDI Controller 1)
172                      cout << "MODWHEEL";                      cout << "MODWHEEL";
173                      break;                      break;
# Line 230  void PrintRegions(gig::Instrument* instr Line 238  void PrintRegions(gig::Instrument* instr
238                      cout << "EFFECT5DEPTH";                      cout << "EFFECT5DEPTH";
239                      break;                      break;
240                  default:                  default:
241                      cout << "UNKNOWN - please report this !";                      cout << "UNKNOWN (" << int(DimensionDef.dimension) << ") - please report this !";
242                      break;                      break;
243              }              }
244              cout << ", Bits=" << (uint) DimensionDef.bits << ", Zones=" << (uint) DimensionDef.zones;              cout << ", Bits=" << (uint) DimensionDef.bits << ", Zones=" << (uint) DimensionDef.zones;
# Line 271  void PrintDimensionRegions(gig::Region* Line 279  void PrintDimensionRegions(gig::Region*
279              if (pSample->pInfo->Name != "") {              if (pSample->pInfo->Name != "") {
280                  cout << "\"" << pSample->pInfo->Name << "\", ";                  cout << "\"" << pSample->pInfo->Name << "\", ";
281              }              }
282              cout << pSample->SamplesPerSecond << "Hz, " << endl;              cout << pSample->SamplesPerSecond << "Hz, ";
283                cout << "UnityNote=" << (int) pDimensionRegion->UnityNote << ", FineTune=" << (int) pDimensionRegion->FineTune << ", Gain=" << (-pDimensionRegion->Gain / 655360.0) << "dB, SampleStartOffset=" << pDimensionRegion->SampleStartOffset << endl;
284          }          }
285          else {          else {
286              cout << "                Sample: <NO_VALID_SAMPLE_REFERENCE> " << endl;              cout << "                Sample: <NO_VALID_SAMPLE_REFERENCE> " << endl;
# Line 298  void PrintDimensionRegions(gig::Region* Line 307  void PrintDimensionRegions(gig::Region*
307                  cout << "UNKNOWN - please report this !";                  cout << "UNKNOWN - please report this !";
308          }          }
309          cout << ", VelocityResponseDepth=" << (int) pDimensionRegion->VelocityResponseDepth << ", VelocityResponseCurveScaling=" << (int) pDimensionRegion->VelocityResponseCurveScaling << endl;          cout << ", VelocityResponseDepth=" << (int) pDimensionRegion->VelocityResponseDepth << ", VelocityResponseCurveScaling=" << (int) pDimensionRegion->VelocityResponseCurveScaling << endl;
310            cout << "                Pan=" << (int) pDimensionRegion->Pan << endl;
311    
312          dimensionRegions++;          dimensionRegions++;
313      }      }

Legend:
Removed from v.240  
changed lines
  Added in v.511

  ViewVC Help
Powered by ViewVC