Inital cartridge manager implementation

pull/1/head
asb2m10 10 years ago
parent 487038d210
commit 6a535ec45a
  1. 36
      Builds/Linux/Makefile
  2. 5192
      Builds/MacOSX/Dexed.xcodeproj/project.pbxproj
  3. BIN
      Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate
  4. 6
      Builds/MacOSX/Info.plist
  5. 16
      Builds/VisualStudio2012/Dexed.vcxproj
  6. 24
      Builds/VisualStudio2012/Dexed.vcxproj.filters
  7. 6
      Builds/VisualStudio2012/resources.rc
  8. 2
      Builds/VisualStudio2013/Dexed.vcxproj
  9. 6
      Builds/VisualStudio2013/Dexed.vcxproj.filters
  10. 44
      Dexed.jucer
  11. 6
      JuceLibraryCode/AppConfig.h
  12. 4
      JuceLibraryCode/JuceHeader.h
  13. 23
      README.md
  14. 187
      Source/CartManager.cpp
  15. 66
      Source/CartManager.h
  16. 18
      Source/DXLookNFeel.cpp
  17. 4
      Source/DXLookNFeel.h
  18. 4
      Source/Dexed.h
  19. 53
      Source/GlobalEditor.cpp
  20. 3
      Source/GlobalEditor.h
  21. 3
      Source/OperatorEditor.cpp
  22. 147
      Source/PluginData.cpp
  23. 5
      Source/PluginData.h
  24. 73
      Source/PluginEditor.cpp
  25. 6
      Source/PluginEditor.h
  26. 11
      Source/PluginFx.h
  27. 14
      Source/PluginParam.cpp
  28. 20
      Source/PluginProcessor.cpp
  29. 28
      Source/PluginProcessor.h
  30. 92
      Source/ProgramListBox.cpp
  31. 56
      Source/ProgramListBox.h

@ -18,12 +18,12 @@ ifeq ($(CONFIG),Debug)
TARGET_ARCH := -march=native
endif
CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=0.8.1" -D "JUCE_APP_VERSION_HEX=0x801" -I /usr/include -I /usr/include/freetype2 -I ~/src/vstsdk2.4 -I ../../JuceLibraryCode -I ../../JuceLibraryCode/modules
CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=1.0.0" -D "JUCE_APP_VERSION_HEX=0x10000" -I /usr/include -I /usr/include/freetype2 -I ~/src/vstsdk2.4 -I ../../JuceLibraryCode -I ../../JuceLibraryCode/modules
CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -ggdb -fPIC -O0
CXXFLAGS += $(CFLAGS)
LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -shared -L/usr/X11R6/lib/ -lX11 -lXext -lXinerama -lasound -ldl -lfreetype -lpthread -lrt
LDDEPS :=
RESFLAGS := -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=0.8.1" -D "JUCE_APP_VERSION_HEX=0x801" -I /usr/include -I /usr/include/freetype2 -I ~/src/vstsdk2.4 -I ../../JuceLibraryCode -I ../../JuceLibraryCode/modules
RESFLAGS := -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=1.0.0" -D "JUCE_APP_VERSION_HEX=0x10000" -I /usr/include -I /usr/include/freetype2 -I ~/src/vstsdk2.4 -I ../../JuceLibraryCode -I ../../JuceLibraryCode/modules
TARGET := Dexed.so
BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)
CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR)
@ -39,12 +39,12 @@ ifeq ($(CONFIG),Release)
TARGET_ARCH := -march=native
endif
CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "NDEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=0.8.1" -D "JUCE_APP_VERSION_HEX=0x801" -I /usr/include -I /usr/include/freetype2 -I ~/src/vstsdk2.4 -I ../../JuceLibraryCode -I ../../JuceLibraryCode/modules
CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "NDEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=1.0.0" -D "JUCE_APP_VERSION_HEX=0x10000" -I /usr/include -I /usr/include/freetype2 -I ~/src/vstsdk2.4 -I ../../JuceLibraryCode -I ../../JuceLibraryCode/modules
CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -fPIC -Os
CXXFLAGS += $(CFLAGS)
LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -shared -fvisibility=hidden -L/usr/X11R6/lib/ -lX11 -lXext -lXinerama -lasound -ldl -lfreetype -lpthread -lrt
LDDEPS :=
RESFLAGS := -D "LINUX=1" -D "NDEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=0.8.1" -D "JUCE_APP_VERSION_HEX=0x801" -I /usr/include -I /usr/include/freetype2 -I ~/src/vstsdk2.4 -I ../../JuceLibraryCode -I ../../JuceLibraryCode/modules
RESFLAGS := -D "LINUX=1" -D "NDEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=1.0.0" -D "JUCE_APP_VERSION_HEX=0x10000" -I /usr/include -I /usr/include/freetype2 -I ~/src/vstsdk2.4 -I ../../JuceLibraryCode -I ../../JuceLibraryCode/modules
TARGET := Dexed.so
BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)
CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR)
@ -55,12 +55,14 @@ OBJECTS := \
$(OBJDIR)/EngineMkI_615efdaa.o \
$(OBJDIR)/EngineOpl_d5a0e5ea.o \
$(OBJDIR)/PluginEditor_94d4fb09.o \
$(OBJDIR)/GlobalEditor_4b9bc379.o \
$(OBJDIR)/CartManager_8ad0044e.o \
$(OBJDIR)/ProgramListBox_58735432.o \
$(OBJDIR)/ParamDialog_aca81c16.o \
$(OBJDIR)/OperatorEditor_b03d363a.o \
$(OBJDIR)/AlgoDisplay_895ecdd0.o \
$(OBJDIR)/DXLookNFeel_cfc3afa2.o \
$(OBJDIR)/DXComponents_a6963633.o \
$(OBJDIR)/OperatorEditor_b03d363a.o \
$(OBJDIR)/GlobalEditor_4b9bc379.o \
$(OBJDIR)/freqlut_ca864b55.o \
$(OBJDIR)/lfo_a7533573.o \
$(OBJDIR)/dx7note_176ee213.o \
@ -127,19 +129,19 @@ $(OBJDIR)/PluginEditor_94d4fb09.o: ../../Source/PluginEditor.cpp
@echo "Compiling PluginEditor.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/GlobalEditor_4b9bc379.o: ../../Source/GlobalEditor.cpp
$(OBJDIR)/CartManager_8ad0044e.o: ../../Source/CartManager.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling GlobalEditor.cpp"
@echo "Compiling CartManager.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/ParamDialog_aca81c16.o: ../../Source/ParamDialog.cpp
$(OBJDIR)/ProgramListBox_58735432.o: ../../Source/ProgramListBox.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling ParamDialog.cpp"
@echo "Compiling ProgramListBox.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/OperatorEditor_b03d363a.o: ../../Source/OperatorEditor.cpp
$(OBJDIR)/ParamDialog_aca81c16.o: ../../Source/ParamDialog.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling OperatorEditor.cpp"
@echo "Compiling ParamDialog.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/AlgoDisplay_895ecdd0.o: ../../Source/AlgoDisplay.cpp
@ -157,6 +159,16 @@ $(OBJDIR)/DXComponents_a6963633.o: ../../Source/DXComponents.cpp
@echo "Compiling DXComponents.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/OperatorEditor_b03d363a.o: ../../Source/OperatorEditor.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling OperatorEditor.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/GlobalEditor_4b9bc379.o: ../../Source/GlobalEditor.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling GlobalEditor.cpp"
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
$(OBJDIR)/freqlut_ca864b55.o: ../../Source/msfa/freqlut.cc
-@mkdir -p $(OBJDIR)
@echo "Compiling freqlut.cc"

File diff suppressed because it is too large Load Diff

@ -16,9 +16,9 @@
<key>CFBundleSignature</key>
<string>PTul</string>
<key>CFBundleShortVersionString</key>
<string>0.8.1</string>
<string>1.0.0</string>
<key>CFBundleVersion</key>
<string>0.8.1</string>
<string>1.0.0</string>
<key>NSHumanReadableCopyright</key>
<string>Digital Suburban</string>
<key>NSHighResolutionCapable</key>
@ -39,7 +39,7 @@
<key>subtype</key>
<string>Dexd</string>
<key>version</key>
<integer>2049</integer>
<integer>65536</integer>
</dict>
</array>
</dict>

