Skip to content

Commit

Permalink
Small module tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 committed Nov 19, 2022
1 parent b85dcae commit 079fa63
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion res/presets/Superdrag.chowpreset
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<proc_chain state_plugin_version="1.0.9">
<Amp_IRs>
<Parameters x_pos="0.5764482617378235" y_pos="0.5060975551605225" ir_file="">
<PARAM id="gain" value="0.0"/>
<PARAM id="gain" value="-3.0"/>
<PARAM id="ir" value="0.0"/>
<PARAM id="mix" value="1.0"/>
<PARAM id="on_off" value="1.0"/>
Expand Down
10 changes: 10 additions & 0 deletions src/processors/drive/GuitarMLAmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ void GuitarMLAmp::loadModelFromJson (const chowdsp::json& modelJson, const Strin

void GuitarMLAmp::loadModel (int modelIndex, Component* parentComponent)
{
normalizationGain = 1.0f;

if (juce::isPositiveAndBelow (modelIndex, numBuiltInModels))
{
int modelDataSize = 0;
Expand All @@ -147,6 +149,12 @@ void GuitarMLAmp::loadModel (int modelIndex, Component* parentComponent)

const auto modelJson = chowdsp::JSONUtils::fromBinaryData (modelData, modelDataSize);
loadModelFromJson (modelJson, guitarMLModelNames[modelIndex]);

// The Mesa model is a bit loud, so let's normalize the level down a bit
// Eventually it would be good to do this sort of thing programmatically.
// so that it could work for custom loaded models as well.
if (modelIndex == 2)
normalizationGain = 0.5f;
}
else if (modelIndex == numBuiltInModels)
{
Expand Down Expand Up @@ -271,6 +279,8 @@ void GuitarMLAmp::processAudio (AudioBuffer<float>& buffer)
}
}

buffer.applyGain (normalizationGain);

dcBlocker.processAudio (buffer);
}

Expand Down
2 changes: 2 additions & 0 deletions src/processors/drive/GuitarMLAmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,7 @@ class GuitarMLAmp : public BaseProcessor

DCBlocker dcBlocker;

float normalizationGain = 1.0f;

JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GuitarMLAmp)
};
2 changes: 1 addition & 1 deletion src/processors/modulation/phaser/Phaser8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Phaser8::Phaser8 (UndoManager* um) : BaseProcessor ("Phaser8",

uiOptions.backgroundColour = Colour { 0xff00a8e9 };
uiOptions.powerColour = Colour { 0xfff44e44 };
uiOptions.info.description = "A phaser effect based on a classic \"Compact\" 8-stage phaser pedal.";
uiOptions.info.description = "A phaser effect based on a classic \"Compact\" 8-stage phaser pedal. The first output contains the signal after the pedal's feedback and modulation stages. The second output contains the sigal after only the feedback stage.";
uiOptions.info.authors = StringArray { "Jatin Chowdhury" };
}

Expand Down

0 comments on commit 079fa63

Please sign in to comment.