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

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

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

revision 2565 by schoenebeck, Tue May 20 12:21:39 2014 UTC revision 2600 by schoenebeck, Sat Jun 7 00:16:03 2014 UTC
# Line 24  Line 24 
24    
25  #include "Engine.h"  #include "Engine.h"
26  #include "EngineChannel.h"  #include "EngineChannel.h"
27    #include "InstrumentScriptVM.h"
28    
29  namespace LinuxSampler { namespace gig {  namespace LinuxSampler { namespace gig {
30      Engine::Format Engine::GetEngineFormat() { return GIG; }      Engine::Format Engine::GetEngineFormat() { return GIG; }
31    
32        LinuxSampler::InstrumentScriptVM* Engine::CreateInstrumentScriptVM() {
33            return new InstrumentScriptVM; // gig format specific extended script runner
34        }
35    
36      /**      /**
37       *  Reacts on supported control change commands (e.g. pitch bend wheel,       *  Reacts on supported control change commands (e.g. pitch bend wheel,
38       *  modulation wheel, aftertouch).       *  modulation wheel, aftertouch).
# Line 300  namespace LinuxSampler { namespace gig { Line 305  namespace LinuxSampler { namespace gig {
305          // change has occured between note on and off)          // change has occured between note on and off)
306          if (ReleaseTriggerVoice && !(VoiceType & Voice::type_release_trigger)) return Pool<Voice>::Iterator();          if (ReleaseTriggerVoice && !(VoiceType & Voice::type_release_trigger)) return Pool<Voice>::Iterator();
307    
308          ::gig::DimensionRegion* pDimRgn = pRegion->GetDimensionRegionByValue(DimValues);          
309            ::gig::DimensionRegion* pDimRgn;
310            if (!itNoteOnEvent->Format.Gig.DimMask) { // normal case ...
311                pDimRgn = pRegion->GetDimensionRegionByValue(DimValues);
312            } else { // some dimension zones were overridden (i.e. by instrument script) ...
313                int index = pRegion->GetDimensionRegionIndexByValue(DimValues);
314                index &= ~itNoteOnEvent->Format.Gig.DimMask;
315                index |=  itNoteOnEvent->Format.Gig.DimBits & itNoteOnEvent->Format.Gig.DimMask;
316                pDimRgn = pRegion->pDimensionRegions[index & 255];
317            }
318          if (!pDimRgn) return Pool<Voice>::Iterator(); // error (could not resolve dimension region)          if (!pDimRgn) return Pool<Voice>::Iterator(); // error (could not resolve dimension region)
319    
320          // no need to continue if sample is silent          // no need to continue if sample is silent

Legend:
Removed from v.2565  
changed lines
  Added in v.2600

  ViewVC Help
Powered by ViewVC