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"]
|
[submodule "modules/plugin_sdk"]
|
||||||
path = modules/plugin_sdk
|
path = modules/plugin_sdk
|
||||||
url = git@github.com:TurnipHat/plugin_sdk.git
|
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)
|
set_property (TARGET "${module_name}" APPEND PROPERTY LABELS Gin)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
# melatonin
|
||||||
|
juce_add_module ("${CMAKE_CURRENT_LIST_DIR}/modules/melatonin_inspector")
|
||||||
|
set_property (TARGET melatonin_inspector APPEND PROPERTY LABELS melatonin)
|
||||||
|
|
||||||
# Binary Data
|
# Binary Data
|
||||||
|
|
||||||
set_property (DIRECTORY APPEND PROPERTY LABELS Assets)
|
set_property (DIRECTORY APPEND PROPERTY LABELS Assets)
|
||||||
|
|
@ -242,6 +246,8 @@ target_link_libraries (${PLUGIN_NAME} PRIVATE
|
||||||
gin_gui
|
gin_gui
|
||||||
gin_plugin
|
gin_plugin
|
||||||
|
|
||||||
|
melatonin_inspector
|
||||||
|
|
||||||
juce::juce_audio_basics
|
juce::juce_audio_basics
|
||||||
juce::juce_audio_devices
|
juce::juce_audio_devices
|
||||||
juce::juce_audio_formats
|
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": "flt", "x": "0", "y": "prevB()+1", "w": 175, "h": 163 },
|
||||||
{ "id": "fltAdsr", "x": "prevR()+1", "y": "prevY()", "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": "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 (filter);
|
||||||
addAndMakeVisible (fltADSR);
|
addAndMakeVisible (fltADSR);
|
||||||
|
|
||||||
for (auto& i : modItems)
|
|
||||||
modHeader.addItem (i);
|
|
||||||
|
|
||||||
addAndMakeVisible (modHeader);
|
|
||||||
|
|
||||||
for (int i = 0; i < Cfg::numLFOs; i++)
|
for (int i = 0; i < Cfg::numLFOs; i++)
|
||||||
{
|
{
|
||||||
lfoBox.addBox (i, &lfos[i]);
|
addAndMakeVisible (&lfos[i]);
|
||||||
lfoBox.addBox (i, &lfoGraphs[i]);
|
addAndMakeVisible (&lfoGraphs[i]);
|
||||||
}
|
}
|
||||||
addAndMakeVisible (lfoBox);
|
|
||||||
lfoBox.setPage (0);
|
|
||||||
|
|
||||||
for (auto& i : fxItems)
|
addAndMakeVisible (gate);
|
||||||
fxHeader.addItem (i);
|
addAndMakeVisible (pattern);
|
||||||
|
addAndMakeVisible (chorus);
|
||||||
addAndMakeVisible (fxHeader);
|
addAndMakeVisible (distort);
|
||||||
|
addAndMakeVisible (delay);
|
||||||
effects.addBox (&gate);
|
addAndMakeVisible (reverb);
|
||||||
effects.addBox (&pattern);
|
addAndMakeVisible (scope);
|
||||||
effects.addBox (&chorus);
|
|
||||||
effects.addBox (&distort);
|
|
||||||
effects.addBox (&delay);
|
|
||||||
effects.addBox (&reverb);
|
|
||||||
effects.addBox (&scope);
|
|
||||||
|
|
||||||
addAndMakeVisible (effects);
|
addAndMakeVisible (effects);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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)
|
void WavetableAudioProcessorEditor::paint (juce::Graphics& g)
|
||||||
{
|
{
|
||||||
ProcessorEditor::paint (g);
|
ProcessorEditor::paint (g);
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,16 @@ public:
|
||||||
void paint (juce::Graphics&) override;
|
void paint (juce::Graphics&) override;
|
||||||
void resized() override;
|
void resized() override;
|
||||||
|
|
||||||
|
void showAboutInfo() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
WavetableAudioProcessor& vaProc;
|
WavetableAudioProcessor& vaProc;
|
||||||
|
|
||||||
Editor editor { vaProc };
|
Editor editor { vaProc };
|
||||||
|
|
||||||
|
#if JUCE_DEBUG
|
||||||
|
std::unique_ptr<melatonin::Inspector> inspector;
|
||||||
|
#endif
|
||||||
|
|
||||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WavetableAudioProcessorEditor)
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WavetableAudioProcessorEditor)
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,9 @@ WavetableVoice::WavetableVoice (WavetableAudioProcessor& p)
|
||||||
|
|
||||||
void WavetableVoice::noteStarted()
|
void WavetableVoice::noteStarted()
|
||||||
{
|
{
|
||||||
|
oscillators[0].setWavetable (proc.osc1Tables);
|
||||||
|
oscillators[1].setWavetable (proc.osc2Tables);
|
||||||
|
|
||||||
fastKill = false;
|
fastKill = false;
|
||||||
startVoice();
|
startVoice();
|
||||||
|
|
||||||
|
|
@ -156,7 +159,7 @@ void WavetableVoice::renderNextBlock (juce::AudioBuffer<float>& outputBuffer, in
|
||||||
float velocity = currentlyPlayingNote.noteOnVelocity.asUnsignedFloat();
|
float velocity = currentlyPlayingNote.noteOnVelocity.asUnsignedFloat();
|
||||||
buffer.applyGain (gin::velocityToGain (velocity, ampKeyTrack));
|
buffer.applyGain (gin::velocityToGain (velocity, ampKeyTrack));
|
||||||
|
|
||||||
// Apply filters
|
// Apply filter
|
||||||
if (proc.filterParams.enable->isOn())
|
if (proc.filterParams.enable->isOn())
|
||||||
filter.process (buffer);
|
filter.process (buffer);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue