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

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

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

revision 2835 by schoenebeck, Thu May 22 15:17:09 2014 UTC revision 2836 by persson, Sun Aug 23 05:57:18 2015 UTC
# Line 1  Line 1 
1  /***************************************************************************  /***************************************************************************
2   *                                                                         *   *                                                                         *
3   *   Copyright (C) 2014 Christian Schoenebeck                              *   *   Copyright (C) 2014-2015 Christian Schoenebeck                         *
4   *                      <cuse@users.sourceforge.net>                       *   *                      <cuse@users.sourceforge.net>                       *
5   *                                                                         *   *                                                                         *
6   *   This program is part of libgig.                                       *   *   This program is part of libgig.                                       *
# Line 310  static set<DLS::range_t> collectVelocity Line 310  static set<DLS::range_t> collectVelocity
310      set<DLS::range_t> velocityRanges;      set<DLS::range_t> velocityRanges;
311      for (int i = 0; i < group.size(); ++i) {      for (int i = 0; i < group.size(); ++i) {
312          Korg::KMPInstrument* instr = group[i];          Korg::KMPInstrument* instr = group[i];
313          int iLowerKey = 0;          uint16_t iLowerKey = 0;
314          for (int k = 0; k < instr->GetRegionCount(); ++k) {          for (int k = 0; k < instr->GetRegionCount(); ++k) {
315              Korg::KMPRegion* rgn = instr->GetRegion(k);              Korg::KMPRegion* rgn = instr->GetRegion(k);
316              DLS::range_t keyRange2 = { iLowerKey, rgn->TopKey };              DLS::range_t keyRange2 = { iLowerKey, rgn->TopKey };
# Line 319  static set<DLS::range_t> collectVelocity Line 319  static set<DLS::range_t> collectVelocity
319                  int from, to;                  int from, to;
320                  string baseName = parseNumberRange(instr->Name(), from, to);                  string baseName = parseNumberRange(instr->Name(), from, to);
321                  if (baseName != instr->Name()) { // number range like "003-120" found in instrument name ...                  if (baseName != instr->Name()) { // number range like "003-120" found in instrument name ...
322                      DLS::range_t velRange = { from, to };                      DLS::range_t velRange = { uint16_t(from), uint16_t(to) };
323                      velocityRanges.insert(velRange);                      velocityRanges.insert(velRange);
324                  }                  }
325              }              }
# Line 623  int main(int argc, char *argv[]) { Line 623  int main(int argc, char *argv[]) {
623                  Korg::KMPInstrument* kmpInstr = *itInstr;                  Korg::KMPInstrument* kmpInstr = *itInstr;
624                  cout << "    |---> KMP multi sample '" << kmpInstr->Name() << "'" << endl;                  cout << "    |---> KMP multi sample '" << kmpInstr->Name() << "'" << endl;
625    
626                  int iLowKey = 0;                  uint16_t iLowKey = 0;
627                  for (int k = 0; k < kmpInstr->GetRegionCount(); ++k) {                  for (int k = 0; k < kmpInstr->GetRegionCount(); ++k) {
628                      Korg::KMPRegion* kmpRegion = kmpInstr->GetRegion(k);                      Korg::KMPRegion* kmpRegion = kmpInstr->GetRegion(k);
629                      DLS::range_t keyRange = { iLowKey, kmpRegion->TopKey };                      DLS::range_t keyRange = { iLowKey, kmpRegion->TopKey };

Legend:
Removed from v.2835  
changed lines
  Added in v.2836

  ViewVC Help
Powered by ViewVC