Algo display

pull/1/head
asb2m10 11 years ago
parent 8415df4d3a
commit f782bb00b3
  1. 27
      Builds/MacOSX/Dexed copy-Info.plist
  2. 4636
      Builds/MacOSX/Dexed.xcodeproj/project.pbxproj
  3. BIN
      Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate
  4. 10
      Builds/MacOSX/Dexed.xcodeproj/xcuserdata/asb2m10.xcuserdatad/xcschemes/xcschememanagement.plist
  5. 14
      README.md
  6. 103
      Source/DXLookNFeel.cpp
  7. 12
      Source/DXLookNFeel.h
  8. 1
      Source/GlobalEditor.cpp
  9. 2
      Source/PluginEditor.cpp
  10. 15
      Source/PluginProcessor.cpp

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist>
<dict>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.digitalsuburban.Dexed</string>
<key>CFBundleName</key>
<string>Dexed</string>
<key>CFBundlePackageType</key>
<string>TDMw</string>
<key>CFBundleSignature</key>
<string>PTul</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleVersion</key>
<string>1.0.0</string>
<key>NSHumanReadableCopyright</key>
<string>Digital Suburban</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>

File diff suppressed because it is too large Load Diff

@ -17,6 +17,16 @@
</dict> </dict>
<key>SuppressBuildableAutocreation</key> <key>SuppressBuildableAutocreation</key>
<dict> <dict>
<key>38AEAF8D18788FBF00A9DF7B</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>38AEAF9718788FFB00A9DF7B</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>CC364D6AF074DD367C3061CC</key> <key>CC364D6AF074DD367C3061CC</key>
<dict> <dict>
<key>primary</key> <key>primary</key>

