From 104d1bfd2e29f4397f8ce8c4578b8b1f40a75f83 Mon Sep 17 00:00:00 2001 From: xenakios Date: Mon, 26 Feb 2018 22:39:30 +0200 Subject: [PATCH] Store and recall the number of harmonics parameter. Seriously, have to make this stuff work in a more robust manner... --- Source/PluginProcessor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp index 8250411..912d133 100644 --- a/Source/PluginProcessor.cpp +++ b/Source/PluginProcessor.cpp @@ -204,6 +204,7 @@ ValueTree PaulstretchpluginAudioProcessor::getStateTree(bool ignoreoptions, bool { storeToTreeProperties(paramtree, nullptr, getFloatParameter(i)); } + storeToTreeProperties(paramtree, nullptr, getIntParameter(cpi_numharmonics)); storeToTreeProperties(paramtree, nullptr, m_outchansparam); storeToTreeProperties(paramtree, nullptr, m_inchansparam); storeToTreeProperties(paramtree, nullptr, getBoolParameter(cpi_bypass_stretch)); @@ -253,7 +254,8 @@ void PaulstretchpluginAudioProcessor::setStateFromTree(ValueTree tree) { getFromTreeProperties(tree,getFloatParameter(i)); } - getFromTreeProperties(tree, m_outchansparam); + getFromTreeProperties(tree, getIntParameter(cpi_numharmonics)); + getFromTreeProperties(tree, m_outchansparam); getFromTreeProperties(tree, m_inchansparam); getFromTreeProperties(tree, getBoolParameter(cpi_bypass_stretch)); }