generatorTypeFromInt function
Implementation
GeneratorType generatorTypeFromInt(int v) {
switch (v){
case 0: return GeneratorType.startAddressOffset;
case 1: return GeneratorType.endAddressOffset;
case 2: return GeneratorType.startLoopAddressOffset;
case 3: return GeneratorType.endLoopAddressOffset;
case 4: return GeneratorType.startAddressCoarseOffset;
case 5: return GeneratorType.modulationLfoToPitch;
case 6: return GeneratorType.vibratoLfoToPitch;
case 7: return GeneratorType.modulationEnvelopeToPitch;
case 8: return GeneratorType.initialFilterCutoffFrequency;
case 9: return GeneratorType.initialFilterQ;
case 10: return GeneratorType.modulationLfoToFilterCutoffFrequency;
case 11: return GeneratorType.modulationEnvelopeToFilterCutoffFrequency;
case 12: return GeneratorType.endAddressCoarseOffset;
case 13: return GeneratorType.modulationLfoToVolume;
case 14: return GeneratorType.unused1;
case 15: return GeneratorType.chorusEffectsSend;
case 16: return GeneratorType.reverbEffectsSend;
case 17: return GeneratorType.pan;
case 18: return GeneratorType.unused2;
case 19: return GeneratorType.unused3;
case 20: return GeneratorType.unused4;
case 21: return GeneratorType.delayModulationLfo;
case 22: return GeneratorType.frequencyModulationLfo;
case 23: return GeneratorType.delayVibratoLfo;
case 24: return GeneratorType.frequencyVibratoLfo;
case 25: return GeneratorType.delayModulationEnvelope;
case 26: return GeneratorType.attackModulationEnvelope;
case 27: return GeneratorType.holdModulationEnvelope;
case 28: return GeneratorType.decayModulationEnvelope;
case 29: return GeneratorType.sustainModulationEnvelope;
case 30: return GeneratorType.releaseModulationEnvelope;
case 31: return GeneratorType.keyNumberToModulationEnvelopeHold;
case 32: return GeneratorType.keyNumberToModulationEnvelopeDecay;
case 33: return GeneratorType.delayVolumeEnvelope;
case 34: return GeneratorType.attackVolumeEnvelope;
case 35: return GeneratorType.holdVolumeEnvelope;
case 36: return GeneratorType.decayVolumeEnvelope;
case 37: return GeneratorType.sustainVolumeEnvelope;
case 38: return GeneratorType.releaseVolumeEnvelope;
case 39: return GeneratorType.keyNumberToVolumeEnvelopeHold;
case 40: return GeneratorType.keyNumberToVolumeEnvelopeDecay;
case 41: return GeneratorType.instrument;
case 42: return GeneratorType.reserved1;
case 43: return GeneratorType.keyRange;
case 44: return GeneratorType.velocityRange;
case 45: return GeneratorType.startLoopAddressCoarseOffset;
case 46: return GeneratorType.keyNumber;
case 47: return GeneratorType.velocity;
case 48: return GeneratorType.initialAttenuation;
case 49: return GeneratorType.reserved2;
case 50: return GeneratorType.endLoopAddressCoarseOffset;
case 51: return GeneratorType.coarseTune;
case 52: return GeneratorType.fineTune;
case 53: return GeneratorType.sampleID;
case 54: return GeneratorType.sampleModes;
case 55: return GeneratorType.reserved3;
case 56: return GeneratorType.scaleTuning;
case 57: return GeneratorType.exclusiveClass;
case 58: return GeneratorType.overridingRootKey;
case 59: return GeneratorType.unused5;
case 60: return GeneratorType.unusedEnd;
}
throw "unknown generator";
}