Skip to content

Commit

Permalink
Tone control is making bad clicking sounds when adjusting. Removing f…
Browse files Browse the repository at this point in the history
…or now.
  • Loading branch information
GuitarML committed Oct 11, 2020
1 parent 3d5edf5 commit f9e7243
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 107 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ See video demo here:
https://www.youtube.com/watch?v=4zwZNa7Kwwo&t=58s

This plugin uses a WaveNet model to recreate the sound of real world hardware, such as
a TS9 Tubescreamer or Blues Jr amp. Drive, Level, and Tone were added for simple ways to
a TS9 Tubescreamer or Blues Jr amp. Drive and Level are used for simple ways to
control the sound. The WaveNet model is effective at emulating distortion style effects or tube amplifiers.

![app](https://github.com/keyth72/SmartGuitarPedal/blob/master/resources/app_pic.png)
Expand Down
4 changes: 0 additions & 4 deletions SmartPedal/SmartPedal.jucer
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@
file="Source/PluginProcessor.cpp"/>
<FILE id="ZHAWrp" name="PluginProcessor.h" compile="0" resource="0"
file="Source/PluginProcessor.h"/>
<FILE id="q7ncaK" name="ResonantLowpassFilter.cpp" compile="1" resource="0"
file="Source/ResonantLowpassFilter.cpp"/>
<FILE id="xESCmj" name="ResonantLowpassFilter.h" compile="0" resource="0"
file="Source/ResonantLowpassFilter.h"/>
<FILE id="v7ySse" name="WaveNet.cpp" compile="1" resource="0" file="Source/WaveNet.cpp"/>
<FILE id="bSp8DX" name="WaveNet.h" compile="0" resource="0" file="Source/WaveNet.h"/>
<FILE id="yRqfH6" name="WaveNetLoader.cpp" compile="1" resource="0"
Expand Down
13 changes: 0 additions & 13 deletions SmartPedal/Source/PluginEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,6 @@ SmartPedalAudioProcessorEditor::SmartPedalAudioProcessorEditor (SmartPedalAudioP
odDriveKnob.setNumDecimalPlacesToDisplay(1);
odDriveKnob.setDoubleClickReturnValue(true, 0.0);

addAndMakeVisible(odToneKnob);
odToneKnob.setLookAndFeel(&blackHexKnobLAF);
odToneKnob.addListener(this);
odToneKnob.setRange(1000.0, 20000.0);
odToneKnob.setValue(10500.0);
odToneKnob.setSliderStyle(juce::Slider::SliderStyle::RotaryVerticalDrag);
odToneKnob.setTextBoxStyle(juce::Slider::TextEntryBoxPosition::NoTextBox, false, 50, 20);
odToneKnob.setNumDecimalPlacesToDisplay(1);
odToneKnob.setDoubleClickReturnValue(true, 10000.0);

addAndMakeVisible(odLevelKnob);
odLevelKnob.setLookAndFeel(&blackHexKnobLAF);
odLevelKnob.addListener(this);
Expand Down Expand Up @@ -140,7 +130,6 @@ void SmartPedalAudioProcessorEditor::resized()
// Overdrive Widgets
odDriveKnob.setBounds(112, 115, 125, 145);
odLevelKnob.setBounds(283, 115, 125, 145);
odToneKnob.setBounds(195, 234, 125, 145);
odFootSw.setBounds(220, 459, 75, 105);
odLED.setBounds(234, 398, 75, 105);
}
Expand Down Expand Up @@ -176,8 +165,6 @@ void SmartPedalAudioProcessorEditor::sliderValueChanged(Slider* slider)
// Overdrive
if (slider == &odDriveKnob)
processor.set_odDrive(slider->getValue());
else if (slider == &odToneKnob)
processor.set_odTone(slider->getValue());
else if (slider == &odLevelKnob)
processor.set_odLevel(slider->getValue());
}
Expand Down
1 change: 0 additions & 1 deletion SmartPedal/Source/PluginEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class SmartPedalAudioProcessorEditor : public AudioProcessorEditor,
// Overdrive Widgets
Slider odDriveKnob;
Slider odLevelKnob;
Slider odToneKnob;
ImageButton odFootSw;
ImageButton odLED;

Expand Down
9 changes: 0 additions & 9 deletions SmartPedal/Source/PluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ void SmartPedalAudioProcessor::processBlock (AudioBuffer<float>& buffer, MidiBuf
// Overdrive Pedal ==================================================================
if (od_state == 1) {
buffer.applyGain(odDrive);
reslowpass.process(buffer, midiMessages, numSamples, numInputChannels);
waveNet.process(buffer.getArrayOfReadPointers(), buffer.getArrayOfWritePointers(),
buffer.getNumSamples());
buffer.applyGain(odLevel);
Expand Down Expand Up @@ -234,14 +233,6 @@ float SmartPedalAudioProcessor::convertLogScale(float in_value, float x_min, flo
}


void SmartPedalAudioProcessor::set_odTone(float toneKnobValue)
{
float sampleRate = getSampleRate();
// Transform to log scale
float new_knobValue = convertLogScale(toneKnobValue, 1000, 20000, 1000, 20000);
reslowpass.setParameters(new_knobValue, sampleRate);
}

void SmartPedalAudioProcessor::set_odLevel(float db_odLevel)
{
odLevel = decibelToLinear(db_odLevel);
Expand Down
3 changes: 0 additions & 3 deletions SmartPedal/Source/PluginProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "../JuceLibraryCode/JuceHeader.h"
#include "WaveNet.h"
#include "WaveNetLoader.h"
#include "ResonantLowpassFilter.h"


//==============================================================================
Expand Down Expand Up @@ -69,7 +68,6 @@ class SmartPedalAudioProcessor : public AudioProcessor
// Overdrive Pedal
void set_odDrive(float odDriveKnobLevel);
float convertLogScale(float in_value, float x_min, float x_max, float y_min, float y_max);
void set_odTone(float toneKnobValue);
void set_odLevel(float db_odLevel);


Expand All @@ -85,7 +83,6 @@ class SmartPedalAudioProcessor : public AudioProcessor

private:
WaveNet waveNet; // OverDrive Pedal
ResonantLowpassFilter reslowpass; // Overdrive tone control
float preGain = 1.0;
float postGain = 1.0;
// Overdrive pedal
Expand Down
41 changes: 0 additions & 41 deletions SmartPedal/Source/ResonantLowpassFilter.cpp

This file was deleted.

35 changes: 0 additions & 35 deletions SmartPedal/Source/ResonantLowpassFilter.h

This file was deleted.

Binary file modified resources/app_pic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/smart_pedal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f9e7243

Please sign in to comment.