2
0
Fork 0

Merge branch 'Jeff-Russ-master'

This commit is contained in:
bsutherland 2015-11-30 21:55:16 +09:00
commit ba95c32302
15 changed files with 4855 additions and 4417 deletions

232
AdlibBlaster.jucer Normal file
View file

@ -0,0 +1,232 @@
<?xml version="1.0" encoding="UTF-8"?>
<JUCERPROJECT id="aEo3EV" name="AdlibBlaster" projectType="audioplug" version="0.11.1"
bundleIdentifier="com.plainweave.AdlibBlaster" includeBinaryInAppConfig="1"
buildVST="1" buildVST3="0" buildAU="1" buildRTAS="0" buildAAX="0"
pluginName="AdlibBlaster" pluginDesc="AdlibBlaster" pluginManufacturer="Plainweave Software"
pluginManufacturerCode="Pwve" pluginCode="PwAB" pluginChannelConfigs="{0, 1}"
pluginIsSynth="1" pluginWantsMidiIn="1" pluginProducesMidiOut="0"
pluginSilenceInIsSilenceOut="0" pluginEditorRequiresKeys="0"
pluginAUExportPrefix="AdlibBlasterAU" pluginRTASCategory="" aaxIdentifier="com.plainweave.AdlibBlaster"
pluginAAXCategory="AAX_ePlugInCategory_Dynamics" jucerVersion="3.1.1"
companyName="Plainweave Software">
<MAINGROUP id="eVDaOt" name="AdlibBlaster">
<GROUP id="{59C113D4-6797-15CE-D83B-3AD69FA8D33F}" name="Source">
<GROUP id="{2820D583-3420-FFB6-4B20-44C1EA45A3D8}" name="DOSBox">
<FILE id="b9oR9v" name="adlib.h" compile="0" resource="0" file="Source/adlib.h"/>
<FILE id="aiSUQT" name="dbopl.cpp" compile="1" resource="0" file="Source/dbopl.cpp"/>
<FILE id="btwPHz" name="dbopl.h" compile="0" resource="0" file="Source/dbopl.h"/>
<FILE id="r2C2po" name="dosbox.h" compile="0" resource="0" file="Source/dosbox.h"/>
<FILE id="RS71D5" name="hardware.h" compile="0" resource="0" file="Source/hardware.h"/>
<FILE id="ZFzWho" name="inout.h" compile="0" resource="0" file="Source/inout.h"/>
<FILE id="C90jAE" name="logging.h" compile="0" resource="0" file="Source/logging.h"/>
<FILE id="NcdeaJ" name="opl.h" compile="0" resource="0" file="Source/opl.h"/>
<FILE id="dUyyeP" name="mixer.h" compile="0" resource="0" file="Source/mixer.h"/>
<FILE id="dVqY5n" name="pic.h" compile="0" resource="0" file="Source/pic.h"/>
<FILE id="MhLIxC" name="setup.h" compile="0" resource="0" file="Source/setup.h"/>
</GROUP>
<FILE id="IWoszV" name="config.h" compile="0" resource="0" file="Source/config.h"/>
<FILE id="q3FMeJ" name="DROMultiplexer.cpp" compile="1" resource="0"
file="Source/DROMultiplexer.cpp"/>
<FILE id="KiwneM" name="DROMultiplexer.h" compile="0" resource="0"
file="Source/DROMultiplexer.h"/>
<FILE id="KB192x" name="EnumFloatParameter.cpp" compile="1" resource="0"
file="Source/EnumFloatParameter.cpp"/>
<FILE id="VUzYom" name="EnumFloatParameter.h" compile="0" resource="0"
file="Source/EnumFloatParameter.h"/>
<FILE id="kqbn87" name="FloatParameter.cpp" compile="1" resource="0"
file="Source/FloatParameter.cpp"/>
<FILE id="zhBEYO" name="FloatParameter.h" compile="0" resource="0"
file="Source/FloatParameter.h"/>
<FILE id="DwaOZA" name="hiopl.cpp" compile="1" resource="0" file="Source/hiopl.cpp"/>
<FILE id="KWqH0b" name="hiopl.h" compile="0" resource="0" file="Source/hiopl.h"/>
<FILE id="MEqllP" name="InstrumentLoader.h" compile="0" resource="0"
file="Source/InstrumentLoader.h"/>
<FILE id="h9FLJU" name="IntFloatParameter.cpp" compile="1" resource="0"
file="Source/IntFloatParameter.cpp"/>
<FILE id="K565bW" name="IntFloatParameter.h" compile="0" resource="0"
file="Source/IntFloatParameter.h"/>
<FILE id="PcN4IQ" name="itoa.h" compile="0" resource="0" file="Source/itoa.h"/>
<FILE id="kakPwh" name="PluginGui.cpp" compile="1" resource="0" file="Source/PluginGui.cpp"/>
<FILE id="v7FmIh" name="PluginGui.h" compile="0" resource="0" file="Source/PluginGui.h"/>
<FILE id="bBGAG8" name="PluginProcessor.cpp" compile="1" resource="0"
file="Source/PluginProcessor.cpp"/>
<FILE id="VvbH8r" name="PluginProcessor.h" compile="0" resource="0"
file="Source/PluginProcessor.h"/>
<FILE id="IipiOc" name="SbiLoader.cpp" compile="1" resource="0" file="Source/SbiLoader.cpp"/>
<FILE id="BP1b58" name="SbiLoader.h" compile="0" resource="0" file="Source/SbiLoader.h"/>
<FILE id="okBzcz" name="tests.cpp" compile="1" resource="0" file="Source/tests.cpp"/>
<FILE id="fxEtqM" name="windows.h" compile="0" resource="0" file="Source/windows.h"/>
<FILE id="ZX8w8R" name="zdopl.cpp" compile="1" resource="0" file="Source/zdopl.cpp"/>
<FILE id="E3ipUS" name="zdopl.h" compile="0" resource="0" file="Source/zdopl.h"/>
</GROUP>
</MAINGROUP>
<EXPORTFORMATS>
<XCODE_MAC targetFolder="Builds/MacOSX" vstFolder="~/SDKs/vstsdk2.4" postbuildCommand="&#13;&#10;# This script takes the build product and copies it to the AU, VST, VST3, RTAS and AAX folders, depending on &#13;&#10;# which plugin types you've built&#13;&#10;&#13;&#10;original=$CONFIGURATION_BUILD_DIR/$FULL_PRODUCT_NAME&#13;&#10;&#13;&#10;# this looks inside the binary to detect which platforms are needed.. &#13;&#10;copyAU=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'AudioUnit' | wc -l&#96;&#13;&#10;copyVST=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'VSTPlugin' | wc -l&#96;&#13;&#10;copyVST3=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'GetPluginFactory' | wc -l&#96;&#13;&#10;copyRTAS=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'CProcess' | wc -l&#96;&#13;&#10;copyAAX=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'ACFStartup' | wc -l&#96;&#13;&#10;&#13;&#10;if [ $copyAU -gt 0 ]; then&#13;&#10; echo &quot;Copying to AudioUnit folder...&quot;&#13;&#10; AU=~/Library/Audio/Plug-Ins/Components/$PRODUCT_NAME.component&#13;&#10; if [ -d &quot;$AU&quot; ]; then &#13;&#10; rm -r &quot;$AU&quot;&#13;&#10; fi&#13;&#10;&#13;&#10; cp -r &quot;$original&quot; &quot;$AU&quot;&#13;&#10; sed -i &quot;&quot; -e 's/TDMwPTul/BNDLPTul/g' &quot;$AU/Contents/PkgInfo&quot;&#13;&#10; sed -i &quot;&quot; -e 's/TDMw/BNDL/g' &quot;$AU/Contents/$INFOPLIST_FILE&quot;&#13;&#10;&#13;&#10; # Fix info.plist for AUs built with Xcode 3&#13;&#10; if [ -f &quot;$DEVELOPER_DIR/Library/Developer/CoreAudio/AudioUnits/AUPublic/AUBase/AUPlugInDispatch.cpp&quot; ]; then&#13;&#10; echo&#13;&#10; else&#13;&#10; echo &quot;Removing AudioComponents entry from Info.plist because this is not a new-format AU&quot;&#13;&#10; /usr/libexec/PlistBuddy -c &quot;Delete AudioComponents&quot; &quot;$AU/Contents/Info.plist&quot;&#13;&#10; fi&#13;&#10;fi&#13;&#10;&#13;&#10;if [ $copyVST -gt 0 ]; then&#13;&#10; echo &quot;Copying to VST folder...&quot;&#13;&#10; VST=~/Library/Audio/Plug-Ins/VST/$PRODUCT_NAME.vst&#13;&#10; if [ -d &quot;$VST&quot; ]; then &#13;&#10; rm -r &quot;$VST&quot;&#13;&#10; fi&#13;&#10;&#13;&#10; cp -r &quot;$original&quot; &quot;$VST&quot;&#13;&#10; sed -i &quot;&quot; -e 's/TDMwPTul/BNDLPTul/g' &quot;$VST/Contents/PkgInfo&quot;&#13;&#10; sed -i &quot;&quot; -e 's/TDMw/BNDL/g' &quot;$VST/Contents/$INFOPLIST_FILE&quot;&#13;&#10;fi&#13;&#10;&#13;&#10;if [ $copyVST3 -gt 0 ]; then&#13;&#10; echo &quot;Copying to VST3 folder...&quot;&#13;&#10; VST3=~/Library/Audio/Plug-Ins/VST3/$PRODUCT_NAME.vst3&#13;&#10; if [ -d &quot;$VST3&quot; ]; then &#13;&#10; rm -r &quot;$VST3&quot;&#13;&#10; fi&#13;&#10;&#13;&#10; cp -r &quot;$original&quot; &quot;$VST3&quot;&#13;&#10; sed -i &quot;&quot; -e 's/TDMwPTul/BNDLPTul/g' &quot;$VST3/Contents/PkgInfo&quot;&#13;&#10; sed -i &quot;&quot; -e 's/TDMw/BNDL/g' &quot;$VST3/Contents/$INFOPLIST_FILE&quot;&#13;&#10;fi&#13;&#10;&#13;&#10;if [ $copyRTAS -gt 0 ]; then&#13;&#10; echo &quot;Copying to RTAS folder...&quot;&#13;&#10; RTAS=/Library/Application\ Support/Digidesign/Plug-Ins/$PRODUCT_NAME.dpm&#13;&#10; if [ -d &quot;$RTAS&quot; ]; then&#13;&#10; rm -r &quot;$RTAS&quot;&#13;&#10; fi&#13;&#10;&#13;&#10; cp -r &quot;$original&quot; &quot;$RTAS&quot;&#13;&#10;fi&#13;&#10;&#13;&#10;if [ $copyAAX -gt 0 ]; then&#13;&#10; echo &quot;Copying to AAX folder...&quot;&#13;&#10;&#13;&#10; if [ -d &quot;/Applications/ProTools_3PDev/Plug-Ins&quot; ]; then&#13;&#10; AAX1=&quot;/Applications/ProTools_3PDev/Plug-Ins/$PRODUCT_NAME.aaxplugin&quot;&#13;&#10;&#13;&#10; if [ -d &quot;$AAX1&quot; ]; then&#13;&#10; rm -r &quot;$AAX1&quot;&#13;&#10; fi&#13;&#10;&#13;&#10; cp -R -H &quot;$original&quot; &quot;$AAX1&quot;&#13;&#10; fi&#13;&#10;&#13;&#10; if [ -d &quot;/Library/Application Support/Avid/Audio/Plug-Ins&quot; ]; then&#13;&#10; AAX2=&quot;/Library/Application Support/Avid/Audio/Plug-Ins/$PRODUCT_NAME.aaxplugin&quot;&#13;&#10;&#13;&#10; if [ -d &quot;$AAX2&quot; ]; then&#13;&#10; rm -r &quot;$AAX2&quot;&#13;&#10; fi&#13;&#10;&#13;&#10; cp -R -H &quot;$original&quot; &quot;$AAX2&quot;&#13;&#10; fi&#13;&#10;fi&#13;&#10;"
vst3Folder="~/SDKs/VST3 SDK" extraCompilerFlags="-std=c++11 -stdlib=libc++">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" osxSDK="default" osxCompatibility="10.7 SDK" osxArchitecture="64BitIntel"
isDebug="1" optimisation="1" targetName="AdlibBlaster" cppLibType="libc++"/>
<CONFIGURATION name="Release" osxSDK="default" osxCompatibility="10.7 SDK" osxArchitecture="64BitIntel"
isDebug="0" optimisation="2" targetName="AdlibBlaster" cppLibType="libc++"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_core" path="../Juce/modules"/>
<MODULEPATH id="juce_events" path="../Juce/modules"/>
<MODULEPATH id="juce_graphics" path="../Juce/modules"/>
<MODULEPATH id="juce_data_structures" path="../Juce/modules"/>
<MODULEPATH id="juce_gui_basics" path="../Juce/modules"/>
<MODULEPATH id="juce_gui_extra" path="../Juce/modules"/>
<MODULEPATH id="juce_cryptography" path="../Juce/modules"/>
<MODULEPATH id="juce_video" path="../Juce/modules"/>
<MODULEPATH id="juce_opengl" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_devices" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_formats" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_processors" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_plugin_client" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_basics" path="../Juce/modules"/>
</MODULEPATHS>
</XCODE_MAC>
<XCODE_IPHONE targetFolder="Builds/iOS" vstFolder="~/SDKs/vstsdk2.4" postbuildCommand="&#13;&#10;# This script takes the build product and copies it to the AU, VST, VST3, RTAS and AAX folders, depending on &#13;&#10;# which plugin types you've built&#13;&#10;&#13;&#10;original=$CONFIGURATION_BUILD_DIR/$FULL_PRODUCT_NAME&#13;&#10;&#13;&#10;# this looks inside the binary to detect which platforms are needed.. &#13;&#10;copyAU=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'AudioUnit' | wc -l&#96;&#13;&#10;copyVST=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'VSTPlugin' | wc -l&#96;&#13;&#10;copyVST3=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'GetPluginFactory' | wc -l&#96;&#13;&#10;copyRTAS=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'CProcess' | wc -l&#96;&#13;&#10;copyAAX=&#96;nm -g &quot;$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH&quot; | grep -i 'ACFStartup' | wc -l&#96;&#13;&#10;&#13;&#10;if [ $copyAU -gt 0 ]; then&#13;&#10; echo &quot;Copying to AudioUnit folder...&quot;&#13;&#10; AU=~/Library/Audio/Plug-Ins/Components/$PRODUCT_NAME.component&#13;&#10; if [ -d &quot;$AU&quot; ]; then &#13;&#10; rm -r &quot;$AU&quot;&#13;&#10; fi&#13;&#10;&#13;&#10; cp -r &quot;$original&quot; &quot;$AU&quot;&#13;&#10; sed -i &quot;&quot; -e 's/TDMwPTul/BNDLPTul/g' &quot;$AU/Contents/PkgInfo&quot;&#13;&#10; sed -i &quot;&quot; -e 's/TDMw/BNDL/g' &quot;$AU/Contents/$INFOPLIST_FILE&quot;&#13;&#10;&#13;&#10; # Fix info.plist for AUs built with Xcode 3&#13;&#10; if [ -f &quot;$DEVELOPER_DIR/Library/Developer/CoreAudio/AudioUnits/AUPublic/AUBase/AUPlugInDispatch.cpp&quot; ]; then&#13;&#10; echo&#13;&#10; else&#13;&#10; echo &quot;Removing AudioComponents entry from Info.plist because this is not a new-format AU&quot;&#13;&#10; /usr/libexec/PlistBuddy -c &quot;Delete AudioComponents&quot; &quot;$AU/Contents/Info.plist&quot;&#13;&#10; fi&#13;&#10;fi&#13;&#10;&#13;&#10;if [ $copyVST -gt 0 ]; then&#13;&#10; echo &quot;Copying to VST folder...&quot;&#13;&#10; VST=~/Library/Audio/Plug-Ins/VST/$PRODUCT_NAME.vst&#13;&#10; if [ -d &quot;$VST&quot; ]; then &#13;&#10; rm -r &quot;$VST&quot;&#13;&#10; fi&#13;&#10;&#13;&#10; cp -r &quot;$original&quot; &quot;$VST&quot;&#13;&#10; sed -i &quot;&quot; -e 's/TDMwPTul/BNDLPTul/g' &quot;$VST/Contents/PkgInfo&quot;&#13;&#10; sed -i &quot;&quot; -e 's/TDMw/BNDL/g' &quot;$VST/Contents/$INFOPLIST_FILE&quot;&#13;&#10;fi&#13;&#10;&#13;&#10;if [ $copyVST3 -gt 0 ]; then&#13;&#10; echo &quot;Copying to VST3 folder...&quot;&#13;&#10; VST3=~/Library/Audio/Plug-Ins/VST3/$PRODUCT_NAME.vst3&#13;&#10; if [ -d &quot;$VST3&quot; ]; then &#13;&#10; rm -r &quot;$VST3&quot;&#13;&#10; fi&#13;&#10;&#13;&#10; cp -r &quot;$original&quot; &quot;$VST3&quot;&#13;&#10; sed -i &quot;&quot; -e 's/TDMwPTul/BNDLPTul/g' &quot;$VST3/Contents/PkgInfo&quot;&#13;&#10; sed -i &quot;&quot; -e 's/TDMw/BNDL/g' &quot;$VST3/Contents/$INFOPLIST_FILE&quot;&#13;&#10;fi&#13;&#10;&#13;&#10;if [ $copyRTAS -gt 0 ]; then&#13;&#10; echo &quot;Copying to RTAS folder...&quot;&#13;&#10; RTAS=/Library/Application\ Support/Digidesign/Plug-Ins/$PRODUCT_NAME.dpm&#13;&#10; if [ -d &quot;$RTAS&quot; ]; then&#13;&#10; rm -r &quot;$RTAS&quot;&#13;&#10; fi&#13;&#10;&#13;&#10; cp -r &quot;$original&quot; &quot;$RTAS&quot;&#13;&#10;fi&#13;&#10;&#13;&#10;if [ $copyAAX -gt 0 ]; then&#13;&#10; echo &quot;Copying to AAX folder...&quot;&#13;&#10;&#13;&#10; if [ -d &quot;/Applications/ProTools_3PDev/Plug-Ins&quot; ]; then&#13;&#10; AAX1=&quot;/Applications/ProTools_3PDev/Plug-Ins/$PRODUCT_NAME.aaxplugin&quot;&#13;&#10;&#13;&#10; if [ -d &quot;$AAX1&quot; ]; then&#13;&#10; rm -r &quot;$AAX1&quot;&#13;&#10; fi&#13;&#10;&#13;&#10; cp -R -H &quot;$original&quot; &quot;$AAX1&quot;&#13;&#10; fi&#13;&#10;&#13;&#10; if [ -d &quot;/Library/Application Support/Avid/Audio/Plug-Ins&quot; ]; then&#13;&#10; AAX2=&quot;/Library/Application Support/Avid/Audio/Plug-Ins/$PRODUCT_NAME.aaxplugin&quot;&#13;&#10;&#13;&#10; if [ -d &quot;$AAX2&quot; ]; then&#13;&#10; rm -r &quot;$AAX2&quot;&#13;&#10; fi&#13;&#10;&#13;&#10; cp -R -H &quot;$original&quot; &quot;$AAX2&quot;&#13;&#10; fi&#13;&#10;fi&#13;&#10;"
vst3Folder="~/SDKs/VST3 SDK">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" iosCompatibility="default" isDebug="1" optimisation="1"
targetName="AdlibBlaster"/>
<CONFIGURATION name="Release" iosCompatibility="default" isDebug="0" optimisation="2"
targetName="AdlibBlaster"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_core" path="../Juce/modules"/>
<MODULEPATH id="juce_events" path="../Juce/modules"/>
<MODULEPATH id="juce_graphics" path="../Juce/modules"/>
<MODULEPATH id="juce_data_structures" path="../Juce/modules"/>
<MODULEPATH id="juce_gui_basics" path="../Juce/modules"/>
<MODULEPATH id="juce_gui_extra" path="../Juce/modules"/>
<MODULEPATH id="juce_cryptography" path="../Juce/modules"/>
<MODULEPATH id="juce_video" path="../Juce/modules"/>
<MODULEPATH id="juce_opengl" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_devices" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_formats" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_processors" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_plugin_client" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_basics" path="../Juce/modules"/>
</MODULEPATHS>
</XCODE_IPHONE>
<VS2013 targetFolder="Builds/VisualStudio2013" vstFolder="c:\SDKs\vstsdk2.4"
vst3Folder="c:\SDKs\VST3 SDK">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit"
isDebug="1" optimisation="1" targetName="AdlibBlaster"/>
<CONFIGURATION name="Release" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit"
isDebug="0" optimisation="2" targetName="AdlibBlaster"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_core" path="../Juce/modules"/>
<MODULEPATH id="juce_events" path="../Juce/modules"/>
<MODULEPATH id="juce_graphics" path="../Juce/modules"/>
<MODULEPATH id="juce_data_structures" path="../Juce/modules"/>
<MODULEPATH id="juce_gui_basics" path="../Juce/modules"/>
<MODULEPATH id="juce_gui_extra" path="../Juce/modules"/>
<MODULEPATH id="juce_cryptography" path="../Juce/modules"/>
<MODULEPATH id="juce_video" path="../Juce/modules"/>
<MODULEPATH id="juce_opengl" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_devices" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_formats" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_processors" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_plugin_client" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_basics" path="../Juce/modules"/>
</MODULEPATHS>
</VS2013>
<LINUX_MAKE targetFolder="Builds/Linux" vstFolder="~/SDKs/vstsdk2.4" vst3Folder="~/SDKs/VST3 SDK">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" libraryPath="/usr/X11R6/lib/" isDebug="1" optimisation="1"
targetName="AdlibBlaster"/>
<CONFIGURATION name="Release" libraryPath="/usr/X11R6/lib/" isDebug="0" optimisation="2"
targetName="AdlibBlaster"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_core" path="../Juce/modules"/>
<MODULEPATH id="juce_events" path="../Juce/modules"/>
<MODULEPATH id="juce_graphics" path="../Juce/modules"/>
<MODULEPATH id="juce_data_structures" path="../Juce/modules"/>
<MODULEPATH id="juce_gui_basics" path="../Juce/modules"/>
<MODULEPATH id="juce_gui_extra" path="../Juce/modules"/>
<MODULEPATH id="juce_cryptography" path="../Juce/modules"/>
<MODULEPATH id="juce_video" path="../Juce/modules"/>
<MODULEPATH id="juce_opengl" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_devices" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_formats" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_processors" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_plugin_client" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_basics" path="../Juce/modules"/>
</MODULEPATHS>
</LINUX_MAKE>
<ANDROID targetFolder="Builds/Android" androidActivityClass="com.yourcompany.adlibblaster.AdlibBlaster"
androidSDKPath="${user.home}/SDKs/android-sdk" androidNDKPath="${user.home}/SDKs/android-ndk"
androidMinimumSDK="8" androidInternetNeeded="1" androidKeyStore="${user.home}/.android/debug.keystore"
androidKeyStorePass="android" androidKeyAlias="androiddebugkey"
androidKeyAliasPass="android" androidCpp11="1">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" androidArchitectures="armeabi armeabi-v7a" isDebug="1"
optimisation="1" targetName="AdlibBlaster"/>
<CONFIGURATION name="Release" androidArchitectures="armeabi armeabi-v7a" isDebug="0"
optimisation="2" targetName="AdlibBlaster"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_core" path="../Juce/modules"/>
<MODULEPATH id="juce_events" path="../Juce/modules"/>
<MODULEPATH id="juce_graphics" path="../Juce/modules"/>
<MODULEPATH id="juce_data_structures" path="../Juce/modules"/>
<MODULEPATH id="juce_gui_basics" path="../Juce/modules"/>
<MODULEPATH id="juce_gui_extra" path="../Juce/modules"/>
<MODULEPATH id="juce_cryptography" path="../Juce/modules"/>
<MODULEPATH id="juce_video" path="../Juce/modules"/>
<MODULEPATH id="juce_opengl" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_devices" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_formats" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_processors" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_plugin_client" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_basics" path="../Juce/modules"/>
</MODULEPATHS>
</ANDROID>
<CODEBLOCKS targetFolder="Builds/CodeBlocks">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="AdlibBlaster"/>
<CONFIGURATION name="Release" isDebug="0" optimisation="2" targetName="AdlibBlaster"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_core" path="../Juce/modules"/>
<MODULEPATH id="juce_events" path="../Juce/modules"/>
<MODULEPATH id="juce_graphics" path="../Juce/modules"/>
<MODULEPATH id="juce_data_structures" path="../Juce/modules"/>
<MODULEPATH id="juce_gui_basics" path="../Juce/modules"/>
<MODULEPATH id="juce_gui_extra" path="../Juce/modules"/>
<MODULEPATH id="juce_cryptography" path="../Juce/modules"/>
<MODULEPATH id="juce_video" path="../Juce/modules"/>
<MODULEPATH id="juce_opengl" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_devices" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_formats" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_processors" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_plugin_client" path="../Juce/modules"/>
<MODULEPATH id="juce_audio_basics" path="../Juce/modules"/>
</MODULEPATHS>
</CODEBLOCKS>
</EXPORTFORMATS>
<MODULES>
<MODULES id="juce_audio_basics" showAllCode="1" useLocalCopy="1"/>
<MODULES id="juce_audio_devices" showAllCode="1" useLocalCopy="1"/>
<MODULES id="juce_audio_formats" showAllCode="1" useLocalCopy="1"/>
<MODULES id="juce_audio_plugin_client" showAllCode="1" useLocalCopy="1"/>
<MODULES id="juce_audio_processors" showAllCode="1" useLocalCopy="1"/>
<MODULES id="juce_core" showAllCode="1" useLocalCopy="1"/>
<MODULES id="juce_cryptography" showAllCode="1" useLocalCopy="1"/>
<MODULES id="juce_data_structures" showAllCode="1" useLocalCopy="1"/>
<MODULES id="juce_events" showAllCode="1" useLocalCopy="1"/>
<MODULES id="juce_graphics" showAllCode="1" useLocalCopy="1"/>
<MODULES id="juce_gui_basics" showAllCode="1" useLocalCopy="1"/>
<MODULES id="juce_gui_extra" showAllCode="1" useLocalCopy="1"/>
<MODULES id="juce_opengl" showAllCode="1" useLocalCopy="1"/>
<MODULES id="juce_video" showAllCode="1" useLocalCopy="1"/>
</MODULES>
<JUCEOPTIONS JUCE_QUICKTIME="disabled"/>
</JUCERPROJECT>