@ -58,7 +58,7 @@
<Optimization>Disabled</Optimization>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\JuceLibraryCode\modules;C:\work\vstsdk2.4;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2012_78A501F=1;JUCE_APP_VERSION=0.8.1;JUCE_APP_VERSION_HEX=0x801;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2012_78A501F=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
@ -100,7 +100,7 @@
<ClCompile>
<Optimization>MinSpace</Optimization>
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\JuceLibraryCode\modules;C:\work\vstsdk2.4;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;JUCER_VS2012_78A501F=1;JUCE_APP_VERSION=0.8.1;JUCE_APP_VERSION_HEX=0x801;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;JUCER_VS2012_78A501F=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
@ -137,12 +137,14 @@
<ClCompile Include="..\..\Source\EngineMkI.cpp"/>
<ClCompile Include="..\..\Source\EngineOpl.cpp"/>
<ClCompile Include="..\..\Source\PluginEditor.cpp"/>
<ClCompile Include="..\..\Source\GlobalEditor.cpp"/>
<ClCompile Include="..\..\Source\CartManager.cpp"/>
<ClCompile Include="..\..\Source\ProgramListBox.cpp"/>
<ClCompile Include="..\..\Source\ParamDialog.cpp"/>
<ClCompile Include="..\..\Source\OperatorEditor.cpp"/>
<ClCompile Include="..\..\Source\AlgoDisplay.cpp"/>
<ClCompile Include="..\..\Source\DXLookNFeel.cpp"/>
<ClCompile Include="..\..\Source\DXComponents.cpp"/>
<ClCompile Include="..\..\Source\OperatorEditor.cpp"/>
<ClCompile Include="..\..\Source\GlobalEditor.cpp"/>
<ClCompile Include="..\..\Source\msfa\freqlut.cc"/>
<ClCompile Include="..\..\Source\msfa\lfo.cc"/>
<ClCompile Include="..\..\Source\msfa\dx7note.cc"/>
@ -1111,12 +1113,14 @@
<ClInclude Include="..\..\Source\EngineMkI.h"/>
<ClInclude Include="..\..\Source\EngineOpl.h"/>
<ClInclude Include="..\..\Source\PluginEditor.h"/>
<ClInclude Include="..\..\Source\GlobalEditor.h"/>
<ClInclude Include="..\..\Source\CartManager.h"/>
<ClInclude Include="..\..\Source\ProgramListBox.h"/>
<ClInclude Include="..\..\Source\ParamDialog.h"/>
<ClInclude Include="..\..\Source\OperatorEditor.h"/>
<ClInclude Include="..\..\Source\AlgoDisplay.h"/>
<ClInclude Include="..\..\Source\DXLookNFeel.h"/>
<ClInclude Include="..\..\Source\DXComponents.h"/>
<ClInclude Include="..\..\Source\OperatorEditor.h"/>
<ClInclude Include="..\..\Source\GlobalEditor.h"/>
<ClInclude Include="..\..\Source\msfa\freqlut.h"/>
<ClInclude Include="..\..\Source\msfa\lfo.h"/>
<ClInclude Include="..\..\Source\msfa\aligned_buf.h"/>

@ -289,13 +289,13 @@
<ClCompile Include="..\..\Source\PluginEditor.cpp">
<Filter>Dexed\Source\ui</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\GlobalEditor.cpp">
<ClCompile Include="..\..\Source\CartManager.cpp">
<Filter>Dexed\Source\ui</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\ParamDialog.cpp">
<ClCompile Include="..\..\Source\ProgramListBox.cpp">
<Filter>Dexed\Source\ui</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\OperatorEditor.cpp">
<ClCompile Include="..\..\Source\ParamDialog.cpp">
<Filter>Dexed\Source\ui</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\AlgoDisplay.cpp">
@ -307,6 +307,12 @@
<ClCompile Include="..\..\Source\DXComponents.cpp">
<Filter>Dexed\Source\ui</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\OperatorEditor.cpp">
<Filter>Dexed\Source\ui</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\GlobalEditor.cpp">
<Filter>Dexed\Source\ui</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\msfa\freqlut.cc">
<Filter>Dexed\Source\msfa</Filter>
</ClCompile>
@ -1419,13 +1425,13 @@
<ClInclude Include="..\..\Source\PluginEditor.h">
<Filter>Dexed\Source\ui</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\GlobalEditor.h">
<ClInclude Include="..\..\Source\CartManager.h">
<Filter>Dexed\Source\ui</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\ParamDialog.h">
<ClInclude Include="..\..\Source\ProgramListBox.h">
<Filter>Dexed\Source\ui</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\OperatorEditor.h">
<ClInclude Include="..\..\Source\ParamDialog.h">
<Filter>Dexed\Source\ui</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\AlgoDisplay.h">
@ -1437,6 +1443,12 @@
<ClInclude Include="..\..\Source\DXComponents.h">
<Filter>Dexed\Source\ui</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\OperatorEditor.h">
<Filter>Dexed\Source\ui</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\GlobalEditor.h">
<Filter>Dexed\Source\ui</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\msfa\freqlut.h">
<Filter>Dexed\Source\msfa</Filter>
</ClInclude>

@ -7,7 +7,7 @@
#include <windows.h>
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,8,1,0
FILEVERSION 1,0,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
@ -15,9 +15,9 @@ BEGIN
BEGIN
VALUE "CompanyName", "Digital Suburban\0"
VALUE "FileDescription", "Dexed\0"
VALUE "FileVersion", "0.8.1\0"
VALUE "FileVersion", "1.0.0\0"
VALUE "ProductName", "Dexed\0"
VALUE "ProductVersion", "0.8.1\0"
VALUE "ProductVersion", "1.0.0\0"
END
END

@ -135,6 +135,7 @@
<ClCompile Include="..\..\Source\PluginFx.cpp"/>
<ClCompile Include="..\..\Source\EngineMkI.cpp"/>
<ClCompile Include="..\..\Source\EngineOpl.cpp"/>
<ClCompile Include="..\..\Source\CartManager.cpp"/>
<ClCompile Include="..\..\Source\PluginEditor.cpp"/>
<ClCompile Include="..\..\Source\GlobalEditor.cpp"/>
<ClCompile Include="..\..\Source\ParamDialog.cpp"/>
@ -1109,6 +1110,7 @@
<ClInclude Include="..\..\Source\PluginFx.h"/>
<ClInclude Include="..\..\Source\EngineMkI.h"/>
<ClInclude Include="..\..\Source\EngineOpl.h"/>
<ClInclude Include="..\..\Source\CartManager.h"/>
<ClInclude Include="..\..\Source\PluginEditor.h"/>
<ClInclude Include="..\..\Source\GlobalEditor.h"/>
<ClInclude Include="..\..\Source\ParamDialog.h"/>

@ -286,6 +286,9 @@
<ClCompile Include="..\..\Source\EngineOpl.cpp">
<Filter>Dexed\Source\dsp</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\CartManager.cpp">
<Filter>Dexed\Source\ui</Filter>
</ClCompile>
<ClCompile Include="..\..\Source\PluginEditor.cpp">
<Filter>Dexed\Source\ui</Filter>
</ClCompile>
@ -1416,6 +1419,9 @@
<ClInclude Include="..\..\Source\EngineOpl.h">
<Filter>Dexed\Source\dsp</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\CartManager.h">
<Filter>Dexed\Source\ui</Filter>
</ClInclude>
<ClInclude Include="..\..\Source\PluginEditor.h">
<Filter>Dexed\Source\ui</Filter>
</ClInclude>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<JUCERPROJECT id="ryFHHI" name="Dexed" projectType="audioplug" version="0.8.1"
<JUCERPROJECT id="ryFHHI" name="Dexed" projectType="audioplug" version="1.0.0"
bundleIdentifier="com.digitalsuburban.Dexed" includeBinaryInAppConfig="1"
buildVST="1" buildAU="1" pluginName="Dexed" pluginDesc="Dexed FM Synth"
pluginManufacturer="Digital Suburban" pluginManufacturerCode="DGSB"
@ -48,15 +48,14 @@
<FILE id="Ec211k" name="PluginEditor.cpp" compile="1" resource="0"
file="Source/PluginEditor.cpp"/>
<FILE id="lZFsG0" name="PluginEditor.h" compile="0" resource="0" file="Source/PluginEditor.h"/>
<FILE id="thAIGQ" name="GlobalEditor.cpp" compile="1" resource="0"
file="Source/GlobalEditor.cpp"/>
<FILE id="CxMFcr" name="GlobalEditor.h" compile="0" resource="0" file="Source/GlobalEditor.h"/>
<FILE id="es8q5y" name="CartManager.cpp" compile="1" resource="0" file="Source/CartManager.cpp"/>
<FILE id="aKUAyS" name="CartManager.h" compile="0" resource="0" file="Source/CartManager.h"/>
<FILE id="McuhRh" name="ProgramListBox.cpp" compile="1" resource="0"
file="Source/ProgramListBox.cpp"/>
<FILE id="pvLRyR" name="ProgramListBox.h" compile="0" resource="0"
file="Source/ProgramListBox.h"/>
<FILE id="eZN5P2" name="ParamDialog.cpp" compile="1" resource="0" file="Source/ParamDialog.cpp"/>
<FILE id="fijjBN" name="ParamDialog.h" compile="0" resource="0" file="Source/ParamDialog.h"/>
<FILE id="oUObPG" name="OperatorEditor.cpp" compile="1" resource="0"
file="Source/OperatorEditor.cpp"/>
<FILE id="ChJDca" name="OperatorEditor.h" compile="0" resource="0"
file="Source/OperatorEditor.h"/>
<FILE id="mlAFW9" name="AlgoDisplay.cpp" compile="1" resource="0" file="Source/AlgoDisplay.cpp"/>
<FILE id="ZsRqfW" name="AlgoDisplay.h" compile="0" resource="0" file="Source/AlgoDisplay.h"/>
<FILE id="TgCdkS" name="DXLookNFeel.cpp" compile="1" resource="0" file="Source/DXLookNFeel.cpp"/>
@ -64,6 +63,13 @@
<FILE id="yOSLIH" name="DXComponents.cpp" compile="1" resource="0"
file="Source/DXComponents.cpp"/>
<FILE id="x2E8Zg" name="DXComponents.h" compile="0" resource="0" file="Source/DXComponents.h"/>
<FILE id="oUObPG" name="OperatorEditor.cpp" compile="1" resource="0"
file="Source/OperatorEditor.cpp"/>
<FILE id="ChJDca" name="OperatorEditor.h" compile="0" resource="0"
file="Source/OperatorEditor.h"/>
<FILE id="thAIGQ" name="GlobalEditor.cpp" compile="1" resource="0"
file="Source/GlobalEditor.cpp"/>
<FILE id="CxMFcr" name="GlobalEditor.h" compile="0" resource="0" file="Source/GlobalEditor.h"/>
</GROUP>
<GROUP id="{CEBA9AF6-1C73-85F6-A187-56A246098441}" name="msfa">
<FILE id="wvG22S" name="freqlut.cc" compile="1" resource="0" file="Source/msfa/freqlut.cc"/>
@ -148,28 +154,6 @@
<MODULEPATH id="juce_audio_basics" path="../../juce"/>
</MODULEPATHS>
</VS2012>
<VS2013 targetFolder="Builds/VisualStudio2013" vstFolder="C:\work\vstsdk2.4">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" winWarningLevel="4" generateManifest="1" winArchitecture="x64"
isDebug="1" optimisation="1" targetName="Dexed"/>
<CONFIGURATION name="Release" winWarningLevel="4" generateManifest="1" winArchitecture="x64"
isDebug="0" optimisation="2" targetName="Dexed"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_gui_extra" path="../../juce"/>
<MODULEPATH id="juce_gui_basics" path="../../juce"/>
<MODULEPATH id="juce_graphics" path="../../juce"/>
<MODULEPATH id="juce_events" path="../../juce"/>
<MODULEPATH id="juce_data_structures" path="../../juce"/>
<MODULEPATH id="juce_core" path="../../juce"/>
<MODULEPATH id="juce_audio_utils" path="../../juce"/>
<MODULEPATH id="juce_audio_processors" path="../../juce"/>
<MODULEPATH id="juce_audio_plugin_client" path="../../juce"/>
<MODULEPATH id="juce_audio_formats" path="../../juce"/>
<MODULEPATH id="juce_audio_devices" path="../../juce"/>
<MODULEPATH id="juce_audio_basics" path="../../juce"/>
</MODULEPATHS>
</VS2013>
<LINUX_MAKE targetFolder="Builds/Linux" vstFolder="~/src/vstsdk2.4">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" libraryPath="/usr/X11R6/lib/" isDebug="1" optimisation="1"

@ -237,13 +237,13 @@
#define JucePlugin_EditorRequiresKeyboardFocus 0
#endif
#ifndef JucePlugin_Version
#define JucePlugin_Version 0.8.1
#define JucePlugin_Version 1.0.0
#endif
#ifndef JucePlugin_VersionCode
#define JucePlugin_VersionCode 0x801
#define JucePlugin_VersionCode 0x10000
#endif
#ifndef JucePlugin_VersionString
#define JucePlugin_VersionString "0.8.1"
#define JucePlugin_VersionString "1.0.0"
#endif
#ifndef JucePlugin_VSTUniqueID
#define JucePlugin_VSTUniqueID JucePlugin_PluginCode

@ -38,8 +38,8 @@
namespace ProjectInfo
{
const char* const projectName = "Dexed";
const char* const versionString = "0.8.1";
const int versionNumber = 0x801;
const char* const versionString = "1.0.0";
const int versionNumber = 0x10000;
}
#endif

@ -15,7 +15,7 @@ in the source folder) stays on the Apache 2.0 license to able to collaborate bet
Features
--------
* Multi platform (OS X, Windows or Linux) and multi format (VST, *soon* AU and others that I don't use); by using JUCE
* Multi platform (OS X, Windows or Linux) and multi format (VST, AU); by using JUCE
* The sound engine [music-synthesizer-for-android](https://code.google.com/p/music-synthesizer-for-android) is closely modeled on the original DX7 characteristics
* 144 DAW automatable DX7 parameters 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 and sysex manager
@ -37,11 +37,11 @@ Changelog
---------
#### Version 0.8.1
* Cartridge Manager
* Apple AU support
* Basic theming
* Fixed the UI corruption when more than one Dexed instance was loaded
#### 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
@ -70,13 +70,11 @@ Changelog
* Knobs now works with vertical mouse drags
* User DX7 zip cartridges
User DX7 zip cartridges
-----------------------
It is possible to enjoy your DX7 sysex collection from one single zip file. Simply move your zipped
sysex content to where you have installed Dexed (VST plugins dir). Then rename the zip file to
`Dexed_cart.zip`. You can modify this file anytime you want, Dexed will simply reparse it when the
file is changed. Directories in the zip file will be transformed into submenu when you hit the
[CART] button. Watch out; Windows hides the .zip extension by default !
DX7 cartridges
--------------
You can now put user cartridges in the "Cartridges" directory once Dexed is started. You will be able to browse them once you use the [CART] button. To get the exact location of this directory, simply click on [FILE MGR], it should open Finder or File Explorer in the "Cartridges" directory.
NOTE: Dexed_Cart.zip is no longer used.
Engine Type
-----------
@ -147,12 +145,6 @@ Credits & thanks
* 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
Planned milestones
------------------
* 0.7 msfa engine tuning
* 0.8 UI redesign
* 0.8.1 Cartridge browser/editor
TODO - Dexed
------------
* Yamaha 4 operators (DX21/DX27/DX100) sysex import
@ -160,7 +152,6 @@ TODO - Dexed
* Zomby UI changes: this occurs in Live and will be fixed in the 0.8.1 version.
* Various code cleanup
* More smothness in mono mode
* AU Version
TODO - msfa
-----------

@ -0,0 +1,187 @@
/**
*
* Copyright (c) 2015 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 3 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 "PluginProcessor.h"
#include "PluginEditor.h"
#include "CartManager.h"
#include "DXLookNFeel.h"
#include "PluginData.h"
#include <fstream>
using namespace ::std;
class SyxFileFilter : public FileFilter {
public:
SyxFileFilter() : FileFilter(".syx") {}
bool isFileSuitable(const File &file) const {
return file.getFileExtension().toLowerCase() == ".syx";
}
bool isDirectorySuitable(const File &file) const {
return true;
};
};
CartManager::CartManager(DexedAudioProcessorEditor *editor) : TopLevelWindow("CartManager", false),
timeSliceThread("Cartridge Directory Scanner") {
mainWindow = editor;
cartDir = DexedAudioProcessor::dexedCartDir;
addAndMakeVisible(activeCart = new ProgramListBox("activepgm", 8));
activeCart->setBounds(8, 430, 843, 100);
activeCart->addListener(this);
memset(browserSysex, 0, 4096);
addAndMakeVisible(browserCart = new ProgramListBox("browserpgm", 2));
browserCart->setBounds(635, 10, 210, 400);
browserCart->addListener(this);
// -------------------------
syxFileFilter = new SyxFileFilter();
cartBrowserList = new DirectoryContentsList(syxFileFilter, timeSliceThread);
cartBrowserList->setDirectory(cartDir, true, true);
timeSliceThread.startThread();
cartBrowser = new FileTreeComponent(*cartBrowserList);
addAndMakeVisible(cartBrowser);
cartBrowser->setBounds(5, 10, 620, 400);
cartBrowser->setDragAndDropDescription("Sysex Browser");
cartBrowser->addListener(this);
/*addAndMakeVisible(newButton = new TextButton("NEW"));
newButton->setBounds(400, 540, 50, 30);*/
addAndMakeVisible(closeButton = new TextButton("CLOSE"));
closeButton->setBounds(10, 540, 50, 30);
addAndMakeVisible(loadButton = new TextButton("LOAD"));
loadButton->setBounds(58, 540, 50, 30);
loadButton->addListener(this);
addAndMakeVisible(saveButton = new TextButton("SAVE"));
saveButton->setBounds(106, 540, 50, 30);
saveButton->addListener(this);
closeButton->addListener(this);
addAndMakeVisible(fileMgrButton = new TextButton("SHOW DIR"));
fileMgrButton->setBounds(154, 540, 70, 30);
fileMgrButton->addListener(this);
}
// 856, 571
void CartManager::paint(Graphics &g) {
g.fillAll(DXLookNFeel::lightBackground);
//g.setColour(Colours::black);
//g.fillRect(0, 5, 859, 410);
}
void CartManager::programSelected(ProgramListBox *source, int pos) {
if ( source == activeCart ) {
browserCart->setSelected(-1);
mainWindow->processor->setCurrentProgram(pos);
mainWindow->processor->updateHostDisplay();
} else {
if ( browserSysex == nullptr )
return;
char unpackPgm[161];
unpackProgramFromSysex(unpackPgm, browserSysex, pos);
activeCart->setSelected(-1);
browserCart->setSelected(pos);
repaint();
mainWindow->processor->updateProgramFromSysex((uint8_t *) unpackPgm);
mainWindow->processor->updateHostDisplay();
}
}
void CartManager::buttonClicked(juce::Button *buttonThatWasClicked) {
if ( buttonThatWasClicked == closeButton ) {
setVisible(false);
return;
}
if ( buttonThatWasClicked == loadButton ) {
FileChooser fc ("Import original DX sysex...", File::nonexistent, "*.syx;*.SYX;*.*", 1);
if ( fc.browseForFileToOpen())
mainWindow->loadCart(fc.getResult());
return;
}
if ( buttonThatWasClicked == saveButton ) {
mainWindow->saveCart();
}
if ( buttonThatWasClicked == fileMgrButton ) {
cartDir.revealToUser();
return;
}
}
void CartManager::fileDoubleClicked(const File& file) {
if ( file.isDirectory() )
return;
mainWindow->loadCart(file);
activeCart->setCartridge(mainWindow->processor->sysex);
}
void CartManager::fileClicked(const File& file, const MouseEvent& e) {
if ( ! e.mods.isLeftButtonDown() )
return;
if ( file.isDirectory() )
return;
String f = file.getFullPathName();
uint8_t syx_data[4104];
ifstream fp_in(f.toRawUTF8(), ios::binary);
if (fp_in.fail()) {
AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, "Error", "Unable to open: " + f);
return;
}
fp_in.read((char *)syx_data, 4104);
fp_in.close();
memcpy(browserSysex, syx_data+6, 4096);
int checksum = sysexChecksum(((char *) &browserSysex), 4096);
if ( checksum != syx_data[4102] ) {
String message = "Sysex import checksum doesnt match ";
message << checksum << " != " << syx_data[4102];
AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon, "Error", message);
return;
}
browserCart->setCartridge(browserSysex);
}
void CartManager::setActiveProgram(int idx) {
activeCart->setSelected(idx);
browserCart->setSelected(-1);
activeCart->repaint();
}
void CartManager::resetActiveSysex() {
activeCart->setCartridge(mainWindow->processor->sysex);
}
// unused stuff from FileBrowserListener
void CartManager::browserRootChanged (const File& newRoot) {}
void CartManager::selectionChanged() {}

