Algo numbering + Copy/Paste settings for ops.

pull/1/head
asb2m10 10 years ago
parent cd668063df
commit a182f23eb8
  1. 4840
      Builds/MacOSX/Dexed.xcodeproj/project.pbxproj
  2. BIN
      Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate
  3. 5
      README.md
  4. 146
      Source/AlgoDisplay.cpp
  5. 93
      Source/GlobalEditor.cpp
  6. 7
      Source/GlobalEditor.h
  7. 28
      Source/OperatorEditor.cpp
  8. 4
      Source/OperatorEditor.h
  9. 19
      Source/PluginData.cpp
  10. 3
      Source/PluginEditor.cpp
  11. 1
      Source/PluginProcessor.cpp
  12. 9
      Source/PluginProcessor.h

File diff suppressed because it is too large Load Diff

@ -35,7 +35,7 @@ new version here but you see it in the change log, it's because this version is
Changelog Changelog
--------- ---------
#### Version 0.8.0 #### Version 0.8.0
* New UI * New UI by [AZur Studio](http://bji.yukihotaru.com/)
* Fixed mono mode ticks on lower frequencies * Fixed mono mode ticks on lower frequencies
* SynprezFM preset are now in a submenu * SynprezFM preset are now in a submenu
@ -131,7 +131,7 @@ FAQ (possibly)
Credits & thanks Credits & thanks
---------------- ----------------
* DX Synth engine : Raph Levien and the [msfa](https://code.google.com/p/music-synthesizer-for-android) team * DX Synth engine : Raph Levien and the [msfa](https://code.google.com/p/music-synthesizer-for-android) team
* AZur Studio : Graphical design * Graphical design : [AZur Studio](http://bji.yukihotaru.com/)
* LP Filter : Filatov Vadim (2DaT); taken from the excellent [Obxd](https://obxd.wordpress.com) project * LP Filter : Filatov Vadim (2DaT); taken from the excellent [Obxd](https://obxd.wordpress.com) project
* PPPlay : Great [OPL3](http://sourceforge.net/projects/peepeeplayer) implementation, with documented code :D * PPPlay : Great [OPL3](http://sourceforge.net/projects/peepeeplayer) implementation, with documented code :D
* DX7 program compilation : Jean-Marc Desprez (author of [SynprezFM](http://www.synprez.com/SynprezFM)) * DX7 program compilation : Jean-Marc Desprez (author of [SynprezFM](http://www.synprez.com/SynprezFM))
@ -148,6 +148,7 @@ TODO - Dexed
------------ ------------
* Yamaha 4 operators (DX21/DX27/DX100) sysex import * Yamaha 4 operators (DX21/DX27/DX100) sysex import
* UI threaded messaging to avoid DAW automation 'clicks' * UI threaded messaging to avoid DAW automation 'clicks'
* Zomby UI changes: this occurs in Live and will be fixed in the 0.8.1 version.
* Various code cleanup * Various code cleanup
* AU Version * AU Version

@ -20,24 +20,25 @@
#include "AlgoDisplay.h" #include "AlgoDisplay.h"
#include "DXLookNFeel.h" #include "DXLookNFeel.h"
#include "Dexed.h"
AlgoDisplay::AlgoDisplay() { AlgoDisplay::AlgoDisplay() {
static char tmpAlgo = 0; static char tmpAlgo = 0;
algo = &tmpAlgo; algo = &tmpAlgo;
} }
inline void displayOp(Graphics &g, char id, char x, char y, char link, char fb) { inline void displayOp(Graphics &g, char id, int x, int y, char link, char fb) {
const int LINE_SZ = 3; const int LINE_SZ = 3;
String t(id); String t(id);
x *= 25; x *= 25;
x += 3;
y *= 21; y *= 21;
y += 5; y += 5;
g.setColour(Colours::white); g.setColour(Colours::white);
g.drawText(t, x, y, 16, 12, Justification::centred, true); g.drawText(t, x, y, 16, 12, Justification::centred, true);
g.setGradientFill(ColourGradient());
g.setColour(DXLookNFeel::fillColour); g.setColour(DXLookNFeel::fillColour);
switch(link) { switch(link) {
case 0 : // LINE DOWN case 0 : // LINE DOWN
@ -49,18 +50,6 @@ inline void displayOp(Graphics &g, char id, char x, char y, char link, char fb)
break; break;
case 2: // ARROW TO RIGHT JOIN case 2: // ARROW TO RIGHT JOIN
g.drawLine(x+8, y+12, x+8, y+19, LINE_SZ); g.drawLine(x+8, y+12, x+8, y+19, LINE_SZ);
//g.drawLine(x-17, y+18, x+9, y+18, LINE_SZ);
break;
case 3: // LINE
g.drawLine(x+8, y+12, x+8, y+18, LINE_SZ);
g.drawLine(x, y+18, x+26, y+18, LINE_SZ);
break;
case 4: // LEFT * 2
g.drawLine(x+8, y+12, x+8, y+18, LINE_SZ);
g.drawLine(x-16, y+18, x+25, y+18, LINE_SZ);
break;
case 5: // RIGHT DIAG
g.drawLine(x+8, y+12, x+25, y+18, LINE_SZ);
break; break;
case 6: case 6:
g.drawLine(x+8, y+12, x+8, y+18, LINE_SZ); g.drawLine(x+8, y+12, x+8, y+18, LINE_SZ);
@ -86,14 +75,12 @@ inline void displayOp(Graphics &g, char id, char x, char y, char link, char fb)
g.drawLine(x+7, y, x+8, y-5, LINE_SZ); g.drawLine(x+7, y, x+8, y-5, LINE_SZ);
g.drawLine(x+8, y-4, x+20, y-4, LINE_SZ); g.drawLine(x+8, y-4, x+20, y-4, LINE_SZ);
g.drawLine(x+19, y-4, x+19, y+59, LINE_SZ); g.drawLine(x+19, y-4, x+19, y+59, LINE_SZ);
// g.drawLine(x+19, y+57, x+19, y+59, LINE_SZ);
g.drawLine(x+8, y+58, x+19, y+58, LINE_SZ); g.drawLine(x+8, y+58, x+19, y+58, LINE_SZ);
break; break;
case 3: // ALGO 6 case 3: // ALGO 6
g.drawLine(x+7, y, x+8, y-5, LINE_SZ); g.drawLine(x+7, y, x+8, y-5, LINE_SZ);
g.drawLine(x+8, y-4, x+20, y-4, LINE_SZ); g.drawLine(x+8, y-4, x+20, y-4, LINE_SZ);
g.drawLine(x+19, y-4, x+19, y+37, LINE_SZ); g.drawLine(x+19, y-4, x+19, y+37, LINE_SZ);
//g.drawLine(x+18, y+36, x+19, y+36, LINE_SZ);
g.drawLine(x+8, y+36, x+19, y+36, LINE_SZ); g.drawLine(x+8, y+36, x+19, y+36, LINE_SZ);
break; break;
case 4: case 4:
@ -109,6 +96,13 @@ inline void displayOp(Graphics &g, char id, char x, char y, char link, char fb)
void AlgoDisplay::paint(Graphics &g) { void AlgoDisplay::paint(Graphics &g) {
g.setColour(DXLookNFeel::fillColour);
g.fillRect(1, 3, 20, 15);
String n = String(*algo +1);
g.setColour(Colours::white);
g.drawText(n, 1, 3, 20, 15, Justification::centred, true);
switch(*algo) { switch(*algo) {
case 0: case 0:
displayOp(g, 6, 3, 0, 0, 1); displayOp(g, 6, 3, 0, 0, 1);
@ -143,44 +137,44 @@ void AlgoDisplay::paint(Graphics &g) {
displayOp(g, 1, 2, 3, 1, 0); displayOp(g, 1, 2, 3, 1, 0);
break; break;
case 4: case 4:
displayOp(g, 6, 3, 2, 0, 1); displayOp(g, 6, 4, 2, 0, 1);
displayOp(g, 5, 3, 3, 2, 0); displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 2, 2, 0, 0); displayOp(g, 4, 3, 2, 0, 0);
displayOp(g, 3, 2, 3, 1, 0); displayOp(g, 3, 3, 3, 1, 0);
displayOp(g, 2, 1, 2, 0, 0); displayOp(g, 2, 2, 2, 0, 0);
displayOp(g, 1, 1, 3, 1, 0); displayOp(g, 1, 2, 3, 1, 0);
break; break;
case 5: // case 5: //
displayOp(g, 6, 3, 2, 0, 3); displayOp(g, 6, 4, 2, 0, 3);
displayOp(g, 5, 3, 3, 2, 0); displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 2, 2, 0, 0); displayOp(g, 4, 3, 2, 0, 0);
displayOp(g, 3, 2, 3, 1, 0); displayOp(g, 3, 3, 3, 1, 0);
displayOp(g, 2, 1, 2, 0, 0); displayOp(g, 2, 2, 2, 0, 0);
displayOp(g, 1, 1, 3, 1, 0); displayOp(g, 1, 2, 3, 1, 0);
break; break;
case 6: case 6:
displayOp(g, 6, 3, 1, 0, 1); displayOp(g, 6, 4, 1, 0, 1);
displayOp(g, 5, 3, 2, 7, 0); displayOp(g, 5, 4, 2, 7, 0);
displayOp(g, 4, 2, 2, 0, 0); displayOp(g, 4, 3, 2, 0, 0);
displayOp(g, 3, 2, 3, 2, 0); displayOp(g, 3, 3, 3, 2, 0);
displayOp(g, 2, 1, 2, 0, 0); displayOp(g, 2, 2, 2, 0, 0);
displayOp(g, 1, 1, 3, 1, 0); displayOp(g, 1, 2, 3, 1, 0);
break; break;
case 7: case 7:
displayOp(g, 6, 3, 1, 0, 0); displayOp(g, 6, 4, 1, 0, 0);
displayOp(g, 5, 3, 2, 7, 0); displayOp(g, 5, 4, 2, 7, 0);
displayOp(g, 4, 2, 2, 0, 4); displayOp(g, 4, 3, 2, 0, 4);
displayOp(g, 3, 2, 3, 2, 0); displayOp(g, 3, 3, 3, 2, 0);
displayOp(g, 2, 1, 2, 0, 0); displayOp(g, 2, 2, 2, 0, 0);
displayOp(g, 1, 1, 3, 1, 0); displayOp(g, 1, 2, 3, 1, 0);
break; break;
case 8: case 8:
displayOp(g, 6, 3, 1, 0, 0); displayOp(g, 6, 4, 1, 0, 0);
displayOp(g, 5, 3, 2, 7, 0); displayOp(g, 5, 4, 2, 7, 0);
displayOp(g, 4, 2, 2, 0, 0); displayOp(g, 4, 3, 2, 0, 0);
displayOp(g, 3, 2, 3, 2, 0); displayOp(g, 3, 3, 3, 2, 0);
displayOp(g, 2, 1, 2, 0, 1); displayOp(g, 2, 2, 2, 0, 1);
displayOp(g, 1, 1, 3, 1, 0); displayOp(g, 1, 2, 3, 1, 0);
break; break;
case 9: case 9:
displayOp(g, 6, 2, 2, 0, 0); displayOp(g, 6, 2, 2, 0, 0);
@ -231,36 +225,36 @@ void AlgoDisplay::paint(Graphics &g) {
displayOp(g, 1, 2, 3, 1, 0); displayOp(g, 1, 2, 3, 1, 0);
break; break;
case 15: case 15:
displayOp(g, 6, 3, 1, 0, 1); displayOp(g, 6, 4, 1, 0, 1);
displayOp(g, 5, 3, 2, 7, 0); displayOp(g, 5, 4, 2, 7, 0);
displayOp(g, 4, 2, 1, 0, 0); displayOp(g, 4, 3, 1, 0, 0);
displayOp(g, 3, 2, 2, 0, 0); displayOp(g, 3, 3, 2, 0, 0);
displayOp(g, 2, 1, 2, 1, 0); displayOp(g, 2, 2, 2, 1, 0);
displayOp(g, 1, 2, 3, 0, 0); displayOp(g, 1, 3, 3, 0, 0);
break; break;
case 16: case 16:
displayOp(g, 6, 3, 1, 0, 0); displayOp(g, 6, 4, 1, 0, 0);
displayOp(g, 5, 3, 2, 7, 0); displayOp(g, 5, 4, 2, 7, 0);
displayOp(g, 4, 2, 1, 0, 0); displayOp(g, 4, 3, 1, 0, 0);
displayOp(g, 3, 2, 2, 0, 0); displayOp(g, 3, 3, 2, 0, 0);
displayOp(g, 2, 1, 2, 1, 4); displayOp(g, 2, 2, 2, 1, 4);
displayOp(g, 1, 2, 3, 0, 0); displayOp(g, 1, 3, 3, 0, 0);
break; break;
case 17: case 17:
displayOp(g, 6, 3, 0, 0, 0); displayOp(g, 6, 4, 0, 0, 0);
displayOp(g, 5, 3, 1, 0, 0); displayOp(g, 5, 4, 1, 0, 0);
displayOp(g, 4, 3, 2, 7, 0); displayOp(g, 4, 4, 2, 7, 0);
displayOp(g, 3, 2, 2, 0, 4); displayOp(g, 3, 3, 2, 0, 4);
displayOp(g, 2, 1, 2, 1, 0); displayOp(g, 2, 2, 2, 1, 0);
displayOp(g, 1, 2, 3, 0, 0); displayOp(g, 1, 3, 3, 0, 0);
break; break;
case 18: case 18:
displayOp(g, 6, 2, 2, 0, 1); displayOp(g, 6, 3, 2, 0, 1);
displayOp(g, 5, 3, 3, 2, 0); displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 2, 3, 1, 0); displayOp(g, 4, 3, 3, 1, 0);
displayOp(g, 3, 1, 1, 0, 0); displayOp(g, 3, 2, 1, 0, 0);
displayOp(g, 2, 1, 2, 0, 0); displayOp(g, 2, 2, 2, 0, 0);
displayOp(g, 1, 1, 3, 1, 0); displayOp(g, 1, 2, 3, 1, 0);
break; break;
case 19: case 19:
displayOp(g, 6, 4, 2, 0, 0); displayOp(g, 6, 4, 2, 0, 0);
@ -327,12 +321,12 @@ void AlgoDisplay::paint(Graphics &g) {
displayOp(g, 1, 1, 3, 1, 0); displayOp(g, 1, 1, 3, 1, 0);
break; break;
case 27: case 27:
displayOp(g, 6, 3, 3, 2, 0); displayOp(g, 6, 4, 3, 2, 0);
displayOp(g, 5, 2, 1, 0, 1); displayOp(g, 5, 3, 1, 0, 1);
displayOp(g, 4, 2, 2, 0, 0); displayOp(g, 4, 3, 2, 0, 0);
displayOp(g, 3, 2, 3, 1, 0); displayOp(g, 3, 3, 3, 1, 0);
displayOp(g, 2, 1, 2, 0, 0); displayOp(g, 2, 2, 2, 0, 0);
displayOp(g, 1, 1, 3, 1, 0); displayOp(g, 1, 2, 3, 1, 0);
break; break;
case 28: case 28:
displayOp(g, 6, 4, 2, 0, 1); displayOp(g, 6, 4, 2, 0, 1);

@ -41,12 +41,7 @@ public:
void paint(Graphics &g) { void paint(Graphics &g) {
if ( ! (midi->isInputActive() || midi->isOutputActive() ) ) if ( ! (midi->isInputActive() || midi->isOutputActive() ) )
return; return;
/*g.setColour(DXLookNFeel::lightBackground);
g.fillRoundedRectangle(0, 0, getWidth(), getHeight(), 3);
*/
g.setColour(Colours::white); g.setColour(Colours::white);
// g.drawSingleLineText("DX7 ACT ", 0, 13);
Image myStrip = ImageCache::getFromMemory(BinaryData::Light_14x14_png, BinaryData::Light_14x14_pngSize); Image myStrip = ImageCache::getFromMemory(BinaryData::Light_14x14_png, BinaryData::Light_14x14_pngSize);
@ -95,13 +90,13 @@ GlobalEditor::GlobalEditor ()
addAndMakeVisible (cutoff = new Slider ("cutoff")); addAndMakeVisible (cutoff = new Slider ("cutoff"));
cutoff->setRange (0, 1, 0); cutoff->setRange (0, 1, 0);
cutoff->setSliderStyle (Slider::RotaryVerticalDrag); cutoff->setSliderStyle (Slider::RotaryVerticalDrag);
cutoff->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); cutoff->setTextBoxStyle (Slider::NoTextBox, true, 80, 20);
cutoff->addListener (this); cutoff->addListener (this);
addAndMakeVisible (reso = new Slider ("reso")); addAndMakeVisible (reso = new Slider ("reso"));
reso->setRange (0, 1, 0); reso->setRange (0, 1, 0);
reso->setSliderStyle (Slider::RotaryVerticalDrag); reso->setSliderStyle (Slider::RotaryVerticalDrag);
reso->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); reso->setTextBoxStyle (Slider::NoTextBox, true, 80, 20);
reso->addListener (this); reso->addListener (this);
addAndMakeVisible (pitchRate2 = new Slider ("pitchRate2")); addAndMakeVisible (pitchRate2 = new Slider ("pitchRate2"));
@ -153,9 +148,9 @@ GlobalEditor::GlobalEditor ()
pitchLevel1->addListener (this); pitchLevel1->addListener (this);
addAndMakeVisible (transpose = new Slider ("transpose")); addAndMakeVisible (transpose = new Slider ("transpose"));
transpose->setRange (0, 48, 0); transpose->setRange (0, 48, 1);
transpose->setSliderStyle (Slider::RotaryVerticalDrag); transpose->setSliderStyle (Slider::RotaryVerticalDrag);
transpose->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); transpose->setTextBoxStyle (Slider::NoTextBox, true, 80, 20);
transpose->addListener (this); transpose->addListener (this);
addAndMakeVisible (oscSync = new ToggleButton ("oscSync")); addAndMakeVisible (oscSync = new ToggleButton ("oscSync"));
@ -163,7 +158,7 @@ GlobalEditor::GlobalEditor ()
oscSync->addListener (this); oscSync->addListener (this);
addAndMakeVisible (pitchModSens = new Slider ("pitchModSens")); addAndMakeVisible (pitchModSens = new Slider ("pitchModSens"));
pitchModSens->setRange (0, 7, 0); pitchModSens->setRange (0, 7, 1);
pitchModSens->setSliderStyle (Slider::RotaryVerticalDrag); pitchModSens->setSliderStyle (Slider::RotaryVerticalDrag);
pitchModSens->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); pitchModSens->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
pitchModSens->addListener (this); pitchModSens->addListener (this);
@ -193,10 +188,10 @@ GlobalEditor::GlobalEditor ()
addAndMakeVisible (lcdDisplay = new LcdDisplay()); addAndMakeVisible (lcdDisplay = new LcdDisplay());
lcdDisplay->setName ("lcdDisplay"); lcdDisplay->setName ("lcdDisplay");
addAndMakeVisible (output = new Slider ("cutoff")); addAndMakeVisible (output = new Slider ("output"));
output->setRange (0, 1, 0); output->setRange (0, 1, 0);
output->setSliderStyle (Slider::RotaryVerticalDrag); output->setSliderStyle (Slider::RotaryVerticalDrag);
output->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); output->setTextBoxStyle (Slider::NoTextBox, true, 80, 20);
output->addListener (this); output->addListener (this);
addAndMakeVisible (vuOutput = new VuMeter()); addAndMakeVisible (vuOutput = new VuMeter());
@ -349,7 +344,7 @@ void GlobalEditor::resized()
pitchModSens->setBounds (666, 5, 34, 34); pitchModSens->setBounds (666, 5, 34, 34);
lfoSync->setBounds (567, 96, 48, 26); lfoSync->setBounds (567, 96, 48, 26);
pitchEnvDisplay->setBounds (751, 10, 93, 30); pitchEnvDisplay->setBounds (751, 10, 93, 30);
algoDisplay->setBounds (338, 30, 146, 91); algoDisplay->setBounds (335, 30, 152, 91);
feedback->setBounds (501, 81, 34, 34); feedback->setBounds (501, 81, 34, 34);
algo->setBounds (501, 22, 34, 34); algo->setBounds (501, 22, 34, 34);
lcdDisplay->setBounds (6, 87, 140, 13); lcdDisplay->setBounds (6, 87, 140, 13);
@ -557,36 +552,38 @@ void GlobalEditor::buttonClicked (Button* buttonThatWasClicked)
//[MiscUserCode] You can add your own definitions of your custom methods or any other code here... //[MiscUserCode] You can add your own definitions of your custom methods or any other code here...
void GlobalEditor::bind(DexedAudioProcessor *parent) { void GlobalEditor::bind(DexedAudioProcessorEditor *edit) {
parent->algo->bind(algo); processor = edit->processor;
parent->lfoRate->bind(lfoSpeed); processor->algo->bind(algo);
parent->lfoDelay->bind(lfoDelay); processor->lfoRate->bind(lfoSpeed);
parent->lfoWaveform->bind(lfoType); processor->lfoDelay->bind(lfoDelay);
parent->lfoAmpDepth->bind(lfoAmDepth); processor->lfoWaveform->bind(lfoType);
parent->lfoPitchDepth->bind(lfoPitchDepth); processor->lfoAmpDepth->bind(lfoAmDepth);
parent->lfoSync->bind(lfoSync); processor->lfoPitchDepth->bind(lfoPitchDepth);
parent->oscSync->bind(oscSync); processor->lfoSync->bind(lfoSync);
parent->transpose->bind(transpose); processor->oscSync->bind(oscSync);
parent->feedback->bind(feedback); processor->transpose->bind(transpose);
parent->pitchModSens->bind(pitchModSens); processor->feedback->bind(feedback);
parent->pitchEgLevel[0]->bind(pitchLevel1); processor->pitchModSens->bind(pitchModSens);
parent->pitchEgLevel[1]->bind(pitchLevel2); processor->pitchEgLevel[0]->bind(pitchLevel1);
parent->pitchEgLevel[2]->bind(pitchLevel3); processor->pitchEgLevel[1]->bind(pitchLevel2);
parent->pitchEgLevel[3]->bind(pitchLevel4); processor->pitchEgLevel[2]->bind(pitchLevel3);
parent->pitchEgRate[0]->bind(pitchRate1); processor->pitchEgLevel[3]->bind(pitchLevel4);
parent->pitchEgRate[1]->bind(pitchRate2); processor->pitchEgRate[0]->bind(pitchRate1);
parent->pitchEgRate[2]->bind(pitchRate3); processor->pitchEgRate[1]->bind(pitchRate2);
parent->pitchEgRate[3]->bind(pitchRate4); processor->pitchEgRate[2]->bind(pitchRate3);
parent->fxCutoff->bind(cutoff); processor->pitchEgRate[3]->bind(pitchRate4);
parent->fxReso->bind(reso); processor->fxCutoff->bind(cutoff);
parent->output->bind(output); processor->fxReso->bind(reso);
algoDisplay->algo = &(parent->data[134]); processor->output->bind(output);
pitchEnvDisplay->pvalues = &(parent->data[126]); algoDisplay->algo = &(processor->data[134]);
processor = parent; pitchEnvDisplay->pvalues = &(processor->data[126]);
editor = edit;
midiMonitor = new MidiMonitor(&(processor->sysexComm)); midiMonitor = new MidiMonitor(&(processor->sysexComm));
addAndMakeVisible(midiMonitor); addAndMakeVisible(midiMonitor);
midiMonitor->setBounds(155, 21, 80, 80); midiMonitor->setBounds(155, 21, 80, 45);
repaint(); repaint();
} }
@ -656,11 +653,11 @@ BEGIN_JUCER_METADATA
textBoxWidth="80" textBoxHeight="20" skewFactor="1"/> textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<SLIDER name="cutoff" id="40531f16bb0bd225" memberName="cutoff" virtualName="" <SLIDER name="cutoff" id="40531f16bb0bd225" memberName="cutoff" virtualName=""
explicitFocusOrder="0" pos="234 9 34 34" min="0" max="1" int="0" explicitFocusOrder="0" pos="234 9 34 34" min="0" max="1" int="0"
style="RotaryVerticalDrag" textBoxPos="NoTextBox" textBoxEditable="1" style="RotaryVerticalDrag" textBoxPos="NoTextBox" textBoxEditable="0"
textBoxWidth="80" textBoxHeight="20" skewFactor="1"/> textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<SLIDER name="reso" id="c8c13464e81a8d83" memberName="reso" virtualName="" <SLIDER name="reso" id="c8c13464e81a8d83" memberName="reso" virtualName=""
explicitFocusOrder="0" pos="277 9 34 34" min="0" max="1" int="0" explicitFocusOrder="0" pos="277 9 34 34" min="0" max="1" int="0"
style="RotaryVerticalDrag" textBoxPos="NoTextBox" textBoxEditable="1" style="RotaryVerticalDrag" textBoxPos="NoTextBox" textBoxEditable="0"
textBoxWidth="80" textBoxHeight="20" skewFactor="1"/> textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<SLIDER name="pitchRate2" id="73f386b3c91d3de4" memberName="pitchRate2" <SLIDER name="pitchRate2" id="73f386b3c91d3de4" memberName="pitchRate2"
virtualName="" explicitFocusOrder="0" pos="767 96 34 34" min="0" virtualName="" explicitFocusOrder="0" pos="767 96 34 34" min="0"
@ -696,14 +693,14 @@ BEGIN_JUCER_METADATA
textBoxEditable="1" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/> textBoxEditable="1" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<SLIDER name="transpose" id="7d1266b1c1534947" memberName="transpose" <SLIDER name="transpose" id="7d1266b1c1534947" memberName="transpose"
virtualName="" explicitFocusOrder="0" pos="202 60 34 34" min="0" virtualName="" explicitFocusOrder="0" pos="202 60 34 34" min="0"
max="48" int="0" style="RotaryVerticalDrag" textBoxPos="NoTextBox" max="48" int="1" style="RotaryVerticalDrag" textBoxPos="NoTextBox"
textBoxEditable="1" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/> textBoxEditable="0" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<TOGGLEBUTTON name="oscSync" id="8f3fe641537cd00" memberName="oscSync" virtualName="" <TOGGLEBUTTON name="oscSync" id="8f3fe641537cd00" memberName="oscSync" virtualName=""
explicitFocusOrder="0" pos="650 96 48 26" buttonText="" connectedEdges="0" explicitFocusOrder="0" pos="650 96 48 26" buttonText="" connectedEdges="0"
needsCallback="1" radioGroupId="0" state="0"/> needsCallback="1" radioGroupId="0" state="0"/>
<SLIDER name="pitchModSens" id="904f73df85a9f886" memberName="pitchModSens" <SLIDER name="pitchModSens" id="904f73df85a9f886" memberName="pitchModSens"
virtualName="" explicitFocusOrder="0" pos="666 5 34 34" min="0" virtualName="" explicitFocusOrder="0" pos="666 5 34 34" min="0"
max="7" int="0" style="RotaryVerticalDrag" textBoxPos="NoTextBox" max="7" int="1" style="RotaryVerticalDrag" textBoxPos="NoTextBox"
textBoxEditable="1" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/> textBoxEditable="1" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<TOGGLEBUTTON name="lfoSync" id="ff92bb0a5a4f7187" memberName="lfoSync" virtualName="" <TOGGLEBUTTON name="lfoSync" id="ff92bb0a5a4f7187" memberName="lfoSync" virtualName=""
explicitFocusOrder="0" pos="567 96 48 26" buttonText="" connectedEdges="0" explicitFocusOrder="0" pos="567 96 48 26" buttonText="" connectedEdges="0"
@ -712,7 +709,7 @@ BEGIN_JUCER_METADATA
virtualName="" explicitFocusOrder="0" pos="751 10 93 30" class="PitchEnvDisplay" virtualName="" explicitFocusOrder="0" pos="751 10 93 30" class="PitchEnvDisplay"
params=""/> params=""/>
<GENERICCOMPONENT name="algoDisplay" id="b26fb9e3b5f0bc37" memberName="algoDisplay" <GENERICCOMPONENT name="algoDisplay" id="b26fb9e3b5f0bc37" memberName="algoDisplay"
virtualName="" explicitFocusOrder="0" pos="338 30 146 91" class="AlgoDisplay" virtualName="" explicitFocusOrder="0" pos="335 30 152 91" class="AlgoDisplay"
params=""/> params=""/>
<SLIDER name="feedback" id="4fac1940c29ab8c" memberName="feedback" virtualName="" <SLIDER name="feedback" id="4fac1940c29ab8c" memberName="feedback" virtualName=""
explicitFocusOrder="0" pos="501 81 34 34" min="0" max="7" int="1" explicitFocusOrder="0" pos="501 81 34 34" min="0" max="7" int="1"
@ -725,9 +722,9 @@ BEGIN_JUCER_METADATA
<GENERICCOMPONENT name="lcdDisplay" id="30c7bb8f114cbbe3" memberName="lcdDisplay" <GENERICCOMPONENT name="lcdDisplay" id="30c7bb8f114cbbe3" memberName="lcdDisplay"
virtualName="" explicitFocusOrder="0" pos="6 87 140 13" class="LcdDisplay" virtualName="" explicitFocusOrder="0" pos="6 87 140 13" class="LcdDisplay"
params=""/> params=""/>
<SLIDER name="cutoff" id="7697fdd54fd1593e" memberName="output" virtualName="" <SLIDER name="output" id="7697fdd54fd1593e" memberName="output" virtualName=""
explicitFocusOrder="0" pos="157 60 34 34" min="0" max="1" int="0" explicitFocusOrder="0" pos="157 60 34 34" min="0" max="1" int="0"
style="RotaryVerticalDrag" textBoxPos="NoTextBox" textBoxEditable="1" style="RotaryVerticalDrag" textBoxPos="NoTextBox" textBoxEditable="0"
textBoxWidth="80" textBoxHeight="20" skewFactor="1"/> textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<GENERICCOMPONENT name="vuOutput" id="dac75af912267f51" memberName="vuOutput" virtualName="" <GENERICCOMPONENT name="vuOutput" id="dac75af912267f51" memberName="vuOutput" virtualName=""
explicitFocusOrder="0" pos="6 103 140 8" class="VuMeter" params=""/> explicitFocusOrder="0" pos="6 103 140 8" class="VuMeter" params=""/>

@ -50,7 +50,7 @@ public:
//============================================================================== //==============================================================================
//[UserMethods] -- You can add your own custom methods in this section. //[UserMethods] -- You can add your own custom methods in this section.
void bind(DexedAudioProcessor *processor); void bind(DexedAudioProcessorEditor *processor);
void setSystemMessage(String msg); void setSystemMessage(String msg);
void setParamMessage(String msg); void setParamMessage(String msg);
void updatePitchPos(int pos); void updatePitchPos(int pos);
@ -58,12 +58,8 @@ public:
void updateDisplay(); void updateDisplay();
void repaintMsg(); void repaintMsg();
DexedAudioProcessorEditor *editor;
void setMonoState(bool state); void setMonoState(bool state);
ProgramSelector *programs; ProgramSelector *programs;
ScopedPointer<Component> midiMonitor; ScopedPointer<Component> midiMonitor;
//[/UserMethods] //[/UserMethods]
@ -79,6 +75,7 @@ public:
private: private:
//[UserVariables] -- You can add your own custom variables in this section. //[UserVariables] -- You can add your own custom variables in this section.
DexedAudioProcessorEditor *editor;
DexedAudioProcessor *processor; DexedAudioProcessor *processor;
//[/UserVariables] //[/UserVariables]

@ -443,8 +443,10 @@ void OperatorEditor::bind(DexedAudioProcessor *parent, int op) {
int offset = parent->opCtrl[op].egRate[0]->getOffset(); int offset = parent->opCtrl[op].egRate[0]->getOffset();
envDisplay->pvalues = &(parent->data[offset]); envDisplay->pvalues = &(parent->data[offset]);
processor = parent;
opNum << op + 1; opNum << op + 1;
internalOp = 5-op;
} }
void OperatorEditor::updateGain(float v) { void OperatorEditor::updateGain(float v) {
@ -483,6 +485,32 @@ void OperatorEditor::updateEnvPos(char pos) {
envDisplay->vPos = pos; envDisplay->vPos = pos;
envDisplay->repaint(); envDisplay->repaint();
} }
void OperatorEditor::mouseDown(const MouseEvent &event) {
if ( event.mods.isRightButtonDown() ) {
PopupMenu popup;
popup.addItem(1, "Copy Operator Values");
popup.addItem(2, "Paste Enveloppes Values", processor->hasClipboardContent());
popup.addItem(3, "Paste Operator Values", processor->hasClipboardContent());
switch(popup.show()) {
case 1:
processor->copyToClipboard(internalOp);
break;
case 2:
processor->pasteEnvFromClipboard(internalOp);
break;
case 3:
processor->pasteOpFromClipboard(internalOp);
break;
}
}
}
//[/MiscUserCode] //[/MiscUserCode]

@ -53,6 +53,7 @@ public:
void updateGain(float v); void updateGain(float v);
void updateDisplay(); void updateDisplay();
void updateEnvPos(char pos); void updateEnvPos(char pos);
void mouseDown(const MouseEvent& e) override;
//[/UserMethods] //[/UserMethods]
void paint (Graphics& g); void paint (Graphics& g);
@ -68,6 +69,9 @@ public:
private: private:
//[UserVariables] -- You can add your own custom variables in this section. //[UserVariables] -- You can add your own custom variables in this section.
String opNum; String opNum;
int internalOp;
DexedAudioProcessor *processor;
//[/UserVariables] //[/UserVariables]
//============================================================================== //==============================================================================

@ -262,6 +262,25 @@ void DexedAudioProcessor::resetToInitVoice() {
triggerAsyncUpdate(); triggerAsyncUpdate();
} }
void DexedAudioProcessor::copyToClipboard(int srcOp) {
memcpy(clipboard, data, 161);
clipboardContent = srcOp;
}
void DexedAudioProcessor::pasteOpFromClipboard(int destOp) {
memcpy(data+(destOp*21), clipboard+(clipboardContent*21), 21);
triggerAsyncUpdate();
}
void DexedAudioProcessor::pasteEnvFromClipboard(int destOp) {
memcpy(data+(destOp*21), clipboard+(clipboardContent*21), 8);
triggerAsyncUpdate();
}
bool DexedAudioProcessor::hasClipboardContent() {
return clipboardContent != -1;
}
//============================================================================== //==============================================================================
void DexedAudioProcessor::getStateInformation(MemoryBlock& destData) { void DexedAudioProcessor::getStateInformation(MemoryBlock& destData) {
// You should use this method to store your parameters in the memory block. // You should use this method to store your parameters in the memory block.

@ -104,10 +104,9 @@ DexedAudioProcessorEditor::DexedAudioProcessorEditor (DexedAudioProcessor* owner
midiKeyboard.setBounds(4, 583, getWidth() - 8, 90); midiKeyboard.setBounds(4, 583, getWidth() - 8, 90);
global.editor = this;
addAndMakeVisible(&global); addAndMakeVisible(&global);
global.setBounds(2,437,864,144); global.setBounds(2,437,864,144);
global.bind(processor); global.bind(this);
sendPopup.addItem(1, "Send program to DX7"); sendPopup.addItem(1, "Send program to DX7");
sendPopup.addItem(2, "Send cartridge to DX7"); sendPopup.addItem(2, "Send cartridge to DX7");

@ -76,6 +76,7 @@ DexedAudioProcessor::DexedAudioProcessor() {
nextMidi = NULL; nextMidi = NULL;
midiMsg = NULL; midiMsg = NULL;
clipboardContent = -1;
} }
DexedAudioProcessor::~DexedAudioProcessor() { DexedAudioProcessor::~DexedAudioProcessor() {

@ -114,6 +114,9 @@ class DexedAudioProcessor : public AudioProcessor, public AsyncUpdater, public
EngineMkI engineMkI; EngineMkI engineMkI;
EngineOpl engineOpl; EngineOpl engineOpl;
char clipboard[161];
char clipboardContent;
public : public :
// in MIDI units (0x4000 is neutral) // in MIDI units (0x4000 is neutral)
@ -122,6 +125,7 @@ public :
char sysex[4096]; char sysex[4096];
char data[161]; char data[161];
CartridgeManager cartManager; CartridgeManager cartManager;
SysexComm sysexComm; SysexComm sysexComm;
@ -174,6 +178,11 @@ public :
} }
void setMonoMode(bool mode); void setMonoMode(bool mode);
void copyToClipboard(int srcOp);
void pasteOpFromClipboard(int destOp);
void pasteEnvFromClipboard(int destOp);
bool hasClipboardContent();
//============================================================================== //==============================================================================
AudioProcessorEditor* createEditor(); AudioProcessorEditor* createEditor();
bool hasEditor() const; bool hasEditor() const;

Loading…
Cancel
Save