Algo numbering + Copy/Paste settings for ops.

pull/1/head
asb2m10 10 years ago
parent cd668063df
commit a182f23eb8
  1. 4838
      Builds/MacOSX/Dexed.xcodeproj/project.pbxproj
  2. BIN
      Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate
  3. 7
      README.md
  4. 544
      Source/AlgoDisplay.cpp
  5. 93
      Source/GlobalEditor.cpp
  6. 7
      Source/GlobalEditor.h
  7. 30
      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
---------
#### Version 0.8.0
* New UI
* New UI by [AZur Studio](http://bji.yukihotaru.com/)
* Fixed mono mode ticks on lower frequencies
* SynprezFM preset are now in a submenu
@ -131,7 +131,7 @@ FAQ (possibly)
Credits & thanks
----------------
* 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
* 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))
@ -147,7 +147,8 @@ Planned milestones
TODO - Dexed
------------
* 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
* AU Version

@ -20,24 +20,25 @@
#include "AlgoDisplay.h"
#include "DXLookNFeel.h"
#include "Dexed.h"
AlgoDisplay::AlgoDisplay() {
static char tmpAlgo = 0;
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;
String t(id);
x *= 25;
x += 3;
y *= 21;
y += 5;
g.setColour(Colours::white);
g.drawText(t, x, y, 16, 12, Justification::centred, true);
g.setGradientFill(ColourGradient());
g.setColour(DXLookNFeel::fillColour);
switch(link) {
case 0 : // LINE DOWN
@ -49,18 +50,6 @@ inline void displayOp(Graphics &g, char id, char x, char y, char link, char fb)
break;
case 2: // ARROW TO RIGHT JOIN
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;
case 6:
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+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+57, x+19, y+59, LINE_SZ);
g.drawLine(x+8, y+58, x+19, y+58, LINE_SZ);
break;
case 3: // ALGO 6
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+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);
break;
case 4:
@ -109,265 +96,272 @@ inline void displayOp(Graphics &g, char id, char x, char y, char link, char fb)
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) {
case 0:
displayOp(g, 6, 3, 0, 0, 1);
displayOp(g, 5, 3, 1, 0, 0);
displayOp(g, 4, 3, 2, 0, 0);
displayOp(g, 3, 3, 3, 2, 0);
displayOp(g, 2, 2, 2, 0, 0);
displayOp(g, 1, 2, 3, 1, 0);
break;
case 1:
displayOp(g, 6, 3, 0, 0, 0);
displayOp(g, 5, 3, 1, 0, 0);
displayOp(g, 4, 3, 2, 0, 0);
displayOp(g, 3, 3, 3, 2, 0);
displayOp(g, 2, 2, 2, 0, 1);
displayOp(g, 1, 2, 3, 1, 0);
break;
case 2:
displayOp(g, 6, 3, 1, 0, 1);
displayOp(g, 5, 3, 2, 0, 0);
displayOp(g, 4, 3, 3, 2, 0);
displayOp(g, 3, 2, 1, 0, 0);
displayOp(g, 2, 2, 2, 0, 0);
displayOp(g, 1, 2, 3, 1, 0);
break;
case 3: //
displayOp(g, 6, 3, 1, 0, 2);
displayOp(g, 5, 3, 2, 0, 0);
displayOp(g, 4, 3, 3, 2, 0);
displayOp(g, 3, 2, 1, 0, 0);
displayOp(g, 2, 2, 2, 0, 0);
displayOp(g, 1, 2, 3, 1, 0);
break;
case 4:
displayOp(g, 6, 3, 2, 0, 1);
displayOp(g, 5, 3, 3, 2, 0);
displayOp(g, 4, 2, 2, 0, 0);
displayOp(g, 3, 2, 3, 1, 0);
displayOp(g, 2, 1, 2, 0, 0);
displayOp(g, 1, 1, 3, 1, 0);
break;
case 5: //
displayOp(g, 6, 3, 2, 0, 3);
displayOp(g, 5, 3, 3, 2, 0);
displayOp(g, 4, 2, 2, 0, 0);
displayOp(g, 3, 2, 3, 1, 0);
displayOp(g, 2, 1, 2, 0, 0);
displayOp(g, 1, 1, 3, 1, 0);
break;
case 6:
displayOp(g, 6, 3, 1, 0, 1);
displayOp(g, 5, 3, 2, 7, 0);
displayOp(g, 4, 2, 2, 0, 0);
displayOp(g, 3, 2, 3, 2, 0);
displayOp(g, 2, 1, 2, 0, 0);
displayOp(g, 1, 1, 3, 1, 0);
break;
case 7:
displayOp(g, 6, 3, 1, 0, 0);
displayOp(g, 5, 3, 2, 7, 0);
displayOp(g, 4, 2, 2, 0, 4);
displayOp(g, 3, 2, 3, 2, 0);
displayOp(g, 2, 1, 2, 0, 0);
displayOp(g, 1, 1, 3, 1, 0);
break;
case 8:
displayOp(g, 6, 3, 1, 0, 0);
displayOp(g, 5, 3, 2, 7, 0);
displayOp(g, 4, 2, 2, 0, 0);
displayOp(g, 3, 2, 3, 2, 0);
displayOp(g, 2, 1, 2, 0, 1);
displayOp(g, 1, 1, 3, 1, 0);
break;
case 9:
displayOp(g, 6, 2, 2, 0, 0);
displayOp(g, 5, 1, 2, 1, 0);
displayOp(g, 4, 2, 3, 1, 0);
displayOp(g, 3, 3, 1, 0, 1);
displayOp(g, 2, 3, 2, 0, 0);
displayOp(g, 1, 3, 3, 2, 0);
break;
case 10:
displayOp(g, 6, 2, 2, 0, 1);
displayOp(g, 5, 1, 2, 1, 0);
displayOp(g, 4, 2, 3, 1, 0);
displayOp(g, 3, 3, 1, 0, 0);
displayOp(g, 2, 3, 2, 0, 0);
displayOp(g, 1, 3, 3, 2, 0);
break;
case 11:
displayOp(g, 6, 3, 2, 7, 0);
displayOp(g, 5, 2, 2, 0, 0);
displayOp(g, 4, 1, 2, 1, 0);
displayOp(g, 3, 2, 3, 6, 0);
displayOp(g, 2, 4, 2, 0, 1);
displayOp(g, 1, 4, 3, 2, 0);
break;
case 12:
displayOp(g, 6, 3, 2, 7, 1);
displayOp(g, 5, 2, 2, 0, 0);
displayOp(g, 4, 1, 2, 1, 0);
displayOp(g, 3, 2, 3, 6, 0);
displayOp(g, 2, 4, 2, 0, 0);
displayOp(g, 1, 4, 3, 2, 0);
break;
case 13:
displayOp(g, 6, 3, 1, 0, 1);
displayOp(g, 5, 2, 1, 1, 0);
displayOp(g, 4, 3, 2, 0, 0);
displayOp(g, 3, 3, 3, 2, 0);
displayOp(g, 2, 2, 2, 0, 0);
displayOp(g, 1, 2, 3, 1, 0);
break;
case 14:
displayOp(g, 6, 3, 1, 0, 0);
displayOp(g, 5, 2, 1, 1, 0);
displayOp(g, 4, 3, 2, 0, 0);
displayOp(g, 3, 3, 3, 2, 0);
displayOp(g, 2, 2, 2, 0, 4);
displayOp(g, 1, 2, 3, 1, 0);
break;
case 15:
displayOp(g, 6, 3, 1, 0, 1);
displayOp(g, 5, 3, 2, 7, 0);
displayOp(g, 4, 2, 1, 0, 0);
displayOp(g, 3, 2, 2, 0, 0);
displayOp(g, 2, 1, 2, 1, 0);
displayOp(g, 1, 2, 3, 0, 0);
break;
case 16:
displayOp(g, 6, 3, 1, 0, 0);
displayOp(g, 5, 3, 2, 7, 0);
displayOp(g, 4, 2, 1, 0, 0);
displayOp(g, 3, 2, 2, 0, 0);
displayOp(g, 2, 1, 2, 1, 4);
displayOp(g, 1, 2, 3, 0, 0);
break;
case 17:
displayOp(g, 6, 3, 0, 0, 0);
displayOp(g, 5, 3, 1, 0, 0);
displayOp(g, 4, 3, 2, 7, 0);
displayOp(g, 3, 2, 2, 0, 4);
displayOp(g, 2, 1, 2, 1, 0);
displayOp(g, 1, 2, 3, 0, 0);
break;
case 18:
displayOp(g, 6, 2, 2, 0, 1);
displayOp(g, 5, 3, 3, 2, 0);
displayOp(g, 4, 2, 3, 1, 0);
displayOp(g, 3, 1, 1, 0, 0);
displayOp(g, 2, 1, 2, 0, 0);
displayOp(g, 1, 1, 3, 1, 0);
break;
case 19:
displayOp(g, 6, 4, 2, 0, 0);
displayOp(g, 5, 3, 2, 1, 0);
displayOp(g, 4, 4, 3, 2, 0);
displayOp(g, 3, 1, 2, 0, 1);
displayOp(g, 2, 2, 3, 6, 0);
displayOp(g, 1, 1, 3, 1, 0);
break;
case 20:
displayOp(g, 6, 3, 2, 0, 0);
displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 3, 3, 1, 0);
displayOp(g, 3, 1, 2, 0, 1);
displayOp(g, 2, 2, 3, 1, 0);
displayOp(g, 1, 1, 3, 1, 0);
break;
case 21:
displayOp(g, 6, 3, 2, 0, 1);
displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 3, 3, 1, 0);
displayOp(g, 3, 2, 3, 1, 0);
displayOp(g, 2, 1, 2, 0, 0);
displayOp(g, 1, 1, 3, 1, 0);
break;
case 22: // CC
displayOp(g, 6, 3, 2, 0, 1);
displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 3, 3, 1, 0);
displayOp(g, 3, 2, 2, 0, 0);
displayOp(g, 2, 2, 3, 1, 0);
displayOp(g, 1, 1, 3, 1, 0);
break;
case 23: // CC
displayOp(g, 6, 3, 2, 0, 1);
displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 3, 3, 1, 0);
displayOp(g, 3, 2, 3, 1, 0);
displayOp(g, 2, 1, 3, 1, 0);
displayOp(g, 1, 0, 3, 1, 0);
break;
case 24: // CC
displayOp(g, 6, 3, 2, 0, 1);
displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 3, 3, 1, 0);
displayOp(g, 3, 2, 3, 1, 0);
displayOp(g, 2, 1, 3, 1, 0);
displayOp(g, 1, 0, 3, 1, 0);
break;
case 25:
displayOp(g, 6, 4, 2, 0, 1);
displayOp(g, 5, 3, 2, 1, 0);
displayOp(g, 4, 4, 3, 2, 0);
displayOp(g, 3, 2, 2, 0, 0);
displayOp(g, 2, 2, 3, 6, 0);
displayOp(g, 1, 1, 3, 1, 0);
break;
case 26:
displayOp(g, 6, 4, 2, 0, 0);
displayOp(g, 5, 3, 2, 1, 0);
displayOp(g, 4, 4, 3, 2, 0);
displayOp(g, 3, 2, 2, 0, 1);
displayOp(g, 2, 2, 3, 6, 0);
displayOp(g, 1, 1, 3, 1, 0);
break;
case 27:
displayOp(g, 6, 3, 3, 2, 0);
displayOp(g, 5, 2, 1, 0, 1);
displayOp(g, 4, 2, 2, 0, 0);
displayOp(g, 3, 2, 3, 1, 0);
displayOp(g, 2, 1, 2, 0, 0);
displayOp(g, 1, 1, 3, 1, 0);
break;
case 28:
displayOp(g, 6, 4, 2, 0, 1);
displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 3, 2, 0, 0);
displayOp(g, 3, 3, 3, 1, 0);
displayOp(g, 2, 2, 3, 1, 0);
displayOp(g, 1, 1, 3, 1, 0);
break;
case 29:
displayOp(g, 6, 4, 3, 2, 0);
displayOp(g, 5, 3, 1, 0, 1);
displayOp(g, 4, 3, 2, 0, 0);
displayOp(g, 3, 3, 3, 1, 0);
displayOp(g, 2, 2, 3, 1, 0);
displayOp(g, 1, 1, 3, 1, 0);
break;
case 30:
displayOp(g, 6, 4, 2, 0, 1);
displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 3, 3, 1, 0);
displayOp(g, 3, 2, 3, 1, 0);
displayOp(g, 2, 1, 3, 1, 0);
displayOp(g, 1, 0, 3, 1, 0);
break;
case 31:
displayOp(g, 6, 5, 3, 2, 1);
displayOp(g, 5, 4, 3, 1, 0);
displayOp(g, 4, 3, 3, 1, 0);
displayOp(g, 3, 2, 3, 1, 0);
displayOp(g, 2, 1, 3, 1, 0);
displayOp(g, 1, 0, 3, 1, 0);
break;
default:
break;
case 0:
displayOp(g, 6, 3, 0, 0, 1);
displayOp(g, 5, 3, 1, 0, 0);
displayOp(g, 4, 3, 2, 0, 0);
displayOp(g, 3, 3, 3, 2, 0);
displayOp(g, 2, 2, 2, 0, 0);
displayOp(g, 1, 2, 3, 1, 0);
break;
case 1:
displayOp(g, 6, 3, 0, 0, 0);
displayOp(g, 5, 3, 1, 0, 0);
displayOp(g, 4, 3, 2, 0, 0);
displayOp(g, 3, 3, 3, 2, 0);
displayOp(g, 2, 2, 2, 0, 1);
displayOp(g, 1, 2, 3, 1, 0);
break;
case 2:
displayOp(g, 6, 3, 1, 0, 1);
displayOp(g, 5, 3, 2, 0, 0);
displayOp(g, 4, 3, 3, 2, 0);
displayOp(g, 3, 2, 1, 0, 0);
displayOp(g, 2, 2, 2, 0, 0);
displayOp(g, 1, 2, 3, 1, 0);
break;
case 3: //
displayOp(g, 6, 3, 1, 0, 2);
displayOp(g, 5, 3, 2, 0, 0);
displayOp(g, 4, 3, 3, 2, 0);
displayOp(g, 3, 2, 1, 0, 0);
displayOp(g, 2, 2, 2, 0, 0);
displayOp(g, 1, 2, 3, 1, 0);
break;
case 4:
displayOp(g, 6, 4, 2, 0, 1);
displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 3, 2, 0, 0);
displayOp(g, 3, 3, 3, 1, 0);
displayOp(g, 2, 2, 2, 0, 0);
displayOp(g, 1, 2, 3, 1, 0);
break;
case 5: //
displayOp(g, 6, 4, 2, 0, 3);
displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 3, 2, 0, 0);
displayOp(g, 3, 3, 3, 1, 0);
displayOp(g, 2, 2, 2, 0, 0);
displayOp(g, 1, 2, 3, 1, 0);
break;
case 6:
displayOp(g, 6, 4, 1, 0, 1);
displayOp(g, 5, 4, 2, 7, 0);
displayOp(g, 4, 3, 2, 0, 0);
displayOp(g, 3, 3, 3, 2, 0);
displayOp(g, 2, 2, 2, 0, 0);
displayOp(g, 1, 2, 3, 1, 0);
break;
case 7:
displayOp(g, 6, 4, 1, 0, 0);
displayOp(g, 5, 4, 2, 7, 0);
displayOp(g, 4, 3, 2, 0, 4);
displayOp(g, 3, 3, 3, 2, 0);
displayOp(g, 2, 2, 2, 0, 0);
displayOp(g, 1, 2, 3, 1, 0);
break;
case 8:
displayOp(g, 6, 4, 1, 0, 0);
displayOp(g, 5, 4, 2, 7, 0);
displayOp(g, 4, 3, 2, 0, 0);
displayOp(g, 3, 3, 3, 2, 0);
displayOp(g, 2, 2, 2, 0, 1);
displayOp(g, 1, 2, 3, 1, 0);
break;
case 9:
displayOp(g, 6, 2, 2, 0, 0);
displayOp(g, 5, 1, 2, 1, 0);
displayOp(g, 4, 2, 3, 1, 0);
displayOp(g, 3, 3, 1, 0, 1);
displayOp(g, 2, 3, 2, 0, 0);
displayOp(g, 1, 3, 3, 2, 0);
break;
case 10:
displayOp(g, 6, 2, 2, 0, 1);
displayOp(g, 5, 1, 2, 1, 0);
displayOp(g, 4, 2, 3, 1, 0);
displayOp(g, 3, 3, 1, 0, 0);
displayOp(g, 2, 3, 2, 0, 0);
displayOp(g, 1, 3, 3, 2, 0);
break;
case 11:
displayOp(g, 6, 3, 2, 7, 0);
displayOp(g, 5, 2, 2, 0, 0);
displayOp(g, 4, 1, 2, 1, 0);
displayOp(g, 3, 2, 3, 6, 0);
displayOp(g, 2, 4, 2, 0, 1);
displayOp(g, 1, 4, 3, 2, 0);
break;
case 12:
displayOp(g, 6, 3, 2, 7, 1);
displayOp(g, 5, 2, 2, 0, 0);
displayOp(g, 4, 1, 2, 1, 0);
displayOp(g, 3, 2, 3, 6, 0);
displayOp(g, 2, 4, 2, 0, 0);
displayOp(g, 1, 4, 3, 2, 0);
break;
case 13:
displayOp(g, 6, 3, 1, 0, 1);
displayOp(g, 5, 2, 1, 1, 0);
displayOp(g, 4, 3, 2, 0, 0);
displayOp(g, 3, 3, 3, 2, 0);
displayOp(g, 2, 2, 2, 0, 0);
displayOp(g, 1, 2, 3, 1, 0);
break;
case 14:
displayOp(g, 6, 3, 1, 0, 0);
displayOp(g, 5, 2, 1, 1, 0);
displayOp(g, 4, 3, 2, 0, 0);
displayOp(g, 3, 3, 3, 2, 0);
displayOp(g, 2, 2, 2, 0, 4);
displayOp(g, 1, 2, 3, 1, 0);
break;
case 15:
displayOp(g, 6, 4, 1, 0, 1);
displayOp(g, 5, 4, 2, 7, 0);
displayOp(g, 4, 3, 1, 0, 0);
displayOp(g, 3, 3, 2, 0, 0);
displayOp(g, 2, 2, 2, 1, 0);
displayOp(g, 1, 3, 3, 0, 0);
break;
case 16:
displayOp(g, 6, 4, 1, 0, 0);
displayOp(g, 5, 4, 2, 7, 0);
displayOp(g, 4, 3, 1, 0, 0);
displayOp(g, 3, 3, 2, 0, 0);
displayOp(g, 2, 2, 2, 1, 4);
displayOp(g, 1, 3, 3, 0, 0);
break;
case 17:
displayOp(g, 6, 4, 0, 0, 0);
displayOp(g, 5, 4, 1, 0, 0);
displayOp(g, 4, 4, 2, 7, 0);
displayOp(g, 3, 3, 2, 0, 4);
displayOp(g, 2, 2, 2, 1, 0);
displayOp(g, 1, 3, 3, 0, 0);
break;
case 18:
displayOp(g, 6, 3, 2, 0, 1);
displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 3, 3, 1, 0);
displayOp(g, 3, 2, 1, 0, 0);
displayOp(g, 2, 2, 2, 0, 0);
displayOp(g, 1, 2, 3, 1, 0);
break;
case 19:
displayOp(g, 6, 4, 2, 0, 0);
displayOp(g, 5, 3, 2, 1, 0);
displayOp(g, 4, 4, 3, 2, 0);
displayOp(g, 3, 1, 2, 0, 1);
displayOp(g, 2, 2, 3, 6, 0);
displayOp(g, 1, 1, 3, 1, 0);
break;
case 20:
displayOp(g, 6, 3, 2, 0, 0);
displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 3, 3, 1, 0);
displayOp(g, 3, 1, 2, 0, 1);
displayOp(g, 2, 2, 3, 1, 0);
displayOp(g, 1, 1, 3, 1, 0);
break;
case 21:
displayOp(g, 6, 3, 2, 0, 1);
displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 3, 3, 1, 0);
displayOp(g, 3, 2, 3, 1, 0);
displayOp(g, 2, 1, 2, 0, 0);
displayOp(g, 1, 1, 3, 1, 0);
break;
case 22: // CC
displayOp(g, 6, 3, 2, 0, 1);
displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 3, 3, 1, 0);
displayOp(g, 3, 2, 2, 0, 0);
displayOp(g, 2, 2, 3, 1, 0);
displayOp(g, 1, 1, 3, 1, 0);
break;
case 23: // CC
displayOp(g, 6, 3, 2, 0, 1);
displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 3, 3, 1, 0);
displayOp(g, 3, 2, 3, 1, 0);
displayOp(g, 2, 1, 3, 1, 0);
displayOp(g, 1, 0, 3, 1, 0);
break;
case 24: // CC
displayOp(g, 6, 3, 2, 0, 1);
displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 3, 3, 1, 0);
displayOp(g, 3, 2, 3, 1, 0);
displayOp(g, 2, 1, 3, 1, 0);
displayOp(g, 1, 0, 3, 1, 0);
break;
case 25:
displayOp(g, 6, 4, 2, 0, 1);
displayOp(g, 5, 3, 2, 1, 0);
displayOp(g, 4, 4, 3, 2, 0);
displayOp(g, 3, 2, 2, 0, 0);
displayOp(g, 2, 2, 3, 6, 0);
displayOp(g, 1, 1, 3, 1, 0);
break;
case 26:
displayOp(g, 6, 4, 2, 0, 0);
displayOp(g, 5, 3, 2, 1, 0);
displayOp(g, 4, 4, 3, 2, 0);
displayOp(g, 3, 2, 2, 0, 1);
displayOp(g, 2, 2, 3, 6, 0);
displayOp(g, 1, 1, 3, 1, 0);
break;
case 27:
displayOp(g, 6, 4, 3, 2, 0);
displayOp(g, 5, 3, 1, 0, 1);
displayOp(g, 4, 3, 2, 0, 0);
displayOp(g, 3, 3, 3, 1, 0);
displayOp(g, 2, 2, 2, 0, 0);
displayOp(g, 1, 2, 3, 1, 0);
break;
case 28:
displayOp(g, 6, 4, 2, 0, 1);
displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 3, 2, 0, 0);
displayOp(g, 3, 3, 3, 1, 0);
displayOp(g, 2, 2, 3, 1, 0);
displayOp(g, 1, 1, 3, 1, 0);
break;
case 29:
displayOp(g, 6, 4, 3, 2, 0);
displayOp(g, 5, 3, 1, 0, 1);
displayOp(g, 4, 3, 2, 0, 0);
displayOp(g, 3, 3, 3, 1, 0);
displayOp(g, 2, 2, 3, 1, 0);
displayOp(g, 1, 1, 3, 1, 0);
break;
case 30:
displayOp(g, 6, 4, 2, 0, 1);
displayOp(g, 5, 4, 3, 2, 0);
displayOp(g, 4, 3, 3, 1, 0);
displayOp(g, 3, 2, 3, 1, 0);
displayOp(g, 2, 1, 3, 1, 0);
displayOp(g, 1, 0, 3, 1, 0);
break;
case 31:
displayOp(g, 6, 5, 3, 2, 1);
displayOp(g, 5, 4, 3, 1, 0);
displayOp(g, 4, 3, 3, 1, 0);
displayOp(g, 3, 2, 3, 1, 0);
displayOp(g, 2, 1, 3, 1, 0);
displayOp(g, 1, 0, 3, 1, 0);
break;
default:
break;
}
}

@ -41,12 +41,7 @@ public:
void paint(Graphics &g) {
if ( ! (midi->isInputActive() || midi->isOutputActive() ) )
return;
/*g.setColour(DXLookNFeel::lightBackground);
g.fillRoundedRectangle(0, 0, getWidth(), getHeight(), 3);
*/
g.setColour(Colours::white);
// g.drawSingleLineText("DX7 ACT ", 0, 13);
Image myStrip = ImageCache::getFromMemory(BinaryData::Light_14x14_png, BinaryData::Light_14x14_pngSize);
@ -95,13 +90,13 @@ GlobalEditor::GlobalEditor ()
addAndMakeVisible (cutoff = new Slider ("cutoff"));
cutoff->setRange (0, 1, 0);
cutoff->setSliderStyle (Slider::RotaryVerticalDrag);
cutoff->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
cutoff->setTextBoxStyle (Slider::NoTextBox, true, 80, 20);
cutoff->addListener (this);
addAndMakeVisible (reso = new Slider ("reso"));
reso->setRange (0, 1, 0);
reso->setSliderStyle (Slider::RotaryVerticalDrag);
reso->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
reso->setTextBoxStyle (Slider::NoTextBox, true, 80, 20);
reso->addListener (this);
addAndMakeVisible (pitchRate2 = new Slider ("pitchRate2"));
@ -153,9 +148,9 @@ GlobalEditor::GlobalEditor ()
pitchLevel1->addListener (this);
addAndMakeVisible (transpose = new Slider ("transpose"));
transpose->setRange (0, 48, 0);
transpose->setRange (0, 48, 1);
transpose->setSliderStyle (Slider::RotaryVerticalDrag);
transpose->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
transpose->setTextBoxStyle (Slider::NoTextBox, true, 80, 20);
transpose->addListener (this);
addAndMakeVisible (oscSync = new ToggleButton ("oscSync"));
@ -163,7 +158,7 @@ GlobalEditor::GlobalEditor ()
oscSync->addListener (this);
addAndMakeVisible (pitchModSens = new Slider ("pitchModSens"));
pitchModSens->setRange (0, 7, 0);
pitchModSens->setRange (0, 7, 1);
pitchModSens->setSliderStyle (Slider::RotaryVerticalDrag);
pitchModSens->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
pitchModSens->addListener (this);
@ -193,10 +188,10 @@ GlobalEditor::GlobalEditor ()
addAndMakeVisible (lcdDisplay = new LcdDisplay());
lcdDisplay->setName ("lcdDisplay");
addAndMakeVisible (output = new Slider ("cutoff"));
addAndMakeVisible (output = new Slider ("output"));
output->setRange (0, 1, 0);
output->setSliderStyle (Slider::RotaryVerticalDrag);
output->setTextBoxStyle (Slider::NoTextBox, false, 80, 20);
output->setTextBoxStyle (Slider::NoTextBox, true, 80, 20);
output->addListener (this);
addAndMakeVisible (vuOutput = new VuMeter());
@ -349,7 +344,7 @@ void GlobalEditor::resized()
pitchModSens->setBounds (666, 5, 34, 34);
lfoSync->setBounds (567, 96, 48, 26);
pitchEnvDisplay->setBounds (751, 10, 93, 30);
algoDisplay->setBounds (338, 30, 146, 91);
algoDisplay->setBounds (335, 30, 152, 91);
feedback->setBounds (501, 81, 34, 34);
algo->setBounds (501, 22, 34, 34);
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...
void GlobalEditor::bind(DexedAudioProcessor *parent) {
parent->algo->bind(algo);
parent->lfoRate->bind(lfoSpeed);
parent->lfoDelay->bind(lfoDelay);
parent->lfoWaveform->bind(lfoType);
parent->lfoAmpDepth->bind(lfoAmDepth);
parent->lfoPitchDepth->bind(lfoPitchDepth);
parent->lfoSync->bind(lfoSync);
parent->oscSync->bind(oscSync);
parent->transpose->bind(transpose);
parent->feedback->bind(feedback);
parent->pitchModSens->bind(pitchModSens);
parent->pitchEgLevel[0]->bind(pitchLevel1);
parent->pitchEgLevel[1]->bind(pitchLevel2);
parent->pitchEgLevel[2]->bind(pitchLevel3);
parent->pitchEgLevel[3]->bind(pitchLevel4);
parent->pitchEgRate[0]->bind(pitchRate1);
parent->pitchEgRate[1]->bind(pitchRate2);
parent->pitchEgRate[2]->bind(pitchRate3);
parent->pitchEgRate[3]->bind(pitchRate4);
parent->fxCutoff->bind(cutoff);
parent->fxReso->bind(reso);
parent->output->bind(output);
algoDisplay->algo = &(parent->data[134]);
pitchEnvDisplay->pvalues = &(parent->data[126]);
processor = parent;
void GlobalEditor::bind(DexedAudioProcessorEditor *edit) {
processor = edit->processor;
processor->algo->bind(algo);
processor->lfoRate->bind(lfoSpeed);
processor->lfoDelay->bind(lfoDelay);
processor->lfoWaveform->bind(lfoType);
processor->lfoAmpDepth->bind(lfoAmDepth);
processor->lfoPitchDepth->bind(lfoPitchDepth);
processor->lfoSync->bind(lfoSync);
processor->oscSync->bind(oscSync);
processor->transpose->bind(transpose);
processor->feedback->bind(feedback);
processor->pitchModSens->bind(pitchModSens);
processor->pitchEgLevel[0]->bind(pitchLevel1);
processor->pitchEgLevel[1]->bind(pitchLevel2);
processor->pitchEgLevel[2]->bind(pitchLevel3);
processor->pitchEgLevel[3]->bind(pitchLevel4);
processor->pitchEgRate[0]->bind(pitchRate1);
processor->pitchEgRate[1]->bind(pitchRate2);
processor->pitchEgRate[2]->bind(pitchRate3);
processor->pitchEgRate[3]->bind(pitchRate4);
processor->fxCutoff->bind(cutoff);
processor->fxReso->bind(reso);
processor->output->bind(output);
algoDisplay->algo = &(processor->data[134]);
pitchEnvDisplay->pvalues = &(processor->data[126]);
editor = edit;
midiMonitor = new MidiMonitor(&(processor->sysexComm));
addAndMakeVisible(midiMonitor);
midiMonitor->setBounds(155, 21, 80, 80);
midiMonitor->setBounds(155, 21, 80, 45);
repaint();
}
@ -656,11 +653,11 @@ BEGIN_JUCER_METADATA
textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<SLIDER name="cutoff" id="40531f16bb0bd225" memberName="cutoff" virtualName=""
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"/>
<SLIDER name="reso" id="c8c13464e81a8d83" memberName="reso" virtualName=""
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"/>
<SLIDER name="pitchRate2" id="73f386b3c91d3de4" memberName="pitchRate2"
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"/>
<SLIDER name="transpose" id="7d1266b1c1534947" memberName="transpose"
virtualName="" explicitFocusOrder="0" pos="202 60 34 34" min="0"
max="48" int="0" style="RotaryVerticalDrag" textBoxPos="NoTextBox"
textBoxEditable="1" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
max="48" int="1" style="RotaryVerticalDrag" textBoxPos="NoTextBox"
textBoxEditable="0" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<TOGGLEBUTTON name="oscSync" id="8f3fe641537cd00" memberName="oscSync" virtualName=""
explicitFocusOrder="0" pos="650 96 48 26" buttonText="" connectedEdges="0"
needsCallback="1" radioGroupId="0" state="0"/>
<SLIDER name="pitchModSens" id="904f73df85a9f886" memberName="pitchModSens"
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"/>
<TOGGLEBUTTON name="lfoSync" id="ff92bb0a5a4f7187" memberName="lfoSync" virtualName=""
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"
params=""/>
<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=""/>
<SLIDER name="feedback" id="4fac1940c29ab8c" memberName="feedback" virtualName=""
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"
virtualName="" explicitFocusOrder="0" pos="6 87 140 13" class="LcdDisplay"
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"
style="RotaryVerticalDrag" textBoxPos="NoTextBox" textBoxEditable="1"
style="RotaryVerticalDrag" textBoxPos="NoTextBox" textBoxEditable="0"
textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<GENERICCOMPONENT name="vuOutput" id="dac75af912267f51" memberName="vuOutput" virtualName=""
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.
void bind(DexedAudioProcessor *processor);
void bind(DexedAudioProcessorEditor *processor);
void setSystemMessage(String msg);
void setParamMessage(String msg);
void updatePitchPos(int pos);
@ -58,12 +58,8 @@ public:
void updateDisplay();
void repaintMsg();
DexedAudioProcessorEditor *editor;
void setMonoState(bool state);
ProgramSelector *programs;
ScopedPointer<Component> midiMonitor;
//[/UserMethods]
@ -79,6 +75,7 @@ public:
private:
//[UserVariables] -- You can add your own custom variables in this section.
DexedAudioProcessorEditor *editor;
DexedAudioProcessor *processor;
//[/UserVariables]

@ -443,8 +443,10 @@ void OperatorEditor::bind(DexedAudioProcessor *parent, int op) {
int offset = parent->opCtrl[op].egRate[0]->getOffset();
envDisplay->pvalues = &(parent->data[offset]);
processor = parent;
opNum << op + 1;
internalOp = 5-op;
}
void OperatorEditor::updateGain(float v) {
@ -483,6 +485,32 @@ void OperatorEditor::updateEnvPos(char pos) {
envDisplay->vPos = pos;
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]

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

@ -262,6 +262,25 @@ void DexedAudioProcessor::resetToInitVoice() {
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) {
// 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);
global.editor = this;
addAndMakeVisible(&global);
global.setBounds(2,437,864,144);
global.bind(processor);
global.bind(this);
sendPopup.addItem(1, "Send program to DX7");
sendPopup.addItem(2, "Send cartridge to DX7");

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

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

Loading…
Cancel
Save