Filter corrupted sysex files

pull/1/head
asb2m10 10 years ago
parent 35550de5dc
commit af17893b6d
  1. 5202
      Builds/MacOSX/Dexed.xcodeproj/project.pbxproj
  2. BIN
      Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate
  3. 12
      Source/CartManager.cpp
  4. 2
      Source/Dexed.h
  5. 1
      Source/GlobalEditor.cpp
  6. 4
      Source/PluginProcessor.cpp
  7. 2
      Source/SysexComm.cpp

File diff suppressed because it is too large Load Diff

@ -31,7 +31,7 @@ class SyxFileFilter : public FileFilter {
public:
SyxFileFilter() : FileFilter(".syx") {}
bool isFileSuitable(const File &file) const {
return file.getFileExtension().toLowerCase() == ".syx";
return file.getFileExtension().toLowerCase() == ".syx" && file.getSize() == 4104;
}
bool isDirectorySuitable(const File &file) const {
return true;
@ -148,7 +148,7 @@ void CartManager::buttonClicked(juce::Button *buttonThatWasClicked) {
if ( buttonThatWasClicked == getDXPgmButton ) {
if ( mainWindow->processor->sysexComm.isInputActive() && mainWindow->processor->sysexComm.isOutputActive() ) {
unsigned char msg[] = { 0xF0, 0x43, 0x20, 0x00, 0xF7 };
unsigned char msg[] = { 0xF0, 0x43, 0x20, 0x09, 0xF7 };
mainWindow->processor->sysexComm.send(MidiMessage(msg, 5));
} else {
showSysexConfigMsg();
@ -158,7 +158,7 @@ void CartManager::buttonClicked(juce::Button *buttonThatWasClicked) {
if ( buttonThatWasClicked == getDXCartButton ) {
if ( mainWindow->processor->sysexComm.isInputActive() && mainWindow->processor->sysexComm.isOutputActive() ) {
unsigned char msg[] = { 0xF0, 0x43, 0x20, 0x01, 0xF7 };
unsigned char msg[] = { 0xF0, 0x43, 0x20, 0x00, 0xF7 };
mainWindow->processor->sysexComm.send(MidiMessage(msg, 5));
} else {
showSysexConfigMsg();
@ -236,10 +236,10 @@ void CartManager::selectionChanged() {
int checksum = sysexChecksum(((char *) &browserSysex), 4096);
if ( checksum != syx_data[4102] ) {
String message = "Sysex import checksum doesnt match ";
/*String message = "Sysex import checksum doesnt match ";
message << ((int)checksum) << " != " << ((int)syx_data[4102]);
AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, "Warning", message);
AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, "Warning", message);*/
browserCart->readOnly = true;
} else {
browserCart->readOnly = false;
@ -319,7 +319,7 @@ void CartManager::initialFocus() {
void CartManager::showSysexConfigMsg() {
AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, "Warning", "The DX7 midi interface is not configured correctly.\n\n"
"These buttons are used to 'ask' the DX7 to send the current program/cartridge.\n\n"
"In order to use this correctly, you need to connect your midi in and midi out of your DX7 to a midi interface and configure this midi interface with the [PARM] dialog.");
"In order to use this correctly, you need to connect your midi in and midi out of your DX7 to a midi interface and configure this midi interface with the [PARM] dialog. THIS ONLY WORKS ON A DX7-II");
}
// unused stuff from FileBrowserListener

@ -31,7 +31,7 @@ void dexed_trace(const char *source, const char *fmt, ...);
#define TRACE(fmt, ...) dexed_trace(__PRETTY_FUNCTION__,fmt,##__VA_ARGS__)
#endif
#else
#define DEXED_VERSION "0.9.0 BETA"
#define DEXED_VERSION "0.9.0 BETA#2"
#define TRACE(fmt, ...)
#endif

@ -568,6 +568,7 @@ void GlobalEditor::updatePitchPos(int pos) {
void GlobalEditor::updateVu(float f) {
vuOutput->v = f;
vuOutput->repaint();
midiMonitor->repaint();
}
void GlobalEditor::setMonoState(bool state) {

@ -437,11 +437,7 @@ void DexedAudioProcessor::handleIncomingMidiMessage(MidiInput* source, const Mid
return;
}
TRACE("program update sysex");
updateProgramFromSysex(buf+6);
String name = normalizeSysexName((const char *) buf+145);
packProgram((uint8_t *) sysex, (uint8_t *) data, currentProgram, name);
programNames.set(currentProgram, name);
}
// 32 voice dump

@ -143,6 +143,8 @@ int SysexComm::send(const MidiMessage &message) {
if ( output == NULL )
return 2;
TRACE("send sysex");
outActivity = true;
output->sendMessageNow(message);
return 0;

Loading…
Cancel
Save