/[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 2101 by persson, Sun May 30 11:40:31 2010 UTC revision 2106 by persson, Sun Jul 4 12:50:51 2010 UTC
# Line 41  namespace LinuxSampler { namespace sfz { Line 41  namespace LinuxSampler { namespace sfz {
41      ) {      ) {
42          dmsg(4,("Engine::ContinuousController cc=%d v=%d\n", itControlChangeEvent->Param.CC.Controller, itControlChangeEvent->Param.CC.Value));          dmsg(4,("Engine::ContinuousController cc=%d v=%d\n", itControlChangeEvent->Param.CC.Controller, itControlChangeEvent->Param.CC.Value));
43    
44          EngineChannel* pChannel = dynamic_cast<EngineChannel*>(pEngineChannel);          EngineChannel* pChannel = static_cast<EngineChannel*>(pEngineChannel);
45          // handle the "control triggered" MIDI rule: a control change          // handle the "control triggered" MIDI rule: a control change
46          // event can trigger a new note on or note off event          // event can trigger a new note on or note off event
47          if (pChannel->pInstrument) {          if (pChannel->pInstrument) {
# Line 72  namespace LinuxSampler { namespace sfz { Line 72  namespace LinuxSampler { namespace sfz {
72          bool                         HandleKeyGroupConflicts          bool                         HandleKeyGroupConflicts
73      ) {      ) {
74          EngineChannel* pChannel = static_cast<EngineChannel*>(pEngineChannel);          EngineChannel* pChannel = static_cast<EngineChannel*>(pEngineChannel);
75          ::sfz::Query q(*pChannel->pInstrument);          ::sfz::Query q;
76          q.chan        = pChannel->MidiChannel();          q.chan        = pChannel->MidiChannel();
77          q.key         = itNoteOnEvent->Param.Note.Key;          q.key         = itNoteOnEvent->Param.Note.Key;
78          q.vel         = itNoteOnEvent->Param.Note.Velocity;          q.vel         = itNoteOnEvent->Param.Note.Velocity;
# Line 93  namespace LinuxSampler { namespace sfz { Line 93  namespace LinuxSampler { namespace sfz {
93                pChannel->LastKey != q.key) ?                pChannel->LastKey != q.key) ?
94               TRIGGER_LEGATO : TRIGGER_FIRST);               TRIGGER_LEGATO : TRIGGER_FIRST);
95    
96            q.search(pChannel->pInstrument);
97    
98          int i = 0;          int i = 0;
99          while (::sfz::Region* region = q.next()) {          while (::sfz::Region* region = q.next()) {
100              if (!RegionSuspended(region)) {              if (!RegionSuspended(region)) {
# Line 108  namespace LinuxSampler { namespace sfz { Line 110  namespace LinuxSampler { namespace sfz {
110          RTList<Event>::Iterator&      itNoteOffEvent          RTList<Event>::Iterator&      itNoteOffEvent
111      ) {      ) {
112          EngineChannel* pChannel = static_cast<EngineChannel*>(pEngineChannel);          EngineChannel* pChannel = static_cast<EngineChannel*>(pEngineChannel);
113          ::sfz::Query q(*pChannel->pInstrument);          ::sfz::Query q;
114          q.chan        = pChannel->MidiChannel();          q.chan        = pChannel->MidiChannel();
115          q.key         = itNoteOffEvent->Param.Note.Key;          q.key         = itNoteOffEvent->Param.Note.Key;
116    
# Line 129  namespace LinuxSampler { namespace sfz { Line 131  namespace LinuxSampler { namespace sfz {
131          q.prev_sw_key = pChannel->LastKey;          q.prev_sw_key = pChannel->LastKey;
132          q.trig        = TRIGGER_RELEASE;          q.trig        = TRIGGER_RELEASE;
133    
134            q.search(pChannel->pInstrument);
135    
136          // now launch the required amount of voices          // now launch the required amount of voices
137          int i = 0;          int i = 0;
138          while (::sfz::Region* region = q.next()) {          while (::sfz::Region* region = q.next()) {
# Line 187  namespace LinuxSampler { namespace sfz { Line 191  namespace LinuxSampler { namespace sfz {
191      }      }
192    
193      String Engine::Version() {      String Engine::Version() {
194          String s = "$Revision: 1.8 $";          String s = "$Revision: 1.9 $";
195          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
196      }      }
197    

Legend:
Removed from v.2101  
changed lines
  Added in v.2106

  ViewVC Help
Powered by ViewVC