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

Diff of /linuxsampler/trunk/src/engines/common/AbstractVoice.cpp

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

revision 3214 by schoenebeck, Thu May 25 14:46:47 2017 UTC revision 3246 by schoenebeck, Sun May 28 22:22:56 2017 UTC
# Line 5  Line 5 
5   *   Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck    *   *   Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck    *
6   *   Copyright (C) 2005-2008 Christian Schoenebeck                         *   *   Copyright (C) 2005-2008 Christian Schoenebeck                         *
7   *   Copyright (C) 2009-2012 Christian Schoenebeck and Grigor Iliev        *   *   Copyright (C) 2009-2012 Christian Schoenebeck and Grigor Iliev        *
8   *   Copyright (C) 2013-2016 Christian Schoenebeck and Andreas Persson     *   *   Copyright (C) 2013-2017 Christian Schoenebeck and Andreas Persson     *
9   *                                                                         *   *                                                                         *
10   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
11   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 151  namespace LinuxSampler { Line 151  namespace LinuxSampler {
151          CrossfadeSmoother.trigger(crossfadeVolume, subfragmentRate);          CrossfadeSmoother.trigger(crossfadeVolume, subfragmentRate);
152    
153          VolumeSmoother.trigger(pEngineChannel->MidiVolume, subfragmentRate);          VolumeSmoother.trigger(pEngineChannel->MidiVolume, subfragmentRate);
154            NoteVolume.setCurveOnly(pNote ? pNote->Override.VolumeCurve : DEFAULT_FADE_CURVE);
155          NoteVolume.setCurrentValue(pNote ? pNote->Override.Volume : 1.f);          NoteVolume.setCurrentValue(pNote ? pNote->Override.Volume : 1.f);
156          NoteVolume.setDefaultDuration(pNote ? pNote->Override.VolumeTime : DEFAULT_NOTE_VOLUME_TIME_S);          NoteVolume.setDefaultDuration(pNote ? pNote->Override.VolumeTime : DEFAULT_NOTE_VOLUME_TIME_S);
157    
# Line 192  namespace LinuxSampler { Line 193  namespace LinuxSampler {
193          }          }
194    
195          Pitch = CalculatePitchInfo(PitchBend);          Pitch = CalculatePitchInfo(PitchBend);
196            NotePitch.setCurveOnly(pNote ? pNote->Override.PitchCurve : DEFAULT_FADE_CURVE);
197          NotePitch.setCurrentValue(pNote ? pNote->Override.Pitch : 1.0f);          NotePitch.setCurrentValue(pNote ? pNote->Override.Pitch : 1.0f);
198          NotePitch.setDefaultDuration(pNote ? pNote->Override.PitchTime : DEFAULT_NOTE_PITCH_TIME_S);          NotePitch.setDefaultDuration(pNote ? pNote->Override.PitchTime : DEFAULT_NOTE_PITCH_TIME_S);
199          NoteCutoff = (pNote) ? pNote->Override.Cutoff : 1.0f;          NoteCutoff = (pNote) ? pNote->Override.Cutoff : 1.0f;
# Line 748  namespace LinuxSampler { Line 750  namespace LinuxSampler {
750                      case Event::synth_param_volume_time:                      case Event::synth_param_volume_time:
751                          NoteVolume.setDefaultDuration(itEvent->Param.NoteSynthParam.AbsValue);                          NoteVolume.setDefaultDuration(itEvent->Param.NoteSynthParam.AbsValue);
752                          break;                          break;
753                        case Event::synth_param_volume_curve:
754                            NoteVolume.setCurve((fade_curve_t)itEvent->Param.NoteSynthParam.AbsValue, GetEngine()->SampleRate / CONFIG_DEFAULT_SUBFRAGMENT_SIZE);
755                            break;
756                      case Event::synth_param_pitch:                      case Event::synth_param_pitch:
757                          NotePitch.fadeTo(itEvent->Param.NoteSynthParam.AbsValue, GetEngine()->SampleRate / CONFIG_DEFAULT_SUBFRAGMENT_SIZE);                          NotePitch.fadeTo(itEvent->Param.NoteSynthParam.AbsValue, GetEngine()->SampleRate / CONFIG_DEFAULT_SUBFRAGMENT_SIZE);
758                          break;                          break;
759                      case Event::synth_param_pitch_time:                      case Event::synth_param_pitch_time:
760                          NotePitch.setDefaultDuration(itEvent->Param.NoteSynthParam.AbsValue);                          NotePitch.setDefaultDuration(itEvent->Param.NoteSynthParam.AbsValue);
761                          break;                          break;
762                        case Event::synth_param_pitch_curve:
763                            NotePitch.setCurve((fade_curve_t)itEvent->Param.NoteSynthParam.AbsValue, GetEngine()->SampleRate / CONFIG_DEFAULT_SUBFRAGMENT_SIZE);
764                            break;
765                      case Event::synth_param_pan:                      case Event::synth_param_pan:
766                          NotePanLeft  = AbstractEngine::PanCurveValueNorm(itEvent->Param.NoteSynthParam.AbsValue, 0 /*left*/);                          NotePanLeft  = AbstractEngine::PanCurveValueNorm(itEvent->Param.NoteSynthParam.AbsValue, 0 /*left*/);
767                          NotePanRight = AbstractEngine::PanCurveValueNorm(itEvent->Param.NoteSynthParam.AbsValue, 1 /*right*/);                          NotePanRight = AbstractEngine::PanCurveValueNorm(itEvent->Param.NoteSynthParam.AbsValue, 1 /*right*/);

Legend:
Removed from v.3214  
changed lines
  Added in v.3246

  ViewVC Help
Powered by ViewVC