/*
==============================================================================
This is an automatically generated GUI class created by the Projucer!
Be careful when adding custom code to these files, as only the code within
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
and re-saved.
Created with Projucer version: 5.4.4
------------------------------------------------------------------------------
The Projucer is part of the JUCE library.
Copyright (c) 2017 - ROLI Ltd.
==============================================================================
*/
//[Headers] You can add your own extra header files here...
#include "AudioParameters.h"
#include "GuiLFOMod.h"
#include "GuiLFO.h"
//[/Headers]
#include "GuiSynth.h"
//[MiscUserDefs] You can add your own user definitions and misc code here...
//[/MiscUserDefs]
//==============================================================================
GuiSynth::GuiSynth ()
{
//[Constructor_pre] You can add your own custom stuff here..
//[/Constructor_pre]
groupChorus.reset (new GUIChorus ("groupChorus",
TRANS("Chorus")));
addAndMakeVisible (groupChorus.get());
groupChorus->setColour (GroupComponent::outlineColourId, Colours::green);
groupMix.reset (new GUIMix ("effectGroup",
TRANS("Mix")));
addAndMakeVisible (groupMix.get());
groupMix->setColour (GroupComponent::outlineColourId, Colours::green);
groupMix->setBounds (8, 8, 280, 672);
groupReverb.reset (new GUIReverb ("groupReverb",
TRANS("Reverb")));
addAndMakeVisible (groupReverb.get());
groupReverb->setColour (GroupComponent::outlineColourId, Colours::green);
groupLFOBalanceMod.reset (new GuiLFOMod ("groupLFOBalanceMod",
TRANS("Balance LFO control")));
addAndMakeVisible (groupLFOBalanceMod.get());
groupLFOBalanceMod->setColour (GroupComponent::outlineColourId, Colours::aqua);
groupLFOBalanceMod->setBounds (296, 208, 240, 472);
groupLFOBalance.reset (new GuiLFO ("groupLFOBalance",
TRANS("Balance LFO")));
addAndMakeVisible (groupLFOBalance.get());
groupLFOBalance->setColour (GroupComponent::outlineColourId, Colours::aqua);
groupLFOBalance->setBounds (296, 8, 238, 200);
groupSpan.reset (new GUISpan ("groupSpan",
TRANS("Span")));
addAndMakeVisible (groupSpan.get());
groupSpan->setColour (GroupComponent::outlineColourId, Colours::blue);
groupSpan->setBounds (543, 9, 280, 239);
groupMetronom.reset (new GUIMetronom ("groupMetronom",
TRANS("Metronome")));
addAndMakeVisible (groupMetronom.get());
groupMetronom->setColour (GroupComponent::outlineColourId, Colours::blue);
groupDelay.reset (new GUIDelay ("groupDelay",
TRANS("Stereo Delay")));
addAndMakeVisible (groupDelay.get());
groupDelay->setColour (GroupComponent::outlineColourId, Colours::green);
//[UserPreSize]
//[/UserPreSize]
setSize (600, 400);
//[Constructor] You can add your own custom stuff here..
molossCyanLNF = std::make_unique< MolossLookNFeel>(MolossLookNFeel::CYAN_LNF);
groupLFOBalanceMod->setLookAndFeel(molossCyanLNF.get());
groupLFOBalance->setLookAndFeel(molossCyanLNF.get());
backGroundImage = std::make_unique<DrawableImage>();
backGroundImage->setImage(molossCyanLNF->getBackgroundImage());
//[/Constructor]
}
GuiSynth::~GuiSynth()
{
//[Destructor_pre]. You can add your own custom destruction code here..
groupLFOBalanceMod->setLookAndFeel(nullptr);
groupLFOBalance->setLookAndFeel(nullptr);
//[/Destructor_pre]
groupChorus = nullptr;
groupMix = nullptr;
groupReverb = nullptr;
groupLFOBalanceMod = nullptr;
groupLFOBalance = nullptr;
groupSpan = nullptr;
groupMetronom = nullptr;
groupDelay = nullptr;
//[Destructor]. You can add your own custom destruction code here..
//[/Destructor]
}
//==============================================================================
void GuiSynth::paint (Graphics& g)
{
//[UserPrePaint] Add your own custom painting code here..
backGroundImage->drawWithin(g, Rectangle<float>(0, 0, getWidth(), getHeight()),
RectanglePlacement::stretchToFit, 1.000f);
//[/UserPrePaint]
//[UserPaint] Add your own custom painting code here..
//[/UserPaint]
}
void GuiSynth::resized()
{
//[UserPreResize] Add your own custom resize code here..
//[/UserPreResize]
groupChorus->setBounds (543, 9 + 239, 280, 110);
groupReverb->setBounds (543, ((9 + 239) + 110) + 110, 280, 110);
groupMetronom->setBounds (544, (((9 + 239) + 110) + 110) + 110, 280, 102);
groupDelay->setBounds (544, (9 + 239) + 110, 280, 110);
//[UserResized] Add your own custom resize handling here..
//[/UserResized]
}
//[MiscUserCode] You can add your own definitions of your custom methods or any other code here...
void GuiSynth::setSynthParameters(SynthParameters * paramSynth) {
groupLFOBalance->setParameters(paramSynth);
groupLFOBalanceMod->setParameters(paramSynth);
groupMix->setParameters(paramSynth);
groupSpan->setParameters(paramSynth);
groupReverb->setParameters(paramSynth);
groupChorus->setParameters(paramSynth);
groupDelay->setParameters(paramSynth);
}
//[/MiscUserCode]
//==============================================================================
#if 0
/* -- Projucer information section --
This is where the Projucer stores the metadata that describe this GUI layout, so
make changes in here at your peril!
BEGIN_JUCER_METADATA
<JUCER_COMPONENT documentType="Component" className="GuiSynth" componentName=""
parentClasses="public Component" constructorParams="" variableInitialisers=""
snapPixels="8" snapActive="1" snapShown="1" overlayOpacity="0.330"
fixedSize="0" initialWidth="600" initialHeight="400">
<BACKGROUND backgroundColour="323e44"/>
<GROUPCOMPONENT name="groupChorus" id="34748eeea2a239d" memberName="groupChorus"
virtualName="GUIChorus" explicitFocusOrder="0" pos="543 0R 280 110"
posRelativeY="d8ff39181bf823e9" outlinecol="ff008000" title="Chorus"/>
<GROUPCOMPONENT name="effectGroup" id="ef05236b7291f013" memberName="groupMix"
virtualName="GUIMix" explicitFocusOrder="0" pos="8 8 280 672"
outlinecol="ff008000" title="Mix"/>
<GROUPCOMPONENT name="groupReverb" id="3bc00e66e6d24b65" memberName="groupReverb"
virtualName="GUIReverb" explicitFocusOrder="0" pos="543 0R 280 110"
posRelativeY="a251a2e009626c14" outlinecol="ff008000" title="Reverb"/>
<GROUPCOMPONENT name="groupLFOBalanceMod" id="38dcb9738c7c06c3" memberName="groupLFOBalanceMod"
virtualName="GuiLFOMod" explicitFocusOrder="0" pos="296 208 240 472"
outlinecol="ff00ffff" title="Balance LFO control"/>
<GROUPCOMPONENT name="groupLFOBalance" id="e688a7661f1c7439" memberName="groupLFOBalance"
virtualName="GuiLFO" explicitFocusOrder="0" pos="296 8 238 200"
outlinecol="ff00ffff" title="Balance LFO"/>
<GROUPCOMPONENT name="groupSpan" id="d8ff39181bf823e9" memberName="groupSpan"
virtualName="GUISpan" explicitFocusOrder="0" pos="543 9 280 239"
outlinecol="ff0000ff" title="Span"/>
<GROUPCOMPONENT name="groupMetronom" id="a5025c27d83a6a34" memberName="groupMetronom"
virtualName="GUIMetronom" explicitFocusOrder="0" pos="544 0R 280 102"
posRelativeY="3bc00e66e6d24b65" outlinecol="ff0000ff" title="Metronome"/>
<GROUPCOMPONENT name="groupDelay" id="a251a2e009626c14" memberName="groupDelay"
virtualName="GUIDelay" explicitFocusOrder="0" pos="544 0R 280 110"
posRelativeY="34748eeea2a239d" outlinecol="ff008000" title="Stereo Delay"/>
</JUCER_COMPONENT>
END_JUCER_METADATA
*/
#endif
//[EndFile] You can add extra defines here...
//[/EndFile]