Merge branch 'master' of https://github.com/Jeff-Russ/AdlibBlaster into Jeff-Russ-master
Conflicts: JuceOPLVSTi.jucer Source/DROMultiplexer.cpp
This commit is contained in:
commit
54adf378bb
15 changed files with 4855 additions and 4417 deletions
232
AdlibBlaster.jucer
Normal file
232
AdlibBlaster.jucer
Normal 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=" # This script takes the build product and copies it to the AU, VST, VST3, RTAS and AAX folders, depending on # which plugin types you've built original=$CONFIGURATION_BUILD_DIR/$FULL_PRODUCT_NAME # this looks inside the binary to detect which platforms are needed.. copyAU=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'AudioUnit' | wc -l` copyVST=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'VSTPlugin' | wc -l` copyVST3=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'GetPluginFactory' | wc -l` copyRTAS=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'CProcess' | wc -l` copyAAX=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'ACFStartup' | wc -l` if [ $copyAU -gt 0 ]; then echo "Copying to AudioUnit folder..." AU=~/Library/Audio/Plug-Ins/Components/$PRODUCT_NAME.component if [ -d "$AU" ]; then rm -r "$AU" fi cp -r "$original" "$AU" sed -i "" -e 's/TDMwPTul/BNDLPTul/g' "$AU/Contents/PkgInfo" sed -i "" -e 's/TDMw/BNDL/g' "$AU/Contents/$INFOPLIST_FILE" # Fix info.plist for AUs built with Xcode 3 if [ -f "$DEVELOPER_DIR/Library/Developer/CoreAudio/AudioUnits/AUPublic/AUBase/AUPlugInDispatch.cpp" ]; then echo else echo "Removing AudioComponents entry from Info.plist because this is not a new-format AU" /usr/libexec/PlistBuddy -c "Delete AudioComponents" "$AU/Contents/Info.plist" fi fi if [ $copyVST -gt 0 ]; then echo "Copying to VST folder..." VST=~/Library/Audio/Plug-Ins/VST/$PRODUCT_NAME.vst if [ -d "$VST" ]; then rm -r "$VST" fi cp -r "$original" "$VST" sed -i "" -e 's/TDMwPTul/BNDLPTul/g' "$VST/Contents/PkgInfo" sed -i "" -e 's/TDMw/BNDL/g' "$VST/Contents/$INFOPLIST_FILE" fi if [ $copyVST3 -gt 0 ]; then echo "Copying to VST3 folder..." VST3=~/Library/Audio/Plug-Ins/VST3/$PRODUCT_NAME.vst3 if [ -d "$VST3" ]; then rm -r "$VST3" fi cp -r "$original" "$VST3" sed -i "" -e 's/TDMwPTul/BNDLPTul/g' "$VST3/Contents/PkgInfo" sed -i "" -e 's/TDMw/BNDL/g' "$VST3/Contents/$INFOPLIST_FILE" fi if [ $copyRTAS -gt 0 ]; then echo "Copying to RTAS folder..." RTAS=/Library/Application\ Support/Digidesign/Plug-Ins/$PRODUCT_NAME.dpm if [ -d "$RTAS" ]; then rm -r "$RTAS" fi cp -r "$original" "$RTAS" fi if [ $copyAAX -gt 0 ]; then echo "Copying to AAX folder..." if [ -d "/Applications/ProTools_3PDev/Plug-Ins" ]; then AAX1="/Applications/ProTools_3PDev/Plug-Ins/$PRODUCT_NAME.aaxplugin" if [ -d "$AAX1" ]; then rm -r "$AAX1" fi cp -R -H "$original" "$AAX1" fi if [ -d "/Library/Application Support/Avid/Audio/Plug-Ins" ]; then AAX2="/Library/Application Support/Avid/Audio/Plug-Ins/$PRODUCT_NAME.aaxplugin" if [ -d "$AAX2" ]; then rm -r "$AAX2" fi cp -R -H "$original" "$AAX2" fi fi "
|
||||||
|
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=" # This script takes the build product and copies it to the AU, VST, VST3, RTAS and AAX folders, depending on # which plugin types you've built original=$CONFIGURATION_BUILD_DIR/$FULL_PRODUCT_NAME # this looks inside the binary to detect which platforms are needed.. copyAU=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'AudioUnit' | wc -l` copyVST=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'VSTPlugin' | wc -l` copyVST3=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'GetPluginFactory' | wc -l` copyRTAS=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'CProcess' | wc -l` copyAAX=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'ACFStartup' | wc -l` if [ $copyAU -gt 0 ]; then echo "Copying to AudioUnit folder..." AU=~/Library/Audio/Plug-Ins/Components/$PRODUCT_NAME.component if [ -d "$AU" ]; then rm -r "$AU" fi cp -r "$original" "$AU" sed -i "" -e 's/TDMwPTul/BNDLPTul/g' "$AU/Contents/PkgInfo" sed -i "" -e 's/TDMw/BNDL/g' "$AU/Contents/$INFOPLIST_FILE" # Fix info.plist for AUs built with Xcode 3 if [ -f "$DEVELOPER_DIR/Library/Developer/CoreAudio/AudioUnits/AUPublic/AUBase/AUPlugInDispatch.cpp" ]; then echo else echo "Removing AudioComponents entry from Info.plist because this is not a new-format AU" /usr/libexec/PlistBuddy -c "Delete AudioComponents" "$AU/Contents/Info.plist" fi fi if [ $copyVST -gt 0 ]; then echo "Copying to VST folder..." VST=~/Library/Audio/Plug-Ins/VST/$PRODUCT_NAME.vst if [ -d "$VST" ]; then rm -r "$VST" fi cp -r "$original" "$VST" sed -i "" -e 's/TDMwPTul/BNDLPTul/g' "$VST/Contents/PkgInfo" sed -i "" -e 's/TDMw/BNDL/g' "$VST/Contents/$INFOPLIST_FILE" fi if [ $copyVST3 -gt 0 ]; then echo "Copying to VST3 folder..." VST3=~/Library/Audio/Plug-Ins/VST3/$PRODUCT_NAME.vst3 if [ -d "$VST3" ]; then rm -r "$VST3" fi cp -r "$original" "$VST3" sed -i "" -e 's/TDMwPTul/BNDLPTul/g' "$VST3/Contents/PkgInfo" sed -i "" -e 's/TDMw/BNDL/g' "$VST3/Contents/$INFOPLIST_FILE" fi if [ $copyRTAS -gt 0 ]; then echo "Copying to RTAS folder..." RTAS=/Library/Application\ Support/Digidesign/Plug-Ins/$PRODUCT_NAME.dpm if [ -d "$RTAS" ]; then rm -r "$RTAS" fi cp -r "$original" "$RTAS" fi if [ $copyAAX -gt 0 ]; then echo "Copying to AAX folder..." if [ -d "/Applications/ProTools_3PDev/Plug-Ins" ]; then AAX1="/Applications/ProTools_3PDev/Plug-Ins/$PRODUCT_NAME.aaxplugin" if [ -d "$AAX1" ]; then rm -r "$AAX1" fi cp -R -H "$original" "$AAX1" fi if [ -d "/Library/Application Support/Avid/Audio/Plug-Ins" ]; then AAX2="/Library/Application Support/Avid/Audio/Plug-Ins/$PRODUCT_NAME.aaxplugin" if [ -d "$AAX2" ]; then rm -r "$AAX2" fi cp -R -H "$original" "$AAX2" fi fi "
|
||||||
|
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>
|
|
@ -1,7 +1,17 @@
|
||||||
#include "DROMultiplexer.h"
|
#include "DROMultiplexer.h"
|
||||||
|
|
||||||
#include "JuceHeader.h"
|
#include "JuceHeader.h"
|
||||||
#include <Windows.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
|
// Used by the first recording instance to claim master status
|
||||||
DROMultiplexer* DROMultiplexer::master = NULL;
|
DROMultiplexer* DROMultiplexer::master = NULL;
|
||||||
|
@ -185,10 +195,11 @@ void DROMultiplexer::TwoOpMelodicNoteOn(Hiopl* opl, int inCh) {
|
||||||
// find a free channel and mark it as used
|
// find a free channel and mark it as used
|
||||||
char addr[16];
|
char addr[16];
|
||||||
int outCh = _FindFreeChannel(opl, inCh);
|
int outCh = _FindFreeChannel(opl, inCh);
|
||||||
|
|
||||||
if (outCh >= 0) {
|
if (outCh >= 0) {
|
||||||
_DebugOut(" <- ");
|
//_DebugOut(" <- ");
|
||||||
_DebugOut(itoa((int)opl, addr, 16));
|
//_DebugOut(itoa((int)opl, addr, 16));
|
||||||
_DebugOut(" ");
|
//_DebugOut(" ");
|
||||||
for (int i = 0; i < MELODIC_CHANNELS; i++) {
|
for (int i = 0; i < MELODIC_CHANNELS; i++) {
|
||||||
Hiopl* tmpOpl = channels[i].opl;
|
Hiopl* tmpOpl = channels[i].opl;
|
||||||
_DebugOut(NULL == tmpOpl ? "-" : tmpOpl->GetState(channels[i].ch));
|
_DebugOut(NULL == tmpOpl ? "-" : tmpOpl->GetState(channels[i].ch));
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
class InstrumentLoader
|
class InstrumentLoader
|
||||||
{
|
{
|
||||||
public:
|
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;
|
virtual String getExtension() = 0;
|
||||||
};
|
};
|
||||||
|
|
4358
Source/PluginGui.cpp
4358
Source/PluginGui.cpp
File diff suppressed because it is too large
Load diff
|
@ -1,193 +1,193 @@
|
||||||
/*
|
/*
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
This is an automatically generated GUI class created by the Introjucer!
|
This is an automatically generated GUI class created by the Introjucer!
|
||||||
|
|
||||||
Be careful when adding custom code to these files, as only the code within
|
Be careful when adding custom code to these files, as only the code within
|
||||||
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
|
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
|
||||||
and re-saved.
|
and re-saved.
|
||||||
|
|
||||||
Created with Introjucer version: 3.1.0
|
Created with Introjucer version: 3.1.1
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
The Introjucer is part of the JUCE library - "Jules' Utility Class Extensions"
|
The Introjucer is part of the JUCE library - "Jules' Utility Class Extensions"
|
||||||
Copyright 2004-13 by Raw Material Software Ltd.
|
Copyright 2004-13 by Raw Material Software Ltd.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __JUCE_HEADER_450C07F5C14097B8__
|
#ifndef __JUCE_HEADER_450C07F5C14097B8__
|
||||||
#define __JUCE_HEADER_450C07F5C14097B8__
|
#define __JUCE_HEADER_450C07F5C14097B8__
|
||||||
|
|
||||||
//[Headers] -- You can add your own extra header files here --
|
//[Headers] -- You can add your own extra header files here --
|
||||||
#include <array>
|
#include <array>
|
||||||
#include "JuceHeader.h"
|
#include "JuceHeader.h"
|
||||||
#include "PluginProcessor.h"
|
#include "PluginProcessor.h"
|
||||||
//[/Headers]
|
//[/Headers]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
/**
|
/**
|
||||||
//[Comments]
|
//[Comments]
|
||||||
This is a GUI for the OPL2 VST plugin, created in Juce.
|
This is a GUI for the OPL2 VST plugin, created in Juce.
|
||||||
//[/Comments]
|
//[/Comments]
|
||||||
*/
|
*/
|
||||||
class PluginGui : public AudioProcessorEditor,
|
class PluginGui : public AudioProcessorEditor,
|
||||||
public FileDragAndDropTarget,
|
public FileDragAndDropTarget,
|
||||||
public DragAndDropContainer,
|
public DragAndDropContainer,
|
||||||
public Timer,
|
public Timer,
|
||||||
public ComboBoxListener,
|
public ComboBoxListener,
|
||||||
public SliderListener,
|
public SliderListener,
|
||||||
public ButtonListener
|
public ButtonListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
PluginGui (JuceOplvstiAudioProcessor* ownerFilter);
|
PluginGui (AdlibBlasterAudioProcessor* ownerFilter);
|
||||||
~PluginGui();
|
~PluginGui();
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
//[UserMethods] -- You can add your own custom methods in this section.
|
//[UserMethods] -- You can add your own custom methods in this section.
|
||||||
void updateFromParameters();
|
void updateFromParameters();
|
||||||
bool isInterestedInFileDrag (const StringArray& files);
|
bool isInterestedInFileDrag (const StringArray& files);
|
||||||
void fileDragEnter (const StringArray& files, int x, int y);
|
void fileDragEnter (const StringArray& files, int x, int y);
|
||||||
void fileDragMove (const StringArray& files, int x, int y);
|
void fileDragMove (const StringArray& files, int x, int y);
|
||||||
void fileDragExit (const StringArray& files);
|
void fileDragExit (const StringArray& files);
|
||||||
void filesDropped (const StringArray& files, int x, int y);
|
void filesDropped (const StringArray& files, int x, int y);
|
||||||
void timerCallback();
|
void timerCallback();
|
||||||
void setRecordButtonState(bool recording);
|
void setRecordButtonState(bool recording);
|
||||||
//[/UserMethods]
|
//[/UserMethods]
|
||||||
|
|
||||||
void paint (Graphics& g);
|
void paint (Graphics& g);
|
||||||
void resized();
|
void resized();
|
||||||
void comboBoxChanged (ComboBox* comboBoxThatHasChanged);
|
void comboBoxChanged (ComboBox* comboBoxThatHasChanged);
|
||||||
void sliderValueChanged (Slider* sliderThatWasMoved);
|
void sliderValueChanged (Slider* sliderThatWasMoved);
|
||||||
void buttonClicked (Button* buttonThatWasClicked);
|
void buttonClicked (Button* buttonThatWasClicked);
|
||||||
|
|
||||||
// Binary resources:
|
// Binary resources:
|
||||||
static const char* full_sine_png;
|
static const char* full_sine_png;
|
||||||
static const int full_sine_pngSize;
|
static const int full_sine_pngSize;
|
||||||
static const char* half_sine_png;
|
static const char* half_sine_png;
|
||||||
static const int half_sine_pngSize;
|
static const int half_sine_pngSize;
|
||||||
static const char* abs_sine_png;
|
static const char* abs_sine_png;
|
||||||
static const int abs_sine_pngSize;
|
static const int abs_sine_pngSize;
|
||||||
static const char* quarter_sine_png;
|
static const char* quarter_sine_png;
|
||||||
static const int quarter_sine_pngSize;
|
static const int quarter_sine_pngSize;
|
||||||
static const char* camel_sine_png;
|
static const char* camel_sine_png;
|
||||||
static const int camel_sine_pngSize;
|
static const int camel_sine_pngSize;
|
||||||
static const char* alternating_sine_png;
|
static const char* alternating_sine_png;
|
||||||
static const int alternating_sine_pngSize;
|
static const int alternating_sine_pngSize;
|
||||||
static const char* square_png;
|
static const char* square_png;
|
||||||
static const int square_pngSize;
|
static const int square_pngSize;
|
||||||
static const char* logarithmic_saw_png;
|
static const char* logarithmic_saw_png;
|
||||||
static const int logarithmic_saw_pngSize;
|
static const int logarithmic_saw_pngSize;
|
||||||
static const char* channeloff_png;
|
static const char* channeloff_png;
|
||||||
static const int channeloff_pngSize;
|
static const int channeloff_pngSize;
|
||||||
static const char* channelon_png;
|
static const char* channelon_png;
|
||||||
static const int channelon_pngSize;
|
static const int channelon_pngSize;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//[UserVariables] -- You can add your own custom variables in this section.
|
//[UserVariables] -- You can add your own custom variables in this section.
|
||||||
static const uint32 COLOUR_MID = 0xff007f00;
|
static const uint32 COLOUR_MID = 0xff007f00;
|
||||||
static const uint32 COLOUR_RECORDING = 0xffff0000;
|
static const uint32 COLOUR_RECORDING = 0xffff0000;
|
||||||
JuceOplvstiAudioProcessor* processor;
|
AdlibBlasterAudioProcessor* processor;
|
||||||
std::array<ScopedPointer<Label>, Hiopl::CHANNELS> channels;
|
std::array<ScopedPointer<Label>, Hiopl::CHANNELS> channels;
|
||||||
TooltipWindow tooltipWindow;
|
TooltipWindow tooltipWindow;
|
||||||
//[/UserVariables]
|
//[/UserVariables]
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
ScopedPointer<GroupComponent> groupComponent;
|
ScopedPointer<GroupComponent> groupComponent;
|
||||||
ScopedPointer<ComboBox> frequencyComboBox;
|
ScopedPointer<ComboBox> frequencyComboBox;
|
||||||
ScopedPointer<Label> frequencyLabel;
|
ScopedPointer<Label> frequencyLabel;
|
||||||
ScopedPointer<Slider> aSlider;
|
ScopedPointer<Slider> aSlider;
|
||||||
ScopedPointer<Label> aLabel;
|
ScopedPointer<Label> aLabel;
|
||||||
ScopedPointer<Slider> dSlider;
|
ScopedPointer<Slider> dSlider;
|
||||||
ScopedPointer<Label> dLabel;
|
ScopedPointer<Label> dLabel;
|
||||||
ScopedPointer<Slider> sSlider;
|
ScopedPointer<Slider> sSlider;
|
||||||
ScopedPointer<Label> dLabel2;
|
ScopedPointer<Label> dLabel2;
|
||||||
ScopedPointer<Slider> rSlider;
|
ScopedPointer<Slider> rSlider;
|
||||||
ScopedPointer<Label> rLabel;
|
ScopedPointer<Label> rLabel;
|
||||||
ScopedPointer<Slider> attenuationSlider;
|
ScopedPointer<Slider> attenuationSlider;
|
||||||
ScopedPointer<Label> attenuationLabel;
|
ScopedPointer<Label> attenuationLabel;
|
||||||
ScopedPointer<Label> dbLabel;
|
ScopedPointer<Label> dbLabel;
|
||||||
ScopedPointer<ImageButton> sineImageButton;
|
ScopedPointer<ImageButton> sineImageButton;
|
||||||
ScopedPointer<ImageButton> halfsineImageButton;
|
ScopedPointer<ImageButton> halfsineImageButton;
|
||||||
ScopedPointer<ImageButton> abssineImageButton;
|
ScopedPointer<ImageButton> abssineImageButton;
|
||||||
ScopedPointer<ImageButton> quartersineImageButton;
|
ScopedPointer<ImageButton> quartersineImageButton;
|
||||||
ScopedPointer<Label> waveLabel;
|
ScopedPointer<Label> waveLabel;
|
||||||
ScopedPointer<ToggleButton> tremoloButton;
|
ScopedPointer<ToggleButton> tremoloButton;
|
||||||
ScopedPointer<ToggleButton> vibratoButton;
|
ScopedPointer<ToggleButton> vibratoButton;
|
||||||
ScopedPointer<ToggleButton> sustainButton;
|
ScopedPointer<ToggleButton> sustainButton;
|
||||||
ScopedPointer<ToggleButton> keyscaleEnvButton;
|
ScopedPointer<ToggleButton> keyscaleEnvButton;
|
||||||
ScopedPointer<Label> frequencyLabel2;
|
ScopedPointer<Label> frequencyLabel2;
|
||||||
ScopedPointer<Label> dbLabel2;
|
ScopedPointer<Label> dbLabel2;
|
||||||
ScopedPointer<GroupComponent> groupComponent2;
|
ScopedPointer<GroupComponent> groupComponent2;
|
||||||
ScopedPointer<ComboBox> frequencyComboBox2;
|
ScopedPointer<ComboBox> frequencyComboBox2;
|
||||||
ScopedPointer<Label> frequencyLabel3;
|
ScopedPointer<Label> frequencyLabel3;
|
||||||
ScopedPointer<Slider> aSlider2;
|
ScopedPointer<Slider> aSlider2;
|
||||||
ScopedPointer<Label> aLabel2;
|
ScopedPointer<Label> aLabel2;
|
||||||
ScopedPointer<Slider> dSlider2;
|
ScopedPointer<Slider> dSlider2;
|
||||||
ScopedPointer<Label> dLabel3;
|
ScopedPointer<Label> dLabel3;
|
||||||
ScopedPointer<Slider> sSlider2;
|
ScopedPointer<Slider> sSlider2;
|
||||||
ScopedPointer<Label> dLabel4;
|
ScopedPointer<Label> dLabel4;
|
||||||
ScopedPointer<Slider> rSlider2;
|
ScopedPointer<Slider> rSlider2;
|
||||||
ScopedPointer<Label> rLabel2;
|
ScopedPointer<Label> rLabel2;
|
||||||
ScopedPointer<Slider> attenuationSlider2;
|
ScopedPointer<Slider> attenuationSlider2;
|
||||||
ScopedPointer<Label> attenuationLabel2;
|
ScopedPointer<Label> attenuationLabel2;
|
||||||
ScopedPointer<Label> dbLabel3;
|
ScopedPointer<Label> dbLabel3;
|
||||||
ScopedPointer<ImageButton> sineImageButton2;
|
ScopedPointer<ImageButton> sineImageButton2;
|
||||||
ScopedPointer<ImageButton> halfsineImageButton2;
|
ScopedPointer<ImageButton> halfsineImageButton2;
|
||||||
ScopedPointer<ImageButton> abssineImageButton2;
|
ScopedPointer<ImageButton> abssineImageButton2;
|
||||||
ScopedPointer<ImageButton> quartersineImageButton2;
|
ScopedPointer<ImageButton> quartersineImageButton2;
|
||||||
ScopedPointer<Label> waveLabel2;
|
ScopedPointer<Label> waveLabel2;
|
||||||
ScopedPointer<ToggleButton> tremoloButton2;
|
ScopedPointer<ToggleButton> tremoloButton2;
|
||||||
ScopedPointer<ToggleButton> vibratoButton2;
|
ScopedPointer<ToggleButton> vibratoButton2;
|
||||||
ScopedPointer<ToggleButton> sustainButton2;
|
ScopedPointer<ToggleButton> sustainButton2;
|
||||||
ScopedPointer<ToggleButton> keyscaleEnvButton2;
|
ScopedPointer<ToggleButton> keyscaleEnvButton2;
|
||||||
ScopedPointer<Label> frequencyLabel4;
|
ScopedPointer<Label> frequencyLabel4;
|
||||||
ScopedPointer<GroupComponent> groupComponent3;
|
ScopedPointer<GroupComponent> groupComponent3;
|
||||||
ScopedPointer<Slider> tremoloSlider;
|
ScopedPointer<Slider> tremoloSlider;
|
||||||
ScopedPointer<Label> frequencyLabel5;
|
ScopedPointer<Label> frequencyLabel5;
|
||||||
ScopedPointer<Label> dbLabel5;
|
ScopedPointer<Label> dbLabel5;
|
||||||
ScopedPointer<Slider> vibratoSlider;
|
ScopedPointer<Slider> vibratoSlider;
|
||||||
ScopedPointer<Label> frequencyLabel6;
|
ScopedPointer<Label> frequencyLabel6;
|
||||||
ScopedPointer<Label> dbLabel6;
|
ScopedPointer<Label> dbLabel6;
|
||||||
ScopedPointer<Slider> feedbackSlider;
|
ScopedPointer<Slider> feedbackSlider;
|
||||||
ScopedPointer<Label> frequencyLabel7;
|
ScopedPointer<Label> frequencyLabel7;
|
||||||
ScopedPointer<ComboBox> velocityComboBox;
|
ScopedPointer<ComboBox> velocityComboBox;
|
||||||
ScopedPointer<Label> attenuationLabel3;
|
ScopedPointer<Label> attenuationLabel3;
|
||||||
ScopedPointer<ComboBox> velocityComboBox2;
|
ScopedPointer<ComboBox> velocityComboBox2;
|
||||||
ScopedPointer<Label> attenuationLabel4;
|
ScopedPointer<Label> attenuationLabel4;
|
||||||
ScopedPointer<ImageButton> alternatingsineImageButton;
|
ScopedPointer<ImageButton> alternatingsineImageButton;
|
||||||
ScopedPointer<ImageButton> camelsineImageButton;
|
ScopedPointer<ImageButton> camelsineImageButton;
|
||||||
ScopedPointer<ImageButton> squareImageButton;
|
ScopedPointer<ImageButton> squareImageButton;
|
||||||
ScopedPointer<ImageButton> logsawImageButton;
|
ScopedPointer<ImageButton> logsawImageButton;
|
||||||
ScopedPointer<ImageButton> alternatingsineImageButton2;
|
ScopedPointer<ImageButton> alternatingsineImageButton2;
|
||||||
ScopedPointer<ImageButton> camelsineImageButton2;
|
ScopedPointer<ImageButton> camelsineImageButton2;
|
||||||
ScopedPointer<ImageButton> squareImageButton2;
|
ScopedPointer<ImageButton> squareImageButton2;
|
||||||
ScopedPointer<ImageButton> logsawImageButton2;
|
ScopedPointer<ImageButton> logsawImageButton2;
|
||||||
ScopedPointer<ComboBox> algorithmComboBox;
|
ScopedPointer<ComboBox> algorithmComboBox;
|
||||||
ScopedPointer<Label> frequencyLabel8;
|
ScopedPointer<Label> frequencyLabel8;
|
||||||
ScopedPointer<Label> dbLabel4;
|
ScopedPointer<Label> dbLabel4;
|
||||||
ScopedPointer<ComboBox> keyscaleAttenuationComboBox2;
|
ScopedPointer<ComboBox> keyscaleAttenuationComboBox2;
|
||||||
ScopedPointer<ComboBox> keyscaleAttenuationComboBox;
|
ScopedPointer<ComboBox> keyscaleAttenuationComboBox;
|
||||||
ScopedPointer<GroupComponent> groupComponent4;
|
ScopedPointer<GroupComponent> groupComponent4;
|
||||||
ScopedPointer<GroupComponent> groupComponent5;
|
ScopedPointer<GroupComponent> groupComponent5;
|
||||||
ScopedPointer<Slider> emulatorSlider;
|
ScopedPointer<Slider> emulatorSlider;
|
||||||
ScopedPointer<Label> emulatorLabel;
|
ScopedPointer<Label> emulatorLabel;
|
||||||
ScopedPointer<Label> emulatorLabel2;
|
ScopedPointer<Label> emulatorLabel2;
|
||||||
ScopedPointer<ToggleButton> recordButton;
|
ScopedPointer<ToggleButton> recordButton;
|
||||||
ScopedPointer<ComboBox> percussionComboBox;
|
ScopedPointer<ComboBox> percussionComboBox;
|
||||||
ScopedPointer<Label> percussionLabel;
|
ScopedPointer<Label> percussionLabel;
|
||||||
|
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PluginGui)
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PluginGui)
|
||||||
};
|
};
|
||||||
|
|
||||||
//[EndFile] You can add extra defines here...
|
//[EndFile] You can add extra defines here...
|
||||||
//[/EndFile]
|
//[/EndFile]
|
||||||
|
|
||||||
#endif // __JUCE_HEADER_450C07F5C14097B8__
|
#endif // __JUCE_HEADER_450C07F5C14097B8__
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
#include "IntFloatParameter.h"
|
#include "IntFloatParameter.h"
|
||||||
#include "SbiLoader.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)
|
: i_program(-1)
|
||||||
{
|
{
|
||||||
// Initalize OPL
|
// Initalize OPL
|
||||||
|
@ -142,27 +142,27 @@ JuceOplvstiAudioProcessor::JuceOplvstiAudioProcessor()
|
||||||
available_channels.push_back(i);
|
available_channels.push_back(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool JuceOplvstiAudioProcessor::isThisInstanceRecording() {
|
bool AdlibBlasterAudioProcessor::isThisInstanceRecording() {
|
||||||
return NULL != recordingFile;
|
return NULL != recordingFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool JuceOplvstiAudioProcessor::isAnyInstanceRecording() {
|
bool AdlibBlasterAudioProcessor::isAnyInstanceRecording() {
|
||||||
return dro->IsAnInstanceRecording();
|
return dro->IsAnInstanceRecording();
|
||||||
}
|
}
|
||||||
|
|
||||||
void JuceOplvstiAudioProcessor::startRecording(File *outputFile) {
|
void AdlibBlasterAudioProcessor::startRecording(File *outputFile) {
|
||||||
recordingFile = outputFile;
|
recordingFile = outputFile;
|
||||||
if (!dro->StartCapture(outputFile->getFullPathName().toUTF8(), Opl)) {
|
if (!dro->StartCapture(outputFile->getFullPathName().toUTF8(), Opl)) {
|
||||||
juce::AlertWindow::showMessageBoxAsync(juce::AlertWindow::InfoIcon, "Could not open specified file for writing!", "OK");
|
juce::AlertWindow::showMessageBoxAsync(juce::AlertWindow::InfoIcon, "Could not open specified file for writing!", "OK");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void JuceOplvstiAudioProcessor::stopRecording() {
|
void AdlibBlasterAudioProcessor::stopRecording() {
|
||||||
dro->StopCapture();
|
dro->StopCapture();
|
||||||
recordingFile = NULL;
|
recordingFile = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JuceOplvstiAudioProcessor::initPrograms()
|
void AdlibBlasterAudioProcessor::initPrograms()
|
||||||
{
|
{
|
||||||
// these ones from the Syndicate in-game music
|
// these ones from the Syndicate in-game music
|
||||||
const float i_params_0[] = {
|
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.
|
{ // apply the currently configured pitch bend to all active notes.
|
||||||
for (int i = 1; i <= Hiopl::CHANNELS; i++) {
|
for (int i = 1; i <= Hiopl::CHANNELS; i++) {
|
||||||
if (NO_NOTE != active_notes[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)
|
for (unsigned int i=0; i < params.size(); ++i)
|
||||||
delete params[i];
|
delete params[i];
|
||||||
|
@ -454,22 +454,22 @@ JuceOplvstiAudioProcessor::~JuceOplvstiAudioProcessor()
|
||||||
}
|
}
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
const String JuceOplvstiAudioProcessor::getName() const
|
const String AdlibBlasterAudioProcessor::getName() const
|
||||||
{
|
{
|
||||||
return JucePlugin_Name;
|
return JucePlugin_Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
int JuceOplvstiAudioProcessor::getNumParameters()
|
int AdlibBlasterAudioProcessor::getNumParameters()
|
||||||
{
|
{
|
||||||
return (int)params.size();
|
return (int)params.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
float JuceOplvstiAudioProcessor::getParameter (int index)
|
float AdlibBlasterAudioProcessor::getParameter (int index)
|
||||||
{
|
{
|
||||||
return params[index]->getParameter();
|
return params[index]->getParameter();
|
||||||
}
|
}
|
||||||
|
|
||||||
void JuceOplvstiAudioProcessor::setIntParameter (String name, int value)
|
void AdlibBlasterAudioProcessor::setIntParameter (String name, int value)
|
||||||
{
|
{
|
||||||
int i = paramIdxByName[name];
|
int i = paramIdxByName[name];
|
||||||
IntFloatParameter* p = (IntFloatParameter*)params[i];
|
IntFloatParameter* p = (IntFloatParameter*)params[i];
|
||||||
|
@ -477,7 +477,7 @@ void JuceOplvstiAudioProcessor::setIntParameter (String name, int value)
|
||||||
setParameter(i, p->getParameter());
|
setParameter(i, p->getParameter());
|
||||||
}
|
}
|
||||||
|
|
||||||
void JuceOplvstiAudioProcessor::setEnumParameter (String name, int index)
|
void AdlibBlasterAudioProcessor::setEnumParameter (String name, int index)
|
||||||
{
|
{
|
||||||
int i = paramIdxByName[name];
|
int i = paramIdxByName[name];
|
||||||
EnumFloatParameter* p = (EnumFloatParameter*)params[i];
|
EnumFloatParameter* p = (EnumFloatParameter*)params[i];
|
||||||
|
@ -485,14 +485,14 @@ void JuceOplvstiAudioProcessor::setEnumParameter (String name, int index)
|
||||||
setParameter(i, p->getParameter());
|
setParameter(i, p->getParameter());
|
||||||
}
|
}
|
||||||
|
|
||||||
int JuceOplvstiAudioProcessor::getIntParameter (String name)
|
int AdlibBlasterAudioProcessor::getIntParameter (String name)
|
||||||
{
|
{
|
||||||
int i = paramIdxByName[name];
|
int i = paramIdxByName[name];
|
||||||
IntFloatParameter* p = (IntFloatParameter*)params[i];
|
IntFloatParameter* p = (IntFloatParameter*)params[i];
|
||||||
return p->getParameterValue();
|
return p->getParameterValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
int JuceOplvstiAudioProcessor::getEnumParameter (String name)
|
int AdlibBlasterAudioProcessor::getEnumParameter (String name)
|
||||||
{
|
{
|
||||||
int i = paramIdxByName[name];
|
int i = paramIdxByName[name];
|
||||||
EnumFloatParameter* p = (EnumFloatParameter*)params[i];
|
EnumFloatParameter* p = (EnumFloatParameter*)params[i];
|
||||||
|
@ -500,7 +500,7 @@ int JuceOplvstiAudioProcessor::getEnumParameter (String name)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parameters which apply directly to the OPL
|
// 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];
|
FloatParameter* p = params[index];
|
||||||
p->setParameter(newValue);
|
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");
|
FILE* f = fopen(filename.toUTF8(), "rb");
|
||||||
unsigned char buf[MAX_INSTRUMENT_FILE_SIZE_BYTES];
|
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
|
// 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"};
|
const String operators[] = {"Modulator", "Carrier"};
|
||||||
register_base &= 0xF0;
|
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();
|
return params[index]->getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
const String JuceOplvstiAudioProcessor::getParameterText (int index)
|
const String AdlibBlasterAudioProcessor::getParameterText (int index)
|
||||||
{
|
{
|
||||||
return params[index]->getParameterText();
|
return params[index]->getParameterText();
|
||||||
}
|
}
|
||||||
|
|
||||||
const String JuceOplvstiAudioProcessor::getInputChannelName (int channelIndex) const
|
const String AdlibBlasterAudioProcessor::getInputChannelName (int channelIndex) const
|
||||||
{
|
{
|
||||||
return String (channelIndex + 1);
|
return String (channelIndex + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
const String JuceOplvstiAudioProcessor::getOutputChannelName (int channelIndex) const
|
const String AdlibBlasterAudioProcessor::getOutputChannelName (int channelIndex) const
|
||||||
{
|
{
|
||||||
return String (channelIndex + 1);
|
return String (channelIndex + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool JuceOplvstiAudioProcessor::isInputChannelStereoPair (int index) const
|
bool AdlibBlasterAudioProcessor::isInputChannelStereoPair (int index) const
|
||||||
{
|
{
|
||||||
return false;
|
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
|
#if JucePlugin_WantsMidiInput
|
||||||
return true;
|
return true;
|
||||||
|
@ -635,7 +635,7 @@ bool JuceOplvstiAudioProcessor::acceptsMidi() const
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool JuceOplvstiAudioProcessor::producesMidi() const
|
bool AdlibBlasterAudioProcessor::producesMidi() const
|
||||||
{
|
{
|
||||||
#if JucePlugin_ProducesMidiOutput
|
#if JucePlugin_ProducesMidiOutput
|
||||||
return true;
|
return true;
|
||||||
|
@ -644,27 +644,27 @@ bool JuceOplvstiAudioProcessor::producesMidi() const
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool JuceOplvstiAudioProcessor::silenceInProducesSilenceOut() const
|
bool AdlibBlasterAudioProcessor::silenceInProducesSilenceOut() const
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
double JuceOplvstiAudioProcessor::getTailLengthSeconds() const
|
double AdlibBlasterAudioProcessor::getTailLengthSeconds() const
|
||||||
{
|
{
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int JuceOplvstiAudioProcessor::getNumPrograms()
|
int AdlibBlasterAudioProcessor::getNumPrograms()
|
||||||
{
|
{
|
||||||
return (int)programs.size();
|
return (int)programs.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
int JuceOplvstiAudioProcessor::getCurrentProgram()
|
int AdlibBlasterAudioProcessor::getCurrentProgram()
|
||||||
{
|
{
|
||||||
return i_program;
|
return i_program;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JuceOplvstiAudioProcessor::updateGuiIfPresent()
|
void AdlibBlasterAudioProcessor::updateGuiIfPresent()
|
||||||
{
|
{
|
||||||
PluginGui* gui = (PluginGui*)getActiveEditor();
|
PluginGui* gui = (PluginGui*)getActiveEditor();
|
||||||
if (gui) {
|
if (gui) {
|
||||||
|
@ -672,7 +672,7 @@ void JuceOplvstiAudioProcessor::updateGuiIfPresent()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void JuceOplvstiAudioProcessor::setCurrentProgram (int index)
|
void AdlibBlasterAudioProcessor::setCurrentProgram (int index)
|
||||||
{
|
{
|
||||||
if (i_program==index)
|
if (i_program==index)
|
||||||
return;
|
return;
|
||||||
|
@ -685,24 +685,24 @@ void JuceOplvstiAudioProcessor::setCurrentProgram (int index)
|
||||||
updateGuiIfPresent();
|
updateGuiIfPresent();
|
||||||
}
|
}
|
||||||
|
|
||||||
const String JuceOplvstiAudioProcessor::getProgramName (int index)
|
const String AdlibBlasterAudioProcessor::getProgramName (int index)
|
||||||
{
|
{
|
||||||
return program_order[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);
|
//Opl->SetSampleRate((int)sampleRate);
|
||||||
// Use this method as the place to do any pre-playback
|
// Use this method as the place to do any pre-playback
|
||||||
// initialisation that you need..
|
// initialisation that you need..
|
||||||
}
|
}
|
||||||
|
|
||||||
void JuceOplvstiAudioProcessor::releaseResources()
|
void AdlibBlasterAudioProcessor::releaseResources()
|
||||||
{
|
{
|
||||||
// When playback stops, you can use this as an opportunity to free up any
|
// When playback stops, you can use this as an opportunity to free up any
|
||||||
// spare memory, etc.
|
// spare memory, etc.
|
||||||
|
@ -710,7 +710,7 @@ void JuceOplvstiAudioProcessor::releaseResources()
|
||||||
|
|
||||||
static const Drum DRUM_INDEX[] = { BDRUM, SNARE, TOM, CYMBAL, HIHAT };
|
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());
|
buffer.clear(0, 0, buffer.getNumSamples());
|
||||||
MidiBuffer::Iterator midi_buffer_iterator(midiMessages);
|
MidiBuffer::Iterator midi_buffer_iterator(midiMessages);
|
||||||
|
@ -820,16 +820,22 @@ void JuceOplvstiAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuf
|
||||||
applyPitchBend();
|
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)
|
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);
|
PluginGui* gui = new PluginGui(this);
|
||||||
gui->updateFromParameters();
|
gui->updateFromParameters();
|
||||||
|
@ -847,7 +853,7 @@ Identifier stringToIdentifier(const String &s)
|
||||||
return s.replaceCharacters(" ", "_");
|
return s.replaceCharacters(" ", "_");
|
||||||
}
|
}
|
||||||
|
|
||||||
void JuceOplvstiAudioProcessor::getStateInformation(MemoryBlock& destData)
|
void AdlibBlasterAudioProcessor::getStateInformation(MemoryBlock& destData)
|
||||||
{
|
{
|
||||||
ReferenceCountedObjectPtr<DynamicObject> v(new DynamicObject);
|
ReferenceCountedObjectPtr<DynamicObject> v(new DynamicObject);
|
||||||
|
|
||||||
|
@ -865,7 +871,7 @@ void JuceOplvstiAudioProcessor::getStateInformation(MemoryBlock& destData)
|
||||||
destData.copyFrom(s.getCharPointer(), 0, destData.getSize());
|
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)
|
if (sizeInBytes < 1)
|
||||||
return;
|
return;
|
||||||
|
@ -910,13 +916,13 @@ void JuceOplvstiAudioProcessor::setStateInformation (const void* data, int sizeI
|
||||||
|
|
||||||
// @param idx 1-based channel index
|
// @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
|
// @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;
|
return active_notes[idx] != NO_NOTE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @param idx 1-based channel index
|
// @param idx 1-based channel index
|
||||||
const char* JuceOplvstiAudioProcessor::getChannelEnvelopeStage(int idx) const
|
const char* AdlibBlasterAudioProcessor::getChannelEnvelopeStage(int idx) const
|
||||||
{
|
{
|
||||||
return Opl->GetState(idx);
|
return Opl->GetState(idx);
|
||||||
}
|
}
|
||||||
|
@ -926,5 +932,5 @@ const char* JuceOplvstiAudioProcessor::getChannelEnvelopeStage(int idx) const
|
||||||
// This creates new instances of the plugin..
|
// This creates new instances of the plugin..
|
||||||
AudioProcessor* JUCE_CALLTYPE createPluginFilter()
|
AudioProcessor* JUCE_CALLTYPE createPluginFilter()
|
||||||
{
|
{
|
||||||
return new JuceOplvstiAudioProcessor();
|
return new AdlibBlasterAudioProcessor();
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,14 +18,14 @@
|
||||||
|
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
class JuceOplvstiAudioProcessor : public AudioProcessor
|
class AdlibBlasterAudioProcessor : public AudioProcessor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
JuceOplvstiAudioProcessor();
|
AdlibBlasterAudioProcessor();
|
||||||
void initPrograms();
|
void initPrograms();
|
||||||
void applyPitchBend();
|
void applyPitchBend();
|
||||||
~JuceOplvstiAudioProcessor();
|
~AdlibBlasterAudioProcessor();
|
||||||
|
|
||||||
bool isThisInstanceRecording();
|
bool isThisInstanceRecording();
|
||||||
bool isAnyInstanceRecording();
|
bool isAnyInstanceRecording();
|
||||||
|
@ -45,7 +45,7 @@ public:
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
const String getName() const;
|
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();
|
int getNumParameters();
|
||||||
|
|
||||||
|
@ -105,6 +105,6 @@ private:
|
||||||
File *recordingFile;
|
File *recordingFile;
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JuceOplvstiAudioProcessor)
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AdlibBlasterAudioProcessor)
|
||||||
};
|
};
|
||||||
#endif // PLUGINPROCESSOR_H_INCLUDED
|
#endif // PLUGINPROCESSOR_H_INCLUDED
|
||||||
|
|
|
@ -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)) {
|
if (0 == strncmp("SBI", (const char*)data, 3)) {
|
||||||
data += 36;
|
data += 36;
|
||||||
|
|
|
@ -7,7 +7,7 @@ public:
|
||||||
SbiLoader(void);
|
SbiLoader(void);
|
||||||
virtual ~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();
|
String getExtension();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -63,20 +63,42 @@
|
||||||
#pragma warning(disable : 4996)
|
#pragma warning(disable : 4996)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WIN32
|
/// Jeff-Russ modified to be uniform across C++ implementations:
|
||||||
typedef long long __int64;
|
// The internal types:
|
||||||
|
#include <stdint.h>
|
||||||
|
typedef unsigned char BYTE;
|
||||||
|
typedef int64_t __int64;
|
||||||
|
typedef double Real64;
|
||||||
|
typedef unsigned char Bit8u;
|
||||||
|
typedef signed char Bit8s;
|
||||||
|
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
|
#endif
|
||||||
|
|
||||||
typedef double Real64;
|
#ifdef _WIN32 // covers both 32 and 64-bit
|
||||||
/* The internal types */
|
#define INLINE __forceinline
|
||||||
typedef unsigned char Bit8u;
|
#endif
|
||||||
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;
|
|
||||||
|
|
||||||
|
//#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
|
||||||
|
|
|
@ -889,6 +889,8 @@ Channel* Channel::BlockTemplate( Chip* chip, Bit32u samples, Bit32s* output ) {
|
||||||
return (this + 2);
|
return (this + 2);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default: /// Jeff-Russ added to silence warning
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
//Init the operators with the the current vibrato and tremolo values
|
//Init the operators with the the current vibrato and tremolo values
|
||||||
Op( 0 )->Prepare( chip );
|
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 + 0 ] += sample & maskLeft;
|
||||||
output[ i * 2 + 1 ] += sample & maskRight;
|
output[ i * 2 + 1 ] += sample & maskRight;
|
||||||
break;
|
break;
|
||||||
|
default: /// Jeff-Russ added to silence warning
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch( mode ) {
|
switch( mode ) {
|
||||||
|
|
184
Source/hiopl.h
184
Source/hiopl.h
|
@ -1,92 +1,92 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
#include "adlib.h"
|
#include "adlib.h"
|
||||||
#include "dbopl.h"
|
#include "dbopl.h"
|
||||||
#include "zdopl.h"
|
#include "zdopl.h"
|
||||||
|
|
||||||
enum Waveform
|
enum Waveform
|
||||||
{
|
{
|
||||||
SIN = 0, HALF_SIN = 1, ABS_SIN = 2, QUART_SIN = 3
|
SIN = 0, HALF_SIN = 1, ABS_SIN = 2, QUART_SIN = 3
|
||||||
};
|
};
|
||||||
|
|
||||||
enum FreqMultiple
|
enum FreqMultiple
|
||||||
{
|
{
|
||||||
xHALF=0, x1=1, x2=2, x3=3, x4=4, x5=5, x6=6, x7=7, x8=8, x9=9, x10=10, x12=12, x15=15
|
xHALF=0, x1=1, x2=2, x3=3, x4=4, x5=5, x6=6, x7=7, x8=8, x9=9, x10=10, x12=12, x15=15
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Emulator
|
enum Emulator
|
||||||
{
|
{
|
||||||
DOSBOX=0, ZDOOM=1
|
DOSBOX=0, ZDOOM=1
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Drum
|
enum Drum
|
||||||
{
|
{
|
||||||
BDRUM=0x10, SNARE=0x8, TOM=0x4, CYMBAL=0x2, HIHAT=0x1
|
BDRUM=0x10, SNARE=0x8, TOM=0x4, CYMBAL=0x2, HIHAT=0x1
|
||||||
};
|
};
|
||||||
|
|
||||||
class Hiopl {
|
class Hiopl {
|
||||||
public:
|
public:
|
||||||
static const int CHANNELS = 9;
|
static const int CHANNELS = 9;
|
||||||
static const int OSCILLATORS = 2;
|
static const int OSCILLATORS = 2;
|
||||||
Hiopl(int buflen, Emulator emulator = ZDOOM);
|
Hiopl(int buflen, Emulator emulator = ZDOOM);
|
||||||
void SetEmulator(Emulator emulator);
|
void SetEmulator(Emulator emulator);
|
||||||
void SetPercussionMode(bool enable);
|
void SetPercussionMode(bool enable);
|
||||||
void HitPercussion(Drum drum);
|
void HitPercussion(Drum drum);
|
||||||
void ReleasePercussion();
|
void ReleasePercussion();
|
||||||
|
|
||||||
void Generate(int length, short* buffer);
|
void Generate(int length, short* buffer);
|
||||||
void Generate(int length, float* buffer);
|
void Generate(int length, float* buffer);
|
||||||
void SetSampleRate(int hz);
|
void SetSampleRate(int hz);
|
||||||
void EnableWaveformControl();
|
void EnableWaveformControl();
|
||||||
void EnableOpl3Mode();
|
void EnableOpl3Mode();
|
||||||
|
|
||||||
void EnableTremolo(int ch, int osc, bool enable);
|
void EnableTremolo(int ch, int osc, bool enable);
|
||||||
void EnableVibrato(int ch, int osc, bool enable);
|
void EnableVibrato(int ch, int osc, bool enable);
|
||||||
void VibratoDepth(bool high);
|
void VibratoDepth(bool high);
|
||||||
void TremoloDepth(bool high);
|
void TremoloDepth(bool high);
|
||||||
void EnableSustain(int ch, int osc, bool enable);
|
void EnableSustain(int ch, int osc, bool enable);
|
||||||
void EnableKsr(int ch, int osc, bool enable);
|
void EnableKsr(int ch, int osc, bool enable);
|
||||||
// true = additive; false = frequency modulation
|
// true = additive; false = frequency modulation
|
||||||
void EnableAdditiveSynthesis(int ch, bool enable);
|
void EnableAdditiveSynthesis(int ch, bool enable);
|
||||||
|
|
||||||
void SetWaveform(int ch, int osc, Waveform wave);
|
void SetWaveform(int ch, int osc, Waveform wave);
|
||||||
void SetAttenuation(int ch, int osc, int level);
|
void SetAttenuation(int ch, int osc, int level);
|
||||||
void SetKsl(int ch, int osc, int level);
|
void SetKsl(int ch, int osc, int level);
|
||||||
void SetFrequencyMultiple(int ch, int osc, FreqMultiple mult);
|
void SetFrequencyMultiple(int ch, int osc, FreqMultiple mult);
|
||||||
void SetEnvelopeAttack(int ch, int osc, int t);
|
void SetEnvelopeAttack(int ch, int osc, int t);
|
||||||
void SetEnvelopeDecay(int ch, int osc, int t);
|
void SetEnvelopeDecay(int ch, int osc, int t);
|
||||||
void SetEnvelopeSustain(int ch, int osc, int level);
|
void SetEnvelopeSustain(int ch, int osc, int level);
|
||||||
void SetEnvelopeRelease(int ch, int osc, int t);
|
void SetEnvelopeRelease(int ch, int osc, int t);
|
||||||
// Get register address offset for operator settings for the specified channel and operator.
|
// Get register address offset for operator settings for the specified channel and operator.
|
||||||
int _GetOffset(int ch, int osc);
|
int _GetOffset(int ch, int osc);
|
||||||
// Get register address offset for channel-wide register settings for the specified channel.
|
// Get register address offset for channel-wide register settings for the specified channel.
|
||||||
int _GetOffset(int ch);
|
int _GetOffset(int ch);
|
||||||
|
|
||||||
void SetModulatorFeedback(int ch, int level);
|
void SetModulatorFeedback(int ch, int level);
|
||||||
void KeyOn(int ch, float frqHz);
|
void KeyOn(int ch, float frqHz);
|
||||||
void KeyOff(int ch);
|
void KeyOff(int ch);
|
||||||
// Return false if no note is active on the channel (ie release is complete)
|
// Return false if no note is active on the channel (ie release is complete)
|
||||||
bool IsActive(int ch);
|
bool IsActive(int ch);
|
||||||
// Return a single character string representing the stage of the envelope for the carrier operator for the channel
|
// Return a single character string representing the stage of the envelope for the carrier operator for the channel
|
||||||
const char* GetState(int ch) const;
|
const char* GetState(int ch) const;
|
||||||
void SetFrequency(int ch, float frqHz, bool keyOn=false);
|
void SetFrequency(int ch, float frqHz, bool keyOn=false);
|
||||||
void _WriteReg(Bit32u reg, Bit8u value, Bit8u mask=0x0);
|
void _WriteReg(Bit32u reg, Bit8u value, Bit8u mask=0x0);
|
||||||
void _ClearRegBits(Bit32u reg, Bit8u mask);
|
void _ClearRegBits(Bit32u reg, Bit8u mask);
|
||||||
// Read the last value written to the specified register address (cached)
|
// Read the last value written to the specified register address (cached)
|
||||||
Bit8u _ReadReg(Bit32u reg);
|
Bit8u _ReadReg(Bit32u reg);
|
||||||
|
|
||||||
~Hiopl();
|
~Hiopl();
|
||||||
private:
|
private:
|
||||||
Emulator emulator;
|
Emulator emulator;
|
||||||
DBOPL::Handler *adlib;
|
DBOPL::Handler *adlib;
|
||||||
OPLEmul *zdoom;
|
OPLEmul *zdoom;
|
||||||
Bit8u regCache[256];
|
Bit8u regCache[256];
|
||||||
bool _CheckParams(int ch, int osc);
|
bool _CheckParams(int ch, int osc);
|
||||||
void _milliHertzToFnum(unsigned int milliHertz, unsigned int *fnum, unsigned int *block, unsigned int conversionFactor=49716);
|
void _milliHertzToFnum(unsigned int milliHertz, unsigned int *fnum, unsigned int *block, unsigned int conversionFactor=49716);
|
||||||
void _ClearRegisters();
|
void _ClearRegisters();
|
||||||
|
|
||||||
std::map<int, int> _op1offset;
|
std::map<int, int> _op1offset;
|
||||||
std::map<int, int> _op2offset;
|
std::map<int, int> _op2offset;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
50
Source/itoa.h
Normal file
50
Source/itoa.h
Normal 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
85
Source/windows.h
Normal 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
3786
Source/zdopl.cpp
3786
Source/zdopl.cpp
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue