version 0.1

pull/1/head
asb2m10 11 years ago
parent 45a5c25708
commit 1bff785f0d
  1. 1
      Source/DXLookNFeel.cpp
  2. 3
      Source/DXLookNFeel.h
  3. 18
      Source/GlobalEditor.cpp
  4. 1
      Source/GlobalEditor.h
  5. 44
      Source/OperatorEditor.cpp
  6. 23
      Source/PluginEditor.cpp
  7. 3
      Source/PluginEditor.h
  8. 29
      Source/PluginParam.cpp
  9. 4
      Source/PluginProcessor.cpp
  10. 11
      Source/PluginProcessor.h

@ -21,5 +21,4 @@
#include "DXLookNFeel.h" #include "DXLookNFeel.h"
DXLookNFeel::DXLookNFeel() { DXLookNFeel::DXLookNFeel() {
} }

@ -24,7 +24,8 @@
#include "../JuceLibraryCode/JuceHeader.h" #include "../JuceLibraryCode/JuceHeader.h"
class DXLookNFeel : LookAndFeel_V3 { class DXLookNFeel : public LookAndFeel_V3 {
public:
DXLookNFeel(); DXLookNFeel();
}; };

@ -66,6 +66,12 @@ GlobalEditor::GlobalEditor ()
lfoPitchDepth->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); lfoPitchDepth->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
lfoPitchDepth->addListener (this); lfoPitchDepth->addListener (this);
addAndMakeVisible (lfoDelay = new Slider ("lfoDelay"));
lfoDelay->setRange (0, 99, 1);
lfoDelay->setSliderStyle (Slider::LinearVertical);
lfoDelay->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
lfoDelay->addListener (this);
//[UserPreSize] //[UserPreSize]
//[/UserPreSize] //[/UserPreSize]
@ -87,6 +93,7 @@ GlobalEditor::~GlobalEditor()
lfoSpeed = nullptr; lfoSpeed = nullptr;
lfoAmDepth = nullptr; lfoAmDepth = nullptr;
lfoPitchDepth = nullptr; lfoPitchDepth = nullptr;
lfoDelay = nullptr;
//[Destructor]. You can add your own custom destruction code here.. //[Destructor]. You can add your own custom destruction code here..
@ -110,6 +117,7 @@ void GlobalEditor::resized()
lfoSpeed->setBounds (80, 8, 23, 56); lfoSpeed->setBounds (80, 8, 23, 56);
lfoAmDepth->setBounds (208, 8, 32, 24); lfoAmDepth->setBounds (208, 8, 32, 24);
lfoPitchDepth->setBounds (176, 8, 32, 24); lfoPitchDepth->setBounds (176, 8, 32, 24);
lfoDelay->setBounds (104, 8, 23, 56);
//[UserResized] Add your own custom resize handling here.. //[UserResized] Add your own custom resize handling here..
//[/UserResized] //[/UserResized]
} }
@ -139,6 +147,11 @@ void GlobalEditor::sliderValueChanged (Slider* sliderThatWasMoved)
//[UserSliderCode_lfoPitchDepth] -- add your slider handling code here.. //[UserSliderCode_lfoPitchDepth] -- add your slider handling code here..
//[/UserSliderCode_lfoPitchDepth] //[/UserSliderCode_lfoPitchDepth]
} }
else if (sliderThatWasMoved == lfoDelay)
{
//[UserSliderCode_lfoDelay] -- add your slider handling code here..
//[/UserSliderCode_lfoDelay]
}
//[UsersliderValueChanged_Post] //[UsersliderValueChanged_Post]
//[/UsersliderValueChanged_Post] //[/UsersliderValueChanged_Post]
@ -166,6 +179,7 @@ void GlobalEditor::comboBoxChanged (ComboBox* comboBoxThatHasChanged)
void GlobalEditor::bind(DexedAudioProcessor *parent) { void GlobalEditor::bind(DexedAudioProcessor *parent) {
parent->algo->bind(algo); parent->algo->bind(algo);
parent->lfoRate->bind(lfoSpeed); parent->lfoRate->bind(lfoSpeed);
parent->lfoDelay->bind(lfoDelay);
parent->lfoWaveform->bind(lfoType); parent->lfoWaveform->bind(lfoType);
parent->lfoAmpDepth->bind(lfoAmDepth); parent->lfoAmpDepth->bind(lfoAmDepth);
parent->lfoPitchDepth->bind(lfoPitchDepth); parent->lfoPitchDepth->bind(lfoPitchDepth);
@ -208,6 +222,10 @@ BEGIN_JUCER_METADATA
virtualName="" explicitFocusOrder="0" pos="176 8 32 24" min="0" virtualName="" explicitFocusOrder="0" pos="176 8 32 24" min="0"
max="99" int="1" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" max="99" int="1" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1"
textBoxWidth="80" textBoxHeight="20" skewFactor="1"/> textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<SLIDER name="lfoDelay" id="1fce68dc81619ef5" memberName="lfoDelay" virtualName=""
explicitFocusOrder="0" pos="104 8 23 56" min="0" max="99" int="1"
style="LinearVertical" textBoxPos="NoTextBox" textBoxEditable="1"
textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
</JUCER_COMPONENT> </JUCER_COMPONENT>
END_JUCER_METADATA END_JUCER_METADATA

@ -67,6 +67,7 @@ private:
ScopedPointer<Slider> lfoSpeed; ScopedPointer<Slider> lfoSpeed;
ScopedPointer<Slider> lfoAmDepth; ScopedPointer<Slider> lfoAmDepth;
ScopedPointer<Slider> lfoPitchDepth; ScopedPointer<Slider> lfoPitchDepth;
ScopedPointer<Slider> lfoDelay;
//============================================================================== //==============================================================================

@ -30,7 +30,7 @@
OperatorEditor::OperatorEditor () OperatorEditor::OperatorEditor ()
{ {
addAndMakeVisible (s_egl1 = new Slider ("egl1")); addAndMakeVisible (s_egl1 = new Slider ("egl1"));
s_egl1->setRange (0, 10, 0); s_egl1->setRange (0, 99, 0);
s_egl1->setSliderStyle (Slider::Rotary); s_egl1->setSliderStyle (Slider::Rotary);
s_egl1->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); s_egl1->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
s_egl1->addListener (this); s_egl1->addListener (this);
@ -40,43 +40,43 @@ OperatorEditor::OperatorEditor ()
toggleButton->addListener (this); toggleButton->addListener (this);
addAndMakeVisible (s_egl2 = new Slider ("egl2")); addAndMakeVisible (s_egl2 = new Slider ("egl2"));
s_egl2->setRange (0, 10, 0); s_egl2->setRange (0, 99, 0);
s_egl2->setSliderStyle (Slider::Rotary); s_egl2->setSliderStyle (Slider::Rotary);
s_egl2->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); s_egl2->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
s_egl2->addListener (this); s_egl2->addListener (this);
addAndMakeVisible (s_egl3 = new Slider ("egl3")); addAndMakeVisible (s_egl3 = new Slider ("egl3"));
s_egl3->setRange (0, 10, 0); s_egl3->setRange (0, 99, 0);
s_egl3->setSliderStyle (Slider::Rotary); s_egl3->setSliderStyle (Slider::Rotary);
s_egl3->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); s_egl3->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
s_egl3->addListener (this); s_egl3->addListener (this);
addAndMakeVisible (s_egl4 = new Slider ("egl4")); addAndMakeVisible (s_egl4 = new Slider ("egl4"));
s_egl4->setRange (0, 10, 0); s_egl4->setRange (0, 99, 0);
s_egl4->setSliderStyle (Slider::Rotary); s_egl4->setSliderStyle (Slider::Rotary);
s_egl4->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); s_egl4->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
s_egl4->addListener (this); s_egl4->addListener (this);
addAndMakeVisible (s_egv1 = new Slider ("egr1")); addAndMakeVisible (s_egv1 = new Slider ("egr1"));
s_egv1->setRange (0, 10, 0); s_egv1->setRange (0, 99, 0);
s_egv1->setSliderStyle (Slider::Rotary); s_egv1->setSliderStyle (Slider::Rotary);
s_egv1->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); s_egv1->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
s_egv1->addListener (this); s_egv1->addListener (this);
addAndMakeVisible (s_egv2 = new Slider ("egr3")); addAndMakeVisible (s_egv2 = new Slider ("egr3"));
s_egv2->setRange (0, 10, 0); s_egv2->setRange (0, 99, 0);
s_egv2->setSliderStyle (Slider::Rotary); s_egv2->setSliderStyle (Slider::Rotary);
s_egv2->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); s_egv2->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
s_egv2->addListener (this); s_egv2->addListener (this);
addAndMakeVisible (s_egv3 = new Slider ("egr3")); addAndMakeVisible (s_egv3 = new Slider ("egr3"));
s_egv3->setRange (0, 10, 0); s_egv3->setRange (0, 99, 0);
s_egv3->setSliderStyle (Slider::Rotary); s_egv3->setSliderStyle (Slider::Rotary);
s_egv3->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); s_egv3->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
s_egv3->addListener (this); s_egv3->addListener (this);
addAndMakeVisible (s_egv4 = new Slider ("egr4")); addAndMakeVisible (s_egv4 = new Slider ("egr4"));
s_egv4->setRange (0, 10, 0); s_egv4->setRange (0, 99, 0);
s_egv4->setSliderStyle (Slider::Rotary); s_egv4->setSliderStyle (Slider::Rotary);
s_egv4->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); s_egv4->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
s_egv4->addListener (this); s_egv4->addListener (this);
@ -99,19 +99,19 @@ OperatorEditor::OperatorEditor ()
opId->setColour (TextEditor::backgroundColourId, Colour (0x00000000)); opId->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
addAndMakeVisible (opLevel = new Slider ("opLevel")); addAndMakeVisible (opLevel = new Slider ("opLevel"));
opLevel->setRange (0, 10, 0); opLevel->setRange (0, 99, 0);
opLevel->setSliderStyle (Slider::Rotary); opLevel->setSliderStyle (Slider::Rotary);
opLevel->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); opLevel->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
opLevel->addListener (this); opLevel->addListener (this);
addAndMakeVisible (opFine = new Slider ("opFine")); addAndMakeVisible (opFine = new Slider ("opFine"));
opFine->setRange (0, 10, 0); opFine->setRange (0, 99, 0);
opFine->setSliderStyle (Slider::Rotary); opFine->setSliderStyle (Slider::Rotary);
opFine->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); opFine->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
opFine->addListener (this); opFine->addListener (this);
addAndMakeVisible (opCoarse = new Slider ("opCoarse")); addAndMakeVisible (opCoarse = new Slider ("opCoarse"));
opCoarse->setRange (0, 10, 0); opCoarse->setRange (0, 32, 0);
opCoarse->setSliderStyle (Slider::Rotary); opCoarse->setSliderStyle (Slider::Rotary);
opCoarse->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); opCoarse->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
opCoarse->addListener (this); opCoarse->addListener (this);
@ -345,38 +345,38 @@ BEGIN_JUCER_METADATA
fixedSize="1" initialWidth="250" initialHeight="70"> fixedSize="1" initialWidth="250" initialHeight="70">
<BACKGROUND backgroundColour="ffffff"/> <BACKGROUND backgroundColour="ffffff"/>
<SLIDER name="egl1" id="dc070cc41347df47" memberName="s_egl1" virtualName="" <SLIDER name="egl1" id="dc070cc41347df47" memberName="s_egl1" virtualName=""
explicitFocusOrder="0" pos="128 8 24 24" min="0" max="10" int="0" explicitFocusOrder="0" pos="128 8 24 24" min="0" max="99" int="0"
style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80"
textBoxHeight="20" skewFactor="1"/> textBoxHeight="20" skewFactor="1"/>
<TOGGLEBUTTON name="new toggle button" id="fcdf1076330e4ef6" memberName="toggleButton" <TOGGLEBUTTON name="new toggle button" id="fcdf1076330e4ef6" memberName="toggleButton"
virtualName="" explicitFocusOrder="0" pos="0 0 24 24" buttonText="" virtualName="" explicitFocusOrder="0" pos="0 0 24 24" buttonText=""
connectedEdges="0" needsCallback="1" radioGroupId="0" state="0"/> connectedEdges="0" needsCallback="1" radioGroupId="0" state="0"/>
<SLIDER name="egl2" id="66f5195e9c374029" memberName="s_egl2" virtualName="" <SLIDER name="egl2" id="66f5195e9c374029" memberName="s_egl2" virtualName=""
explicitFocusOrder="0" pos="152 8 24 24" min="0" max="10" int="0" explicitFocusOrder="0" pos="152 8 24 24" min="0" max="99" int="0"
style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80"
textBoxHeight="20" skewFactor="1"/> textBoxHeight="20" skewFactor="1"/>
<SLIDER name="egl3" id="9d57bd53203dcdb4" memberName="s_egl3" virtualName="" <SLIDER name="egl3" id="9d57bd53203dcdb4" memberName="s_egl3" virtualName=""
explicitFocusOrder="0" pos="176 8 24 24" min="0" max="10" int="0" explicitFocusOrder="0" pos="176 8 24 24" min="0" max="99" int="0"
style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80"
textBoxHeight="20" skewFactor="1"/> textBoxHeight="20" skewFactor="1"/>
<SLIDER name="egl4" id="4f7c3ece3ea2cf9c" memberName="s_egl4" virtualName="" <SLIDER name="egl4" id="4f7c3ece3ea2cf9c" memberName="s_egl4" virtualName=""
explicitFocusOrder="0" pos="200 8 24 24" min="0" max="10" int="0" explicitFocusOrder="0" pos="200 8 24 24" min="0" max="99" int="0"
style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80"
textBoxHeight="20" skewFactor="1"/> textBoxHeight="20" skewFactor="1"/>
<SLIDER name="egr1" id="2ca8137d80da46fb" memberName="s_egv1" virtualName="" <SLIDER name="egr1" id="2ca8137d80da46fb" memberName="s_egv1" virtualName=""
explicitFocusOrder="0" pos="128 40 24 24" min="0" max="10" int="0" explicitFocusOrder="0" pos="128 40 24 24" min="0" max="99" int="0"
style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80"
textBoxHeight="20" skewFactor="1"/> textBoxHeight="20" skewFactor="1"/>
<SLIDER name="egr3" id="4ad6d0c532d15973" memberName="s_egv2" virtualName="" <SLIDER name="egr3" id="4ad6d0c532d15973" memberName="s_egv2" virtualName=""
explicitFocusOrder="0" pos="152 40 24 24" min="0" max="10" int="0" explicitFocusOrder="0" pos="152 40 24 24" min="0" max="99" int="0"
style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80"
textBoxHeight="20" skewFactor="1"/> textBoxHeight="20" skewFactor="1"/>
<SLIDER name="egr3" id="8a2027f9ede16b4f" memberName="s_egv3" virtualName="" <SLIDER name="egr3" id="8a2027f9ede16b4f" memberName="s_egv3" virtualName=""
explicitFocusOrder="0" pos="176 40 24 24" min="0" max="10" int="0" explicitFocusOrder="0" pos="176 40 24 24" min="0" max="99" int="0"
style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80"
textBoxHeight="20" skewFactor="1"/> textBoxHeight="20" skewFactor="1"/>
<SLIDER name="egr4" id="8c04f1c943d837e8" memberName="s_egv4" virtualName="" <SLIDER name="egr4" id="8c04f1c943d837e8" memberName="s_egv4" virtualName=""
explicitFocusOrder="0" pos="200 40 24 24" min="0" max="10" int="0" explicitFocusOrder="0" pos="200 40 24 24" min="0" max="99" int="0"
style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80"
textBoxHeight="20" skewFactor="1"/> textBoxHeight="20" skewFactor="1"/>
<COMBOBOX name="opMode" id="2cf8156bb94cdc40" memberName="opMode" virtualName="" <COMBOBOX name="opMode" id="2cf8156bb94cdc40" memberName="opMode" virtualName=""
@ -388,15 +388,15 @@ BEGIN_JUCER_METADATA
focusDiscardsChanges="0" fontname="Default font" fontsize="19.600000000000001421" focusDiscardsChanges="0" fontname="Default font" fontsize="19.600000000000001421"
bold="0" italic="0" justification="33"/> bold="0" italic="0" justification="33"/>
<SLIDER name="opLevel" id="f8521c8214fb8993" memberName="opLevel" virtualName="" <SLIDER name="opLevel" id="f8521c8214fb8993" memberName="opLevel" virtualName=""
explicitFocusOrder="0" pos="8 40 24 24" min="0" max="10" int="0" explicitFocusOrder="0" pos="8 40 24 24" min="0" max="99" int="0"
style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80"
textBoxHeight="20" skewFactor="1"/> textBoxHeight="20" skewFactor="1"/>
<SLIDER name="opFine" id="e445aa61bd6cddcb" memberName="opFine" virtualName="" <SLIDER name="opFine" id="e445aa61bd6cddcb" memberName="opFine" virtualName=""
explicitFocusOrder="0" pos="96 40 24 24" min="0" max="10" int="0" explicitFocusOrder="0" pos="96 40 24 24" min="0" max="99" int="0"
style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80"
textBoxHeight="20" skewFactor="1"/> textBoxHeight="20" skewFactor="1"/>
<SLIDER name="opCoarse" id="4eec63d30d7488d2" memberName="opCoarse" virtualName="" <SLIDER name="opCoarse" id="4eec63d30d7488d2" memberName="opCoarse" virtualName=""
explicitFocusOrder="0" pos="72 40 24 24" min="0" max="10" int="0" explicitFocusOrder="0" pos="72 40 24 24" min="0" max="32" int="0"
style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80" style="Rotary" textBoxPos="NoTextBox" textBoxEditable="1" textBoxWidth="80"
textBoxHeight="20" skewFactor="1"/> textBoxHeight="20" skewFactor="1"/>
<SLIDER name="new slider" id="21f21cc5fae8e54b" memberName="gain" virtualName="" <SLIDER name="new slider" id="21f21cc5fae8e54b" memberName="gain" virtualName=""

