/[svn]/linuxsampler/trunk/src/engines/common/LFOTriangleDiHarmonic.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/common/LFOTriangleDiHarmonic.h

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

revision 718 by schoenebeck, Sun Jul 24 10:26:17 2005 UTC revision 719 by senkov, Sun Jul 24 16:48:11 2005 UTC
# Line 69  namespace LinuxSampler { Line 69  namespace LinuxSampler {
69               * @param ExtControlValue - new external controller value               * @param ExtControlValue - new external controller value
70               */               */
71              inline void update(const uint16_t& ExtControlValue) {              inline void update(const uint16_t& ExtControlValue) {
72                  const float max = InternalDepth + ExtControlValue * ExtControlDepthCoeff;                  const float max = this->InternalDepth + ExtControlValue * this->ExtControlDepthCoeff;
73                  if (RANGE == range_unsigned)                  if (RANGE == range_unsigned)
74                      normalizer = max * 0.5f;                      normalizer = max * 0.5f;
75                  else /* signed range */                  else /* signed range */
# Line 90  namespace LinuxSampler { Line 90  namespace LinuxSampler {
90               *                          audio output signal               *                          audio output signal
91               */               */
92              void trigger(float Frequency, start_level_t StartLevel, uint16_t InternalDepth, uint16_t ExtControlDepth, bool FlipPhase, unsigned int SampleRate) {              void trigger(float Frequency, start_level_t StartLevel, uint16_t InternalDepth, uint16_t ExtControlDepth, bool FlipPhase, unsigned int SampleRate) {
93                  this->InternalDepth        = (InternalDepth / 1200.0f) * Max;                  this->InternalDepth        = (InternalDepth / 1200.0f) * this->Max;
94                  this->ExtControlDepthCoeff = (((float) ExtControlDepth / 1200.0f) / 127.0f) * Max;                  this->ExtControlDepthCoeff = (((float) ExtControlDepth / 1200.0f) / 127.0f) * this->Max;
95    
96                  c1 = 2.0f * M_PI * Frequency / (float) SampleRate;                  c1 = 2.0f * M_PI * Frequency / (float) SampleRate;
97                  c2 = 2.0f * M_PI * Frequency / (float) SampleRate * 3.0f;                  c2 = 2.0f * M_PI * Frequency / (float) SampleRate * 3.0f;

Legend:
Removed from v.718  
changed lines
  Added in v.719

  ViewVC Help
Powered by ViewVC