mirror of
https://codeberg.org/armin/wavetable.git
synced 2026-09-01 05:50:46 +02:00
More UI
This commit is contained in:
parent
8a591b3ab0
commit
3dbcbf73e5
10 changed files with 60 additions and 29 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
|
@ -7,3 +7,6 @@
|
|||
[submodule "modules/plugin_sdk"]
|
||||
path = modules/plugin_sdk
|
||||
url = git@github.com:TurnipHat/plugin_sdk.git
|
||||
[submodule "modules/melatonin_inspector"]
|
||||
path = modules/melatonin_inspector
|
||||
url = git@github.com:sudara/melatonin_inspector.git
|
||||
|
|
|
|||
|
|
@ -85,6 +85,10 @@ foreach(module_name IN ITEMS gin gin_dsp gin_graphics gin_gui gin_metadata gin_n
|
|||
set_property (TARGET "${module_name}" APPEND PROPERTY LABELS Gin)
|
||||
endforeach()
|
||||
|
||||
# melatonin
|
||||
juce_add_module ("${CMAKE_CURRENT_LIST_DIR}/modules/melatonin_inspector")
|
||||
set_property (TARGET melatonin_inspector APPEND PROPERTY LABELS melatonin)
|
||||
|
||||
# Binary Data
|
||||
|
||||
set_property (DIRECTORY APPEND PROPERTY LABELS Assets)
|
||||
|
|
@ -242,6 +246,8 @@ target_link_libraries (${PLUGIN_NAME} PRIVATE
|
|||
gin_gui
|
||||
gin_plugin
|
||||
|
||||
melatonin_inspector
|
||||
|
||||
juce::juce_audio_basics
|
||||
juce::juce_audio_devices
|
||||
juce::juce_audio_formats
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 15facfa3eaa9648244202df0e29067d30b36f33c
|
||||
Subproject commit 3e758affdb87d98b1699982262082c7b4c755392
|
||||
1
modules/melatonin_inspector
Submodule
1
modules/melatonin_inspector
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 177bf1318757fb78f76c4ea20356fc73168d8db5
|
||||
|
|
@ -5,6 +5,13 @@
|
|||
{ "id": "flt", "x": "0", "y": "prevB()+1", "w": 175, "h": 163 },
|
||||
{ "id": "fltAdsr", "x": "prevR()+1", "y": "prevY()", "w": 175, "h": 163 },
|
||||
{ "id": "lfo[1..3]", "x": "0,prevR()+1", "y": "prevB()+1,prevY()", "w": 175, "h": 163 },
|
||||
{ "id": "scope", "x": "0", "y": "prevB()+1", "w": 175, "h": 163 }
|
||||
{ "id": "gate", "x": "prevR()+1", "y": "prevY()", "w": 175, "h": 163 },
|
||||
{ "id": "gatePattern", "x": "prevR()+1", "y": "prevY()", "w": 175, "h": 163 },
|
||||
{ "id": "scope", "x": "0", "y": "prevB()+1", "w": 175, "h": 163 },
|
||||
{ "id": "reverb", "x": "prevR()+1", "y": "prevY()", "w": 175, "h": 163 },
|
||||
{ "id": "delay", "x": "prevR()+1", "y": "prevY()", "w": 175, "h": 163 },
|
||||
{ "id": "distort", "x": "prevR()+1", "y": "prevY()", "w": 175, "h": 163 },
|
||||
{ "id": "chorus", "x": "prevR()+1", "y": "prevY()", "w": 175, "h": 163 },
|
||||
{ "id": "lfoArea[1..3]", "x": 0, "y": 0, "w": 0, "h": 0 }
|
||||
]
|
||||
}
|
||||
|
|
@ -10,31 +10,19 @@ Editor::Editor (WavetableAudioProcessor& proc_)
|
|||
addAndMakeVisible (filter);
|
||||
addAndMakeVisible (fltADSR);
|
||||
|
||||
for (auto& i : modItems)
|
||||
modHeader.addItem (i);
|
||||
|
||||
addAndMakeVisible (modHeader);
|
||||
|
||||
for (int i = 0; i < Cfg::numLFOs; i++)
|
||||
{
|
||||
lfoBox.addBox (i, &lfos[i]);
|
||||
lfoBox.addBox (i, &lfoGraphs[i]);
|
||||
addAndMakeVisible (&lfos[i]);
|
||||
addAndMakeVisible (&lfoGraphs[i]);
|
||||
}
|
||||
addAndMakeVisible (lfoBox);
|
||||
lfoBox.setPage (0);
|
||||
|
||||
for (auto& i : fxItems)
|
||||
fxHeader.addItem (i);
|
||||
|
||||
addAndMakeVisible (fxHeader);
|
||||
|
||||
effects.addBox (&gate);
|
||||
effects.addBox (&pattern);
|
||||
effects.addBox (&chorus);
|
||||
effects.addBox (&distort);
|
||||
effects.addBox (&delay);
|
||||
effects.addBox (&reverb);
|
||||
effects.addBox (&scope);
|
||||
addAndMakeVisible (gate);
|
||||
addAndMakeVisible (pattern);
|
||||
addAndMakeVisible (chorus);
|
||||
addAndMakeVisible (distort);
|
||||
addAndMakeVisible (delay);
|
||||
addAndMakeVisible (reverb);
|
||||
addAndMakeVisible (scope);
|
||||
|
||||
addAndMakeVisible (effects);
|
||||
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ public:
|
|||
FilterADSRArea (WavetableAudioProcessor& proc_)
|
||||
: proc (proc_)
|
||||
{
|
||||
setName ( "fltAdsr" );
|
||||
setName ("fltAdsr");
|
||||
|
||||
auto& flt = proc.filterParams;
|
||||
|
||||
|
|
@ -152,7 +152,7 @@ public:
|
|||
LFOBox (const juce::String& name, WavetableAudioProcessor& proc_, int idx_)
|
||||
: gin::ParamBox (name), proc (proc_), idx (idx_)
|
||||
{
|
||||
setName ( "lfo" + juce::String ( idx + 1 ) );
|
||||
setName ("lfo" + juce::String (idx + 1));
|
||||
|
||||
auto& lfo = proc.lfoParams[idx];
|
||||
|
||||
|
|
@ -190,7 +190,7 @@ public:
|
|||
LFOArea (WavetableAudioProcessor& proc_, int idx_)
|
||||
: proc (proc_), idx (idx_)
|
||||
{
|
||||
setName ( "lfoArea" + juce::String ( idx + 1 ) );
|
||||
setName ("lfoArea" + juce::String (idx + 1));
|
||||
|
||||
auto& lfo = proc.lfoParams[idx];
|
||||
|
||||
|
|
@ -222,7 +222,7 @@ public:
|
|||
GateBox (WavetableAudioProcessor& proc_)
|
||||
: gin::ParamBox ("Gate"), proc (proc_)
|
||||
{
|
||||
setName ( "gate" );
|
||||
setName ("gate");
|
||||
|
||||
addControl (new gin::Select (proc.gateParams.beat), 0, 0);
|
||||
addControl (new gin::Knob (proc.gateParams.length), 1, 0);
|
||||
|
|
@ -242,7 +242,7 @@ public:
|
|||
GateArea (WavetableAudioProcessor& proc_)
|
||||
: gin::ParamArea ("Pattern"), proc (proc_)
|
||||
{
|
||||
setName ( "gatePattern" );
|
||||
setName ("gatePattern");
|
||||
|
||||
g = new gin::GateEffectComponent();
|
||||
g->setParams (proc.gateParams.length, proc.gateParams.l, proc.gateParams.r, proc.gateParams.enable);
|
||||
|
|
|
|||
|
|
@ -15,6 +15,23 @@ WavetableAudioProcessorEditor::~WavetableAudioProcessorEditor()
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
void WavetableAudioProcessorEditor::showAboutInfo()
|
||||
{
|
||||
#if JUCE_DEBUG
|
||||
if (inspector == nullptr)
|
||||
{
|
||||
inspector = std::make_unique<melatonin::Inspector> (*this);
|
||||
inspector->setVisible(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
inspector = nullptr;
|
||||
}
|
||||
#else
|
||||
ProcessorEditor::showAboutInfo();
|
||||
#endif
|
||||
}
|
||||
|
||||
void WavetableAudioProcessorEditor::paint (juce::Graphics& g)
|
||||
{
|
||||
ProcessorEditor::paint (g);
|
||||
|
|
|
|||
|
|
@ -16,10 +16,16 @@ public:
|
|||
void paint (juce::Graphics&) override;
|
||||
void resized() override;
|
||||
|
||||
void showAboutInfo() override;
|
||||
|
||||
private:
|
||||
WavetableAudioProcessor& vaProc;
|
||||
|
||||
Editor editor { vaProc };
|
||||
|
||||
#if JUCE_DEBUG
|
||||
std::unique_ptr<melatonin::Inspector> inspector;
|
||||
#endif
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WavetableAudioProcessorEditor)
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@ WavetableVoice::WavetableVoice (WavetableAudioProcessor& p)
|
|||
|
||||
void WavetableVoice::noteStarted()
|
||||
{
|
||||
oscillators[0].setWavetable (proc.osc1Tables);
|
||||
oscillators[1].setWavetable (proc.osc2Tables);
|
||||
|
||||
fastKill = false;
|
||||
startVoice();
|
||||
|
||||
|
|
@ -156,7 +159,7 @@ void WavetableVoice::renderNextBlock (juce::AudioBuffer<float>& outputBuffer, in
|
|||
float velocity = currentlyPlayingNote.noteOnVelocity.asUnsignedFloat();
|
||||
buffer.applyGain (gin::velocityToGain (velocity, ampKeyTrack));
|
||||
|
||||
// Apply filters
|
||||
// Apply filter
|
||||
if (proc.filterParams.enable->isOn())
|
||||
filter.process (buffer);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue