External midi sysex support

pull/1/head
asb2m10 10 years ago
parent bcb05fa1e9
commit 145dffd0a9
  1. 2
      Builds/MacOSX/Dexed.xcodeproj/project.pbxproj
  2. BIN
      Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate
  3. 1
      Builds/VisualStudio2012/Dexed.vcxproj
  4. 3
      Builds/VisualStudio2012/Dexed.vcxproj.filters
  5. 1
      Builds/VisualStudio2013/Dexed.vcxproj
  6. 3
      Builds/VisualStudio2013/Dexed.vcxproj.filters
  7. 1
      Dexed.jucer
  8. 11
      README.md
  9. 34
      Source/Dexed.h
  10. 32
      Source/ParamDialog.cpp
  11. 2
      Source/ParamDialog.h
  12. 4
      Source/PluginData.cpp
  13. 9
      Source/PluginEditor.cpp
  14. 4
      Source/PluginParam.cpp
  15. 1
      Source/PluginProcessor.cpp
  16. 8
      Source/PluginProcessor.h
  17. 41
      Source/SysexComm.cpp
  18. 30
      Source/SysexComm.h

@ -100,6 +100,7 @@
0B2C1056583363B66704DB9C = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Array.h"; path = "../../JuceLibraryCode/modules/juce_core/containers/juce_Array.h"; sourceTree = "SOURCE_ROOT"; };
0B338B58E9C37E83F0FD865D = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_Desktop.h"; path = "../../JuceLibraryCode/modules/juce_gui_basics/components/juce_Desktop.h"; sourceTree = "SOURCE_ROOT"; };
0B7725520356AED2C80FC943 = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_MarkerList.cpp"; path = "../../JuceLibraryCode/modules/juce_gui_basics/positioning/juce_MarkerList.cpp"; sourceTree = "SOURCE_ROOT"; };
0BD21CA621B7350EBED18C0A = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Dexed.h; path = ../../Source/Dexed.h; sourceTree = "SOURCE_ROOT"; };
0C0B6B8DAD62A3F5C926825F = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_DynamicLibrary.h"; path = "../../JuceLibraryCode/modules/juce_core/threads/juce_DynamicLibrary.h"; sourceTree = "SOURCE_ROOT"; };
0CB234755B75E0DBC2FFB58E = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "juce_ResizableCornerComponent.cpp"; path = "../../JuceLibraryCode/modules/juce_gui_basics/layout/juce_ResizableCornerComponent.cpp"; sourceTree = "SOURCE_ROOT"; };
0DCC7A5AD5AC5D3637FFAAFB = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "juce_ToolbarButton.h"; path = "../../JuceLibraryCode/modules/juce_gui_basics/buttons/juce_ToolbarButton.h"; sourceTree = "SOURCE_ROOT"; };
@ -906,6 +907,7 @@
3BE8F91A99E8F48CB9F10C1F,
68D35AFE11BAA35EAE497D47, ); name = msfa; sourceTree = "<group>"; };
29B923E6EB12F97B68585AFC = {isa = PBXGroup; children = (
0BD21CA621B7350EBED18C0A,
45ADFD8885BE76C7F7D999AC,
5C0A1B7E2BF8FCAF5A1E8616,
59D15F780D468B587F9C7E78,

@ -1137,6 +1137,7 @@
<ClCompile Include="..\..\JuceLibraryCode\modules\juce_audio_plugin_client\VST\juce_VST_Wrapper.cpp"/>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\Source\Dexed.h"/>
<ClInclude Include="..\..\Source\PluginProcessor.h"/>
<ClInclude Include="..\..\Source\PluginParam.h"/>
<ClInclude Include="..\..\Source\PluginData.h"/>

@ -1419,6 +1419,9 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\Source\Dexed.h">
<Filter>Dexed\Source</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\PluginProcessor.h">
<Filter>Dexed\Source</Filter>
</ClInclude>

@ -1136,6 +1136,7 @@
<ClCompile Include="..\..\JuceLibraryCode\modules\juce_audio_plugin_client\VST\juce_VST_Wrapper.cpp"/>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\Source\Dexed.h"/>
<ClInclude Include="..\..\Source\PluginProcessor.h"/>
<ClInclude Include="..\..\Source\PluginParam.h"/>
<ClInclude Include="..\..\Source\PluginData.h"/>

@ -1419,6 +1419,9 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\Source\Dexed.h">
<Filter>Dexed\Source</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\PluginProcessor.h">
<Filter>Dexed\Source</Filter>
</ClInclude>

@ -16,6 +16,7 @@
<FILE id="gfRTZ1" name="builtin_pgm.zip" compile="0" resource="1" file="Resources/builtin_pgm.zip"/>
</GROUP>
<GROUP id="{EA38D88A-6B79-E394-8B57-FA22D50C4D86}" name="Source">
<FILE id="pBbZ9Y" name="Dexed.h" compile="0" resource="0" file="Source/Dexed.h"/>
<FILE id="Yp2cX4" name="PluginProcessor.cpp" compile="1" resource="0"
file="Source/PluginProcessor.cpp"/>
<FILE id="ob0Eek" name="PluginProcessor.h" compile="0" resource="0"

@ -25,7 +25,7 @@ Features
Changelog
---------
#### Version 0.6.0 (current sprint)
* Added external midi interface to send / receive sysex
* Added external midi interface to send / receive sysex message
* Fix Tracktion crash upon startup
* Middle C (transpose) now works
* Mouse over the interface controls now tells what it does without having to change it
@ -47,7 +47,7 @@ Changelog
Binary downloads
----------------
Dexed is not a finished product but it is stable enough to be used in a DAW environment:
in normal operation it shouldn't crash and the VST state saving works.
in normal operation it shouldn't crash and the VST state saving works. If you don't see the new version here but you see it in the change log, it's because this version is in development (current sprint). Only officials (tested) builds are listed here.
* Version 0.5.1 [vst win32](http://le-son666.com/software/dexed/dexed-0.5.1-win32.zip) - [vst win64](http://le-son666.com/software/dexed/dexed-0.5.1-win64.zip) - [vst os x](http://le-son666.com/software/dexed/dexed-0.5.1-osx.vst.zip)
* Version 0.5.0 [vst win32](http://le-son666.com/software/dexed/dexed-0.5.0a-win32.zip) - [vst win64](http://le-son666.com/software/dexed/dexed-0.5.0a-win64.zip) - [vst os x](http://le-son666.com/software/dexed/dexed-0.5.0-osx.vst.zip)
@ -87,12 +87,13 @@ Credits & thanks
TODO - Dexed
------------
* Implement a better DX look and feel (amp, pitch, algo)
* Implement a better DX look and feel (amp, pitch, algo) *** commin Q4 2014
* Various code cleanup
* 4op (DX21/DX27/DX100) sysex import
TODO - msfa
-----------
* The sample rate should not change the response of the envelopes
* Portamento implentation
* LFO/Mod-wheel Amplitude
* Portamento implementation
* LFO/Mod-wheel amplitude
* Algo 4 & 6 feedback

@ -0,0 +1,34 @@
/**
*
* Copyright (c) 2014 Pascal Gauthier.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*/
#ifndef DEXED_H_INCLUDED
#define DEXED_H_INCLUDED
void dexed_trace(const char *source, const char *fmt, ...);
#ifdef _MSC_VER
#define TRACE(fmt, ...) dexed_trace(__FUNCTION__,fmt,##__VA_ARGS__)
#else
#define TRACE(fmt, ...) dexed_trace(__PRETTY_FUNCTION__,fmt,##__VA_ARGS__)
#endif
#define DEXED_VERSION "0.6.0"
#endif // DEXED_H_INCLUDED

@ -18,6 +18,7 @@
*/
//[Headers] You can add your own extra header files here...
#include "Dexed.h"
//[/Headers]
#include "ParamDialog.h"
@ -74,12 +75,12 @@ ParamDialog::ParamDialog ()
StringArray input;
input.add("None");
input.addArray(MidiInput::getDevices());
sysexIn->addItemList(input, 1);
sysexIn->addItemList(input, 2);
StringArray output;
output.add("None");
output.addArray(MidiOutput::getDevices());
sysexOut->addItemList(output, 1);
sysexOut->addItemList(output, 2);
//[/Constructor]
}
@ -123,13 +124,13 @@ void ParamDialog::paint (Graphics& g)
g.setColour (Colours::white);
g.setFont (Font (15.00f, Font::plain));
g.drawText (TRANS("Sysex In"),
19, 170, 131, 23,
19, 178, 131, 23,
Justification::centredLeft, true);
g.setColour (Colours::white);
g.setFont (Font (15.00f, Font::plain));
g.drawText (TRANS("Sysex Out"),
19, 210, 131, 23,
19, 218, 131, 23,
Justification::centredLeft, true);
g.setColour (Colours::white);
@ -146,8 +147,8 @@ void ParamDialog::resized()
{
pitchRange->setBounds (192, 16, 72, 24);
pitchStep->setBounds (192, 56, 72, 24);
sysexIn->setBounds (104, 168, 152, 24);
sysexOut->setBounds (104, 208, 152, 24);
sysexIn->setBounds (104, 176, 152, 24);
sysexOut->setBounds (104, 216, 152, 24);
sysexChl->setBounds (184, 256, 72, 24);
//[UserResized] Add your own custom resize handling here..
//[/UserResized]
@ -209,10 +210,15 @@ void ParamDialog::setDialogValues(Controllers &c, SysexComm &mgr) {
sysexChl->setValue(mgr.getChl() + 1);
StringArray inputs = MidiInput::getDevices();
sysexIn->setItemEnabled(inputs.indexOf(mgr.getInput()), true);
int idx = inputs.indexOf(mgr.getInput());
idx = idx == -1 ? 0 : idx + 1;
sysexIn->setSelectedItemIndex(idx);
StringArray outputs = MidiOutput::getDevices();
sysexOut->setItemEnabled(outputs.indexOf(mgr.getOutput()), true);
idx = outputs.indexOf(mgr.getOutput());
TRACE("output idx %d output %s", idx, mgr.getOutput().toRawUTF8());
idx = idx == -1 ? 0 : idx + 1;
sysexOut->setSelectedItemIndex(idx);
}
void ParamDialog::getDialogValues(Controllers &c, SysexComm &mgr) {
@ -244,9 +250,9 @@ BEGIN_JUCER_METADATA
fontname="Default font" fontsize="15" bold="0" italic="0" justification="33"/>
<TEXT pos="19 61 229 23" fill="solid: ffffffff" hasStroke="0" text="Pitch Bend Step"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="33"/>
<TEXT pos="19 170 131 23" fill="solid: ffffffff" hasStroke="0" text="Sysex In"
<TEXT pos="19 178 131 23" fill="solid: ffffffff" hasStroke="0" text="Sysex In"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="33"/>
<TEXT pos="19 210 131 23" fill="solid: ffffffff" hasStroke="0" text="Sysex Out"
<TEXT pos="19 218 131 23" fill="solid: ffffffff" hasStroke="0" text="Sysex Out"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="33"/>
<TEXT pos="19 258 245 23" fill="solid: ffffffff" hasStroke="0" text="Sysex Channel"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="33"/>
@ -260,10 +266,10 @@ BEGIN_JUCER_METADATA
max="12" int="1" style="Rotary" textBoxPos="TextBoxLeft" textBoxEditable="1"
textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<COMBOBOX name="sysexIn" id="3750642d8b5be11" memberName="sysexIn" virtualName=""
explicitFocusOrder="0" pos="104 168 152 24" editable="0" layout="33"
explicitFocusOrder="0" pos="104 176 152 24" editable="0" layout="33"
items="" textWhenNonSelected="" textWhenNoItems="(no choices)"/>
<COMBOBOX name="sysexOut" id="44730115841c2214" memberName="sysexOut" virtualName=""
explicitFocusOrder="0" pos="104 208 152 24" editable="0" layout="33"
explicitFocusOrder="0" pos="104 216 152 24" editable="0" layout="33"
items="" textWhenNonSelected="" textWhenNoItems="(no choices)"/>
<SLIDER name="sysexChl" id="7fdc8830f90a7c86" memberName="sysexChl" virtualName=""
explicitFocusOrder="0" pos="184 256 72 24" min="1" max="16" int="1"

@ -56,6 +56,8 @@ public:
void sliderValueChanged (Slider* sliderThatWasMoved);
void comboBoxChanged (ComboBox* comboBoxThatHasChanged);
private:
//[UserVariables] -- You can add your own custom variables in this section.
//[/UserVariables]

@ -23,13 +23,13 @@
#include "PluginParam.h"
#include "PluginProcessor.h"
#include "PluginData.h"
#include "Dexed.h"
uint8_t sysexChecksum(const char *sysex, int size) {
int sum = 0;
int i;
for (i = 0; i < 4096; sum -= sysex[i++]);
for (i = 0; i < size; sum -= sysex[i++]);
return sum & 0x7F;
}

@ -22,9 +22,12 @@
#include "PluginEditor.h"
#include "GlobalEditor.h"
#include "ParamDialog.h"
#include "Dexed.h"
#include "math.h"
#include <fstream>
using namespace ::std;
class AboutBox : public DialogWindow {
@ -47,7 +50,7 @@ public:
g.drawImage (about_png, 0, 0, about_png.getWidth(), about_png.getHeight(),
0, 0, about_png.getWidth(), about_png.getHeight());
g.setColour(Colour(0xFF000000));
String ver("Version 0.5 ; built date " __DATE__ );
String ver("Version " DEXED_VERSION " ; built date " __DATE__ );
g.drawSingleLineText(ver, 9, 118);
}
};
@ -147,8 +150,8 @@ DexedAudioProcessorEditor::DexedAudioProcessorEditor (DexedAudioProcessor* owner
global.setBounds(5,235,855,90);
global.bind(processor);
sendPopup.addItem(1, "Send current program to DX7 via sysex");
sendPopup.addItem(2, "Send current cartridge to DX7 via sysex");
sendPopup.addItem(1, "Send current program to DX7");
sendPopup.addItem(2, "Send current cartridge to DX7");
updateUI();
startTimer(100);

@ -23,6 +23,7 @@
#include "PluginParam.h"
#include "PluginProcessor.h"
#include "PluginEditor.h"
#include "Dexed.h"
// ************************************************************************
//
@ -57,16 +58,19 @@ void Ctrl::bind(ComboBox *c) {
void Ctrl::unbind() {
if (slider != NULL) {
slider->removeListener(this);
slider->removeMouseListener(this);
slider = NULL;
}
if (button != NULL) {
button->removeListener(this);
button->removeMouseListener(this);
button = NULL;
}
if (comboBox != NULL) {
comboBox->removeListener(this);
comboBox->removeMouseListener(this);
comboBox = NULL;
}
}

@ -21,6 +21,7 @@
#include "PluginProcessor.h"
#include "PluginEditor.h"
#include "Dexed.h"
#include "msfa/synth.h"
#include "msfa/freqlut.h"
#include "msfa/sin.h"

@ -206,12 +206,4 @@ private:
};
void dexed_trace(const char *source, const char *fmt, ...);
#ifdef _MSC_VER
#define TRACE(fmt, ...) dexed_trace(__FUNCTION__,fmt,##__VA_ARGS__)
#else
#define TRACE(fmt, ...) dexed_trace(__PRETTY_FUNCTION__,fmt,##__VA_ARGS__)
#endif
#endif // PLUGINPROCESSOR_H_INCLUDED

@ -1,14 +1,25 @@
/*
==============================================================================
MidiMgr.cpp
Created: 24 Jun 2014 2:43:55am
Author: Pascal Gauthier
==============================================================================
*/
/**
*
* Copyright (c) 2014 Pascal Gauthier.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*/
#include "SysexComm.h"
#include "Dexed.h"
SysexComm::SysexComm() {
sysexChl = 1;
@ -49,7 +60,7 @@ void SysexComm::setInput(String target) {
int idx = devices.indexOf(target);
if ( idx == -1 ) {
// device not found
TRACE("device %s not found", target.toRawUTF8());
inputName = "";
return;
}
@ -58,6 +69,9 @@ void SysexComm::setInput(String target) {
if ( input != NULL ) {
inputName = target;
input->start();
TRACE("sysex %s opened", target.toRawUTF8());
} else {
TRACE("unable to open %s", target.toRawUTF8());
}
}
@ -75,13 +89,17 @@ void SysexComm::setOutput(String target) {
int idx = devices.indexOf(target);
if ( idx == -1 ) {
// device not found
TRACE("device %s not found", target.toRawUTF8());
outputName = "";
return;
}
output = MidiOutput::openDevice(idx);
if ( output != NULL ) {
outputName = target;
TRACE("sysex %s opened", target.toRawUTF8());
} else {
TRACE("unable to open %s", target.toRawUTF8());
}
}
@ -105,5 +123,6 @@ void SysexComm::send(const juce::MidiMessage &message) {
if ( output == NULL )
return;
TRACE("sending sysex...");
output->sendMessageNow(message);
}

@ -1,12 +1,22 @@
/*
==============================================================================
MidiMgr.h
Created: 24 Jun 2014 2:43:55am
Author: Pascal Gauthier
==============================================================================
*/
/**
*
* Copyright (c) 2014 Pascal Gauthier.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*/
#ifndef SYSEXCOMM_H_INCLUDED
#define SYSEXCOMM_H_INCLUDED
@ -39,6 +49,4 @@ public :
void send(const MidiMessage& message);
};
#endif // SYSEXCOMM_H_INCLUDED
Loading…
Cancel
Save