2
0
Fork 0

Increase max voice count to 32

There are still only 8 pannings, because there are only 8 variation knobs in the GUI, so these are reused in cyclic fashion.
This commit is contained in:
Shane Dunne 2019-03-06 10:16:23 -05:00
parent bb328d882c
commit a1fd960949
5 changed files with 55 additions and 112 deletions

View file

@ -7,10 +7,11 @@
pluginManufacturer="Datsounds" pluginManufacturerCode="Dats" pluginManufacturer="Datsounds" pluginManufacturerCode="Dats"
pluginCode="Obxd" pluginChannelConfigs="{0, 2}" pluginIsSynth="1" pluginCode="Obxd" pluginChannelConfigs="{0, 2}" pluginIsSynth="1"
pluginWantsMidiIn="1" pluginProducesMidiOut="0" pluginSilenceInIsSilenceOut="0" pluginWantsMidiIn="1" pluginProducesMidiOut="0" pluginSilenceInIsSilenceOut="0"
pluginEditorRequiresKeys="0" pluginAUExportPrefix="" pluginRTASCategory="ePlugInCategory_SWGenerators" pluginEditorRequiresKeys="0" pluginAUExportPrefix="" pluginRTASCategory="2048"
aaxIdentifier="" pluginAAXCategory="" jucerVersion="4.3.0" companyName="2Dat" aaxIdentifier="" pluginAAXCategory="" jucerVersion="5.4.3" companyName="2Dat"
companyWebsite="http://obxd.wordpress.com" companyEmail="" buildAUv3="0" companyWebsite="http://obxd.wordpress.com" companyEmail="" buildAUv3="0"
pluginIsMidiEffectPlugin="0" pluginAUMainType=""> pluginIsMidiEffectPlugin="0" pluginFormats="buildVST,buildAU"
pluginCharacteristicsValue="pluginIsSynth,pluginWantsMidiIn">
<MAINGROUP id="NZ3n4V" name="Obxd"> <MAINGROUP id="NZ3n4V" name="Obxd">
<GROUP id="{90740217-84AB-FD0D-FBC4-CA9EA2C68D5E}" name="Source"> <GROUP id="{90740217-84AB-FD0D-FBC4-CA9EA2C68D5E}" name="Source">
<GROUP id="{5F0B15D1-4D92-B2FF-5904-9CF4C3CE645F}" name="Images"> <GROUP id="{5F0B15D1-4D92-B2FF-5904-9CF4C3CE645F}" name="Images">
@ -66,11 +67,10 @@
vst3Folder="modules/vstsdk3"> vst3Folder="modules/vstsdk3">
<CONFIGURATIONS> <CONFIGURATIONS>
<CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="Obxd" osxArchitecture="64BitUniversal" <CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="Obxd" osxArchitecture="64BitUniversal"
stripLocalSymbols="0" osxCompatibility="10.6 SDK" osxSDK="default" stripLocalSymbols="0" osxCompatibility="10.6 SDK" linkTimeOptimisation="0"/>
linkTimeOptimisation="0"/>
<CONFIGURATION name="Release" isDebug="0" optimisation="3" targetName="Obxd" <CONFIGURATION name="Release" isDebug="0" optimisation="3" targetName="Obxd"
osxArchitecture="64BitUniversal" stripLocalSymbols="1" osxCompatibility="10.6 SDK" osxArchitecture="64BitUniversal" stripLocalSymbols="1" osxCompatibility="10.6 SDK"
osxSDK="default" linkTimeOptimisation="0"/> linkTimeOptimisation="0"/>
</CONFIGURATIONS> </CONFIGURATIONS>
<MODULEPATHS> <MODULEPATHS>
<MODULEPATH id="juce_opengl" path="modules"/> <MODULEPATH id="juce_opengl" path="modules"/>
@ -88,92 +88,46 @@
<MODULEPATH id="juce_audio_utils" path="modules"/> <MODULEPATH id="juce_audio_utils" path="modules"/>
</MODULEPATHS> </MODULEPATHS>
</XCODE_MAC> </XCODE_MAC>
<VS2010 targetFolder="Builds/VisualStudio2010" vstFolder="modules/vstsdk3"> <VS2017 targetFolder="Builds/VisualStudio2017">
<CONFIGURATIONS> <CONFIGURATIONS>
<CONFIGURATION name="Release32" winWarningLevel="2" generateManifest="1" winArchitecture="32-bit" <CONFIGURATION isDebug="1" name="Debug"/>
isDebug="0" optimisation="3" targetName="Obxd" useRuntimeLibDLL="0"/> <CONFIGURATION isDebug="0" name="Release"/>
<CONFIGURATION name="Release64" winWarningLevel="2" generateManifest="1" winArchitecture="x64"
optimisation="3" targetName="Obxd64" useRuntimeLibDLL="0"/>
</CONFIGURATIONS> </CONFIGURATIONS>
<MODULEPATHS> <MODULEPATHS>
<MODULEPATH id="juce_opengl" path="modules"/> <MODULEPATH id="juce_opengl"/>
<MODULEPATH id="juce_gui_extra" path="modules"/> <MODULEPATH id="juce_gui_extra"/>
<MODULEPATH id="juce_gui_basics" path="modules"/> <MODULEPATH id="juce_gui_basics"/>
<MODULEPATH id="juce_graphics" path="modules"/> <MODULEPATH id="juce_graphics"/>
<MODULEPATH id="juce_events" path="modules"/> <MODULEPATH id="juce_events"/>
<MODULEPATH id="juce_data_structures" path="modules"/> <MODULEPATH id="juce_data_structures"/>
<MODULEPATH id="juce_core" path="modules"/> <MODULEPATH id="juce_core"/>
<MODULEPATH id="juce_audio_utils" path="modules"/> <MODULEPATH id="juce_audio_utils"/>
<MODULEPATH id="juce_audio_processors" path="modules"/> <MODULEPATH id="juce_audio_processors"/>
<MODULEPATH id="juce_audio_plugin_client" path="modules"/> <MODULEPATH id="juce_audio_plugin_client"/>
<MODULEPATH id="juce_audio_formats" path="modules"/> <MODULEPATH id="juce_audio_formats"/>
<MODULEPATH id="juce_audio_devices" path="modules"/> <MODULEPATH id="juce_audio_devices"/>
<MODULEPATH id="juce_audio_basics" path="modules"/> <MODULEPATH id="juce_audio_basics"/>
</MODULEPATHS> </MODULEPATHS>
</VS2010> </VS2017>
<LINUX_MAKE targetFolder="Builds/LinuxMakefile" vstFolder="modules/vstsdk2.4">
<CONFIGURATIONS>
<CONFIGURATION name="Release64" libraryPath="/usr/X11R6/lib/" isDebug="0" optimisation="3"
targetName="Obxd64"/>
<CONFIGURATION name="Release32" libraryPath="/usr/X11R6/lib/" linuxArchitecture="-m32"
optimisation="3" targetName="Obxd"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_opengl" path="modules"/>
<MODULEPATH id="juce_gui_extra" path="modules"/>
<MODULEPATH id="juce_gui_basics" path="modules"/>
<MODULEPATH id="juce_graphics" path="modules"/>
<MODULEPATH id="juce_events" path="modules"/>
<MODULEPATH id="juce_data_structures" path="modules"/>
<MODULEPATH id="juce_core" path="modules"/>
<MODULEPATH id="juce_audio_utils" path="modules"/>
<MODULEPATH id="juce_audio_processors" path="modules"/>
<MODULEPATH id="juce_audio_plugin_client" path="modules"/>
<MODULEPATH id="juce_audio_formats" path="modules"/>
<MODULEPATH id="juce_audio_devices" path="modules"/>
<MODULEPATH id="juce_audio_basics" path="modules"/>
</MODULEPATHS>
</LINUX_MAKE>
<VS2013 targetFolder="Builds/VisualStudio2013">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" winWarningLevel="4" generateManifest="1" winArchitecture="x64"
isDebug="1" optimisation="3" targetName="Obxd"/>
<CONFIGURATION name="Release64" winWarningLevel="4" generateManifest="1" winArchitecture="x64"
isDebug="0" optimisation="3" targetName="Obxd64" useRuntimeLibDLL="0"/>
<CONFIGURATION name="Release32" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit"
isDebug="0" optimisation="3" targetName="Obxd" useRuntimeLibDLL="0"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_opengl" path="modules"/>
<MODULEPATH id="juce_gui_extra" path="modules"/>
<MODULEPATH id="juce_gui_basics" path="modules"/>
<MODULEPATH id="juce_graphics" path="modules"/>
<MODULEPATH id="juce_events" path="modules"/>
<MODULEPATH id="juce_data_structures" path="modules"/>
<MODULEPATH id="juce_core" path="modules"/>
<MODULEPATH id="juce_audio_utils" path="modules"/>
<MODULEPATH id="juce_audio_processors" path="modules"/>
<MODULEPATH id="juce_audio_plugin_client" path="modules"/>
<MODULEPATH id="juce_audio_formats" path="modules"/>
<MODULEPATH id="juce_audio_devices" path="modules"/>
<MODULEPATH id="juce_audio_basics" path="modules"/>
</MODULEPATHS>
</VS2013>
</EXPORTFORMATS> </EXPORTFORMATS>
<MODULES> <MODULES>
<MODULES id="juce_audio_basics" showAllCode="1" useLocalCopy="1"/> <MODULES id="juce_audio_basics" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULES id="juce_audio_devices" showAllCode="1" useLocalCopy="1"/> <MODULES id="juce_audio_devices" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULES id="juce_audio_formats" showAllCode="1" useLocalCopy="1"/> <MODULES id="juce_audio_formats" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULES id="juce_audio_plugin_client" showAllCode="1" useLocalCopy="1"/> <MODULES id="juce_audio_plugin_client" showAllCode="1" useLocalCopy="0"
<MODULES id="juce_audio_processors" showAllCode="1" useLocalCopy="1"/> useGlobalPath="1"/>
<MODULE id="juce_audio_utils" showAllCode="1" useLocalCopy="1"/> <MODULES id="juce_audio_processors" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULES id="juce_core" showAllCode="1" useLocalCopy="1"/> <MODULE id="juce_audio_utils" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULES id="juce_data_structures" showAllCode="1" useLocalCopy="1"/> <MODULES id="juce_core" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULES id="juce_events" showAllCode="1" useLocalCopy="1"/> <MODULES id="juce_data_structures" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULES id="juce_graphics" showAllCode="1" useLocalCopy="1"/> <MODULES id="juce_events" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULES id="juce_gui_basics" showAllCode="1" useLocalCopy="1"/> <MODULES id="juce_graphics" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULES id="juce_gui_extra" showAllCode="1" useLocalCopy="1"/> <MODULES id="juce_gui_basics" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULES id="juce_opengl" showAllCode="1" useLocalCopy="1"/> <MODULES id="juce_gui_extra" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULES id="juce_opengl" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
</MODULES> </MODULES>
<JUCEOPTIONS JUCE_QUICKTIME="disabled"/> <JUCEOPTIONS JUCE_QUICKTIME="disabled"/>
<LIVE_SETTINGS>
<WINDOWS/>
</LIVE_SETTINGS>
</JUCERPROJECT> </JUCERPROJECT>

