/[svn]/linuxsampler/trunk/src/engines/sfz/Voice.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/sfz/Voice.cpp

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

revision 2015 by iliev, Sun Oct 25 22:22:52 2009 UTC revision 2021 by iliev, Fri Oct 30 16:36:20 2009 UTC
# Line 56  namespace LinuxSampler { namespace sfz { Line 56  namespace LinuxSampler { namespace sfz {
56          si.BitDepth         = (pSample->GetFrameSize() / pSample->GetChannelCount()) * 8;          si.BitDepth         = (pSample->GetFrameSize() / pSample->GetChannelCount()) * 8;
57          si.TotalFrameCount  = pSample->GetTotalFrameCount();          si.TotalFrameCount  = pSample->GetTotalFrameCount();
58    
59          si.HasLoops       = false; // TODO:          si.HasLoops       = pRegion->HasLoop();
60          si.LoopStart      = 0; // TODO:          si.LoopStart      = pRegion->GetLoopStart();
61          si.LoopLength     = 0; // TODO:          si.LoopLength     = pRegion->GetLoopEnd() - pRegion->GetLoopStart();
62          si.LoopPlayCount  = 0; // TODO:          si.LoopPlayCount  = pRegion->GetLoopCount();
63          si.Unpitched      = false; // TODO:          si.Unpitched      = pRegion->pitch_keytrack == 0;
64          return si;          return si;
65      }      }
66    
67      Voice::RegionInfo Voice::GetRegionInfo() {      Voice::RegionInfo Voice::GetRegionInfo() {
68          RegionInfo ri;          RegionInfo ri;
69          /*ri.UnityNote = pSample->OriginalPitch;          ri.UnityNote = pRegion->pitch_keycenter;
70          ri.FineTune  = pRegion->tune;          ri.FineTune  = pRegion->tune;
71          ri.Pan       = pRegion->pan;          ri.Pan       = pRegion->pan;
72          ri.SampleStartOffset = pRegion->startAddrsOffset + pRegion->startAddrsCoarseOffset;          ri.SampleStartOffset = 0; // TODO:
73    
74          ri.EG1PreAttack        = 1000;          ri.EG1PreAttack        = pRegion->ampeg_start * 10;
75          ri.EG1Attack           = pRegion->EG1Attack;          ri.EG1Attack           = pRegion->ampeg_attack;
76          ri.EG1Hold             = pRegion->EG1Hold;          ri.EG1Hold             = pRegion->ampeg_hold;
77          ri.EG1Decay1           = pRegion->EG1Decay;          ri.EG1Decay1           = pRegion->ampeg_decay;
78          ri.EG1Decay2           = pRegion->EG1Decay;          ri.EG1Decay2           = pRegion->ampeg_decay;
79          ri.EG1Sustain          = pRegion->EG1Sustain;          ri.EG1Sustain          = pRegion->ampeg_sustain;
80          ri.EG1InfiniteSustain  = true;          ri.EG1InfiniteSustain  = true;
81          ri.EG1Release          = pRegion->EG1Release;          ri.EG1Release          = pRegion->ampeg_release;
82    
83          ri.EG2PreAttack        = 1000;          ri.EG2PreAttack        = pRegion->fileg_start;
84          ri.EG2Attack           = pRegion->EG2Attack;          ri.EG2Attack           = pRegion->fileg_attack;
85          //ri.EG2Hold             = pRegion->EG2Hold; // TODO:          //ri.EG2Hold             = pRegion->fileg_hold; // TODO:
86          ri.EG2Decay1           = pRegion->EG2Decay;          ri.EG2Decay1           = pRegion->fileg_decay;
87          ri.EG2Decay2           = pRegion->EG2Decay;          ri.EG2Decay2           = pRegion->fileg_decay;
88          ri.EG2Sustain          = pRegion->EG2Sustain;          ri.EG2Sustain          = pRegion->fileg_sustain;
89          ri.EG2InfiniteSustain  = true;          ri.EG2InfiniteSustain  = true;
90          ri.EG2Release          = pRegion->EG2Release;          ri.EG2Release          = pRegion->fileg_release;
91    
92          ri.EG3Attack     = 0; // TODO:          ri.EG3Attack     = pRegion->pitcheg_attack;
93          ri.EG3Depth      = 0; // TODO:          ri.EG3Depth      = 0; // TODO:
94          ri.VCFEnabled    = false; // TODO:          ri.VCFEnabled    = false; // TODO:
95          ri.VCFType       = ::gig::vcf_type_lowpass; // TODO:          ri.VCFType       = ::gig::vcf_type_lowpass; // TODO:
96          ri.VCFResonance  = 0; // TODO:          ri.VCFResonance  = 0; // TODO:
97    
98          ri.ReleaseTriggerDecay = 0;*/          ri.ReleaseTriggerDecay = 0;
99    
100          return ri;          return ri;
101      }      }
# Line 117  namespace LinuxSampler { namespace sfz { Line 117  namespace LinuxSampler { namespace sfz {
117      }      }
118    
119      double Voice::GetVelocityRelease(uint8_t MIDIKeyVelocity) {      double Voice::GetVelocityRelease(uint8_t MIDIKeyVelocity) {
120          return 0.0; // TODO:          return 0.9; // TODO:
121      }      }
122    
123      void Voice::ProcessCCEvent(RTList<Event>::Iterator& itEvent) {      void Voice::ProcessCCEvent(RTList<Event>::Iterator& itEvent) {

Legend:
Removed from v.2015  
changed lines
  Added in v.2021

  ViewVC Help
Powered by ViewVC