Support for drop of .syx files in the cart manager

Fixed the "Send '*' program to DX7" missing sysex header
pull/1/head
asb2m10 9 years ago
parent f89e26caef
commit 79e6007fa2
  1. BIN
      Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate
  2. 13
      README.md
  3. 44
      Source/CartManager.cpp
  4. 15
      Source/CartManager.h
  5. 2
      Source/PluginData.cpp
  6. 1
      Source/PluginData.h

@ -17,6 +17,12 @@ in the source folder) stays on the Apache 2.0 license to able to collaborate bet
Changelog
---------
#### Version 0.9.1
* Drop of .syx files in the cartridge manager
* Dexed data directory can now optionally reside in the same location where the binary is installed
* 'Send current program to DX7' in Cartridge Manager works as designed
* Support for sysex streams (multiple sysex messages in one .syx file)
* falkTX upstream fixes for Linux
#### Version 0.9.0
* Apple AU support
@ -26,7 +32,6 @@ Changelog
* Fixed the UI corruption when more than one Dexed instance was loaded
* Fixed wrong display value issues (coarse and fine)
#### Version 0.8.0
* New UI by [AZur Studio](http://bji.yukihotaru.com/)
* You can now copy/paste the operator/envelopes values by using the right-click mouse button on the operator
@ -63,15 +68,15 @@ Credits & thanks
* 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 programs : Dave Benson, Frank Carvalho, Tim Conrardy, Jack Deckard, Chris Dodunski, Tim Garrett, Hitaye, Stephan Ibsen, Christian Jezreel, Narfman, Godric Wilkie
* markusthegeek direct implication for this project
* falkTX [distrho](http://distrho.sourceforge.net/)
TODO - Dexed
------------
* Yamaha 4 operators (DX21/DX27/DX100) sysex import
* 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.
* Zomby UI changes: this occurs in Live
* Various code cleanup
* More smothness in mono mode
* More smoothness in mono mode
TODO - msfa
-----------

@ -38,8 +38,41 @@ public:
};
};
class FileTreeDrop : public FileTreeComponent {
public :
FileTreeDrop(DirectoryContentsList &listToShow) : FileTreeComponent(listToShow) {}
bool isInterestedInFileDrag (const StringArray &files) override {
bool found = false;
for(int i=0; i<files.size(); i++) {
String filename = files[i].toLowerCase();
found |= filename.endsWith(".syx");
}
return found;
}
void filesDropped(const StringArray &files, int x, int y) override {
File targetDir = getSelectedFile();
if ( ! targetDir.exists() )
targetDir = DexedAudioProcessor::dexedCartDir;
if ( ! targetDir.isDirectory() )
targetDir = targetDir.getParentDirectory();
for(int i=0; i<files.size(); i++) {
if ( files[i].toLowerCase().endsWith(".syx") ) {
File src(files[i]);
File target = targetDir.getChildFile(src.getFileName());
src.copyFileTo(target);
}
}
fileList.refresh();
}
};
CartManager::CartManager(DexedAudioProcessorEditor *editor) : Component("CartManager") {
mainWindow = editor;
cartDir = DexedAudioProcessor::dexedCartDir;
@ -57,7 +90,7 @@ CartManager::CartManager(DexedAudioProcessorEditor *editor) : Component("CartMan
timeSliceThread->startThread();
cartBrowserList = new DirectoryContentsList(syxFileFilter, *timeSliceThread);
cartBrowserList->setDirectory(cartDir, true, true);
cartBrowser = new FileTreeComponent(*cartBrowserList);
cartBrowser = new FileTreeDrop(*cartBrowserList);
addAndMakeVisible(cartBrowser);
cartBrowser->setBounds(23, 18, 590, 384);
cartBrowser->setDragAndDropDescription("Sysex Browser");
@ -259,8 +292,11 @@ void CartManager::programRightClicked(ProgramListBox *source, int pos) {
source->getCurrentCart().unpackProgram(unpackPgm, pos);
}
if ( mainWindow->processor->sysexComm.isOutputActive() )
mainWindow->processor->sysexComm.send(MidiMessage(unpackPgm, 161));
if ( mainWindow->processor->sysexComm.isOutputActive() ) {
uint8_t msg[163];
exportSysexPgm(msg, unpackPgm);
mainWindow->processor->sysexComm.send(MidiMessage(msg, 163));
}
break;
case 1010:

@ -24,6 +24,7 @@
#include "../JuceLibraryCode/JuceHeader.h"
#include "PluginData.h"
#include "ProgramListBox.h"
#include "PluginData.h"
class CartManager : public Component, public ButtonListener, public DragAndDropContainer, public FileBrowserListener
, public ProgramListBoxListener {
@ -53,13 +54,13 @@ class CartManager : public Component, public ButtonListener, public DragAndDrop
public:
CartManager(DexedAudioProcessorEditor *editor);
virtual ~CartManager();
void paint(Graphics& g);
void buttonClicked (Button* buttonThatWasClicked);
void paint(Graphics& g) override;
void buttonClicked (Button* buttonThatWasClicked) override;
void selectionChanged();
void fileClicked (const File& file, const MouseEvent& e);
void fileDoubleClicked (const File& file);
void browserRootChanged (const File& newRoot);
void selectionChanged() override;
void fileClicked (const File& file, const MouseEvent& e) override;
void fileDoubleClicked (const File& file) override;
void browserRootChanged (const File& newRoot) override;
void setActiveProgram(int idx, String activeName);
void resetActiveSysex();
@ -67,7 +68,7 @@ public:
virtual void programSelected(ProgramListBox *source, int pos) override;
virtual void programRightClicked(ProgramListBox *source, int pos) override;
virtual void programDragged(ProgramListBox *destListBox, int dest, char *packedPgm) override;
void initialFocus();
};

@ -229,7 +229,7 @@ void DexedAudioProcessor::pasteEnvFromClipboard(int destOp) {
}
void DexedAudioProcessor::sendCurrentSysexProgram() {
uint8_t raw[167];
uint8_t raw[163];
exportSysexPgm(raw, data);
if ( sysexComm.isOutputActive() ) {

@ -28,6 +28,7 @@
#include "Dexed.h"
uint8_t sysexChecksum(const uint8_t *sysex, int size);
void exportSysexPgm(uint8_t *dest, uint8_t *src);
#define SYSEX_HEADER { 0xF0, 0x43, 0x00, 0x00, 0x20, 0x00 }

Loading…
Cancel
Save