Skip to content

Commit

Permalink
Remove Noise class from flanger (LMMS#7473)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rossmaxx committed Aug 28, 2024
1 parent a992019 commit 35f350e
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 102 deletions.
2 changes: 1 addition & 1 deletion plugins/Flanger/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
INCLUDE(BuildPlugin)

BUILD_PLUGIN(
flanger FlangerEffect.cpp FlangerControls.cpp FlangerControlsDialog.cpp Noise.cpp MonoDelay.cpp
flanger FlangerEffect.cpp FlangerControls.cpp FlangerControlsDialog.cpp MonoDelay.cpp
MOCFILES FlangerControls.h FlangerControlsDialog.h
EMBEDDED_RESOURCES artwork.png logo.png
)
11 changes: 3 additions & 8 deletions plugins/Flanger/FlangerEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
#include "FlangerEffect.h"
#include "Engine.h"
#include "MonoDelay.h"
#include "Noise.h"
#include "QuadratureLfo.h"

#include "embed.h"
#include "lmms_math.h"
#include "plugin_export.h"

namespace lmms
Expand Down Expand Up @@ -61,7 +61,6 @@ FlangerEffect::FlangerEffect( Model *parent, const Plugin::Descriptor::SubPlugin
m_lfo = new QuadratureLfo( Engine::audioEngine()->outputSampleRate() );
m_lDelay = new MonoDelay( 1, Engine::audioEngine()->outputSampleRate() );
m_rDelay = new MonoDelay( 1, Engine::audioEngine()->outputSampleRate() );
m_noise = new Noise;
}


Expand All @@ -81,10 +80,6 @@ FlangerEffect::~FlangerEffect()
{
delete m_lfo;
}
if(m_noise)
{
delete m_noise;
}
}


Expand Down Expand Up @@ -113,8 +108,8 @@ bool FlangerEffect::processAudioBuffer( SampleFrame* buf, const fpp_t frames )
float leftLfo;
float rightLfo;

buf[f][0] += m_noise->tick() * noise;
buf[f][1] += m_noise->tick() * noise;
buf[f][0] += (fastRandf(2.0f) - 1.0f) * noise;
buf[f][1] += (fastRandf(2.0f) - 1.0f) * noise;
dryS[0] = buf[f][0];
dryS[1] = buf[f][1];
m_lfo->tick(&leftLfo, &rightLfo);
Expand Down
3 changes: 0 additions & 3 deletions plugins/Flanger/FlangerEffect.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ namespace lmms
{

class MonoDelay;
class Noise;
class QuadratureLfo;


Expand All @@ -55,8 +54,6 @@ class FlangerEffect : public Effect
MonoDelay* m_lDelay;
MonoDelay* m_rDelay;
QuadratureLfo* m_lfo;
Noise* m_noise;

};


Expand Down
46 changes: 0 additions & 46 deletions plugins/Flanger/Noise.cpp

This file was deleted.

44 changes: 0 additions & 44 deletions plugins/Flanger/Noise.h

This file was deleted.

0 comments on commit 35f350e

Please sign in to comment.