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

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

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

revision 2237 by iliev, Fri Aug 12 13:07:05 2011 UTC revision 2249 by iliev, Fri Aug 19 18:29:29 2011 UTC
# Line 492  namespace sfz Line 492  namespace sfz
492          fileg_vel2sustain = 0;          fileg_vel2sustain = 0;
493          fileg_vel2release = 0;          fileg_vel2release = 0;
494          fileg_depth       = 0;          fileg_depth       = 0;
495            
496            fileg_delay_oncc.clear();
497            fileg_start_oncc.clear();
498            fileg_attack_oncc.clear();
499            fileg_hold_oncc.clear();
500            fileg_decay_oncc.clear();
501            fileg_sustain_oncc.clear();
502            fileg_release_oncc.clear();
503            fileg_depth_oncc.clear();
504    
505          pitcheg_delay    = 0;          pitcheg_delay    = 0;
506          pitcheg_start    = 0; //in percentage          pitcheg_start    = 0; //in percentage
# Line 508  namespace sfz Line 517  namespace sfz
517          pitcheg_vel2decay   = 0;          pitcheg_vel2decay   = 0;
518          pitcheg_vel2sustain = 0;          pitcheg_vel2sustain = 0;
519          pitcheg_vel2release = 0;          pitcheg_vel2release = 0;
520            
521            pitcheg_delay_oncc.clear();
522            pitcheg_start_oncc.clear();
523            pitcheg_attack_oncc.clear();
524            pitcheg_hold_oncc.clear();
525            pitcheg_decay_oncc.clear();
526            pitcheg_sustain_oncc.clear();
527            pitcheg_release_oncc.clear();
528            pitcheg_depth_oncc.clear();
529    
530          amplfo_delay     = 0;          amplfo_delay     = 0;
531          amplfo_fade      = 0;          amplfo_fade      = 0;
532          amplfo_freq      = -1; /* -1 is used to determine whether the LFO was initialized */          amplfo_freq      = -1; /* -1 is used to determine whether the LFO was initialized */
533          amplfo_depth     = 0;          amplfo_depth     = 0;
534            amplfo_delay_oncc.clear();
535            amplfo_fade_oncc.clear();
536          amplfo_depthcc.clear();          amplfo_depthcc.clear();
537          amplfo_freqcc.clear();          amplfo_freqcc.clear();
538    
# Line 520  namespace sfz Line 540  namespace sfz
540          fillfo_fade      = 0;          fillfo_fade      = 0;
541          fillfo_freq      = -1; /* -1 is used to determine whether the LFO was initialized */          fillfo_freq      = -1; /* -1 is used to determine whether the LFO was initialized */
542          fillfo_depth     = 0;          fillfo_depth     = 0;
543            fillfo_delay_oncc.clear();
544            fillfo_fade_oncc.clear();
545          fillfo_depthcc.clear();          fillfo_depthcc.clear();
546          fillfo_freqcc.clear();          fillfo_freqcc.clear();
547    
# Line 527  namespace sfz Line 549  namespace sfz
549          pitchlfo_fade    = 0;          pitchlfo_fade    = 0;
550          pitchlfo_freq    = -1; /* -1 is used to determine whether the LFO was initialized */          pitchlfo_freq    = -1; /* -1 is used to determine whether the LFO was initialized */
551          pitchlfo_depth   = 0;          pitchlfo_depth   = 0;
552            pitchlfo_delay_oncc.clear();
553            pitchlfo_fade_oncc.clear();
554          pitchlfo_freqcc.clear();          pitchlfo_freqcc.clear();
555      }      }
556    
# Line 756  namespace sfz Line 780  namespace sfz
780          region->fileg_vel2decay   = fileg_vel2decay;          region->fileg_vel2decay   = fileg_vel2decay;
781          region->fileg_vel2sustain = fileg_vel2sustain;          region->fileg_vel2sustain = fileg_vel2sustain;
782          region->fileg_vel2release = fileg_vel2release;          region->fileg_vel2release = fileg_vel2release;
783            
784            region->fileg_delay_oncc   = fileg_delay_oncc;
785            region->fileg_start_oncc   = fileg_start_oncc;
786            region->fileg_attack_oncc  = fileg_attack_oncc;
787            region->fileg_hold_oncc    = fileg_hold_oncc;
788            region->fileg_decay_oncc   = fileg_decay_oncc;
789            region->fileg_sustain_oncc = fileg_sustain_oncc;
790            region->fileg_release_oncc = fileg_release_oncc;
791            region->fileg_depth_oncc   = fileg_depth_oncc;
792    
793          region->pitcheg_delay    = pitcheg_delay;          region->pitcheg_delay    = pitcheg_delay;
794          region->pitcheg_start    = pitcheg_start;          region->pitcheg_start    = pitcheg_start;
# Line 772  namespace sfz Line 805  namespace sfz
805          region->pitcheg_vel2decay   = pitcheg_vel2decay;          region->pitcheg_vel2decay   = pitcheg_vel2decay;
806          region->pitcheg_vel2sustain = pitcheg_vel2sustain;          region->pitcheg_vel2sustain = pitcheg_vel2sustain;
807          region->pitcheg_vel2release = pitcheg_vel2release;          region->pitcheg_vel2release = pitcheg_vel2release;
808            
809            region->pitcheg_delay_oncc   = pitcheg_delay_oncc;
810            region->pitcheg_start_oncc   = pitcheg_start_oncc;
811            region->pitcheg_attack_oncc  = pitcheg_attack_oncc;
812            region->pitcheg_hold_oncc    = pitcheg_hold_oncc;
813            region->pitcheg_decay_oncc   = pitcheg_decay_oncc;
814            region->pitcheg_sustain_oncc = pitcheg_sustain_oncc;
815            region->pitcheg_release_oncc = pitcheg_release_oncc;
816            region->pitcheg_depth_oncc   = pitcheg_depth_oncc;
817    
818          region->amplfo_delay     = amplfo_delay;          region->amplfo_delay     = amplfo_delay;
819          region->amplfo_fade      = amplfo_fade;          region->amplfo_fade      = amplfo_fade;
820          region->amplfo_freq      = amplfo_freq;          region->amplfo_freq      = amplfo_freq;
821          region->amplfo_depth     = amplfo_depth;          region->amplfo_depth     = amplfo_depth;
822                    
823            region->amplfo_delay_oncc = amplfo_delay_oncc;
824            region->amplfo_fade_oncc  = amplfo_fade_oncc;
825          region->amplfo_depthcc   = amplfo_depthcc;          region->amplfo_depthcc   = amplfo_depthcc;
826          region->amplfo_freqcc    = amplfo_freqcc;          region->amplfo_freqcc    = amplfo_freqcc;
827    
# Line 786  namespace sfz Line 830  namespace sfz
830          region->fillfo_freq      = fillfo_freq;          region->fillfo_freq      = fillfo_freq;
831          region->fillfo_depth     = fillfo_depth;          region->fillfo_depth     = fillfo_depth;
832                    
833            region->fillfo_delay_oncc = fillfo_delay_oncc;
834            region->fillfo_fade_oncc  = fillfo_fade_oncc;
835          region->fillfo_depthcc   = fillfo_depthcc;          region->fillfo_depthcc   = fillfo_depthcc;
836          region->fillfo_freqcc    = fillfo_freqcc;          region->fillfo_freqcc    = fillfo_freqcc;
837    
# Line 794  namespace sfz Line 840  namespace sfz
840          region->pitchlfo_freq    = pitchlfo_freq;          region->pitchlfo_freq    = pitchlfo_freq;
841          region->pitchlfo_depth   = pitchlfo_depth;          region->pitchlfo_depth   = pitchlfo_depth;
842                    
843            region->pitchlfo_delay_oncc = pitchlfo_delay_oncc;
844            region->pitchlfo_fade_oncc  = pitchlfo_fade_oncc;
845          region->pitchlfo_depthcc = pitchlfo_depthcc;          region->pitchlfo_depthcc = pitchlfo_depthcc;
846          region->pitchlfo_freqcc  = pitchlfo_freqcc;          region->pitchlfo_freqcc  = pitchlfo_freqcc;
847                    
# Line 1560  namespace sfz Line 1608  namespace sfz
1608              else if ("ampeg_sustain" == key_cc) pCurDef->ampeg_sustaincc.add( CC(num_cc, check(key, -100.0f, 100.0f, ToFloat(value))) );              else if ("ampeg_sustain" == key_cc) pCurDef->ampeg_sustaincc.add( CC(num_cc, check(key, -100.0f, 100.0f, ToFloat(value))) );
1609              else if ("ampeg_release" == key_cc) pCurDef->ampeg_releasecc.add( CC(num_cc, check(key, -100.0f, 100.0f, ToFloat(value))) );              else if ("ampeg_release" == key_cc) pCurDef->ampeg_releasecc.add( CC(num_cc, check(key, -100.0f, 100.0f, ToFloat(value))) );
1610                            
1611                else if ("fileg_delay_on"   == key_cc) pCurDef->fileg_delay_oncc.add( CC(num_cc, check(key, -100.0f, 100.0f, ToFloat(value))) );
1612                else if ("fileg_start_on"   == key_cc) pCurDef->fileg_start_oncc.add( CC(num_cc, check(key, -100.0f, 100.0f, ToFloat(value))) );
1613                else if ("fileg_attack_on"  == key_cc) pCurDef->fileg_attack_oncc.add( CC(num_cc, check(key, -100.0f, 100.0f, ToFloat(value))) );
1614                else if ("fileg_hold_on"    == key_cc) pCurDef->fileg_hold_oncc.add( CC(num_cc, check(key, -100.0f, 100.0f, ToFloat(value))) );
1615                else if ("fileg_decay_on"   == key_cc) pCurDef->fileg_decay_oncc.add( CC(num_cc, check(key, -100.0f, 100.0f, ToFloat(value))) );
1616                else if ("fileg_sustain_on" == key_cc) pCurDef->fileg_sustain_oncc.add( CC(num_cc, check(key, -100.0f, 100.0f, ToFloat(value))) );
1617                else if ("fileg_release_on" == key_cc) pCurDef->fileg_release_oncc.add( CC(num_cc, check(key, -100.0f, 100.0f, ToFloat(value))) );
1618                else if ("fileg_depth_on"   == key_cc) pCurDef->fileg_depth_oncc.add( CC(num_cc, check(key, -12000, 12000, ToInt(value))) );
1619                
1620                else if ("pitcheg_delay_on"   == key_cc) pCurDef->pitcheg_delay_oncc.add( CC(num_cc, check(key, -100.0f, 100.0f, ToFloat(value))) );
1621                else if ("pitcheg_start_on"   == key_cc) pCurDef->pitcheg_start_oncc.add( CC(num_cc, check(key, -100.0f, 100.0f, ToFloat(value))) );
1622                else if ("pitcheg_attack_on"  == key_cc) pCurDef->pitcheg_attack_oncc.add( CC(num_cc, check(key, -100.0f, 100.0f, ToFloat(value))) );
1623                else if ("pitcheg_hold_on"    == key_cc) pCurDef->pitcheg_hold_oncc.add( CC(num_cc, check(key, -100.0f, 100.0f, ToFloat(value))) );
1624                else if ("pitcheg_decay_on"   == key_cc) pCurDef->pitcheg_decay_oncc.add( CC(num_cc, check(key, -100.0f, 100.0f, ToFloat(value))) );
1625                else if ("pitcheg_sustain_on" == key_cc) pCurDef->pitcheg_sustain_oncc.add( CC(num_cc, check(key, -100.0f, 100.0f, ToFloat(value))) );
1626                else if ("pitcheg_release_on" == key_cc) pCurDef->pitcheg_release_oncc.add( CC(num_cc, check(key, -100.0f, 100.0f, ToFloat(value))) );
1627                else if ("pitcheg_depth_on"   == key_cc) pCurDef->pitcheg_depth_oncc.add( CC(num_cc, check(key, -12000, 12000, ToInt(value))) );
1628                
1629                else if ("pitchlfo_delay_on" == key_cc) pCurDef->pitchlfo_delay_oncc.add( CC(num_cc, check(key, 0.0f, 100.0f, ToFloat(value))) );
1630                else if ("pitchlfo_fade_on" == key_cc) pCurDef->pitchlfo_fade_oncc.add( CC(num_cc, check(key, 0.0f, 100.0f, ToFloat(value))) );
1631              else if ("pitchlfo_depth" == key_cc) pCurDef->pitchlfo_depthcc.set(num_cc, ToInt(value));              else if ("pitchlfo_depth" == key_cc) pCurDef->pitchlfo_depthcc.set(num_cc, ToInt(value));
1632              else if ("pitchlfo_freq" == key_cc) pCurDef->pitchlfo_freqcc.add( CC(num_cc, check(key, -200.0f, 200.0f, ToFloat(value))) );              else if ("pitchlfo_freq" == key_cc) pCurDef->pitchlfo_freqcc.add( CC(num_cc, check(key, -200.0f, 200.0f, ToFloat(value))) );
1633                else if ("fillfo_delay_on" == key_cc) pCurDef->fillfo_delay_oncc.add( CC(num_cc, check(key, 0.0f, 100.0f, ToFloat(value))) );
1634                else if ("fillfo_fade_on" == key_cc) pCurDef->fillfo_fade_oncc.add( CC(num_cc, check(key, 0.0f, 100.0f, ToFloat(value))) );
1635              else if ("fillfo_depth" == key_cc) pCurDef->fillfo_depthcc.add( CC(num_cc, check(key, -1200, 1200, ToInt(value))) );              else if ("fillfo_depth" == key_cc) pCurDef->fillfo_depthcc.add( CC(num_cc, check(key, -1200, 1200, ToInt(value))) );
1636              else if ("fillfo_freq" == key_cc) pCurDef->fillfo_freqcc.add( CC(num_cc, check(key, -200.0f, 200.0f, ToFloat(value))) );              else if ("fillfo_freq" == key_cc) pCurDef->fillfo_freqcc.add( CC(num_cc, check(key, -200.0f, 200.0f, ToFloat(value))) );
1637                else if ("amplfo_delay_on" == key_cc) pCurDef->amplfo_delay_oncc.add( CC(num_cc, check(key, 0.0f, 100.0f, ToFloat(value))) );
1638                else if ("amplfo_fade_on" == key_cc) pCurDef->amplfo_fade_oncc.add( CC(num_cc, check(key, 0.0f, 100.0f, ToFloat(value))) );
1639              else if ("amplfo_depth" == key_cc) pCurDef->amplfo_depthcc.add( CC(num_cc, check(key, -10.0f, 10.0f, ToFloat(value))) );              else if ("amplfo_depth" == key_cc) pCurDef->amplfo_depthcc.add( CC(num_cc, check(key, -10.0f, 10.0f, ToFloat(value))) );
1640              else if ("amplfo_freq" == key_cc) pCurDef->amplfo_freqcc.add( CC(num_cc, check(key, -200.0f, 200.0f, ToFloat(value))) );              else if ("amplfo_freq" == key_cc) pCurDef->amplfo_freqcc.add( CC(num_cc, check(key, -200.0f, 200.0f, ToFloat(value))) );
1641              else if ("volume_on" == key_cc) pCurDef->volume_oncc.add( CC(num_cc, check(key, -144.0f, 100.0f, ToFloat(value))) );              else if ("volume_on" == key_cc) pCurDef->volume_oncc.add( CC(num_cc, check(key, -144.0f, 100.0f, ToFloat(value))) );

Legend:
Removed from v.2237  
changed lines
  Added in v.2249

  ViewVC Help
Powered by ViewVC