UI Cosmetic changes

pull/1/head
asb2m10 11 years ago
parent 6637400d47
commit 1d550a9d60
  1. BIN
      Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate
  2. 13
      Source/DXComponents.cpp
  3. 7
      Source/DXComponents.h
  4. 26
      Source/GlobalEditor.cpp
  5. 3
      Source/GlobalEditor.h
  6. 20
      Source/PluginEditor.cpp
  7. 20
      Source/PluginProcessor.cpp

@ -283,3 +283,16 @@ void VuMeter::paint(Graphics &g) {
g.fillRoundedRectangle (3.0f, (height-3.0f) - (3.0f + i * h + h * 0.1f) , width - 6.0f, h * 0.8f, 0);
}
}
void LcdDisplay::paint(Graphics &g) {
g.setColour(Colours::black.withAlpha(0.4f));
g.fillRoundedRectangle (0.0f, 0.0f, (float) getWidth(), (float) getHeight(), 1.0f);
g.setColour (Colours::white);
g.setFont (Font (Font::getDefaultMonospacedFontName(), 15.00f, Font::plain));
g.drawText (systemMsg,
4, 4, 300, 8,
Justification::centredLeft, true);
g.drawText (paramMsg,
4, 20, 300, 8,
Justification::centredLeft, true);
}

@ -54,4 +54,11 @@ class VuMeter: public Component {
float v;
};
class LcdDisplay : public Component {
public:
String systemMsg;
String paramMsg;
void paint(Graphics &g);
};
#endif // DXCOMPONENTS_H_INCLUDED

@ -162,6 +162,9 @@ GlobalEditor::GlobalEditor ()
algo->setTextBoxStyle (Slider::NoTextBox, true, 80, 20);
algo->addListener (this);
addAndMakeVisible (lcdDisplay = new LcdDisplay());
lcdDisplay->setName ("lcdDisplay");
//[UserPreSize]
//[/UserPreSize]
@ -170,7 +173,7 @@ GlobalEditor::GlobalEditor ()
//[Constructor] You can add your own custom stuff here..
systemMsg << "* DEXED DX synthesizer *";
lcdDisplay->systemMsg << "* DEXED DX synthesizer *";
//[/Constructor]
}
@ -203,6 +206,7 @@ GlobalEditor::~GlobalEditor()
algoDisplay = nullptr;
feedback = nullptr;
algo = nullptr;
lcdDisplay = nullptr;
//[Destructor]. You can add your own custom destruction code here..
@ -216,17 +220,7 @@ void GlobalEditor::paint (Graphics& g)
//[/UserPrePaint]
//[UserPaint] Add your own custom painting code here..
g.setColour (Colours::black);
g.setFont (Font (Font::getDefaultMonospacedFontName(), 15.00f, Font::plain));
g.drawText (systemMsg,
11, 8, 300, 8,
Justification::centredLeft, true);
g.setColour (Colours::black);
g.setFont (Font (Font::getDefaultMonospacedFontName(), 15.00f, Font::plain));
g.drawText (paramMsg,
11, 24, 300, 8,
Justification::centredLeft, true);
//[/UserPaint]
}
@ -255,6 +249,7 @@ void GlobalEditor::resized()
algoDisplay->setBounds (442, 8, 152, 74);
feedback->setBounds (568, 32, 24, 24);
algo->setBounds (568, 8, 24, 24);
lcdDisplay->setBounds (8, 0, 256, 32);
//[UserResized] Add your own custom resize handling here..
//[/UserResized]
}
@ -415,12 +410,12 @@ void GlobalEditor::bind(DexedAudioProcessor *parent) {
}
void GlobalEditor::setSystemMessage(String msg) {
systemMsg = msg;
lcdDisplay->systemMsg = msg;
repaint();
}
void GlobalEditor::setParamMessage(String msg) {
paramMsg = msg;
lcdDisplay->paramMsg = msg;
repaint();
}
@ -539,6 +534,9 @@ BEGIN_JUCER_METADATA
explicitFocusOrder="0" pos="568 8 24 24" min="1" max="32" int="1"
style="Rotary" textBoxPos="NoTextBox" textBoxEditable="0" textBoxWidth="80"
textBoxHeight="20" skewFactor="1"/>
<GENERICCOMPONENT name="lcdDisplay" id="30c7bb8f114cbbe3" memberName="lcdDisplay"
virtualName="" explicitFocusOrder="0" pos="8 0 256 32" class="LcdDisplay"
params=""/>
</JUCER_COMPONENT>
END_JUCER_METADATA