@ -31,8 +31,9 @@ DexedAudioProcessorEditor::DexedAudioProcessorEditor (DexedAudioProcessor* owner
: AudioProcessorEditor (ownerFilter), : AudioProcessorEditor (ownerFilter),
midiKeyboard (ownerFilter->keyboardState, MidiKeyboardComponent::horizontalKeyboard) midiKeyboard (ownerFilter->keyboardState, MidiKeyboardComponent::horizontalKeyboard)
{ {
LookAndFeel::setDefaultLookAndFeel(&dx_lnf);
// This is where our plugin's editor size is set. // This is where our plugin's editor size is set.
setSize (800, 400); setSize (765, 380);
processor = ownerFilter; processor = ownerFilter;
@ -55,37 +56,40 @@ DexedAudioProcessorEditor::DexedAudioProcessorEditor (DexedAudioProcessor* owner
// OPERATORS // OPERATORS
addAndMakeVisible(&(ops[0])); addAndMakeVisible(&(ops[0]));
ops[0].setBounds(20, 40, 250, 80); ops[0].setBounds(5, 40, 250, 80);
ops[0].bind(processor, 0); ops[0].bind(processor, 0);
addAndMakeVisible(&(ops[1])); addAndMakeVisible(&(ops[1]));
ops[1].setBounds(270, 40, 250, 80); ops[1].setBounds(255, 40, 250, 80);
ops[1].bind(processor, 1); ops[1].bind(processor, 1);
addAndMakeVisible(&(ops[2])); addAndMakeVisible(&(ops[2]));
ops[2].setBounds(520, 40, 250, 80); ops[2].setBounds(505, 40, 250, 80);
ops[2].bind(processor, 2); ops[2].bind(processor, 2);
addAndMakeVisible(&(ops[3])); addAndMakeVisible(&(ops[3]));
ops[3].setBounds(20, 120, 250, 80); ops[3].setBounds(5, 120, 250, 80);
ops[3].bind(processor, 3); ops[3].bind(processor, 3);
addAndMakeVisible(&(ops[4])); addAndMakeVisible(&(ops[4]));
ops[4].setBounds(270, 120, 250, 80); ops[4].setBounds(255, 120, 250, 80);
ops[4].bind(processor, 4); ops[4].bind(processor, 4);
addAndMakeVisible(&(ops[5])); addAndMakeVisible(&(ops[5]));
ops[5].setBounds(520, 120, 250, 80); ops[5].setBounds(505, 120, 250, 80);
ops[5].bind(processor, 5); ops[5].bind(processor, 5);
// add the midi keyboard component.. // add the midi keyboard component..
addAndMakeVisible (&midiKeyboard); addAndMakeVisible (&midiKeyboard);
// The DX7 is a badass on the bass, keep it that way
midiKeyboard.setLowestVisibleKey(24);
const int keyboardHeight = 90; const int keyboardHeight = 90;
midiKeyboard.setBounds (4, getHeight() - keyboardHeight - 4, getWidth() - 8, keyboardHeight); midiKeyboard.setBounds (4, getHeight() - keyboardHeight - 4, getWidth() - 8, keyboardHeight);
addAndMakeVisible(&global); addAndMakeVisible(&global);
global.setBounds(520,200,250,80); global.setBounds(505,200,250,80);
global.bind(processor); global.bind(processor);
startTimer(100); startTimer(100);
@ -120,10 +124,9 @@ void DexedAudioProcessorEditor::buttonClicked(Button *buttonThatWasClicked) {
ifstream fp_in; ifstream fp_in;
fp_in.open(f.toRawUTF8(), ifstream::in); fp_in.open(f.toRawUTF8(), ifstream::in);
if (fp_in.fail()) { if (fp_in.fail()) {
AlertWindow::showMessageBoxAsync (AlertWindow::InfoIcon, AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon,
"Error", "Error",
"Unable to open: " + f); "Unable to open: " + f);
std::cerr << "error opening file" << std::endl;
return; return;
} }
fp_in.read((char *)syx_data, 4104); fp_in.read((char *)syx_data, 4104);

@ -25,6 +25,7 @@
#include "PluginProcessor.h" #include "PluginProcessor.h"
#include "OperatorEditor.h" #include "OperatorEditor.h"
#include "GlobalEditor.h" #include "GlobalEditor.h"
#include "DXLookNFeel.h"
//============================================================================== //==============================================================================
/** /**
@ -40,6 +41,8 @@ class DexedAudioProcessorEditor : public AudioProcessorEditor,
MidiKeyboardComponent midiKeyboard; MidiKeyboardComponent midiKeyboard;
DXLookNFeel dx_lnf;
public: public:
DexedAudioProcessorEditor (DexedAudioProcessor* ownerFilter); DexedAudioProcessorEditor (DexedAudioProcessor* ownerFilter);

@ -92,12 +92,14 @@ float CtrlInt::getValuePlugin() {
} }
void CtrlInt::setValuePlugin(float f) { void CtrlInt::setValuePlugin(float f) {
if ( f >= 1 )
f -= 0.00000001;
setValue((f * steps)); setValue((f * steps));
} }
void CtrlInt::setValue(int v) { void CtrlInt::setValue(int v) {
if ( v >= steps ) {
TRACE("WARNING: value too big %s : %d", label.toRawUTF8(), v);
v = steps-1;
}
value = v; value = v;
if ( dxOffset >= 0 ) { if ( dxOffset >= 0 ) {
if ( parent != NULL ) if ( parent != NULL )
@ -212,12 +214,12 @@ void DexedAudioProcessor::initCtrl() {
lfoDelay = new CtrlInt("LFO-Delay", 100, 138); lfoDelay = new CtrlInt("LFO-Delay", 100, 138);
ctrl.add(lfoDelay); ctrl.add(lfoDelay);
lfoAmpDepth = new CtrlInt("LFO-AmpDepth", 100, 139); lfoPitchDepth = new CtrlInt("LFO-PitchDepth", 100, 139);
ctrl.add(lfoAmpDepth);
lfoPitchDepth = new CtrlInt("LFO-PitchDepth", 100, 140);
ctrl.add(lfoPitchDepth); ctrl.add(lfoPitchDepth);
lfoAmpDepth = new CtrlInt("LFO-AmpDepth", 100, 140);
ctrl.add(lfoAmpDepth);
lfoSync = new CtrlInt("LFO-Sync", 2, 141); lfoSync = new CtrlInt("LFO-Sync", 2, 141);
ctrl.add(lfoSync); ctrl.add(lfoSync);
@ -236,8 +238,16 @@ int DexedAudioProcessor::importSysex(const char *imported) {
memcpy(patchNames[i], sysex + ((i*128)+118), 11); memcpy(patchNames[i], sysex + ((i*128)+118), 11);
for(int j=0;j<10;j++) { for(int j=0;j<10;j++) {
if ( patchNames[i][j] > 127 || patchNames[i][j] < 32 ) char c = (unsigned char)patchNames[i][j];
patchNames[i][j] = ' '; switch (c) {
case 92: c = 'Y'; break; /* yen */
case 126: c = '>'; break; /* >> */
case 127: c = '<'; break; /* << */
default:
if (c < 32 || c > 127) c = 32;
break;
}
patchNames[i][j] = c;
} }
patchNames[i][11] = 0; patchNames[i][11] = 0;
} }
@ -281,8 +291,6 @@ void DexedAudioProcessor::unpackSysex(int idx) {
data[158] = 1; data[158] = 1;
data[159] = 1; data[159] = 1;
data[160] = 1; data[160] = 1;
TRACE("The LFO is at %d", data[142]);
} }
@ -381,7 +389,6 @@ void DexedAudioProcessor::getStateInformation (MemoryBlock& destData) {
// as intermediaries to make it easy to save and load complex data.*/ // as intermediaries to make it easy to save and load complex data.*/
TRACE("getting state with %d", currentProgram); TRACE("getting state with %d", currentProgram);
destData.insert(data, 161, 0); destData.insert(data, 161, 0);
} }

