2
0
Fork 0

Merge pull request #6 from getdunne/master

Increase max voice count to 32
This commit is contained in:
reales 2019-09-01 13:03:46 +02:00 committed by GitHub
commit f3660234df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 383 additions and 124 deletions

320
.gitignore vendored Normal file
View file

@ -0,0 +1,320 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
.DS_Store
Builds/
## JUCE library code
JuceLibraryCode/
## Build generated
build/
DerivedData/
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
**/Properties/launchSettings.json
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Typescript v1 declaration files
typings/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush
.cr/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
*.exe

View file

@ -2,15 +2,17 @@
<JUCERPROJECT id="mxW328" name="Obxd" projectType="audioplug" version="1.4.1" <JUCERPROJECT id="mxW328" name="Obxd" projectType="audioplug" version="1.4.1"
bundleIdentifier="com.Datsounds.Obxd" includeBinaryInAppConfig="1" bundleIdentifier="com.Datsounds.Obxd" includeBinaryInAppConfig="1"
buildVST="1" buildVST3="0" buildAU="1" buildRTAS="0" buildAAX="0" buildVST="1" buildVST3="1" buildAU="1" buildRTAS="0" buildAAX="0"
pluginName="OB-Xd" pluginDesc="Emulation of famous OB-X, OB-Xa and OB-8 synths" pluginName="OB-Xd" pluginDesc="Emulation of famous OB-X, OB-Xa and OB-8 synths"
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.4" companyName="2Dat"
companyWebsite="http://obxd.wordpress.com" companyEmail="" buildAUv3="0" companyWebsite="http://obxd.wordpress.com" companyEmail="" buildAUv3="0"
pluginIsMidiEffectPlugin="0" pluginAUMainType=""> pluginIsMidiEffectPlugin="0" pluginFormats="buildAU,buildStandalone,buildVST,buildVST3"
pluginCharacteristicsValue="pluginIsSynth,pluginWantsMidiIn"
buildStandalone="1" enableIAA="0">
<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">
@ -62,15 +64,12 @@
</GROUP> </GROUP>
</MAINGROUP> </MAINGROUP>
<EXPORTFORMATS> <EXPORTFORMATS>
<XCODE_MAC targetFolder="Builds/MacOSX" vstFolder="modules/vstsdk3" extraCompilerFlags="-I../../modules/vstsdk3" <XCODE_MAC targetFolder="Builds/MacOSX" vstFolder="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" stripLocalSymbols="0"
stripLocalSymbols="0" osxCompatibility="10.6 SDK" osxSDK="default" 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" stripLocalSymbols="1" osxCompatibility="10.6 SDK" linkTimeOptimisation="0"/>
osxSDK="default" linkTimeOptimisation="0"/>
</CONFIGURATIONS> </CONFIGURATIONS>
<MODULEPATHS> <MODULEPATHS>
<MODULEPATH id="juce_opengl" path="modules"/> <MODULEPATH id="juce_opengl" path="modules"/>
@ -88,92 +87,47 @@
<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/>
<OSX/>
</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")));

View file

@ -491,7 +491,7 @@ const String ObxdAudioProcessor::getParameterName (int index)
case FREL: case FREL:
return S("FilterRelease"); return S("FilterRelease");
} }
return String::empty; return {};
} }
const String ObxdAudioProcessor::getParameterText (int index) const String ObxdAudioProcessor::getParameterText (int index)
@ -755,7 +755,7 @@ void ObxdAudioProcessor::getStateInformation (MemoryBlock& destData)
void ObxdAudioProcessor::setStateInformation (const void* data, int sizeInBytes) void ObxdAudioProcessor::setStateInformation (const void* data, int sizeInBytes)
{ {
if (XmlElement* const xmlState = getXmlFromBinary(data,sizeInBytes)) if (std::unique_ptr<XmlElement> xmlState = getXmlFromBinary(data,sizeInBytes))
{ {
XmlElement* xprogs = xmlState->getFirstChildElement(); XmlElement* xprogs = xmlState->getFirstChildElement();
if (xprogs->hasTagName(S("programs"))) if (xprogs->hasTagName(S("programs")))
@ -782,14 +782,12 @@ void ObxdAudioProcessor::setStateInformation (const void* data, int sizeInBytes)
} }
setCurrentProgram(xmlState->getIntAttribute(S("currentProgram"), 0)); setCurrentProgram(xmlState->getIntAttribute(S("currentProgram"), 0));
delete xmlState;
} }
} }
void ObxdAudioProcessor::setCurrentProgramStateInformation(const void* data,int sizeInBytes) void ObxdAudioProcessor::setCurrentProgramStateInformation(const void* data,int sizeInBytes)
{ {
if (XmlElement* const e = getXmlFromBinary(data, sizeInBytes)) if (std::unique_ptr<XmlElement> e = getXmlFromBinary(data, sizeInBytes))
{ {
programs.currentProgramPtr->setDefaultValues(); programs.currentProgramPtr->setDefaultValues();
@ -801,8 +799,6 @@ void ObxdAudioProcessor::setCurrentProgramStateInformation(const void* data,int
programs.currentProgramPtr->name = e->getStringAttribute(S("programName"), S("Default")); programs.currentProgramPtr->name = e->getStringAttribute(S("programName"), S("Default"));
setCurrentProgram(programs.currentProgram); setCurrentProgram(programs.currentProgram);
delete e;
} }
} }