Update for param Ids
This commit is contained in:
parent
85c16f5752
commit
e33cbd7ac2
2
dpf
2
dpf
|
@ -1 +1 @@
|
||||||
Subproject commit 8fd0d9072b164d9d83f7e34c420131aeafdc315a
|
Subproject commit 1d00b38275356435cd384fd89fa9e65e4d6939c8
|
|
@ -18,8 +18,6 @@
|
||||||
#include "DistrhoPluginNekobi.hpp"
|
#include "DistrhoPluginNekobi.hpp"
|
||||||
#include "DistrhoUINekobi.hpp"
|
#include "DistrhoUINekobi.hpp"
|
||||||
|
|
||||||
using DGL::Point;
|
|
||||||
|
|
||||||
START_NAMESPACE_DISTRHO
|
START_NAMESPACE_DISTRHO
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
@ -29,7 +27,7 @@ DistrhoUINekobi::DistrhoUINekobi()
|
||||||
fAboutWindow(this)
|
fAboutWindow(this)
|
||||||
{
|
{
|
||||||
// FIXME
|
// FIXME
|
||||||
fNeko.setTimerSpeed(4);
|
fNeko.setTimerSpeed(5);
|
||||||
|
|
||||||
// background
|
// background
|
||||||
fImgBackground = Image(DistrhoArtworkNekobi::backgroundData, DistrhoArtworkNekobi::backgroundWidth, DistrhoArtworkNekobi::backgroundHeight, GL_BGR);
|
fImgBackground = Image(DistrhoArtworkNekobi::backgroundData, DistrhoArtworkNekobi::backgroundWidth, DistrhoArtworkNekobi::backgroundHeight, GL_BGR);
|
||||||
|
@ -40,7 +38,7 @@ DistrhoUINekobi::DistrhoUINekobi()
|
||||||
// slider
|
// slider
|
||||||
Image sliderImage(DistrhoArtworkNekobi::sliderData, DistrhoArtworkNekobi::sliderWidth, DistrhoArtworkNekobi::sliderHeight);
|
Image sliderImage(DistrhoArtworkNekobi::sliderData, DistrhoArtworkNekobi::sliderWidth, DistrhoArtworkNekobi::sliderHeight);
|
||||||
|
|
||||||
fSliderWaveform = new ImageSlider(this, sliderImage);
|
fSliderWaveform = new ImageSlider(this, sliderImage, DistrhoPluginNekobi::paramWaveform);
|
||||||
fSliderWaveform->setStartPos(133, 40);
|
fSliderWaveform->setStartPos(133, 40);
|
||||||
fSliderWaveform->setEndPos(133, 60);
|
fSliderWaveform->setEndPos(133, 60);
|
||||||
fSliderWaveform->setRange(0.0f, 1.0f);
|
fSliderWaveform->setRange(0.0f, 1.0f);
|
||||||
|
@ -52,7 +50,7 @@ DistrhoUINekobi::DistrhoUINekobi()
|
||||||
Image knobImage(DistrhoArtworkNekobi::knobData, DistrhoArtworkNekobi::knobWidth, DistrhoArtworkNekobi::knobHeight);
|
Image knobImage(DistrhoArtworkNekobi::knobData, DistrhoArtworkNekobi::knobWidth, DistrhoArtworkNekobi::knobHeight);
|
||||||
|
|
||||||
// knob Tuning
|
// knob Tuning
|
||||||
fKnobTuning = new ImageKnob(this, knobImage);
|
fKnobTuning = new ImageKnob(this, knobImage, ImageKnob::Vertical, DistrhoPluginNekobi::paramTuning);
|
||||||
fKnobTuning->setPos(41, 43);
|
fKnobTuning->setPos(41, 43);
|
||||||
fKnobTuning->setRange(-12.0f, 12.0f);
|
fKnobTuning->setRange(-12.0f, 12.0f);
|
||||||
fKnobTuning->setValue(0.0f);
|
fKnobTuning->setValue(0.0f);
|
||||||
|
@ -60,7 +58,7 @@ DistrhoUINekobi::DistrhoUINekobi()
|
||||||
fKnobTuning->setCallback(this);
|
fKnobTuning->setCallback(this);
|
||||||
|
|
||||||
// knob Cutoff
|
// knob Cutoff
|
||||||
fKnobCutoff = new ImageKnob(this, knobImage);
|
fKnobCutoff = new ImageKnob(this, knobImage, ImageKnob::Vertical, DistrhoPluginNekobi::paramCutoff);
|
||||||
fKnobCutoff->setPos(185, 43);
|
fKnobCutoff->setPos(185, 43);
|
||||||
fKnobCutoff->setRange(0.0f, 100.0f);
|
fKnobCutoff->setRange(0.0f, 100.0f);
|
||||||
fKnobCutoff->setValue(25.0f);
|
fKnobCutoff->setValue(25.0f);
|
||||||
|
@ -68,7 +66,7 @@ DistrhoUINekobi::DistrhoUINekobi()
|
||||||
fKnobCutoff->setCallback(this);
|
fKnobCutoff->setCallback(this);
|
||||||
|
|
||||||
// knob Resonance
|
// knob Resonance
|
||||||
fKnobResonance = new ImageKnob(this, knobImage);
|
fKnobResonance = new ImageKnob(this, knobImage, ImageKnob::Vertical, DistrhoPluginNekobi::paramResonance);
|
||||||
fKnobResonance->setPos(257, 43);
|
fKnobResonance->setPos(257, 43);
|
||||||
fKnobResonance->setRange(0.0f, 95.0f);
|
fKnobResonance->setRange(0.0f, 95.0f);
|
||||||
fKnobResonance->setValue(25.0f);
|
fKnobResonance->setValue(25.0f);
|
||||||
|
@ -76,7 +74,7 @@ DistrhoUINekobi::DistrhoUINekobi()
|
||||||
fKnobResonance->setCallback(this);
|
fKnobResonance->setCallback(this);
|
||||||
|
|
||||||
// knob Env Mod
|
// knob Env Mod
|
||||||
fKnobEnvMod = new ImageKnob(this, knobImage);
|
fKnobEnvMod = new ImageKnob(this, knobImage, ImageKnob::Vertical, DistrhoPluginNekobi::paramEnvMod);
|
||||||
fKnobEnvMod->setPos(329, 43);
|
fKnobEnvMod->setPos(329, 43);
|
||||||
fKnobEnvMod->setRange(0.0f, 100.0f);
|
fKnobEnvMod->setRange(0.0f, 100.0f);
|
||||||
fKnobEnvMod->setValue(50.0f);
|
fKnobEnvMod->setValue(50.0f);
|
||||||
|
@ -84,7 +82,7 @@ DistrhoUINekobi::DistrhoUINekobi()
|
||||||
fKnobEnvMod->setCallback(this);
|
fKnobEnvMod->setCallback(this);
|
||||||
|
|
||||||
// knob Decay
|
// knob Decay
|
||||||
fKnobDecay = new ImageKnob(this, knobImage);
|
fKnobDecay = new ImageKnob(this, knobImage, ImageKnob::Vertical, DistrhoPluginNekobi::paramDecay);
|
||||||
fKnobDecay->setPos(400, 43);
|
fKnobDecay->setPos(400, 43);
|
||||||
fKnobDecay->setRange(0.0f, 100.0f);
|
fKnobDecay->setRange(0.0f, 100.0f);
|
||||||
fKnobDecay->setValue(75.0f);
|
fKnobDecay->setValue(75.0f);
|
||||||
|
@ -92,7 +90,7 @@ DistrhoUINekobi::DistrhoUINekobi()
|
||||||
fKnobDecay->setCallback(this);
|
fKnobDecay->setCallback(this);
|
||||||
|
|
||||||
// knob Accent
|
// knob Accent
|
||||||
fKnobAccent = new ImageKnob(this, knobImage);
|
fKnobAccent = new ImageKnob(this, knobImage, ImageKnob::Vertical, DistrhoPluginNekobi::paramAccent);
|
||||||
fKnobAccent->setPos(473, 43);
|
fKnobAccent->setPos(473, 43);
|
||||||
fKnobAccent->setRange(0.0f, 100.0f);
|
fKnobAccent->setRange(0.0f, 100.0f);
|
||||||
fKnobAccent->setValue(25.0f);
|
fKnobAccent->setValue(25.0f);
|
||||||
|
@ -100,7 +98,7 @@ DistrhoUINekobi::DistrhoUINekobi()
|
||||||
fKnobAccent->setCallback(this);
|
fKnobAccent->setCallback(this);
|
||||||
|
|
||||||
// knob Volume
|
// knob Volume
|
||||||
fKnobVolume = new ImageKnob(this, knobImage);
|
fKnobVolume = new ImageKnob(this, knobImage, ImageKnob::Vertical, DistrhoPluginNekobi::paramVolume);
|
||||||
fKnobVolume->setPos(545, 43);
|
fKnobVolume->setPos(545, 43);
|
||||||
fKnobVolume->setRange(0.0f, 100.0f);
|
fKnobVolume->setRange(0.0f, 100.0f);
|
||||||
fKnobVolume->setValue(75.0f);
|
fKnobVolume->setValue(75.0f);
|
||||||
|
@ -171,80 +169,32 @@ void DistrhoUINekobi::imageButtonClicked(ImageButton* button, int)
|
||||||
|
|
||||||
void DistrhoUINekobi::imageKnobDragStarted(ImageKnob* knob)
|
void DistrhoUINekobi::imageKnobDragStarted(ImageKnob* knob)
|
||||||
{
|
{
|
||||||
if (knob == fKnobTuning)
|
d_editParameter(knob->getId(), true);
|
||||||
d_editParameter(DistrhoPluginNekobi::paramTuning, true);
|
|
||||||
else if (knob == fKnobCutoff)
|
|
||||||
d_editParameter(DistrhoPluginNekobi::paramCutoff, true);
|
|
||||||
else if (knob == fKnobResonance)
|
|
||||||
d_editParameter(DistrhoPluginNekobi::paramResonance, true);
|
|
||||||
else if (knob == fKnobEnvMod)
|
|
||||||
d_editParameter(DistrhoPluginNekobi::paramEnvMod, true);
|
|
||||||
else if (knob == fKnobDecay)
|
|
||||||
d_editParameter(DistrhoPluginNekobi::paramDecay, true);
|
|
||||||
else if (knob == fKnobAccent)
|
|
||||||
d_editParameter(DistrhoPluginNekobi::paramAccent, true);
|
|
||||||
else if (knob == fKnobVolume)
|
|
||||||
d_editParameter(DistrhoPluginNekobi::paramVolume, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DistrhoUINekobi::imageKnobDragFinished(ImageKnob* knob)
|
void DistrhoUINekobi::imageKnobDragFinished(ImageKnob* knob)
|
||||||
{
|
{
|
||||||
if (knob == fKnobTuning)
|
d_editParameter(knob->getId(), false);
|
||||||
d_editParameter(DistrhoPluginNekobi::paramTuning, false);
|
|
||||||
else if (knob == fKnobCutoff)
|
|
||||||
d_editParameter(DistrhoPluginNekobi::paramCutoff, false);
|
|
||||||
else if (knob == fKnobResonance)
|
|
||||||
d_editParameter(DistrhoPluginNekobi::paramResonance, false);
|
|
||||||
else if (knob == fKnobEnvMod)
|
|
||||||
d_editParameter(DistrhoPluginNekobi::paramEnvMod, false);
|
|
||||||
else if (knob == fKnobDecay)
|
|
||||||
d_editParameter(DistrhoPluginNekobi::paramDecay, false);
|
|
||||||
else if (knob == fKnobAccent)
|
|
||||||
d_editParameter(DistrhoPluginNekobi::paramAccent, false);
|
|
||||||
else if (knob == fKnobVolume)
|
|
||||||
d_editParameter(DistrhoPluginNekobi::paramVolume, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DistrhoUINekobi::imageKnobValueChanged(ImageKnob* knob, float value)
|
void DistrhoUINekobi::imageKnobValueChanged(ImageKnob* knob, float value)
|
||||||
{
|
{
|
||||||
if (knob == fKnobTuning)
|
d_setParameterValue(knob->getId(), value);
|
||||||
d_setParameterValue(DistrhoPluginNekobi::paramTuning, value);
|
|
||||||
else if (knob == fKnobCutoff)
|
|
||||||
d_setParameterValue(DistrhoPluginNekobi::paramCutoff, value);
|
|
||||||
else if (knob == fKnobResonance)
|
|
||||||
d_setParameterValue(DistrhoPluginNekobi::paramResonance, value);
|
|
||||||
else if (knob == fKnobEnvMod)
|
|
||||||
d_setParameterValue(DistrhoPluginNekobi::paramEnvMod, value);
|
|
||||||
else if (knob == fKnobDecay)
|
|
||||||
d_setParameterValue(DistrhoPluginNekobi::paramDecay, value);
|
|
||||||
else if (knob == fKnobAccent)
|
|
||||||
d_setParameterValue(DistrhoPluginNekobi::paramAccent, value);
|
|
||||||
else if (knob == fKnobVolume)
|
|
||||||
d_setParameterValue(DistrhoPluginNekobi::paramVolume, value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DistrhoUINekobi::imageSliderDragStarted(ImageSlider* slider)
|
void DistrhoUINekobi::imageSliderDragStarted(ImageSlider* slider)
|
||||||
{
|
{
|
||||||
if (slider != fSliderWaveform)
|
d_editParameter(slider->getId(), true);
|
||||||
return;
|
|
||||||
|
|
||||||
d_editParameter(DistrhoPluginNekobi::paramWaveform, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DistrhoUINekobi::imageSliderDragFinished(ImageSlider* slider)
|
void DistrhoUINekobi::imageSliderDragFinished(ImageSlider* slider)
|
||||||
{
|
{
|
||||||
if (slider != fSliderWaveform)
|
d_editParameter(slider->getId(), false);
|
||||||
return;
|
|
||||||
|
|
||||||
d_editParameter(DistrhoPluginNekobi::paramWaveform, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DistrhoUINekobi::imageSliderValueChanged(ImageSlider* slider, float value)
|
void DistrhoUINekobi::imageSliderValueChanged(ImageSlider* slider, float value)
|
||||||
{
|
{
|
||||||
if (slider != fSliderWaveform)
|
d_setParameterValue(slider->getId(), value);
|
||||||
return;
|
|
||||||
|
|
||||||
d_setParameterValue(DistrhoPluginNekobi::paramWaveform, value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DistrhoUINekobi::onDisplay()
|
void DistrhoUINekobi::onDisplay()
|
||||||
|
|
Loading…
Reference in New Issue