@ -0,0 +1,66 @@
/**
*
* Copyright (c) 2015 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 3 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 CARTMANAGER_H_INCLUDED
#define CARTMANAGER_H_INCLUDED
#include "../JuceLibraryCode/JuceHeader.h"
#include "PluginData.h"
#include "ProgramListBox.h"
class CartManager : public TopLevelWindow, public ButtonListener, public DragAndDropContainer, public FileBrowserListener
, public ProgramListBoxListener {
ScopedPointer<TextButton> newButton;
ScopedPointer<TextButton> loadButton;
ScopedPointer<TextButton> saveButton;
ScopedPointer<TextButton> closeButton;
ScopedPointer<TextButton> fileMgrButton;
ScopedPointer<ProgramListBox> activeCart;
ScopedPointer<ProgramListBox> browserCart;
ScopedPointer<FileTreeComponent> cartBrowser;
ScopedPointer<FileFilter> syxFileFilter;
TimeSliceThread timeSliceThread;
ScopedPointer<DirectoryContentsList> cartBrowserList;
File cartDir;
DexedAudioProcessorEditor *mainWindow;
char browserSysex[4096];
public:
CartManager(DexedAudioProcessorEditor *editor);
void paint(Graphics& g);
void buttonClicked (Button* buttonThatWasClicked);
void selectionChanged();
void fileClicked (const File& file, const MouseEvent& e);
void fileDoubleClicked (const File& file);
void browserRootChanged (const File& newRoot);
void setActiveProgram(int idx);
void resetActiveSysex();
virtual void programSelected(ProgramListBox *source, int pos) override;
};
#endif // CARTMANAGER_H_INCLUDED

@ -21,8 +21,7 @@
#include "DXLookNFeel.h"
#include "DXComponents.h"
#include "Dexed.h"
extern File dexedWorkdir;
#include "PluginProcessor.h"
#define REG_COLOUR(id, value) setColour(id, value); colourMap.set(#id, id)
@ -36,13 +35,9 @@ Image &findImage(String path) {
}
DXLookNFeel::DXLookNFeel() {
Colour lightBackground;
Colour ctrlBackground;
dexedWorkdir.setAsCurrentWorkingDirectory();
background = Colour(60,50,47);
lightBackground = Colour(78,72,63);
DexedAudioProcessor::dexedAppDir.setAsCurrentWorkingDirectory();
ctrlBackground = Colour(20,18,18);
REG_COLOUR(TextButton::buttonColourId,Colour(0xFF0FC00F));
@ -63,7 +58,10 @@ DXLookNFeel::DXLookNFeel() {
REG_COLOUR(PopupMenu::textColourId, Colours::white);
REG_COLOUR(PopupMenu::highlightedTextColourId, Colours::white);
REG_COLOUR(PopupMenu::highlightedBackgroundColourId, fillColour);
REG_COLOUR(TreeView::backgroundColourId, background);
REG_COLOUR(DirectoryContentsDisplayComponent::highlightColourId, fillColour);
REG_COLOUR(DirectoryContentsDisplayComponent::textColourId, Colours::white);
imageKnob = ImageCache::getFromMemory(BinaryData::Knob_34x34_png, BinaryData::Knob_34x34_pngSize);
imageSwitch = ImageCache::getFromMemory(BinaryData::Switch_48x26_png, BinaryData::Switch_48x26_pngSize);
imageButton = ImageCache::getFromMemory(BinaryData::ButtonUnlabeled_50x30_png, BinaryData::ButtonUnlabeled_50x30_pngSize);
@ -77,7 +75,7 @@ DXLookNFeel::DXLookNFeel() {
defaultFont = Typeface::createSystemTypefaceFor(BinaryData::NotoSansRegular_ttf, BinaryData::NotoSansRegular_ttfSize);
defaultFontBold = Typeface::createSystemTypefaceFor(BinaryData::NotoSansBold_ttf, BinaryData::NotoSansBold_ttfSize);
File dexedTheme = dexedWorkdir.getChildFile("DexedTheme.xml");
File dexedTheme = DexedAudioProcessor::dexedAppDir.getChildFile("DexedTheme.xml");
if ( ! dexedTheme.existsAsFile() )
return;
@ -239,6 +237,8 @@ void DXLookNFeel::positionComboBoxText(ComboBox& box, Label& label) {
CriticalSection DXLookNFeel::lock;
DXLookNFeel * DXLookNFeel::ins = NULL;
Colour DXLookNFeel::fillColour = Colour(77,159,151);
Colour DXLookNFeel::lightBackground = Colour(78,72,63);
Colour DXLookNFeel::background = Colour(60,50,47);
DXLookNFeel *DXLookNFeel::getLookAndFeel() {
const ScopedLock locker(lock);

@ -34,8 +34,6 @@ public:
Typeface::Ptr defaultFont;
Typeface::Ptr defaultFontBold;
Colour background;
Image imageKnob, imageSwitch, imageButton, imageSlider, imageScaling, imageLight, imageLFO;
Image imageOperator, imageGlobal;
@ -56,6 +54,8 @@ public:
static DXLookNFeel *getLookAndFeel();
static Colour fillColour;
static Colour lightBackground;
static Colour background;
};
#endif // DXLOOKNFEEL_H_INCLUDED

@ -24,14 +24,14 @@
void dexed_trace(const char *source, const char *fmt, ...);
#ifdef DEBUG
#define DEXED_VERSION "0.8.1a DEBUG"
#define DEXED_VERSION "0.8.1 DEBUG"
#ifdef _MSC_VER
#define TRACE(fmt, ...) dexed_trace(__FUNCTION__,fmt,##__VA_ARGS__)
#else
#define TRACE(fmt, ...) dexed_trace(__PRETTY_FUNCTION__,fmt,##__VA_ARGS__)
#endif
#else
#define DEXED_VERSION "0.8.OSC"
#define DEXED_VERSION "0.8.1"
#define TRACE(fmt, ...)
#endif

@ -206,22 +206,10 @@ GlobalEditor::GlobalEditor ()
parmButton->setButtonText (TRANS("PARM"));
parmButton->addListener (this);
addAndMakeVisible (sendButton = new TextButton ("sendButton"));
sendButton->setButtonText (TRANS("SEND"));
sendButton->addListener (this);
addAndMakeVisible (cartButton = new TextButton ("cartButton"));
cartButton->setButtonText (TRANS("CART"));
cartButton->addListener (this);
addAndMakeVisible (loadButton = new TextButton ("loadButton"));
loadButton->setButtonText (TRANS("LOAD"));
loadButton->addListener (this);
addAndMakeVisible (saveButton = new TextButton ("saveButton"));
saveButton->setButtonText (TRANS("SAVE"));
saveButton->addListener (this);
addAndMakeVisible (storeButton = new TextButton ("storeButton"));
storeButton->setButtonText (TRANS("STORE"));
storeButton->addListener (this);
@ -291,10 +279,7 @@ GlobalEditor::~GlobalEditor()
vuOutput = nullptr;
initButton = nullptr;
parmButton = nullptr;
sendButton = nullptr;
cartButton = nullptr;
loadButton = nullptr;
saveButton = nullptr;
storeButton = nullptr;
monoMode = nullptr;
lfoType = nullptr;
@ -346,12 +331,9 @@ void GlobalEditor::resized()
lcdDisplay->setBounds (6, 87, 140, 13);
output->setBounds (157, 60, 34, 34);
vuOutput->setBounds (6, 103, 140, 8);
initButton->setBounds (3, 56, 50, 30);
parmButton->setBounds (51, 56, 50, 30);
sendButton->setBounds (99, 56, 50, 30);
initButton->setBounds (100, 111, 50, 30);
parmButton->setBounds (52, 111, 50, 30);
cartButton->setBounds (3, 111, 50, 30);
loadButton->setBounds (50, 111, 50, 30);
saveButton->setBounds (98, 111, 50, 30);
storeButton->setBounds (270, 109, 50, 30);
monoMode->setBounds (249, 65, 48, 26);
lfoType->setBounds (583, 8, 36, 26);
@ -502,30 +484,12 @@ void GlobalEditor::buttonClicked (Button* buttonThatWasClicked)
editor->parmShow();
//[/UserButtonCode_parmButton]
}
else if (buttonThatWasClicked == sendButton)
{
//[UserButtonCode_sendButton] -- add your button handler code here..
editor->sendToDx7();
//[/UserButtonCode_sendButton]
}
else if (buttonThatWasClicked == cartButton)
{
//[UserButtonCode_cartButton] -- add your button handler code here..
editor->cartShow();
//[/UserButtonCode_cartButton]
}
else if (buttonThatWasClicked == loadButton)
{
//[UserButtonCode_loadButton] -- add your button handler code here..
editor->loadCart();
//[/UserButtonCode_loadButton]
}
else if (buttonThatWasClicked == saveButton)
{
//[UserButtonCode_saveButton] -- add your button handler code here..
editor->saveCart();
//[/UserButtonCode_saveButton]
}
else if (buttonThatWasClicked == storeButton)
{
//[UserButtonCode_storeButton] -- add your button handler code here..
@ -720,23 +684,14 @@ BEGIN_JUCER_METADATA
<GENERICCOMPONENT name="vuOutput" id="dac75af912267f51" memberName="vuOutput" virtualName=""
explicitFocusOrder="0" pos="6 103 140 8" class="VuMeter" params=""/>
<TEXTBUTTON name="initButton" id="92b278163c42e21d" memberName="initButton"
virtualName="" explicitFocusOrder="0" pos="3 56 50 30" buttonText="INIT"
virtualName="" explicitFocusOrder="0" pos="100 111 50 30" buttonText="INIT"
connectedEdges="0" needsCallback="1" radioGroupId="0"/>
<TEXTBUTTON name="parmButton" id="d5cd6260b34be817" memberName="parmButton"
virtualName="" explicitFocusOrder="0" pos="51 56 50 30" buttonText="PARM"
connectedEdges="0" needsCallback="1" radioGroupId="0"/>
<TEXTBUTTON name="sendButton" id="9b45b291c75c7b3f" memberName="sendButton"
virtualName="" explicitFocusOrder="0" pos="99 56 50 30" buttonText="SEND"
virtualName="" explicitFocusOrder="0" pos="52 111 50 30" buttonText="PARM"
connectedEdges="0" needsCallback="1" radioGroupId="0"/>
<TEXTBUTTON name="cartButton" id="465a101c3a0e744" memberName="cartButton"
virtualName="" explicitFocusOrder="0" pos="3 111 50 30" buttonText="CART"
connectedEdges="0" needsCallback="1" radioGroupId="0"/>
<TEXTBUTTON name="loadButton" id="54e62fe23ff547d1" memberName="loadButton"
virtualName="" explicitFocusOrder="0" pos="50 111 50 30" buttonText="LOAD"
connectedEdges="0" needsCallback="1" radioGroupId="0"/>
<TEXTBUTTON name="saveButton" id="44bf9479012da9b4" memberName="saveButton"
virtualName="" explicitFocusOrder="0" pos="98 111 50 30" buttonText="SAVE"
connectedEdges="0" needsCallback="1" radioGroupId="0"/>
<TEXTBUTTON name="storeButton" id="a94bec26832eb58b" memberName="storeButton"
virtualName="" explicitFocusOrder="0" pos="270 109 50 30" buttonText="STORE"
connectedEdges="0" needsCallback="1" radioGroupId="0"/>

@ -107,10 +107,7 @@ private:
ScopedPointer<VuMeter> vuOutput;
ScopedPointer<TextButton> initButton;
ScopedPointer<TextButton> parmButton;
ScopedPointer<TextButton> sendButton;
ScopedPointer<TextButton> cartButton;
ScopedPointer<TextButton> loadButton;
ScopedPointer<TextButton> saveButton;
ScopedPointer<TextButton> storeButton;
ScopedPointer<ToggleButton> monoMode;
ScopedPointer<ComboBoxImage> lfoType;

@ -572,7 +572,8 @@ BEGIN_JUCER_METADATA
explicitFocusOrder="0" pos="15 10 95 10" bkgCol="6a000000" textCol="ffffffff"
outlineCol="0" edTextCol="ff000000" edBkgCol="0" labelText="1,000 kHz"
editableSingleClick="0" editableDoubleClick="0" focusDiscardsChanges="0"
fontname="Default font" fontsize="12.6" bold="0" italic="0" justification="36"/>
fontname="Default font" fontsize="12.599999999999999645" bold="0"
italic="0" justification="36"/>
<SLIDER name="detune" id="f093ec8defca2fc2" memberName="detune" virtualName=""
explicitFocusOrder="0" pos="6 24 34 34" min="-7" max="7" int="1"
style="RotaryVerticalDrag" textBoxPos="NoTextBox" textBoxEditable="0"

@ -1,6 +1,6 @@
/**
*
* Copyright (c) 2014 Pascal Gauthier.
* Copyright (c) 2014-2015 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
@ -104,7 +104,6 @@ void exportSysexPgm(char *dest, char *src, char sysexChl) {
memcpy(dest+161, footer, 2);
}
/**
* Pack a program into a 32 packed sysex
*/
@ -169,55 +168,60 @@ char normparm(char value, char max, int id) {
return v;
}
void DexedAudioProcessor::unpackProgram(int idx) {
char *bulk = sysex + (idx * 128);
void unpackProgramFromSysex(char *unpackPgm, char *sysexCart, int idx) {
char *bulk = sysexCart + (idx * 128);
for (int op = 0; op < 6; op++) {
// eg rate and level, brk pt, depth, scaling
for(int i=0; i<11; i++) {
data[op * 21 + i] = normparm(bulk[op * 17 + i], 99, i);
unpackPgm[op * 21 + i] = normparm(bulk[op * 17 + i], 99, i);
}
memcpy(data + op * 21, bulk + op * 17, 11);
memcpy(unpackPgm + op * 21, bulk + op * 17, 11);
char leftrightcurves = bulk[op * 17 + 11];
data[op * 21 + 11] = leftrightcurves & 3;
data[op * 21 + 12] = (leftrightcurves >> 2) & 3;
unpackPgm[op * 21 + 11] = leftrightcurves & 3;
unpackPgm[op * 21 + 12] = (leftrightcurves >> 2) & 3;
char detune_rs = bulk[op * 17 + 12];
data[op * 21 + 13] = detune_rs & 7;
unpackPgm[op * 21 + 13] = detune_rs & 7;
char kvs_ams = bulk[op * 17 + 13];
data[op * 21 + 14] = kvs_ams & 3;
data[op * 21 + 15] = kvs_ams >> 2;
data[op * 21 + 16] = bulk[op * 17 + 14]; // output level
unpackPgm[op * 21 + 14] = kvs_ams & 3;
unpackPgm[op * 21 + 15] = kvs_ams >> 2;
unpackPgm[op * 21 + 16] = bulk[op * 17 + 14]; // output level
char fcoarse_mode = bulk[op * 17 + 15];
data[op * 21 + 17] = fcoarse_mode & 1;
data[op * 21 + 18] = fcoarse_mode >> 1;
data[op * 21 + 19] = bulk[op * 17 + 16]; // fine freq
data[op * 21 + 20] = detune_rs >> 3;
unpackPgm[op * 21 + 17] = fcoarse_mode & 1;
unpackPgm[op * 21 + 18] = fcoarse_mode >> 1;
unpackPgm[op * 21 + 19] = bulk[op * 17 + 16]; // fine freq
unpackPgm[op * 21 + 20] = detune_rs >> 3;
}
for (int i=0; i<8; i++) {
data[126+i] = normparm(bulk[102+i], 99, 126+i);
unpackPgm[126+i] = normparm(bulk[102+i], 99, 126+i);
}
data[134] = normparm(bulk[110], 31, 134);
unpackPgm[134] = normparm(bulk[110], 31, 134);
char oks_fb = bulk[111];
data[135] = oks_fb & 7;
data[136] = oks_fb >> 3;
memcpy(data + 137, bulk + 112, 4); // lfo
unpackPgm[135] = oks_fb & 7;
unpackPgm[136] = oks_fb >> 3;
memcpy(unpackPgm + 137, bulk + 112, 4); // lfo
char lpms_lfw_lks = bulk[116];
data[141] = lpms_lfw_lks & 1;
data[142] = (lpms_lfw_lks >> 1) & 7;
data[143] = lpms_lfw_lks >> 4;
memcpy(data + 144, bulk + 117, 11); // transpose, name
data[155] = 1; // operator on/off
data[156] = 1;
data[157] = 1;
data[158] = 1;
data[159] = 1;
data[160] = 1;
unpackPgm[141] = lpms_lfw_lks & 1;
unpackPgm[142] = (lpms_lfw_lks >> 1) & 7;
unpackPgm[143] = lpms_lfw_lks >> 4;
memcpy(unpackPgm + 144, bulk + 117, 11); // transpose, name
unpackPgm[155] = 1; // operator on/off
unpackPgm[156] = 1;
unpackPgm[157] = 1;
unpackPgm[158] = 1;
unpackPgm[159] = 1;
unpackPgm[160] = 1;
}
void DexedAudioProcessor::unpackProgram(int idx) {
unpackProgramFromSysex(data, sysex, idx);
}
int DexedAudioProcessor::importSysex(const char *imported) {
memcpy(sysex, imported + 6, 4096);
@ -237,10 +241,26 @@ void DexedAudioProcessor::updateProgramFromSysex(const uint8 *rawdata) {
triggerAsyncUpdate();
}
void DexedAudioProcessor::loadBuiltin(int idx) {
void DexedAudioProcessor::setupStartupCart() {
char syx_data[4104];
memset(&syx_data, 0, 4104);
cartManager.getSysex(idx, (char *) &syx_data);
File startup = dexedCartDir.getChildFile("Dexed_01.syx");
if ( startup.exists() ) {
ScopedPointer<FileInputStream> fis = startup.createInputStream();
if ( fis == nullptr ) {
TRACE("unable to open default cartridge");
return;
}
fis->read(syx_data, 4104);
} else {
// The user deleted the file :/, load from the builtin zip file.
MemoryInputStream *mis = new MemoryInputStream(BinaryData::builtin_pgm_zip, BinaryData::builtin_pgm_zipSize, false);
ScopedPointer<ZipFile> builtin_pgm = new ZipFile(mis, true);
ScopedPointer<InputStream> is = builtin_pgm->createStreamForEntry(builtin_pgm->getIndexOfFileName(("Dexed_01.syx")));
is->read(syx_data, 4104);
}
importSysex((char *) &syx_data);
}
@ -355,6 +375,60 @@ void DexedAudioProcessor::setStateInformation(const void* source, int sizeInByte
updateUI();
}
File DexedAudioProcessor::dexedAppDir;
File DexedAudioProcessor::dexedCartDir;
void DexedAudioProcessor::resolvAppDir() {
#if JUCE_MAC || JUCE_IOS
dexedAppDir = File("~/Library/Application Support/DigitalSuburban/Dexed");
#elif JUCE_WINDOWS
dexedAppDir = File(File::userApplicationDataDirectory).getChildFile("DigitalSuburban").getChildFile("Dexed"));
#else
// char xdgHomeDefault[] = ;
char *xdgHome = getenv("XDG_DATA_HOME");
if ( xdgHome == nullptr ) {
xdgHome = "~/.local/share";
}
dexedAppDir = File(xdgHome).getChildFile("DigitalSuburban").getChildFile("Dexed");
#endif
if ( ! dexedAppDir.exists() ) {
dexedAppDir.createDirectory();
// ==========================================================================
// For older versions, we move the Dexed.xml config file
// This code will be removed in 0.9.0
File cfgFile = dexedAppDir.getParentDirectory().getChildFile("Dexed.xml");
if ( cfgFile.exists() )
cfgFile.copyFileTo(dexedAppDir);
// *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
// ==========================================================================
}
dexedCartDir = dexedAppDir.getChildFile("Cartridges");
if ( ! dexedCartDir.exists() ) {
// Initial setup, we unzip the built-in cartridges
dexedCartDir.createDirectory();
File synprezFmDir = dexedCartDir.getChildFile("SynprezFM");
synprezFmDir.createDirectory();
MemoryInputStream *mis = new MemoryInputStream(BinaryData::builtin_pgm_zip, BinaryData::builtin_pgm_zipSize, false);
ScopedPointer<ZipFile> builtin_pgm = new ZipFile(mis, true);
for(int i=0;i<builtin_pgm->getNumEntries();i++) {
if ( builtin_pgm->getEntry(i)->filename == "Dexed_01.syx" ) {
builtin_pgm->uncompressEntry(i, dexedCartDir);
} else {
builtin_pgm->uncompressEntry(i, synprezFmDir);
}
}
}
}
#define IDX_USER 1000
CartridgeManager::CartridgeManager() {
@ -382,7 +456,6 @@ void CartridgeManager::getSysex(int idx, char *dest) {
}
is->read(dest, 4104);
delete is;
return;
}

@ -1,6 +1,6 @@
/**
*
* Copyright (c) 2014 Pascal Gauthier.
* Copyright (c) 2014-2015 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
@ -24,7 +24,6 @@
#include "../JuceLibraryCode/JuceHeader.h"
#define SYSEX_SIZE 4104
enum UnpackedOffset {
egRate,
egLevel = 4,
@ -59,10 +58,12 @@ enum UnpackedOffset {
};
String normalizeSysexName(const char *sysexName);
uint8_t sysexChecksum(const char *sysex, int size);
void extractProgramNames(const char *block, StringArray &dest);
void exportSysexCart(char *dest, char *src, char sysexChl);
void exportSysexPgm(char *dest, char *src, char sysexChl);
void packProgram(uint8_t *dest, uint8_t *src, int idx, String name);
void unpackProgramFromSysex(char *unpackPgm, char *sysexCart, int idx);
class CartridgeManager {
ScopedPointer<ZipFile> builtin_pgm;

@ -1,6 +1,6 @@
/**
*
* Copyright (c) 2013 Pascal Gauthier.
* Copyright (c) 2013-2015 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
@ -60,11 +60,12 @@ public:
//==============================================================================
DexedAudioProcessorEditor::DexedAudioProcessorEditor (DexedAudioProcessor* ownerFilter)
: AudioProcessorEditor (ownerFilter),
midiKeyboard (ownerFilter->keyboardState, MidiKeyboardComponent::horizontalKeyboard)
midiKeyboard (ownerFilter->keyboardState, MidiKeyboardComponent::horizontalKeyboard),
cartManager(this)
{
LookAndFeel::setDefaultLookAndFeel(DXLookNFeel::getLookAndFeel());
setSize (866, ownerFilter->showKeyboard ? 674 : 581);
setSize(866, ownerFilter->showKeyboard ? 674 : 581);
processor = ownerFilter;
@ -115,6 +116,8 @@ DexedAudioProcessorEditor::DexedAudioProcessorEditor (DexedAudioProcessor* owner
rebuildProgramCombobox();
global.programs->addListener(this);
addChildComponent(&cartManager);
updateUI();
startTimer(100);
}
@ -131,43 +134,31 @@ void DexedAudioProcessorEditor::paint (Graphics& g) {
}
void DexedAudioProcessorEditor::cartShow() {
int result = processor->cartManager.getCarts()->show();
if ( result < 1 )
cartManager.resetActiveSysex();
cartManager.setBounds(4, 2, 859, 576);
cartManager.setVisible(true);
}
void DexedAudioProcessorEditor::loadCart(File file) {
String f = file.getFullPathName();
uint8_t syx_data[4104];
ifstream fp_in(f.toRawUTF8(), ios::binary);
if (fp_in.fail()) {
AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon,
"Error",
"Unable to open: " + f);
return;
processor->loadBuiltin(result-1);
}
fp_in.read((char *)syx_data, 4104);
fp_in.close();
if ( processor->importSysex((char *) &syx_data) ) {
global.setSystemMessage(String("Unkown sysex format !?"));
}
processor->setCurrentProgram(0);
rebuildProgramCombobox();
global.programs->setSelectedId(processor->getCurrentProgram()+1, dontSendNotification);
processor->updateHostDisplay();
return;
}
void DexedAudioProcessorEditor::loadCart() {
FileChooser fc ("Import original DX sysex...", File::nonexistent, "*.syx;*.SYX;*.*", 1);
if ( fc.browseForFileToOpen()) {
String f = fc.getResults().getReference(0).getFullPathName();
uint8_t syx_data[4104];
ifstream fp_in(f.toRawUTF8(), ios::binary);
if (fp_in.fail()) {
AlertWindow::showMessageBoxAsync (AlertWindow::WarningIcon,
"Error",
"Unable to open: " + f);
return;
}
fp_in.read((char *)syx_data, 4104);
fp_in.close();
if ( processor->importSysex((char *) &syx_data) ) {
global.setSystemMessage(String("Unkown sysex format !?"));
}
processor->setCurrentProgram(0);
rebuildProgramCombobox();
global.programs->setSelectedId(processor->getCurrentProgram()+1, dontSendNotification);
processor->updateHostDisplay();
}
return;
}
void DexedAudioProcessorEditor::saveCart() {
@ -233,7 +224,7 @@ void DexedAudioProcessorEditor::parmShow() {
processor->setEngineType(tp);
processor->savePreference();
setSize (866, processor->showKeyboard ? 677 : 583);
setSize(866, processor->showKeyboard ? 677 : 583);
midiKeyboard.repaint();
if ( ret == false ) {
@ -286,6 +277,8 @@ void DexedAudioProcessorEditor::rebuildProgramCombobox() {
global.programs->addItem(id, i+1);
}
global.programs->setSelectedId(processor->getCurrentProgram()+1, dontSendNotification);
cartManager.setActiveProgram(processor->getCurrentProgram());
cartManager.resetActiveSysex();
}
void DexedAudioProcessorEditor::storeProgram() {
@ -311,6 +304,14 @@ void DexedAudioProcessorEditor::storeProgram() {
extractProgramNames((char *) &destSysex, programs);
dialog.addComboBox(String("Dest"), programs);
ScopedPointer<ToggleButton> saveToDisk = nullptr;
if ( externalFile == NULL ) {
saveToDisk = new ToggleButton("Save Changes to disk");
saveToDisk->setSize(300, 30);
dialog.addCustomComponent(saveToDisk);
}
dialog.addButton("OK", 0, KeyPress(KeyPress::returnKey));
dialog.addButton("CANCEL", 1, KeyPress(KeyPress::escapeKey));
dialog.addButton("EXTERNAL FILE", 2, KeyPress());

@ -1,6 +1,6 @@
/**
*
* Copyright (c) 2013 Pascal Gauthier.
* Copyright (c) 2013-2015 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
@ -27,6 +27,7 @@
#include "GlobalEditor.h"
#include "DXComponents.h"
#include "DXLookNFeel.h"
#include "CartManager.h"
//==============================================================================
/**
@ -40,6 +41,7 @@ class DexedAudioProcessorEditor : public AudioProcessorEditor,
MidiKeyboardComponent midiKeyboard;
OperatorEditor operators[6];
Colour background;
CartManager cartManager;
public:
DexedAudioProcessor *processor;
GlobalEditor global;
@ -52,7 +54,7 @@ public:
void comboBoxChanged (ComboBox* comboBoxThatHasChanged);
void updateUI();
void rebuildProgramCombobox();
void loadCart();
void loadCart(File file);
void saveCart();
void initProgram();
void storeProgram();

@ -23,13 +23,6 @@
#include "../JuceLibraryCode/JuceHeader.h"
class ModuleFx {
public:
virtual ~ModuleFx() {};
virtual void init(int sampleRate) = 0;
virtual void process(float *work, int sz) = 0;
};
class PluginFx {
float s1,s2,s3,s4;
float sampleRate;
@ -64,9 +57,7 @@ class PluginFx {
public:
PluginFx();
ScopedPointer<ModuleFx> obxdFilter;
// this is set directly by the ui / parameter
float uiCutoff;
float uiReso;

@ -1,6 +1,6 @@
/**
*
* Copyright (c) 2013 Pascal Gauthier.
* Copyright (c) 2013-2015 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
@ -19,6 +19,7 @@
*/
#include <time.h>
#include <stdlib.h>
#include "PluginParam.h"
#include "PluginProcessor.h"
@ -275,7 +276,7 @@ void CtrlDX::updateComponent() {
*
*/
void DexedAudioProcessor::initCtrl() {
loadBuiltin(0);
setupStartupCart();
currentProgram = 0;
fxCutoff = new CtrlFloat("Cutoff", &fx.uiCutoff);
@ -544,7 +545,9 @@ const String DexedAudioProcessor::getParameterText(int index) {
}
void DexedAudioProcessor::loadPreference() {
PropertiesFile prop(prefOptions);
File propFile = DexedAudioProcessor::dexedAppDir.getChildFile("Dexed.xml");
PropertiesFile::Options prefOptions;
PropertiesFile prop(propFile, prefOptions);
if ( ! prop.isValidFile() ) {
return;
@ -584,7 +587,9 @@ void DexedAudioProcessor::loadPreference() {
}
void DexedAudioProcessor::savePreference() {
PropertiesFile prop(prefOptions);
File propFile = DexedAudioProcessor::dexedAppDir.getChildFile("Dexed.xml");
PropertiesFile::Options prefOptions;
PropertiesFile prop(propFile, prefOptions);
prop.setValue(String("normalizeDxVelocity"), normalizeDxVelocity);
prop.setValue(String("pitchRange"), controllers.values_[kControllerPitchRange]);
@ -601,3 +606,4 @@ void DexedAudioProcessor::savePreference() {
prop.save();
}

@ -1,6 +1,6 @@
/**
*
* Copyright (c) 2013 Pascal Gauthier.
* Copyright (c) 2013-2015 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
@ -31,8 +31,6 @@
#include "msfa/aligned_buf.h"
#include "msfa/fm_op_kernel.h"
File dexedWorkdir;
//==============================================================================
DexedAudioProcessor::DexedAudioProcessor() {
#ifdef DEBUG
@ -48,25 +46,21 @@ DexedAudioProcessor::DexedAudioProcessor() {
Sin::init();
lastStateSave = 0;
currentNote = -1;
engineType = -1;
vuSignal = 0;
monoMode = 0;
resolvAppDir();
initCtrl();
sendSysexChange = true;
normalizeDxVelocity = false;
sysexComm.listener = this;
engineType = -1;
memset(&voiceStatus, 0, sizeof(VoiceStatus));
prefOptions.applicationName = String("Dexed");
prefOptions.filenameSuffix = String("xml");
prefOptions.folderName = String("DigitalSuburban");
prefOptions.osxLibrarySubFolder = String("Application Support");
memset(&voiceStatus, 0, sizeof(VoiceStatus));
dexedWorkdir = prefOptions.getDefaultFile().getParentDirectory();
controllers.values_[kControllerPitchRange] = 3;
controllers.values_[kControllerPitchStep] = 0;
loadPreference();

@ -1,6 +1,6 @@
/**
*
* Copyright (c) 2013 Pascal Gauthier.
* Copyright (c) 2013-2015 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
@ -49,6 +49,8 @@ enum DexedEngineResolution {
DEXED_ENGINE_OPL
};
//extern File dexedWorkdir;
//==============================================================================
/**
*/
@ -76,7 +78,7 @@ class DexedAudioProcessor : public AudioProcessor, public AsyncUpdater, public
long lastStateSave;
/**
* PlugFX
* Plugin fx (the filter)
*/
PluginFx fx;
@ -85,7 +87,6 @@ class DexedAudioProcessor : public AudioProcessor, public AsyncUpdater, public
* and needs to be updated.
*/
bool refreshVoice;
bool normalizeDxVelocity;
bool sendSysexChange;
@ -100,8 +101,6 @@ class DexedAudioProcessor : public AudioProcessor, public AsyncUpdater, public
void handleAsyncUpdate();
void initCtrl();
PropertiesFile::Options prefOptions;
MidiMessage* nextMidi,*midiMsg;
bool hasMidiMessage;
int midiEventPos;
@ -117,6 +116,9 @@ class DexedAudioProcessor : public AudioProcessor, public AsyncUpdater, public
char clipboard[161];
char clipboardContent;
void resolvAppDir();
File activeCartridge;
public :
// in MIDI units (0x4000 is neutral)
Controllers controllers;
@ -124,18 +126,13 @@ public :
char sysex[4096];
char data[161];
CartridgeManager cartManager;
//CartridgeManager cartManager;
SysexComm sysexComm;
VoiceStatus voiceStatus;
bool forceRefreshUI;
float vuSignal;
bool showKeyboard;
int getEngineType();
void setEngineType(int rs);
@ -189,7 +186,8 @@ public :
bool peekVoiceStatus();
void unpackProgram(int idx);
void updateProgramFromSysex(const uint8 *rawdata);
void loadBuiltin(int idx);
void setupStartupCart();
//==============================================================================
const String getName() const;
int getNumParameters();
@ -220,10 +218,6 @@ public :
void getStateInformation (MemoryBlock& destData);
void setStateInformation (const void* data, int sizeInBytes);
//void getCurrentProgramStateInformation (MemoryBlock& destData);
//void setCurrentProgramStateInformation (const void* data, int sizeInBytes);
//==============================================================================
// this is kept up to date with the midi messages that arrive, and the UI component
// registers with it so it can represent the incoming messages
MidiKeyboardState keyboardState;
@ -232,6 +226,8 @@ public :
void loadPreference();
void savePreference();
static File dexedAppDir;
static File dexedCartDir;
private:
//==============================================================================
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DexedAudioProcessor)

@ -0,0 +1,92 @@
/**
*
* Copyright (c) 2015 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 3 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 "ProgramListBox.h"
#include "PluginData.h"
#include "DXLookNFeel.h"
#include "Dexed.h"
ProgramListBox::ProgramListBox(const String name, int numCols) : Component(name) {
cols = numCols;
rows = 32 / numCols;
selectedPgm = -1;
hasContent = false;
}
void ProgramListBox::paint(Graphics &g) {
int pgm = 0;
for(int i=0;i<cols;i++) {
for(int j=0;j<rows;j++) {
if ( selectedPgm == pgm ) {
g.setColour(DXLookNFeel::fillColour);
g.fillRoundedRectangle(cellWidth*i+2, cellHeight*j + 2, cellWidth - 4, cellHeight - 4, 2);
} else {
g.setColour(Colours::dimgrey);
g.drawRoundedRectangle(cellWidth*i+2, cellHeight*j + 2, cellWidth - 4, cellHeight - 4, 2, 0.5);
}
if ( hasContent == true ) {
g.setColour(Colours::white);
g.drawText(String(pgm+1) + ". ", cellWidth * i + 5, cellHeight * j, cellWidth, cellHeight, Justification::left, true);
g.drawFittedText(programNames[pgm], cellWidth * i - 5, cellHeight * j, cellWidth, cellHeight, Justification::right, true);
}
pgm++;
}
}
}
void ProgramListBox::resized() {
cellWidth = getWidth() / cols;
cellHeight = getHeight() / rows;
}
void ProgramListBox::setCartridge(char *sysex) {
extractProgramNames((const char *)sysex, programNames);
hasContent = true;
repaint();
}
void ProgramListBox::addListener(ProgramListBoxListener *listener) {
this->listener = listener;
}
int ProgramListBox::programPosition(const MouseEvent &event) {
return (event.getMouseDownY() / cellHeight) + ((event.getMouseDownX() / cellWidth) * rows);
}
void ProgramListBox::mouseDoubleClick(const MouseEvent &event) {
if ( ! hasContent )
return;
int pos = programPosition(event);
if ( listener != nullptr ) {
listener->programSelected(this, pos);
}
repaint();
}
void ProgramListBox::mouseDown(const MouseEvent &event) {
}
void ProgramListBox::setSelected(int idx) {
selectedPgm = idx;
}

@ -0,0 +1,56 @@
/**
*
* Copyright (c) 2015 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 3 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 PROGRAMLISTBOX_H_INCLUDED
#define PROGRAMLISTBOX_H_INCLUDED
#include "JuceHeader.h"
class ProgramListBox;
class ProgramListBoxListener {
public:
virtual ~ProgramListBoxListener() {}
virtual void programSelected(ProgramListBox *source, int pos) = 0;
};
class ProgramListBox : public Component {
ProgramListBoxListener *listener;
bool hasContent;
bool showPgmNumber;
int cols, rows;
int cellWidth, cellHeight;
StringArray programNames;
int programPosition(const MouseEvent &event);
int selectedPgm;
public:
ProgramListBox(const String name, int numCols);
void addListener(ProgramListBoxListener *listener);
void paint(Graphics &g);
void setCartridge(char *sysex);
void resized();
void mouseDoubleClick(const MouseEvent &event);
void mouseDown(const MouseEvent &event);
void setSelected(int idx);
};
#endif // PROGRAMLISTBOX_H_INCLUDED
Loading…
Cancel
Save