diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fbffd30
--- /dev/null
+++ b/.gitignore
@@ -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
diff --git a/OB-Xd.jucer b/OB-Xd.jucer
index d8937ea..42672a4 100644
--- a/OB-Xd.jucer
+++ b/OB-Xd.jucer
@@ -2,15 +2,17 @@
+ pluginIsMidiEffectPlugin="0" pluginFormats="buildAU,buildStandalone,buildVST,buildVST3"
+ pluginCharacteristicsValue="pluginIsSynth,pluginWantsMidiIn"
+ buildStandalone="1" enableIAA="0">
@@ -62,15 +64,12 @@
-
+
-
+
+ stripLocalSymbols="1" osxCompatibility="10.6 SDK" linkTimeOptimisation="0"/>
@@ -88,92 +87,47 @@
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Engine/Motherboard.h b/Source/Engine/Motherboard.h
index d673c66..21d9201 100755
--- a/Source/Engine/Motherboard.h
+++ b/Source/Engine/Motherboard.h
@@ -48,8 +48,9 @@ public:
bool vibratoEnabled;
float Volume;
- const static int MAX_VOICES=8;
- float pannings[MAX_VOICES];
+ const static int MAX_VOICES = 32;
+ const static int MAX_PANNINGS = 8;
+ float pannings[MAX_PANNINGS];
ObxdVoice voices[MAX_VOICES];
bool uni;
bool Oversample;
@@ -79,7 +80,7 @@ public:
// pannings = new float[MAX_VOICES];
totalvc = MAX_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;
}
@@ -363,11 +364,11 @@ public:
if(Oversample)
{
float x2 = processSynthVoice(voices[i],lfovalue2,viblfo2);
- vlo+=x2*(1-pannings[i]);
- vro+=x2*(pannings[i]);
+ vlo+=x2*(1-pannings[i % MAX_PANNINGS]);
+ vro+=x2*(pannings[i % MAX_PANNINGS]);
}
- vl+=x1*(1-pannings[i]);
- vr+=x1*(pannings[i]);
+ vl+=x1*(1-pannings[i % MAX_PANNINGS]);
+ vr+=x1*(pannings[i % MAX_PANNINGS]);
}
if(Oversample)
{
diff --git a/Source/Engine/SynthEngine.h b/Source/Engine/SynthEngine.h
index 22862f1..c916590 100755
--- a/Source/Engine/SynthEngine.h
+++ b/Source/Engine/SynthEngine.h
@@ -166,7 +166,7 @@ public:
}
void setVoiceCount(float param)
{
- synth.setVoiceCount(roundToInt((param*7) +1));
+ synth.setVoiceCount(roundToInt((param*(synth.MAX_VOICES-1)) +1));
}
void procPitchWheelAmount(float param)
{
@@ -184,7 +184,7 @@ public:
}
void processPan(float param,int idx)
{
- synth.pannings[idx-1] = param;
+ synth.pannings[(idx-1) % synth.MAX_PANNINGS] = param;
}
void processTune(float param)
{
diff --git a/Source/Images/voices.png b/Source/Images/voices.png
index c8af407..fdaa2a3 100644
Binary files a/Source/Images/voices.png and b/Source/Images/voices.png differ
diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp
index d50ec73..8693073 100755
--- a/Source/PluginEditor.cpp
+++ b/Source/PluginEditor.cpp
@@ -287,14 +287,8 @@ void ObxdAudioProcessorEditor::rebuildComponents()
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 ->addChoise("1");
- voiceSwitch ->addChoise("2");
- voiceSwitch ->addChoise("3");
- voiceSwitch ->addChoise("4");
- voiceSwitch ->addChoise("5");
- voiceSwitch ->addChoise("6");
- voiceSwitch ->addChoise("7");
- voiceSwitch ->addChoise("8");
+ for (int i=1; i <= 32; i++)
+ voiceSwitch ->addChoise(String(i));
voiceSwitch ->setValue(ownerFilter->getParameter(VOICE_COUNT),dontSendNotification);
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);
voiceSwitch = addNormalButtonListClassic(172,321,38,ownerFilter,VOICE_COUNT,"VoiceCount",ImageCache::getFromFile(skinFolder.getChildFile("voices.png")));
- voiceSwitch ->addChoise("1");
- voiceSwitch ->addChoise("2");
- voiceSwitch ->addChoise("3");
- voiceSwitch ->addChoise("4");
- voiceSwitch ->addChoise("5");
- voiceSwitch ->addChoise("6");
- voiceSwitch ->addChoise("7");
- voiceSwitch ->addChoise("8");
+ for (int i=1; i <= 32; i++)
+ voiceSwitch->addChoise(String(i));
voiceSwitch ->setValue(ownerFilter->getParameter(VOICE_COUNT),dontSendNotification);
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(lfoAmt2Knob,LFO2AMT)
- handleSParam(pan1Knob,PAN1)
+ handleSParam(pan1Knob,PAN1)
handleSParam(pan2Knob,PAN2)
handleSParam(pan3Knob,PAN3)
handleSParam(pan4Knob,PAN4)
diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp
index e613396..745f512 100755
--- a/Source/PluginProcessor.cpp
+++ b/Source/PluginProcessor.cpp
@@ -491,7 +491,7 @@ const String ObxdAudioProcessor::getParameterName (int index)
case FREL:
return S("FilterRelease");
}
- return String::empty;
+ return {};
}
const String ObxdAudioProcessor::getParameterText (int index)
@@ -755,7 +755,7 @@ void ObxdAudioProcessor::getStateInformation (MemoryBlock& destData)
void ObxdAudioProcessor::setStateInformation (const void* data, int sizeInBytes)
{
- if (XmlElement* const xmlState = getXmlFromBinary(data,sizeInBytes))
+ if (std::unique_ptr xmlState = getXmlFromBinary(data,sizeInBytes))
{
XmlElement* xprogs = xmlState->getFirstChildElement();
if (xprogs->hasTagName(S("programs")))
@@ -782,14 +782,12 @@ void ObxdAudioProcessor::setStateInformation (const void* data, int sizeInBytes)
}
setCurrentProgram(xmlState->getIntAttribute(S("currentProgram"), 0));
-
- delete xmlState;
}
}
void ObxdAudioProcessor::setCurrentProgramStateInformation(const void* data,int sizeInBytes)
{
- if (XmlElement* const e = getXmlFromBinary(data, sizeInBytes))
+ if (std::unique_ptr e = getXmlFromBinary(data, sizeInBytes))
{
programs.currentProgramPtr->setDefaultValues();
@@ -801,8 +799,6 @@ void ObxdAudioProcessor::setCurrentProgramStateInformation(const void* data,int
programs.currentProgramPtr->name = e->getStringAttribute(S("programName"), S("Default"));
setCurrentProgram(programs.currentProgram);
-
- delete e;
}
}