View file

@ -48,8 +48,9 @@ public:
bool vibratoEnabled; bool vibratoEnabled;
float Volume; float Volume;
const static int MAX_VOICES=8; const static int MAX_VOICES = 32;
float pannings[MAX_VOICES]; const static int MAX_PANNINGS = 8;
float pannings[MAX_PANNINGS];
ObxdVoice voices[MAX_VOICES]; ObxdVoice voices[MAX_VOICES];
bool uni; bool uni;
bool Oversample; bool Oversample;
@ -79,7 +80,7 @@ public:
// pannings = new float[MAX_VOICES]; // pannings = new float[MAX_VOICES];
totalvc = MAX_VOICES; totalvc = MAX_VOICES;
vq = VoiceQueue(MAX_VOICES,voices); vq = VoiceQueue(MAX_VOICES,voices);
for(int i = 0 ; i < MAX_VOICES;++i) for(int i = 0 ; i < MAX_PANNINGS;++i)
{ {
pannings[i]= 0.5; pannings[i]= 0.5;
} }
@ -363,11 +364,11 @@ public:
if(Oversample) if(Oversample)
{ {
float x2 = processSynthVoice(voices[i],lfovalue2,viblfo2); float x2 = processSynthVoice(voices[i],lfovalue2,viblfo2);
vlo+=x2*(1-pannings[i]); vlo+=x2*(1-pannings[i % MAX_PANNINGS]);
vro+=x2*(pannings[i]); vro+=x2*(pannings[i % MAX_PANNINGS]);
} }
vl+=x1*(1-pannings[i]); vl+=x1*(1-pannings[i % MAX_PANNINGS]);
vr+=x1*(pannings[i]); vr+=x1*(pannings[i % MAX_PANNINGS]);
} }
if(Oversample) if(Oversample)
{ {

View file

@ -166,7 +166,7 @@ public:
} }
void setVoiceCount(float param) void setVoiceCount(float param)
{ {
synth.setVoiceCount(roundToInt((param*7) +1)); synth.setVoiceCount(roundToInt((param*(synth.MAX_VOICES-1)) +1));
} }
void procPitchWheelAmount(float param) void procPitchWheelAmount(float param)
{ {
@ -184,7 +184,7 @@ public:
} }
void processPan(float param,int idx) void processPan(float param,int idx)
{ {
synth.pannings[idx-1] = param; synth.pannings[(idx-1) % synth.MAX_PANNINGS] = param;
} }
void processTune(float param) void processTune(float param)
{ {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View file

@ -287,14 +287,8 @@ void ObxdAudioProcessorEditor::rebuildComponents()
envelopeDetuneKnob = addTinyKnob(1353,300,ownerFilter,ENVDER,"Env",0.2); envelopeDetuneKnob = addTinyKnob(1353,300,ownerFilter,ENVDER,"Env",0.2);
voiceSwitch = addNormalButtonList(124,338,17,ownerFilter,VOICE_COUNT,"VoiceCount",ImageCache::getFromMemory(BinaryData::voices_png,BinaryData::voices_pngSize)); voiceSwitch = addNormalButtonList(124,338,17,ownerFilter,VOICE_COUNT,"VoiceCount",ImageCache::getFromMemory(BinaryData::voices_png,BinaryData::voices_pngSize));
voiceSwitch ->addChoise("1"); for (int i=1; i <= 32; i++)
voiceSwitch ->addChoise("2"); voiceSwitch ->addChoise(String(i));
voiceSwitch ->addChoise("3");
voiceSwitch ->addChoise("4");
voiceSwitch ->addChoise("5");
voiceSwitch ->addChoise("6");
voiceSwitch ->addChoise("7");
voiceSwitch ->addChoise("8");
voiceSwitch ->setValue(ownerFilter->getParameter(VOICE_COUNT),dontSendNotification); voiceSwitch ->setValue(ownerFilter->getParameter(VOICE_COUNT),dontSendNotification);
legatoSwitch = addNormalButtonList(25,338,65,ownerFilter,LEGATOMODE,"Legato",ImageCache::getFromMemory(BinaryData::legato_png,BinaryData::legato_pngSize)); legatoSwitch = addNormalButtonList(25,338,65,ownerFilter,LEGATOMODE,"Legato",ImageCache::getFromMemory(BinaryData::legato_png,BinaryData::legato_pngSize));
@ -400,14 +394,8 @@ void ObxdAudioProcessorEditor::rebuildComponents()
bendLfoRateKnob = addNormalKnobClassic(364,345,ownerFilter,BENDLFORATE,"ModRate",0.4); bendLfoRateKnob = addNormalKnobClassic(364,345,ownerFilter,BENDLFORATE,"ModRate",0.4);
voiceSwitch = addNormalButtonListClassic(172,321,38,ownerFilter,VOICE_COUNT,"VoiceCount",ImageCache::getFromFile(skinFolder.getChildFile("voices.png"))); voiceSwitch = addNormalButtonListClassic(172,321,38,ownerFilter,VOICE_COUNT,"VoiceCount",ImageCache::getFromFile(skinFolder.getChildFile("voices.png")));
voiceSwitch ->addChoise("1"); for (int i=1; i <= 32; i++)
voiceSwitch ->addChoise("2"); voiceSwitch->addChoise(String(i));
voiceSwitch ->addChoise("3");
voiceSwitch ->addChoise("4");
voiceSwitch ->addChoise("5");
voiceSwitch ->addChoise("6");
voiceSwitch ->addChoise("7");
voiceSwitch ->addChoise("8");
voiceSwitch ->setValue(ownerFilter->getParameter(VOICE_COUNT),dontSendNotification); voiceSwitch ->setValue(ownerFilter->getParameter(VOICE_COUNT),dontSendNotification);
legatoSwitch = addNormalButtonListClassic(65,321,95,ownerFilter,LEGATOMODE,"Legato",ImageCache::getFromFile(skinFolder.getChildFile("legato.png"))); legatoSwitch = addNormalButtonListClassic(65,321,95,ownerFilter,LEGATOMODE,"Legato",ImageCache::getFromFile(skinFolder.getChildFile("legato.png")));
@ -511,7 +499,7 @@ void ObxdAudioProcessorEditor::sliderValueChanged (Slider* c)
handleSParam(lfoAmt1Knob,LFO1AMT) handleSParam(lfoAmt1Knob,LFO1AMT)
handleSParam(lfoAmt2Knob,LFO2AMT) handleSParam(lfoAmt2Knob,LFO2AMT)
handleSParam(pan1Knob,PAN1) handleSParam(pan1Knob,PAN1)
handleSParam(pan2Knob,PAN2) handleSParam(pan2Knob,PAN2)
handleSParam(pan3Knob,PAN3) handleSParam(pan3Knob,PAN3)
handleSParam(pan4Knob,PAN4) handleSParam(pan4Knob,PAN4)