@ -30,10 +30,10 @@
//============================================================================== //==============================================================================
DexedAudioProcessor::DexedAudioProcessor() { DexedAudioProcessor::DexedAudioProcessor() {
Logger *tmp = Logger::getCurrentLogger(); /*Logger *tmp = Logger::getCurrentLogger();
if ( tmp == NULL ) { if ( tmp == NULL ) {
Logger::setCurrentLogger(FileLogger::createDateStampedLogger("Dexed", "DebugSession-", "log", "DexedAudioProcessor Created")); Logger::setCurrentLogger(FileLogger::createDateStampedLogger("Dexed", "DebugSession-", "log", "DexedAudioProcessor Created"));
} }*/
TRACE("Hi"); TRACE("Hi");
currentNote = -1; currentNote = -1;

@ -94,7 +94,12 @@ public :
void unbindUI(); void unbindUI();
void updateUI(); void updateUI();
void processMidiMessage(const uint8_t *buf, int buf_size);
void keydown(uint8_t pitch, uint8_t velo);
void keyup(uint8_t pitch);
void processSamples(int n_samples, int16_t *buffer);
public: public:
//============================================================================== //==============================================================================
DexedAudioProcessor(); DexedAudioProcessor();
@ -158,10 +163,6 @@ private:
//============================================================================== //==============================================================================
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DexedAudioProcessor) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DexedAudioProcessor)
void processMidiMessage(const uint8_t *buf, int buf_size);
void keydown(uint8_t pitch, uint8_t velo);
void keyup(uint8_t pitch);
void processSamples(int n_samples, int16_t *buffer);
}; };
#define TRACE(fmt, ...) DexedAudioProcessor::log(__PRETTY_FUNCTION__,fmt,##__VA_ARGS__) #define TRACE(fmt, ...) DexedAudioProcessor::log(__PRETTY_FUNCTION__,fmt,##__VA_ARGS__)

Loading…
Cancel
Save