View file

@ -1,7 +1,17 @@
#include "DROMultiplexer.h"
#include "JuceHeader.h"
/// Jeff-Russ added guard against windows.h include if not windows:
#ifdef _WIN32 // covers both 32 and 64-bit
#include <Windows.h>
#else
#include "windows.h"
#endif
/// Jeff-Russ added to replace mising itoa for xcode:
#if __APPLE__
#include "itoa.h"
#endif
// Used by the first recording instance to claim master status
DROMultiplexer* DROMultiplexer::master = NULL;
@ -185,10 +195,11 @@ void DROMultiplexer::TwoOpMelodicNoteOn(Hiopl* opl, int inCh) {
// find a free channel and mark it as used
char addr[16];
int outCh = _FindFreeChannel(opl, inCh);
if (outCh >= 0) {
_DebugOut(" <- ");
_DebugOut(itoa((int)opl, addr, 16));
_DebugOut(" ");
//_DebugOut(" <- ");
//_DebugOut(itoa((int)opl, addr, 16));
//_DebugOut(" ");
for (int i = 0; i < MELODIC_CHANNELS; i++) {
Hiopl* tmpOpl = channels[i].opl;
_DebugOut(NULL == tmpOpl ? "-" : tmpOpl->GetState(channels[i].ch));

View file

@ -6,6 +6,6 @@
class InstrumentLoader
{
public:
virtual void loadInstrumentData(int n, const unsigned char* data, JuceOplvstiAudioProcessor *proc) = 0;
virtual void loadInstrumentData(int n, const unsigned char* data, AdlibBlasterAudioProcessor *proc) = 0;
virtual String getExtension() = 0;
};

View file

@ -7,7 +7,7 @@
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
and re-saved.
Created with Introjucer version: 3.1.0
Created with Introjucer version: 3.1.1
------------------------------------------------------------------------------
@ -29,46 +29,56 @@ void PluginGui::updateFromParameters()
emulatorSlider->setValue(processor->getEnumParameter("Emulator"), juce::NotificationType::dontSendNotification);
setRecordButtonState(processor->isThisInstanceRecording());
sineImageButton->setToggleState(false, false);
halfsineImageButton->setToggleState(false, false);
abssineImageButton->setToggleState(false, false);
quartersineImageButton->setToggleState(false, false);
alternatingsineImageButton->setToggleState(false, false);
camelsineImageButton->setToggleState(false, false);
squareImageButton->setToggleState(false, false);
logsawImageButton->setToggleState(false, false);
/// setToggleState(bool, bool) is deprecated.
/// Jeff-Russ replaced the second arg of "false" with dontSendNotification:
sineImageButton->setToggleState(false, dontSendNotification);
halfsineImageButton->setToggleState(false, dontSendNotification);
abssineImageButton->setToggleState(false, dontSendNotification);
quartersineImageButton->setToggleState(false, dontSendNotification);
alternatingsineImageButton->setToggleState(false, dontSendNotification);
camelsineImageButton->setToggleState(false, dontSendNotification);
squareImageButton->setToggleState(false, dontSendNotification);
logsawImageButton->setToggleState(false, dontSendNotification);
switch(processor->getEnumParameter("Modulator Wave")) {
case 0: sineImageButton->setToggleState(true, false); break;
case 1: halfsineImageButton->setToggleState(true, false); break;
case 2: abssineImageButton->setToggleState(true, false); break;
case 3: quartersineImageButton->setToggleState(true, false); break;
case 4: alternatingsineImageButton->setToggleState(true, false); break;
case 5: camelsineImageButton->setToggleState(true, false); break;
case 6: squareImageButton->setToggleState(true, false); break;
case 7: logsawImageButton->setToggleState(true, false); break;
case 0: sineImageButton->setToggleState(true, dontSendNotification); break;
case 1: halfsineImageButton->setToggleState(true, dontSendNotification); break;
case 2: abssineImageButton->setToggleState(true, dontSendNotification); break;
case 3: quartersineImageButton->setToggleState(true, dontSendNotification); break;
case 4: alternatingsineImageButton->setToggleState(true, dontSendNotification); break;
case 5: camelsineImageButton->setToggleState(true, dontSendNotification); break;
case 6: squareImageButton->setToggleState(true, dontSendNotification); break;
case 7: logsawImageButton->setToggleState(true, dontSendNotification); break;
}
sineImageButton2->setToggleState(false, false);
halfsineImageButton2->setToggleState(false, false);
abssineImageButton2->setToggleState(false, false);
quartersineImageButton2->setToggleState(false, false);
alternatingsineImageButton2->setToggleState(false, false);
camelsineImageButton2->setToggleState(false, false);
squareImageButton2->setToggleState(false, false);
logsawImageButton2->setToggleState(false, false);
sineImageButton2->setToggleState(false, dontSendNotification);
halfsineImageButton2->setToggleState(false, dontSendNotification);
abssineImageButton2->setToggleState(false, dontSendNotification);
quartersineImageButton2->setToggleState(false, dontSendNotification);
alternatingsineImageButton2->setToggleState(false, dontSendNotification);
camelsineImageButton2->setToggleState(false, dontSendNotification);
squareImageButton2->setToggleState(false, dontSendNotification);
logsawImageButton2->setToggleState(false, dontSendNotification);
switch(processor->getEnumParameter("Carrier Wave")) {
case 0: sineImageButton2->setToggleState(true, false); break;
case 1: halfsineImageButton2->setToggleState(true, false); break;
case 2: abssineImageButton2->setToggleState(true, false); break;
case 3: quartersineImageButton2->setToggleState(true, false); break;
case 4: alternatingsineImageButton2->setToggleState(true, false); break;
case 5: camelsineImageButton2->setToggleState(true, false); break;
case 6: squareImageButton2->setToggleState(true, false); break;
case 7: logsawImageButton2->setToggleState(true, false); break;
case 0: sineImageButton2->setToggleState(true, dontSendNotification); break;
case 1: halfsineImageButton2->setToggleState(true, dontSendNotification); break;
case 2: abssineImageButton2->setToggleState(true, dontSendNotification); break;
case 3: quartersineImageButton2->setToggleState(true, dontSendNotification); break;
case 4: alternatingsineImageButton2->setToggleState(true, dontSendNotification); break;
case 5: camelsineImageButton2->setToggleState(true, dontSendNotification); break;
case 6: squareImageButton2->setToggleState(true, dontSendNotification); break;
case 7: logsawImageButton2->setToggleState(true, dontSendNotification); break;
}
frequencyComboBox->setSelectedItemIndex(processor->getEnumParameter("Modulator Frequency Multiplier"), true);
frequencyComboBox2->setSelectedItemIndex(processor->getEnumParameter("Carrier Frequency Multiplier"), true);
/// setSelectedItemIndex(bool, bool) is deprecated.
/// Jeff-Russ replaced the second arg of "true" with "sendNotificationAsync":
frequencyComboBox->setSelectedItemIndex (
processor->getEnumParameter("Modulator Frequency Multiplier"),
sendNotificationAsync);
frequencyComboBox2->setSelectedItemIndex (
processor->getEnumParameter("Carrier Frequency Multiplier"),
sendNotificationAsync);
attenuationSlider->setValue(processor->getEnumParameter("Modulator Attenuation") * -0.75, juce::NotificationType::dontSendNotification);
attenuationSlider2->setValue(processor->getEnumParameter("Carrier Attenuation") * -0.75, juce::NotificationType::dontSendNotification);
@ -82,30 +92,44 @@ void PluginGui::updateFromParameters()
sSlider2->setValue(processor->getIntParameter("Carrier Sustain Level"), juce::NotificationType::dontSendNotification);
rSlider2->setValue(processor->getIntParameter("Carrier Release"), juce::NotificationType::dontSendNotification);
keyscaleAttenuationComboBox->setSelectedItemIndex(processor->getEnumParameter("Modulator Keyscale Level"), true);
keyscaleAttenuationComboBox2->setSelectedItemIndex(processor->getEnumParameter("Carrier Keyscale Level"), true);
/// Jeff-Russ replaced the second arg of "true" with "sendNotificationAsync":
keyscaleAttenuationComboBox->setSelectedItemIndex (
processor->getEnumParameter("Modulator Keyscale Level"),
sendNotificationAsync);
keyscaleAttenuationComboBox2->setSelectedItemIndex (
processor->getEnumParameter("Carrier Keyscale Level"),
sendNotificationAsync);
if (processor->getEnumParameter("Modulator Tremolo")) tremoloButton->setToggleState(true, false);
if (processor->getEnumParameter("Modulator Vibrato")) vibratoButton->setToggleState(true, false);
if (processor->getEnumParameter("Modulator Sustain")) sustainButton->setToggleState(true, false);
if (processor->getEnumParameter("Modulator Keyscale Rate")) keyscaleEnvButton->setToggleState(true, false);
if (processor->getEnumParameter("Modulator Tremolo")) tremoloButton->setToggleState(true, dontSendNotification);
if (processor->getEnumParameter("Modulator Vibrato")) vibratoButton->setToggleState(true, dontSendNotification);
if (processor->getEnumParameter("Modulator Sustain")) sustainButton->setToggleState(true, dontSendNotification);
if (processor->getEnumParameter("Modulator Keyscale Rate")) keyscaleEnvButton->setToggleState(true, dontSendNotification);
if (processor->getEnumParameter("Carrier Tremolo")) tremoloButton2->setToggleState(true, false);
if (processor->getEnumParameter("Carrier Vibrato")) vibratoButton2->setToggleState(true, false);
if (processor->getEnumParameter("Carrier Sustain")) sustainButton2->setToggleState(true, false);
if (processor->getEnumParameter("Carrier Keyscale Rate")) keyscaleEnvButton2->setToggleState(true, false);
if (processor->getEnumParameter("Carrier Tremolo")) tremoloButton2->setToggleState(true, dontSendNotification);
if (processor->getEnumParameter("Carrier Vibrato")) vibratoButton2->setToggleState(true, dontSendNotification);
if (processor->getEnumParameter("Carrier Sustain")) sustainButton2->setToggleState(true, dontSendNotification);
if (processor->getEnumParameter("Carrier Keyscale Rate")) keyscaleEnvButton2->setToggleState(true, dontSendNotification);
vibratoSlider->setValue(processor->getEnumParameter("Vibrato Depth") * 7.0 + 7.0, juce::NotificationType::dontSendNotification);
tremoloSlider->setValue(processor->getEnumParameter("Tremolo Depth") * 3.8 + 1.0, juce::NotificationType::dontSendNotification);
feedbackSlider->setValue(processor->getIntParameter("Modulator Feedback"), juce::NotificationType::dontSendNotification);
velocityComboBox->setSelectedItemIndex(processor->getEnumParameter("Modulator Velocity Sensitivity"), true);
velocityComboBox2->setSelectedItemIndex(processor->getEnumParameter("Carrier Velocity Sensitivity"), true);
/// Jeff-Russ replaced the second arg of "true" with "sendNotificationAsync":
algorithmComboBox->setSelectedItemIndex(processor->getEnumParameter("Algorithm"), true);
percussionComboBox->setSelectedItemIndex(processor->getEnumParameter("Percussion Mode"), true);
velocityComboBox->setSelectedItemIndex (
processor->getEnumParameter("Modulator Velocity Sensitivity"),
sendNotificationAsync);
velocityComboBox2->setSelectedItemIndex (
processor->getEnumParameter("Carrier Velocity Sensitivity"),
sendNotificationAsync);
algorithmComboBox->setSelectedItemIndex (
processor->getEnumParameter("Algorithm"),
sendNotificationAsync);
percussionComboBox->setSelectedItemIndex (
processor->getEnumParameter("Percussion Mode"),
sendNotificationAsync);
tooltipWindow.setColour(tooltipWindow.backgroundColourId, Colour(0x0));
tooltipWindow.setColour(tooltipWindow.textColourId, Colour(COLOUR_MID));
@ -126,7 +150,7 @@ void PluginGui::setRecordButtonState(bool recording) {
//[/MiscUserDefs]
//==============================================================================
PluginGui::PluginGui (JuceOplvstiAudioProcessor* ownerFilter)
PluginGui::PluginGui (AdlibBlasterAudioProcessor* ownerFilter)
: AudioProcessorEditor (ownerFilter)
{
addAndMakeVisible (groupComponent = new GroupComponent ("new group",
@ -1552,7 +1576,7 @@ void PluginGui::buttonClicked (Button* buttonThatWasClicked)
else if (buttonThatWasClicked == recordButton)
{
//[UserButtonCode_recordButton] -- add your button handler code here..
recordButton->setToggleState(false, false);
recordButton->setToggleState(false, dontSendNotification);
if (!processor->isAnyInstanceRecording()) {
WildcardFileFilter wildcardFilter ("*.dro", String::empty, "DRO files");
FileBrowserComponent browser (FileBrowserComponent::saveMode,
@ -1637,7 +1661,7 @@ BEGIN_JUCER_METADATA
<JUCER_COMPONENT documentType="Component" className="PluginGui" componentName=""
parentClasses="public AudioProcessorEditor, public FileDragAndDropTarget, public DragAndDropContainer, public Timer"
constructorParams="JuceOplvstiAudioProcessor* ownerFilter" variableInitialisers=" AudioProcessorEditor (ownerFilter)"
constructorParams="AdlibBlasterAudioProcessor* ownerFilter" variableInitialisers=" AudioProcessorEditor (ownerFilter)"
snapPixels="8" snapActive="1" snapShown="1" overlayOpacity="0.330"
fixedSize="0" initialWidth="860" initialHeight="550">
<BACKGROUND backgroundColour="ff000000"/>
@ -1894,8 +1918,8 @@ BEGIN_JUCER_METADATA
<SLIDER name="tremolo slider" id="ab64abee7ac8874b" memberName="tremoloSlider"
virtualName="" explicitFocusOrder="0" pos="632 456 112 24" thumbcol="ff00af00"
trackcol="7f007f00" textboxtext="ff007f00" textboxbkgd="ff000000"
textboxhighlight="ff00af00" min="1" max="4.7999999999999998"
int="3.7999999999999998" style="LinearHorizontal" textBoxPos="TextBoxLeft"
textboxhighlight="ff00af00" min="1" max="4.7999999999999998224"
int="3.7999999999999998224" style="LinearHorizontal" textBoxPos="TextBoxLeft"
textBoxEditable="1" textBoxWidth="44" textBoxHeight="20" skewFactor="1"/>
<LABEL name="frequency label" id="134ce8f87da62b88" memberName="frequencyLabel5"
virtualName="" explicitFocusOrder="0" pos="472 456 152 24" tooltip="OPL global tremolo depth"

View file

@ -7,7 +7,7 @@
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
and re-saved.
Created with Introjucer version: 3.1.0
Created with Introjucer version: 3.1.1
------------------------------------------------------------------------------
@ -44,7 +44,7 @@ class PluginGui : public AudioProcessorEditor,
{
public:
//==============================================================================
PluginGui (JuceOplvstiAudioProcessor* ownerFilter);
PluginGui (AdlibBlasterAudioProcessor* ownerFilter);
~PluginGui();
//==============================================================================
@ -92,7 +92,7 @@ private:
//[UserVariables] -- You can add your own custom variables in this section.
static const uint32 COLOUR_MID = 0xff007f00;
static const uint32 COLOUR_RECORDING = 0xffff0000;
JuceOplvstiAudioProcessor* processor;
AdlibBlasterAudioProcessor* processor;
std::array<ScopedPointer<Label>, Hiopl::CHANNELS> channels;
TooltipWindow tooltipWindow;
//[/UserVariables]

View file

@ -4,10 +4,10 @@
#include "IntFloatParameter.h"
#include "SbiLoader.h"
const char *JuceOplvstiAudioProcessor::PROGRAM_INDEX = "Program Index";
const char *AdlibBlasterAudioProcessor::PROGRAM_INDEX = "Program Index";
//==============================================================================
JuceOplvstiAudioProcessor::JuceOplvstiAudioProcessor()
AdlibBlasterAudioProcessor::AdlibBlasterAudioProcessor()
: i_program(-1)
{
// Initalize OPL
@ -142,27 +142,27 @@ JuceOplvstiAudioProcessor::JuceOplvstiAudioProcessor()
available_channels.push_back(i);
}
bool JuceOplvstiAudioProcessor::isThisInstanceRecording() {
bool AdlibBlasterAudioProcessor::isThisInstanceRecording() {
return NULL != recordingFile;
}
bool JuceOplvstiAudioProcessor::isAnyInstanceRecording() {
bool AdlibBlasterAudioProcessor::isAnyInstanceRecording() {
return dro->IsAnInstanceRecording();
}
void JuceOplvstiAudioProcessor::startRecording(File *outputFile) {
void AdlibBlasterAudioProcessor::startRecording(File *outputFile) {
recordingFile = outputFile;
if (!dro->StartCapture(outputFile->getFullPathName().toUTF8(), Opl)) {
juce::AlertWindow::showMessageBoxAsync(juce::AlertWindow::InfoIcon, "Could not open specified file for writing!", "OK");
}
}
void JuceOplvstiAudioProcessor::stopRecording() {
void AdlibBlasterAudioProcessor::stopRecording() {
dro->StopCapture();
recordingFile = NULL;
}
void JuceOplvstiAudioProcessor::initPrograms()
void AdlibBlasterAudioProcessor::initPrograms()
{
// these ones from the Syndicate in-game music
const float i_params_0[] = {
@ -434,7 +434,7 @@ void JuceOplvstiAudioProcessor::initPrograms()
}
void JuceOplvstiAudioProcessor::applyPitchBend()
void AdlibBlasterAudioProcessor::applyPitchBend()
{ // apply the currently configured pitch bend to all active notes.
for (int i = 1; i <= Hiopl::CHANNELS; i++) {
if (NO_NOTE != active_notes[i]) {
@ -445,7 +445,7 @@ void JuceOplvstiAudioProcessor::applyPitchBend()
}
}
JuceOplvstiAudioProcessor::~JuceOplvstiAudioProcessor()
AdlibBlasterAudioProcessor::~AdlibBlasterAudioProcessor()
{
for (unsigned int i=0; i < params.size(); ++i)
delete params[i];
@ -454,22 +454,22 @@ JuceOplvstiAudioProcessor::~JuceOplvstiAudioProcessor()
}
//==============================================================================
const String JuceOplvstiAudioProcessor::getName() const
const String AdlibBlasterAudioProcessor::getName() const
{
return JucePlugin_Name;
}
int JuceOplvstiAudioProcessor::getNumParameters()
int AdlibBlasterAudioProcessor::getNumParameters()
{
return (int)params.size();
}
float JuceOplvstiAudioProcessor::getParameter (int index)
float AdlibBlasterAudioProcessor::getParameter (int index)
{
return params[index]->getParameter();
}
void JuceOplvstiAudioProcessor::setIntParameter (String name, int value)
void AdlibBlasterAudioProcessor::setIntParameter (String name, int value)
{
int i = paramIdxByName[name];
IntFloatParameter* p = (IntFloatParameter*)params[i];
@ -477,7 +477,7 @@ void JuceOplvstiAudioProcessor::setIntParameter (String name, int value)
setParameter(i, p->getParameter());
}
void JuceOplvstiAudioProcessor::setEnumParameter (String name, int index)
void AdlibBlasterAudioProcessor::setEnumParameter (String name, int index)
{
int i = paramIdxByName[name];
EnumFloatParameter* p = (EnumFloatParameter*)params[i];
@ -485,14 +485,14 @@ void JuceOplvstiAudioProcessor::setEnumParameter (String name, int index)
setParameter(i, p->getParameter());
}
int JuceOplvstiAudioProcessor::getIntParameter (String name)
int AdlibBlasterAudioProcessor::getIntParameter (String name)
{
int i = paramIdxByName[name];
IntFloatParameter* p = (IntFloatParameter*)params[i];
return p->getParameterValue();
}
int JuceOplvstiAudioProcessor::getEnumParameter (String name)
int AdlibBlasterAudioProcessor::getEnumParameter (String name)
{
int i = paramIdxByName[name];
EnumFloatParameter* p = (EnumFloatParameter*)params[i];
@ -500,7 +500,7 @@ int JuceOplvstiAudioProcessor::getEnumParameter (String name)
}
// Parameters which apply directly to the OPL
void JuceOplvstiAudioProcessor::setParameter (int index, float newValue)
void AdlibBlasterAudioProcessor::setParameter (int index, float newValue)
{
FloatParameter* p = params[index];
p->setParameter(newValue);
@ -548,7 +548,7 @@ void JuceOplvstiAudioProcessor::setParameter (int index, float newValue)
}
}
void JuceOplvstiAudioProcessor::loadInstrumentFromFile(String filename)
void AdlibBlasterAudioProcessor::loadInstrumentFromFile(String filename)
{
FILE* f = fopen(filename.toUTF8(), "rb");
unsigned char buf[MAX_INSTRUMENT_FILE_SIZE_BYTES];
@ -560,7 +560,7 @@ void JuceOplvstiAudioProcessor::loadInstrumentFromFile(String filename)
}
// Used to configure parameters from .SBI instrument file
void JuceOplvstiAudioProcessor::setParametersByRegister(int register_base, int op, uint8 value)
void AdlibBlasterAudioProcessor::setParametersByRegister(int register_base, int op, uint8 value)
{
const String operators[] = {"Modulator", "Carrier"};
register_base &= 0xF0;
@ -596,37 +596,37 @@ void JuceOplvstiAudioProcessor::setParametersByRegister(int register_base, int o
}
}
const String JuceOplvstiAudioProcessor::getParameterName (int index)
const String AdlibBlasterAudioProcessor::getParameterName (int index)
{
return params[index]->getName();
}
const String JuceOplvstiAudioProcessor::getParameterText (int index)
const String AdlibBlasterAudioProcessor::getParameterText (int index)
{
return params[index]->getParameterText();
}
const String JuceOplvstiAudioProcessor::getInputChannelName (int channelIndex) const
const String AdlibBlasterAudioProcessor::getInputChannelName (int channelIndex) const
{
return String (channelIndex + 1);
}
const String JuceOplvstiAudioProcessor::getOutputChannelName (int channelIndex) const
const String AdlibBlasterAudioProcessor::getOutputChannelName (int channelIndex) const
{
return String (channelIndex + 1);
}
bool JuceOplvstiAudioProcessor::isInputChannelStereoPair (int index) const
bool AdlibBlasterAudioProcessor::isInputChannelStereoPair (int index) const
{
return false;
}
bool JuceOplvstiAudioProcessor::isOutputChannelStereoPair (int index) const
bool AdlibBlasterAudioProcessor::isOutputChannelStereoPair (int index) const
{
return false;
return true; //// Jeff-Russ changed to true for AU version. for vsti make it false
}
bool JuceOplvstiAudioProcessor::acceptsMidi() const
bool AdlibBlasterAudioProcessor::acceptsMidi() const
{
#if JucePlugin_WantsMidiInput
return true;
@ -635,7 +635,7 @@ bool JuceOplvstiAudioProcessor::acceptsMidi() const
#endif
}
bool JuceOplvstiAudioProcessor::producesMidi() const
bool AdlibBlasterAudioProcessor::producesMidi() const
{
#if JucePlugin_ProducesMidiOutput
return true;
@ -644,27 +644,27 @@ bool JuceOplvstiAudioProcessor::producesMidi() const
#endif
}
bool JuceOplvstiAudioProcessor::silenceInProducesSilenceOut() const
bool AdlibBlasterAudioProcessor::silenceInProducesSilenceOut() const
{
return false;
}
double JuceOplvstiAudioProcessor::getTailLengthSeconds() const
double AdlibBlasterAudioProcessor::getTailLengthSeconds() const
{
return 0.0;
}
int JuceOplvstiAudioProcessor::getNumPrograms()
int AdlibBlasterAudioProcessor::getNumPrograms()
{
return (int)programs.size();
}
int JuceOplvstiAudioProcessor::getCurrentProgram()
int AdlibBlasterAudioProcessor::getCurrentProgram()
{
return i_program;
}
void JuceOplvstiAudioProcessor::updateGuiIfPresent()
void AdlibBlasterAudioProcessor::updateGuiIfPresent()
{
PluginGui* gui = (PluginGui*)getActiveEditor();
if (gui) {
@ -672,7 +672,7 @@ void JuceOplvstiAudioProcessor::updateGuiIfPresent()
}
}
void JuceOplvstiAudioProcessor::setCurrentProgram (int index)
void AdlibBlasterAudioProcessor::setCurrentProgram (int index)
{
if (i_program==index)
return;
@ -685,24 +685,24 @@ void JuceOplvstiAudioProcessor::setCurrentProgram (int index)
updateGuiIfPresent();
}
const String JuceOplvstiAudioProcessor::getProgramName (int index)
const String AdlibBlasterAudioProcessor::getProgramName (int index)
{
return program_order[index];
}
void JuceOplvstiAudioProcessor::changeProgramName (int index, const String& newName)
void AdlibBlasterAudioProcessor::changeProgramName (int index, const String& newName)
{
}
//==============================================================================
void JuceOplvstiAudioProcessor::prepareToPlay (double sampleRate, int samplesPerBlock)
void AdlibBlasterAudioProcessor::prepareToPlay (double sampleRate, int samplesPerBlock)
{
//Opl->SetSampleRate((int)sampleRate);
// Use this method as the place to do any pre-playback
// initialisation that you need..
}
void JuceOplvstiAudioProcessor::releaseResources()
void AdlibBlasterAudioProcessor::releaseResources()
{
// When playback stops, you can use this as an opportunity to free up any
// spare memory, etc.
@ -710,7 +710,7 @@ void JuceOplvstiAudioProcessor::releaseResources()
static const Drum DRUM_INDEX[] = { BDRUM, SNARE, TOM, CYMBAL, HIHAT };
void JuceOplvstiAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages)
void AdlibBlasterAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages)
{
buffer.clear(0, 0, buffer.getNumSamples());
MidiBuffer::Iterator midi_buffer_iterator(midiMessages);
@ -820,16 +820,22 @@ void JuceOplvstiAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuf
applyPitchBend();
}
}
Opl->Generate(buffer.getNumSamples(), buffer.getSampleData(0));
/// Jeff-Russ: getSampleData(int) is deprecated. use getWritePointer(int)
Opl->Generate(buffer.getNumSamples(), buffer.getWritePointer(0));
/// Jeff-Russ added loop to copy left channel to right channel. uncomment when building to {0,2} AU
// const float* LChanRead = buffer.getReadPointer(0, 0);
// float* RChanWrite = buffer.getWritePointer(1, 0);
// for (int i = 0; i < buffer.getNumSamples(); i++) { RChanWrite[i] = LChanRead[i]; }
}
//==============================================================================
bool JuceOplvstiAudioProcessor::hasEditor() const
bool AdlibBlasterAudioProcessor::hasEditor() const
{
return true; // (change this to false if you choose to not supply an editor)
}
AudioProcessorEditor* JuceOplvstiAudioProcessor::createEditor()
AudioProcessorEditor* AdlibBlasterAudioProcessor::createEditor()
{
PluginGui* gui = new PluginGui(this);
gui->updateFromParameters();
@ -847,7 +853,7 @@ Identifier stringToIdentifier(const String &s)
return s.replaceCharacters(" ", "_");
}
void JuceOplvstiAudioProcessor::getStateInformation(MemoryBlock& destData)
void AdlibBlasterAudioProcessor::getStateInformation(MemoryBlock& destData)
{
ReferenceCountedObjectPtr<DynamicObject> v(new DynamicObject);
@ -865,7 +871,7 @@ void JuceOplvstiAudioProcessor::getStateInformation(MemoryBlock& destData)
destData.copyFrom(s.getCharPointer(), 0, destData.getSize());
}
void JuceOplvstiAudioProcessor::setStateInformation (const void* data, int sizeInBytes)
void AdlibBlasterAudioProcessor::setStateInformation (const void* data, int sizeInBytes)
{
if (sizeInBytes < 1)
return;
@ -910,13 +916,13 @@ void JuceOplvstiAudioProcessor::setStateInformation (const void* data, int sizeI
// @param idx 1-based channel index
// @note since this is just reading off pod, "safe" to access without a mutex by other threads such as GUI
int JuceOplvstiAudioProcessor::isChannelActive(int idx) const
int AdlibBlasterAudioProcessor::isChannelActive(int idx) const
{
return active_notes[idx] != NO_NOTE;
}
// @param idx 1-based channel index
const char* JuceOplvstiAudioProcessor::getChannelEnvelopeStage(int idx) const
const char* AdlibBlasterAudioProcessor::getChannelEnvelopeStage(int idx) const
{
return Opl->GetState(idx);
}
@ -926,5 +932,5 @@ const char* JuceOplvstiAudioProcessor::getChannelEnvelopeStage(int idx) const
// This creates new instances of the plugin..
AudioProcessor* JUCE_CALLTYPE createPluginFilter()
{
return new JuceOplvstiAudioProcessor();
return new AdlibBlasterAudioProcessor();
}

View file

@ -18,14 +18,14 @@
//==============================================================================
class JuceOplvstiAudioProcessor : public AudioProcessor
class AdlibBlasterAudioProcessor : public AudioProcessor
{
public:
//==============================================================================
JuceOplvstiAudioProcessor();
AdlibBlasterAudioProcessor();
void initPrograms();
void applyPitchBend();
~JuceOplvstiAudioProcessor();
~AdlibBlasterAudioProcessor();
bool isThisInstanceRecording();
bool isAnyInstanceRecording();
@ -45,7 +45,7 @@ public:
//==============================================================================
const String getName() const;
static const int JuceOplvstiAudioProcessor::MAX_INSTRUMENT_FILE_SIZE_BYTES = 1024;
static const int MAX_INSTRUMENT_FILE_SIZE_BYTES = 1024;
int getNumParameters();
@ -105,6 +105,6 @@ private:
File *recordingFile;
//==============================================================================
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JuceOplvstiAudioProcessor)
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AdlibBlasterAudioProcessor)
};
#endif // PLUGINPROCESSOR_H_INCLUDED

View file

@ -5,7 +5,7 @@ SbiLoader::SbiLoader(void)
{
}
void SbiLoader::loadInstrumentData(int n, const unsigned char* data, JuceOplvstiAudioProcessor *proc)
void SbiLoader::loadInstrumentData(int n, const unsigned char* data, AdlibBlasterAudioProcessor *proc)
{
if (0 == strncmp("SBI", (const char*)data, 3)) {
data += 36;

View file

@ -7,7 +7,7 @@ public:
SbiLoader(void);
virtual ~SbiLoader(void);
void loadInstrumentData(int n, const unsigned char* data, JuceOplvstiAudioProcessor *proc);
void loadInstrumentData(int n, const unsigned char* data, AdlibBlasterAudioProcessor *proc);
String getExtension();
};

View file

@ -63,20 +63,42 @@
#pragma warning(disable : 4996)
#endif
#ifndef WIN32
typedef long long __int64;
#endif
/// Jeff-Russ modified to be uniform across C++ implementations:
// The internal types:
#include <stdint.h>
typedef unsigned char BYTE;
typedef int64_t __int64;
typedef double Real64;
/* The internal types */
typedef unsigned char Bit8u;
typedef signed char Bit8s;
typedef unsigned short Bit16u;
typedef signed short Bit16s;
typedef unsigned long Bit32u;
typedef signed long Bit32s;
typedef unsigned __int64 Bit64u;
typedef signed __int64 Bit64s;
typedef unsigned int Bitu;
typedef signed int Bits;
typedef uint16_t Bit16u;
typedef int16_t Bit16s;
typedef uint32_t Bit32u;
typedef int32_t Bit32s;
typedef uint64_t Bit64u;
typedef int64_t Bit64s;
typedef Bit32u Bitu;
typedef Bit32s Bits;
/// Jeff-Russ PUT PLATFORM SPECIFIC STUFF HERE:
#ifndef _WIN32 /// __forceinline likely not needed
#define __forceinline inline /// outside of windows.
#endif
#ifdef _WIN32 // covers both 32 and 64-bit
#define INLINE __forceinline
#endif
//#elif __APPLE__
// #include "TargetConditionals.h"
// #define INLINE inline /// apple has no forceinline
//#elif __linux
// #define INLINE inline
//#elif __unix
// #define INLINE inline
//#elif __posix
// #define INLINE inline
//#else
// #error Unsupported Operating System
//#endif

View file

@ -889,6 +889,8 @@ Channel* Channel::BlockTemplate( Chip* chip, Bit32u samples, Bit32s* output ) {
return (this + 2);
}
break;
default: /// Jeff-Russ added to silence warning
break;
}
//Init the operators with the the current vibrato and tremolo values
Op( 0 )->Prepare( chip );
@ -954,6 +956,8 @@ Channel* Channel::BlockTemplate( Chip* chip, Bit32u samples, Bit32s* output ) {
output[ i * 2 + 0 ] += sample & maskLeft;
output[ i * 2 + 1 ] += sample & maskRight;
break;
default: /// Jeff-Russ added to silence warning
break;
}
}
switch( mode ) {

50
Source/itoa.h Normal file
View file

@ -0,0 +1,50 @@
///=============================================================================
/// itoa.h - A C++ header to implement itoa()
/// Created: 11 Feb 2015 5:08:51pm
/// Author: Jeff-Russ
///=============================================================================
#pragma once
#include <iostream>
using namespace std;
// A utility function to reverse a string:
void reverse(char str[], int length)
{
int start = 0;
int end = length -1;
while (start < end)
{ swap(*(str+start), *(str+end));
start++;
end--;
}
};
char* itoa(int num, char* str, int base)
{
int i = 0;
bool isNegative = false;
if (num == 0) // Handle 0 explicitly, otherwise
{ str[i++] = '0'; // empty string is printed for 0
str[i] = '\0';
return str;
}
// In standard itoa(), negative
if (num < 0 && base == 10) // numbers are handled only with
{ isNegative = true; // base 10. Otherwise numbers
num = -num; // are considered unsigned.
}
while (num != 0)
{ int rem = num % base; // Process individual digits
str[i++] = (rem > 9)? (rem-10) + 'a' : rem + '0';
num = num/base;
}
if (isNegative) // If number is negative, append '-'
str[i++] = '-';
str[i] = '\0'; // Append string terminator
reverse(str, i); // Reverse the string
return str;
};

85
Source/windows.h Normal file
View file

@ -0,0 +1,85 @@
///=============================================================================
/// windows.h - as needed re-definition of windows.h functions for non-win
/// Created: 11 Feb 2015 5:08:51pm
/// Author: Jeff-Russ
///=============================================================================
#pragma once
#include <stdint.h>
// PVOID - A pointer to any type.
// This type is declared in WinNT.h as follows:
typedef void* PVOID;
// DWORDLONG A 64-bit unsigned integer.
// This type is declared in IntSafe.h as follows:
typedef uint64_t DWORDLONG;
#define WINAPI
// DWORD - A 32-bit unsigned integer.
// This type is declared in IntSafe.h as follows:
typedef uint32_t DWORD;
// WCHAR - A 16-bit unicode character
// This type is declared in WinNT.h as follows:
typedef int16_t WCHAR;
// HANDLE - A handle to an object.
// This type is declared in WinDef.h as follows:
typedef /*PVOID*/ DWORD HANDLE;
DWORD STD_INPUT_HANDLE = -10;
DWORD STD_OUTPUT_HANDLE = -11;
DWORD STD_ERROR_HANDLE = -12;
#define MAX_PATH PATH_MAX
// BYTE - A byte (8-bits)
// This type is declared in WinDef.h as follows:
typedef unsigned char BYTE;
// WORD - A 16-bit unsigned integer.
// This type is declared in WinDef.h as follows:
typedef uint16_t WORD;
// BOOL - A boolean variable
// This type is declared in WinDef.h as follows:
typedef BYTE BOOL;
DWORD GetStdHandle (DWORD handle) { return handle; }
void WriteConsole(DWORD conout,const char* strPtr,
DWORD count, DWORD* countAdr, int* nul)
{
std::string msgType = "NOTICE: ";
if (conout == -10)
msgType = "INPUT: ";
else if (conout == -11)
msgType = "OUTPUT: ";
else if (conout == -12)
msgType = "ERROR: ";
else
msgType = "NOTICE: ";
std::string message (const char* str, uint32_t count);
std::cout << std::endl << msgType << message;
}
void AllocConsole()
{
std::cout << std::endl << "=== Starting debug console....." << std::endl;
}
void FreeConsole()
{
std::cout << std::endl << "=== Exited debug console ===" << std::endl;
}

View file

@ -46,9 +46,13 @@
#include <math.h>
#include <string.h>
#include <limits>
#include <cstdlib> /// Jeff-Russ added to get rand() and RAND_MAX
typedef unsigned __int8 BYTE;
#ifndef M_PI /// Jeff-Russ added
#define M_PI 3.141592654
#endif
#include "config.h"
#include "zdopl.h"
@ -851,7 +855,7 @@ void OPL3::initChannels() {
void OPL3::update_1_NTS1_6() {
int _1_nts1_6 = registers[OPL3DataStruct::_1_NTS1_6_Offset];
// Note Selection. This register is used in Channel.updateOperators() implementations,
// to calculate the channel´s Key Scale Number.
// to calculate the channel4s Key Scale Number.
// The value of the actual envelope rate follows the value of
// OPL3.nts,Operator.keyScaleNumber and Operator.ksr
nts = (_1_nts1_6 & 0x40) >> 6;
@ -1008,7 +1012,7 @@ void Channel::update_2_KON1_BLOCK3_FNUMH2(OPL3 *OPL3) {
int _2_kon1_block3_fnumh2 = OPL3->registers[channelBaseAddress+ChannelData::_2_KON1_BLOCK3_FNUMH2_Offset];
// Frequency Number (hi-register) and Block. These two registers, together with fnuml,
// sets the Channel´s base frequency;
// sets the Channel4s base frequency;
block = (_2_kon1_block3_fnumh2 & 0x1C) >> 2;
fnumh = _2_kon1_block3_fnumh2 & 0x03;
updateOperators(OPL3);
@ -1465,7 +1469,7 @@ double EnvelopeGenerator::getEnvelope(OPL3 *OPL3, int egt, int am) {
switch(stage) {
case ATTACK:
// Since the attack is exponential, it will never reach 0 dB, so
// we´ll work with the next to maximum in the envelope resolution.
// we4ll work with the next to maximum in the envelope resolution.
if(envelope<-envelopeResolution && xAttackIncrement != -EnvelopeGeneratorData::MUGEN) {
// The attack is exponential.
#if 0