Browse Source

Added duplicate method for breakpoint envelope. NOTE : the copy is not fully implemented yet. Get free filter envelope duplicate for use with offline rendering.

tags/1.2.2
xenakios 7 years ago
parent
commit
1b4c75df0a
2 changed files with 11 additions and 0 deletions
  1. +2
    -0
      Source/PluginProcessor.cpp
  2. +9
    -0
      Source/jcdp_envelope.h

+ 2
- 0
Source/PluginProcessor.cpp View File

@@ -467,6 +467,8 @@ String PaulstretchpluginAudioProcessor::offlineRender(File outputfile)
File outputfiletouse = outputfile.getNonexistentSibling(); File outputfiletouse = outputfile.getNonexistentSibling();
int numoutchans = *getIntParameter(cpi_num_outchans); int numoutchans = *getIntParameter(cpi_num_outchans);
auto ss = std::make_shared<StretchAudioSource>(numoutchans,m_afm,m_sm_enab_pars); auto ss = std::make_shared<StretchAudioSource>(numoutchans,m_afm,m_sm_enab_pars);
shared_envelope free_env = m_free_filter_envelope->duplicate();
ss->setFreeFilterEnvelope(free_env);
int blocksize = 2048; int blocksize = 2048;
ss->setAudioFile(m_current_file); ss->setAudioFile(m_current_file);


+ 9
- 0
Source/jcdp_envelope.h View File

@@ -208,6 +208,15 @@ public:
m_value_grid={0.0,0.25,0.5,0.75,1.0}; m_value_grid={0.0,0.25,0.5,0.75,1.0};
m_randbuf.resize(1024); m_randbuf.resize(1024);
} }
std::unique_ptr<breakpoint_envelope> duplicate()
{
auto result = std::make_unique<breakpoint_envelope>();
result->m_nodes = m_nodes;
result->m_randbuf = m_randbuf;
result->m_transform_wrap_x = m_transform_wrap_x;
result->m_transform_x_shift = m_transform_x_shift;
return result;
}




void SetName(String Name) { m_name=Name; } void SetName(String Name) { m_name=Name; }


Loading…
Cancel
Save