2
0
Fork 0

Mac AU now works in {0,2}. see PluginProccessor.cpp line 826

This commit is contained in:
Jeff-Russ 2015-02-24 15:07:55 -05:00
parent 2216b7ba0d
commit 755d3d7a27
9 changed files with 1978 additions and 1972 deletions

View file

@ -2,20 +2,30 @@
<JUCERPROJECT id="aEo3EV" name="AdlibBlaster" projectType="audioplug" version="0.11.1"
bundleIdentifier="com.plainweave.AdlibBlaster" includeBinaryInAppConfig="1"
buildVST="1" buildVST3="1" buildAU="1" buildRTAS="0" buildAAX="0"
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">
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">
<FILE id="b9oR9v" name="adlib.h" compile="0" resource="0" file="Source/adlib.h"/>
<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="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="q3FMeJ" name="DROMultiplexer.cpp" compile="1" resource="0"
file="Source/DROMultiplexer.cpp"/>
<FILE id="KiwneM" name="DROMultiplexer.h" compile="0" resource="0"
@ -28,10 +38,8 @@
file="Source/FloatParameter.cpp"/>
<FILE id="zhBEYO" name="FloatParameter.h" compile="0" resource="0"
file="Source/FloatParameter.h"/>
<FILE id="RS71D5" name="hardware.h" compile="0" resource="0" file="Source/hardware.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="ZFzWho" name="inout.h" compile="0" resource="0" file="Source/inout.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"
@ -39,10 +47,6 @@
<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="C90jAE" name="logging.h" compile="0" resource="0" file="Source/logging.h"/>
<FILE id="dUyyeP" name="mixer.h" compile="0" resource="0" file="Source/mixer.h"/>
<FILE id="NcdeaJ" name="opl.h" compile="0" resource="0" file="Source/opl.h"/>
<FILE id="dVqY5n" name="pic.h" compile="0" resource="0" file="Source/pic.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"
@ -51,7 +55,6 @@
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="MhLIxC" name="setup.h" compile="0" resource="0" file="Source/setup.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"/>
@ -60,12 +63,12 @@
</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">
vst3Folder="~/SDKs/VST3 SDK" extraCompilerFlags="-std=c++11 -stdlib=libc++">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" osxSDK="default" osxCompatibility="default" osxArchitecture="64BitUniversal"
isDebug="1" optimisation="1" targetName="AdlibBlaster"/>
<CONFIGURATION name="Release" osxSDK="default" osxCompatibility="default" osxArchitecture="64BitUniversal"
isDebug="0" optimisation="2" targetName="AdlibBlaster"/>
<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"/>

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

@ -150,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",
@ -1661,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"/>

View file

@ -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);
@ -822,15 +822,20 @@ void JuceOplvstiAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuf
}
/// 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();
@ -848,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);
@ -866,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;
@ -911,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);
}
@ -927,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();
@ -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

@ -49,9 +49,7 @@
#include <cstdlib> /// Jeff-Russ added to get rand() and RAND_MAX
/*typedef unsigned __int8 BYTE;*/ /// Jeff changed to char and put in config.h
#ifndef M_PI /// Jeff-Russ added condition to silence xcode warning
#ifndef M_PI /// Jeff-Russ added
#define M_PI 3.141592654
#endif
@ -857,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;
@ -1014,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);
@ -1471,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