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

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

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

revision 2060 by persson, Sun Feb 14 11:40:49 2010 UTC revision 2061 by persson, Tue Feb 23 18:32:31 2010 UTC
# Line 104  namespace LinuxSampler { namespace sfz { Line 104  namespace LinuxSampler { namespace sfz {
104          EngineChannel* pChannel = static_cast<EngineChannel*>(pEngineChannel);          EngineChannel* pChannel = static_cast<EngineChannel*>(pEngineChannel);
105          uint8_t  chan     = pChannel->MidiChannel();          uint8_t  chan     = pChannel->MidiChannel();
106          int      key      = itNoteOffEvent->Param.Note.Key;          int      key      = itNoteOffEvent->Param.Note.Key;
107          uint8_t  vel      = itNoteOffEvent->Param.Note.Velocity;  
108            // MIDI note-on velocity is used instead of note-off velocity
109            uint8_t  vel      = pChannel->pMIDIKeyInfo[key].Velocity;
110            itNoteOffEvent->Param.Note.Velocity = vel;
111    
112          int      bend     = pChannel->Pitch;          int      bend     = pChannel->Pitch;
113          uint8_t  chanaft  = pChannel->ControllerTable[128];          uint8_t  chanaft  = pChannel->ControllerTable[128];
114          uint8_t* cc       = pChannel->ControllerTable;          uint8_t* cc       = pChannel->ControllerTable;
115          ::sfz::trigger_t trig = TRIGGER_RELEASE;          ::sfz::trigger_t trig = TRIGGER_RELEASE;
116    
117          pChannel->regionsTemp = pChannel->pInstrument->GetRegionsOnKey (          pChannel->regionsTemp = pChannel->pInstrument->GetRegionsOnKey (
118              chan, key, vel, bend, 0, chanaft, 0, 0, 0, trig, cc, 0.0f, 0, NULL, 0, 0              chan, key, vel, bend, 0, chanaft, 0, 0, 0, trig, cc, 0.0f, 1, NULL, 0, 0
119          );          );
120    
121          // now launch the required amount of voices          // now launch the required amount of voices
# Line 131  namespace LinuxSampler { namespace sfz { Line 135  namespace LinuxSampler { namespace sfz {
135          EngineChannel* pChannel = static_cast<EngineChannel*>(pEngineChannel);          EngineChannel* pChannel = static_cast<EngineChannel*>(pEngineChannel);
136          int key = itNoteOnEvent->Param.Note.Key;          int key = itNoteOnEvent->Param.Note.Key;
137          EngineChannel::MidiKey* pKey  = &pChannel->pMIDIKeyInfo[key];          EngineChannel::MidiKey* pKey  = &pChannel->pMIDIKeyInfo[key];
138          Voice::type_t VoiceType = Voice::type_normal;          Voice::type_t VoiceType = (ReleaseTriggerVoice) ? Voice::type_release_trigger : (!iLayer) ? Voice::type_release_trigger_required : Voice::type_normal;
139    
140          Pool<Voice>::Iterator itNewVoice;          Pool<Voice>::Iterator itNewVoice;
141          ::sfz::Region* pRgn = pChannel->regionsTemp[iLayer];          ::sfz::Region* pRgn = pChannel->regionsTemp[iLayer];
# Line 169  namespace LinuxSampler { namespace sfz { Line 173  namespace LinuxSampler { namespace sfz {
173      }      }
174    
175      String Engine::Version() {      String Engine::Version() {
176          String s = "$Revision: 1.3 $";          String s = "$Revision: 1.4 $";
177          return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword          return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword
178      }      }
179    

Legend:
Removed from v.2060  
changed lines
  Added in v.2061

  ViewVC Help
Powered by ViewVC