@ -11,7 +11,14 @@ folder) stays on the Apache 2.0 license to able to collaborate between projects.
Binary downloads Binary downloads
---------------- ----------------
It is far from finish but for those who want to try the "music-synthesizer-for-android" project It is far from finish but for those who want to try the "music-synthesizer-for-android" project
on a PC/Mac, you can download it [here](http://le-son666.com/software/dexed) on a PC/Mac, you can download it [here](http://le-son666.com/software/dexed).
Using has a DX7 editor
----------------------
This plugin can process original DX7 messages. If you change a parameter, it will send the
corresponding DX7 sysex to midi out. Not all DAW supports sysex; for example
Ableton Live simply discard any sysex data. Reaper does process midi out, but doesn't pass any
midi in sysex data to the plugin.
(New) Features (New) Features
-------------- --------------
@ -20,16 +27,17 @@ on a PC/Mac, you can download it [here](http://le-son666.com/software/dexed)
* All of the 144 DX7 parameters are available from one single panel * All of the 144 DX7 parameters are available from one single panel
* Fully supports DX7 input and output Sysex messages; including controller change. This means that you can use this with a native DX7/TX7 as a patch editor * Fully supports DX7 input and output Sysex messages; including controller change. This means that you can use this with a native DX7/TX7 as a patch editor
* Each operator have a realtime VU meter to know wich one is active * Each operator have a realtime VU meter to know wich one is active
* Can load any DX7/TX7 sysex programs. [See this](http://www.synprez.com/SynprezFM/) for great collection of DX7 patches (SynprezFM-II-builtins.tgz) * Can load any DX7/TX7 sysex programs. [See this (SynprezFM-II-builtins.tgz)](http://www.synprez.com/SynprezFM/) for great collection of DX7 patches
TODO - Dexed TODO - Dexed
------------ ------------
* Implement a better DX look and feel * Implement a better DX look and feel
* Better implementation of the LPF filter * Better implementation of the LPF filter
* Better display of the amplitude envelope * Better display of the amplitude envelope
* Implement a display of the algo * Better display of the algo
TODO - msfa TODO - msfa
----------- -----------
* LFO Amplitude * LFO Amplitude
* MOD Wheel action * MOD Wheel action
* Algo 4 & 6 feedback

@ -21,6 +21,48 @@
#include "DXLookNFeel.h" #include "DXLookNFeel.h"
#include "PluginProcessor.h" #include "PluginProcessor.h"
/**
* Algorithm arrangements, based on the DX1 display.
* Feedop 7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
{ 0, 1, 2, 0, 4, 0, 3, 0, 5, 6, 0, 0, 0, 3 }, // 20
{ 0, 1, 2, 4, 5, 0, 3, 0, 6, 0, 0, 0, 0, 3 }, // 21
{ 0, 1, 3, 4, 5, 0, 2, 0, 6, 0, 0, 0, 0, 6 }, // 22
{ 0, 1, 2, 4, 5, 0, 0, 3, 6, 0, 0, 0, 0, 6 }, // 23
{ 1, 2, 3, 4, 5, 0, 0, 0, 6, 0, 0, 0, 0, 6 }, // 24
{ 1, 2, 3, 4, 5, 0, 0, 0, 6, 0, 0, 0, 0, 6 }, // 25
{ 0, 1, 2, 0, 4, 0, 0, 3, 5, 6, 0, 0, 0, 6 }, // 26
// 1 2 3 4 5 6 7 8 9 A B C D F
{ 0, 1, 2, 0, 4, 0, 0, 3, 5, 6, 0, 0, 0, 3 }, // 27
{ 0, 1, 3, 6, 0, 0, 2, 4, 0, 0, 5, 0, 0, 5 }, // 28
{ 0, 1, 2, 3, 5, 0, 0, 0, 4, 6, 0, 0, 0, 6 }, // 29
{ 0, 1, 2, 3, 6, 0, 0, 0, 4, 0, 0, 5, 0, 5 }, // 30
{ 1, 2, 3, 4, 5, 0, 0, 0, 0, 6, 0, 0, 0, 6 }, // 31
{ 1, 2, 3, 4, 5, 6, 0, 0, 0, 0, 0, 0, 0, 6 } // 32
};
void EnvDisplay::paint(Graphics &g) { void EnvDisplay::paint(Graphics &g) {
int rate[4]; int rate[4];
int level[4]; int level[4];
@ -49,11 +91,67 @@ void EnvDisplay::paint(Graphics &g) {
} }
} }
void AlgoDisplay::updateUI() { AlgoDisplay::AlgoDisplay() {
algo = NULL;
} }
/**
* For now, this is hardcoded 126x56 (21x14 each)
*/
void AlgoDisplay::paint(Graphics &g) { void AlgoDisplay::paint(Graphics &g) {
int alg;
if ( algo == NULL ) {
return;
}
if ( *algo <= 31 ) {
alg = *algo;
} else {
alg = 31;
}
const char *arr = algoArr[alg];
for(int i=0;i<13;i++) {
char target = arr[i];
bool feedback = target == arr[13];
if ( target == 0 )
continue;
if ( i < 6 ) {
drawOp(g, i, 3, target, feedback);
continue;
}
if ( i < 10 ){
drawOp(g, (i-6)+1, 2, target, feedback);
continue;
}
if ( i < 12 ) {
drawOp(g, (i-10)+2, 1, target, feedback);
continue;
}
// last one
drawOp(g, (i-12)+3, 0, target, feedback);
}
}
void AlgoDisplay::drawOp(Graphics &g, int x, int y, int num, bool feedback) {
String txt;
txt << num;
g.setColour(Colour(0xFF0FC00F));
g.fillRect(x*21+1, y*14+1, 19, 13);
g.setColour(Colour(0xFFFFFFFF));
g.drawText(txt, x*21, y*14, 21, 14, Justification::centred, true);
if ( feedback ) {
g.setColour(Colour(0xFFFFFFFF));
int x1 = (x*21) + 19;
g.drawLine(x1, y*14+1, x1, y*14+14, 3);
}
} }
@ -61,4 +159,5 @@ DXLookNFeel::DXLookNFeel() {
setColour(TextButton::buttonColourId,Colour(0xFF0FC00F)); setColour(TextButton::buttonColourId,Colour(0xFF0FC00F));
setColour(Slider::rotarySliderOutlineColourId,Colour(0xFF0FC00F)); setColour(Slider::rotarySliderOutlineColourId,Colour(0xFF0FC00F));
setColour(Slider::rotarySliderFillColourId,Colour(0xFFFFFFFF)); setColour(Slider::rotarySliderFillColourId,Colour(0xFFFFFFFF));
} }

@ -34,14 +34,20 @@ public:
}; };
class AlgoDisplay : public Component { class AlgoDisplay : public Component {
int algo; void drawOp(Graphics &g, int x, int y, int num, bool feedback);
public: public:
void paint(Graphics &g); AlgoDisplay();
void updateUI(); char *algo;
void paint(Graphics &g);
}; };
class DXLookNFeel : public LookAndFeel_V3 { class DXLookNFeel : public LookAndFeel_V3 {
public: public:
const Colour white;
DXLookNFeel(); DXLookNFeel();
}; };

