Fix carrier keyscale attenuation and velocity sensitivity.
This commit is contained in:
parent
b5dbbc066b
commit
af5580ca63
6 changed files with 54 additions and 21 deletions
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<JUCERPROJECT id="wUKQiT" name="JuceOPLVSTi" projectType="audioplug" version="0.13.3"
|
||||
<JUCERPROJECT id="wUKQiT" name="JuceOPLVSTi" projectType="audioplug" version="0.14.1"
|
||||
bundleIdentifier="com.plainweave.JuceOPLVSTi" buildVST="1" buildAU="1"
|
||||
pluginName="JuceOPLVSTi" pluginDesc="JuceOPLVSTi" pluginManufacturer="Plainweave Software"
|
||||
pluginManufacturerCode="Pwve" pluginCode="JOPL" pluginChannelConfigs="{0, 1}"
|
||||
pluginIsSynth="1" pluginWantsMidiIn="1" pluginProducesMidiOut="0"
|
||||
pluginSilenceInIsSilenceOut="0" pluginEditorRequiresKeys="0"
|
||||
pluginAUExportPrefix="JuceOPLVSTiAU" pluginRTASCategory="" aaxIdentifier="com.plainweave.JuceOPLVSTi"
|
||||
pluginAAXCategory="AAX_ePlugInCategory_Dynamics" jucerVersion="4.2.4"
|
||||
pluginAAXCategory="AAX_ePlugInCategory_Dynamics" jucerVersion="4.3.1"
|
||||
buildVST3="0" buildRTAS="0" buildAAX="0" includeBinaryInAppConfig="1"
|
||||
pluginIsMidiEffectPlugin="0" companyWebsite="https://bsutherland.github.io/JuceOPLVSTi/"
|
||||
buildAUv3="0">
|
||||
|
|
|
@ -16,6 +16,8 @@ OPLLookAndFeel::OPLLookAndFeel()
|
|||
toggleOff = ImageCache::getFromMemory(PluginGui::toggle_off_sq_png, PluginGui::toggle_off_sq_pngSize), 1.000f, Colour(0x00000000);
|
||||
toggleOn = ImageCache::getFromMemory(PluginGui::toggle_on_sq_png, PluginGui::toggle_on_sq_pngSize), 1.000f, Colour(0x00000000);
|
||||
toggleRect = Rectangle<float>((float)toggleOff.getWidth(), (float)toggleOn.getHeight());
|
||||
|
||||
setColour(Label::ColourIds::outlineWhenEditingColourId, Colours::black);
|
||||
}
|
||||
|
||||
void OPLLookAndFeel::drawTickBox(Graphics &g,
|
||||
|
|
|
@ -1983,6 +1983,8 @@ void PluginGui::comboBoxChanged (ComboBox* comboBoxThatHasChanged)
|
|||
else if (comboBoxThatHasChanged == velocityComboBox2)
|
||||
{
|
||||
//[UserComboBoxCode_velocityComboBox2] -- add your combo box handling code here..
|
||||
int id = comboBoxThatHasChanged->getSelectedId() - 1;
|
||||
processor->setEnumParameter("Carrier Velocity Sensitivity", id);
|
||||
//[/UserComboBoxCode_velocityComboBox2]
|
||||
}
|
||||
else if (comboBoxThatHasChanged == algorithmComboBox)
|
||||
|
@ -1995,6 +1997,8 @@ void PluginGui::comboBoxChanged (ComboBox* comboBoxThatHasChanged)
|
|||
else if (comboBoxThatHasChanged == keyscaleAttenuationComboBox2)
|
||||
{
|
||||
//[UserComboBoxCode_keyscaleAttenuationComboBox2] -- add your combo box handling code here..
|
||||
int id = comboBoxThatHasChanged->getSelectedId() - 1;
|
||||
processor->setEnumParameter("Carrier Keyscale Level", id);
|
||||
//[/UserComboBoxCode_keyscaleAttenuationComboBox2]
|
||||
}
|
||||
else if (comboBoxThatHasChanged == keyscaleAttenuationComboBox)
|
||||
|
|
|
@ -748,10 +748,10 @@ void AdlibBlasterAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBu
|
|||
Opl->SetAttenuation(ch, 2, getEnumParameter("Carrier Attenuation"));
|
||||
break;
|
||||
case 1:
|
||||
Opl->SetAttenuation(ch, 2, 16 - (midi_message.getVelocity() / 8));
|
||||
Opl->SetAttenuation(ch, 2, 32 - (midi_message.getVelocity() / 4));
|
||||
break;
|
||||
case 2:
|
||||
Opl->SetAttenuation(ch, 2, 32 - (midi_message.getVelocity() / 4));
|
||||
Opl->SetAttenuation(ch, 2, 63 - (midi_message.getVelocity() / 2));
|
||||
break;
|
||||
}
|
||||
switch (getEnumParameter("Modulator Velocity Sensitivity")) {
|
||||
|
|
|
@ -213,8 +213,23 @@ static const char* STATE[] = {
|
|||
"D",
|
||||
"A",
|
||||
};
|
||||
// in-memory ordering of DOSBox emulator
|
||||
static int DOSBOX_CH_MAP[] = {
|
||||
-1, // channel numbering starts at 1
|
||||
0,
|
||||
2, // 1
|
||||
4, // 2
|
||||
1, // 3
|
||||
3, // 4
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
};
|
||||
const char* Hiopl::GetState(int ch) const {
|
||||
return STATE[adlib->chip.chan[ch - 1].op[1].state];
|
||||
int dosboxCh = DOSBOX_CH_MAP[ch];
|
||||
return STATE[adlib->chip.chan[dosboxCh].op[1].state];
|
||||
}
|
||||
|
||||
bool Hiopl::IsActive(int ch) {
|
||||
|
@ -277,31 +292,20 @@ Hiopl::~Hiopl() {
|
|||
|
||||
};
|
||||
|
||||
// Check that _GetOffset parameters are in range.
|
||||
bool Hiopl::_CheckParams(int ch, int osc=OSCILLATORS) {
|
||||
return ch > 0 && ch <= CHANNELS && osc > 0 && osc <= OSCILLATORS;
|
||||
}
|
||||
|
||||
// The register offset for parameters that affect a specific oscillator.
|
||||
int Hiopl::_GetOffset(int ch, int osc) {
|
||||
assert(_CheckParams(ch, osc));
|
||||
return (1 == osc) ? _op1offset[ch] : _op2offset[ch];
|
||||
}
|
||||
|
||||
// re-ordered to match in-memory ordering of DOSBox emulator
|
||||
static int OFFSET_MAP[] = {
|
||||
-1,
|
||||
0,
|
||||
3,//1,
|
||||
1,//2,
|
||||
4,//3,
|
||||
2,//4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
};
|
||||
// The register offset for parameters that affect the entire channel.
|
||||
int Hiopl::_GetOffset(int ch) {
|
||||
assert(_CheckParams(ch));
|
||||
return OFFSET_MAP[ch];
|
||||
return ch - 1;
|
||||
}
|
||||
|
||||
|
|
23
cmd/win.cmd
Normal file
23
cmd/win.cmd
Normal file
|
@ -0,0 +1,23 @@
|
|||
@ECHO OFF
|
||||
IF [%1]==[] GOTO usage
|
||||
|
||||
ECHO Building Windows Release
|
||||
SET RELEASE_VERSION=%1
|
||||
|
||||
MSBUILD Builds\VisualStudio2015\JuceOPLVSTi.vcxproj /p:Configuration="Release - 32-bit" /p:Platform="x86"
|
||||
MSBUILD Builds\VisualStudio2015\JuceOPLVSTi.vcxproj /p:Configuration="Release - 64-bit" /p:Platform="x64"
|
||||
|
||||
MKDIR %RELEASE_TEMP%
|
||||
COPY "Builds\VisualStudio2015\Release - 32-bit\JuceOPLVSTi.dll" .
|
||||
COPY "Builds\VisualStudio2015\x64\Release - 64-bit\JuceOPLVSTi x64.dll" .
|
||||
|
||||
REM We can zip using jar from the JDK!
|
||||
REM http://stackoverflow.com/a/29879102/1480560
|
||||
DEL JuceOPLVSTi_%RELEASE_VERSION%.zip
|
||||
jar -cMf JuceOPLVSTi_%RELEASE_VERSION%.zip "JuceOPLVSTi x64.dll" JuceOPLVSTi.dll Instruments
|
||||
DEL "JuceOPLVSTi x64.dll" JuceOPLVSTi.dll
|
||||
GOTO :eof
|
||||
|
||||
:usage
|
||||
ECHO Specify version on command line (eg 0-14-1)
|
||||
|
Loading…
Reference in a new issue