private void LoadSfzGens(SfzRegion region)
{
GenDescriptions = new GeneratorDescriptor[1];
GenDescriptions[0] = new GeneratorDescriptor();
GenDescriptions[0].SamplerType = Components.WaveformEnum.SampleData;
GenDescriptions[0].AssetName = region.sample;
//deal with end point
if (region.end == -1) //-1 is silent region, so set end to 0 and let the generator figure it out later
GenDescriptions[0].EndPhase = 0;
else if (region.end == 0) //set end out of range and let the descriptor default it to the proper end value
GenDescriptions[0].EndPhase = -1;
else //add one to the value because its inclusive
GenDescriptions[0].EndPhase = region.end + 1;
GenDescriptions[0].KeyTrack = region.pitchKeyTrack;
//deal with loop end
if (region.loopEnd < 0)
GenDescriptions[0].LoopEndPhase = -1;
else
GenDescriptions[0].LoopEndPhase = region.loopEnd + 1;
GenDescriptions[0].LoopMethod = region.loopMode;
if (region.loopStart < 0)
GenDescriptions[0].LoopStartPhase = -1;
else
GenDescriptions[0].LoopStartPhase = region.loopStart;
GenDescriptions[0].Offset = region.offset;
GenDescriptions[0].Rootkey = region.pitchKeyCenter;
GenDescriptions[0].Tune = (short)(region.tune + region.transpose * 100);
GenDescriptions[0].VelTrack = region.pitchVelTrack;
}
private void LoadSfzCustom(SfzRegion region)