@ -396,6 +396,7 @@ void GlobalEditor::bind(DexedAudioProcessor *parent) {
parent->pitchEgRate[3]->bind(pitchRate4); parent->pitchEgRate[3]->bind(pitchRate4);
parent->fxCutoff->bind(cutoff); parent->fxCutoff->bind(cutoff);
parent->fxReso->bind(reso); parent->fxReso->bind(reso);
algoDisplay->algo = &(parent->data[134]);
processor = parent; processor = parent;
} }

@ -204,4 +204,6 @@ void DexedAudioProcessorEditor::updateUI() {
int id = processor->getCurrentProgram() + 1; int id = processor->getCurrentProgram() + 1;
presets.setSelectedId(id, NotificationType::dontSendNotification); presets.setSelectedId(id, NotificationType::dontSendNotification);
global.repaint();
} }

@ -164,15 +164,20 @@ AudioProcessor* JUCE_CALLTYPE createPluginFilter() {
void DexedAudioProcessor::processMidiMessage(MidiMessage *msg) { void DexedAudioProcessor::processMidiMessage(MidiMessage *msg) {
if ( msg->isSysEx() ) { if ( msg->isSysEx() ) {
TRACE("SYSEX RECEIVED");
const uint8 *buf = msg->getSysExData(); const uint8 *buf = msg->getSysExData();
int sz = msg->getSysExDataSize(); int sz = msg->getSysExDataSize();
TRACE("SYSEX RECEIVED %d", sz);
if ( sz < 3 ) if ( sz < 3 )
return; return;
// test if it is a Yamaha Sysex // test if it is a Yamaha Sysex
if ( buf[0] != 0x43 ) if ( buf[0] != 0x43 ) {
TRACE("not a yamaha sysex %d", buf[0]);
return; return;
}
TRACE("buf 2 %d", buf[2]);
// single voice dump // single voice dump
if ( buf[2] == 0 ) { if ( buf[2] == 0 ) {
@ -180,7 +185,8 @@ void DexedAudioProcessor::processMidiMessage(MidiMessage *msg) {
TRACE("wrong single voice datasize %d", sz); TRACE("wrong single voice datasize %d", sz);
return; return;
} }
updateProgramFromSysex(buf+5); TRACE("program update sysex");
updateProgramFromSysex(buf+4);
refreshUI |= REFRESH_COMP; refreshUI |= REFRESH_COMP;
return; return;
} }
@ -191,7 +197,8 @@ void DexedAudioProcessor::processMidiMessage(MidiMessage *msg) {
TRACE("wrong 32 voice datasize %d", sz); TRACE("wrong 32 voice datasize %d", sz);
return; return;
} }
importSysex((const char *)buf+5); TRACE("update 32bulk voice)");
importSysex((const char *)buf+4);
refreshUI |= REFRESH_COMP; refreshUI |= REFRESH_COMP;
} }
return; return;

Loading…
Cancel
Save