@ -53,8 +53,6 @@ public:
void updatePitchPos(int pos);
void updateDisplay();
String systemMsg;
String paramMsg;
//[/UserMethods]
void paint (Graphics& g);
@ -93,6 +91,7 @@ private:
ScopedPointer<AlgoDisplay> algoDisplay;
ScopedPointer<Slider> feedback;
ScopedPointer<Slider> algo;
ScopedPointer<LcdDisplay> lcdDisplay;
//==============================================================================

@ -33,7 +33,7 @@ DexedAudioProcessorEditor::DexedAudioProcessorEditor (DexedAudioProcessor* owner
{
LookAndFeel::setDefaultLookAndFeel(&dx_lnf);
setSize (865, 420);
setSize (866, 420);
processor = ownerFilter;
@ -72,32 +72,32 @@ DexedAudioProcessorEditor::DexedAudioProcessorEditor (DexedAudioProcessor* owner
addAndMakeVisible(aboutButton = new TextButton("ABOUT"));
aboutButton->setButtonText ("ABOUT");
aboutButton->addListener (this);
aboutButton->setBounds (805, 5, 50, 18);
aboutButton->setBounds (807, 5, 50, 18);
// OPERATORS
addAndMakeVisible(&(operators[0]));
operators[0].setBounds(5, 39, 280, 90);
operators[0].setBounds(7, 38, 280, 90);
operators[0].bind(processor, 0);
addAndMakeVisible(&(operators[1]));
operators[1].setBounds(290, 39, 280, 90);
operators[1].setBounds(294, 38, 280, 90);
operators[1].bind(processor, 1);
addAndMakeVisible(&(operators[2]));
operators[2].setBounds(575, 39, 280, 90);
operators[2].setBounds(579, 38, 280, 90);
operators[2].bind(processor, 2);
addAndMakeVisible(&(operators[3]));
operators[3].setBounds(5, 133, 280, 90);
operators[3].setBounds(7, 133, 280, 90);
operators[3].bind(processor, 3);
addAndMakeVisible(&(operators[4]));
operators[4].setBounds(290, 133, 280, 90);
operators[4].setBounds(294, 133, 280, 90);
operators[4].bind(processor, 4);
addAndMakeVisible(&(operators[5]));
operators[5].setBounds(575, 133, 280, 90);
operators[5].setBounds(579, 133, 280, 90);
operators[5].bind(processor, 5);
// add the midi keyboard component..
@ -124,10 +124,10 @@ DexedAudioProcessorEditor::~DexedAudioProcessorEditor() {
//==============================================================================
void DexedAudioProcessorEditor::paint (Graphics& g) {
g.setColour(Colour(0xFF744420));
g.setColour(Colour(0xFF47260D));
g.fillRoundedRectangle(0.0f, 0.0f, (float) getWidth(), (float) getHeight(), 0);
g.setColour(Colour(0xFFA87B67));
g.setColour(Colour(0xFF4D3828));
g.fillRoundedRectangle(0.0f, 30, (float) getWidth(), 200, 0);
}

@ -370,16 +370,16 @@ void DexedAudioProcessor::processSamples(int n_samples, float *buffer) {
for (int note = 0; note < MAX_ACTIVE_NOTES; ++note) {
if (voices[note].live) {
voices[note].dx7_note->compute(audiobuf.get(), lfovalue, lfodelay, &controllers);
}
for (int j=0; j < N; ++j) {
int32_t val = audiobuf.get()[j] >> 4;
int clip_val = val < -(1 << 24) ? 0x8000 : val >= (1 << 24) ? 0x7fff : val >> 9;
float f = ((float) clip_val) / (float) 32768;
if( f > 1 ) f = 1;
if( f < -1 ) f = -1;
sumbuf[j] += f;
audiobuf.get()[j] = 0;
for (int j=0; j < N; ++j) {
int32_t val = audiobuf.get()[j] >> 4;
int clip_val = val < -(1 << 24) ? 0x8000 : val >= (1 << 24) ? 0x7fff : val >> 9;
float f = ((float) clip_val) / (float) 32768;
if( f > 1 ) f = 1;
if( f < -1 ) f = -1;
sumbuf[j] += f;
audiobuf.get()[j] = 0;
}
}
}
@ -426,7 +426,6 @@ bool DexedAudioProcessor::peekVoiceStatus() {
return true;
}
const String DexedAudioProcessor::getInputChannelName (int channelIndex) const {
return String (channelIndex + 1);
}
@ -476,7 +475,6 @@ bool DexedAudioProcessor::hasEditor() const {
return true; // (change this to false if you choose to not supply an editor)
}
void DexedAudioProcessor::updateUI() {
// notify host something has changed
updateHostDisplay();

Loading…
Cancel
Save