Add parameter for stretch bypass
This commit is contained in:
		@@ -145,7 +145,7 @@ void PaulstretchpluginAudioProcessorEditor::resized()
 | 
				
			|||||||
	int w = getWidth();
 | 
						int w = getWidth();
 | 
				
			||||||
	int xoffs = 1;
 | 
						int xoffs = 1;
 | 
				
			||||||
	int yoffs = 30;
 | 
						int yoffs = 30;
 | 
				
			||||||
	int div = w / 4;
 | 
						int div = w / 5;
 | 
				
			||||||
	//std::vector<std::vector<int>> layout;
 | 
						//std::vector<std::vector<int>> layout;
 | 
				
			||||||
	//layout.emplace_back(cpi_capture_enabled,	cpi_passthrough,	cpi_pause_enabled,	cpi_freeze);
 | 
						//layout.emplace_back(cpi_capture_enabled,	cpi_passthrough,	cpi_pause_enabled,	cpi_freeze);
 | 
				
			||||||
	//layout.emplace_back(cpi_main_volume,		cpi_num_inchans,	cpi_num_outchans);
 | 
						//layout.emplace_back(cpi_main_volume,		cpi_num_inchans,	cpi_num_outchans);
 | 
				
			||||||
@@ -158,6 +158,8 @@ void PaulstretchpluginAudioProcessorEditor::resized()
 | 
				
			|||||||
	m_parcomps[cpi_pause_enabled]->setBounds(xoffs, yoffs, div-1, 24);
 | 
						m_parcomps[cpi_pause_enabled]->setBounds(xoffs, yoffs, div-1, 24);
 | 
				
			||||||
	xoffs += div;
 | 
						xoffs += div;
 | 
				
			||||||
	m_parcomps[cpi_freeze]->setBounds(xoffs, yoffs, div - 1, 24);
 | 
						m_parcomps[cpi_freeze]->setBounds(xoffs, yoffs, div - 1, 24);
 | 
				
			||||||
 | 
						xoffs += div;
 | 
				
			||||||
 | 
						m_parcomps[cpi_bypass_stretch]->setBounds(xoffs, yoffs, div - 1, 24);
 | 
				
			||||||
	xoffs = 1;
 | 
						xoffs = 1;
 | 
				
			||||||
	yoffs += 25;
 | 
						yoffs += 25;
 | 
				
			||||||
	div = w / 3;
 | 
						div = w / 3;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -142,6 +142,7 @@ PaulstretchpluginAudioProcessor::PaulstretchpluginAudioProcessor()
 | 
				
			|||||||
	addParameter(new AudioParameterBool("markdirty0", "Internal (don't use)", false)); // 31
 | 
						addParameter(new AudioParameterBool("markdirty0", "Internal (don't use)", false)); // 31
 | 
				
			||||||
	m_inchansparam = new AudioParameterInt("numinchans0", "Num ins", 2, 8, 2); // 32
 | 
						m_inchansparam = new AudioParameterInt("numinchans0", "Num ins", 2, 8, 2); // 32
 | 
				
			||||||
	addParameter(m_inchansparam); // 32
 | 
						addParameter(m_inchansparam); // 32
 | 
				
			||||||
 | 
						addParameter(new AudioParameterBool("bypass_stretch0", "Bypass stretch", false)); // 33
 | 
				
			||||||
#ifdef SOUNDRANGE_OFFSET_ENABLED
 | 
					#ifdef SOUNDRANGE_OFFSET_ENABLED
 | 
				
			||||||
	addParameter(new AudioParameterFloat("playrangeoffset_0", "Play offset", 0.0f, 1.0f, 0.0f)); // 33
 | 
						addParameter(new AudioParameterFloat("playrangeoffset_0", "Play offset", 0.0f, 1.0f, 0.0f)); // 33
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
@@ -151,7 +152,7 @@ PaulstretchpluginAudioProcessor::PaulstretchpluginAudioProcessor()
 | 
				
			|||||||
	setPreBufferAmount(2);
 | 
						setPreBufferAmount(2);
 | 
				
			||||||
    startTimer(1, 50);
 | 
					    startTimer(1, 50);
 | 
				
			||||||
	m_show_technical_info = m_propsfile->m_props_file->getBoolValue("showtechnicalinfo", false);
 | 
						m_show_technical_info = m_propsfile->m_props_file->getBoolValue("showtechnicalinfo", false);
 | 
				
			||||||
	m_stretch_source->setPreviewDry(true);
 | 
						
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PaulstretchpluginAudioProcessor::~PaulstretchpluginAudioProcessor()
 | 
					PaulstretchpluginAudioProcessor::~PaulstretchpluginAudioProcessor()
 | 
				
			||||||
@@ -537,7 +538,7 @@ void PaulstretchpluginAudioProcessor::processBlock (AudioSampleBuffer& buffer, M
 | 
				
			|||||||
		return;
 | 
							return;
 | 
				
			||||||
	m_stretch_source->setMainVolume(*getFloatParameter(cpi_main_volume));
 | 
						m_stretch_source->setMainVolume(*getFloatParameter(cpi_main_volume));
 | 
				
			||||||
	m_stretch_source->setRate(*getFloatParameter(cpi_stretchamount));
 | 
						m_stretch_source->setRate(*getFloatParameter(cpi_stretchamount));
 | 
				
			||||||
 | 
						m_stretch_source->setPreviewDry(*getBoolParameter(cpi_bypass_stretch));
 | 
				
			||||||
	setFFTSize(*getFloatParameter(cpi_fftsize));
 | 
						setFFTSize(*getFloatParameter(cpi_fftsize));
 | 
				
			||||||
	m_ppar.pitch_shift.cents = *getFloatParameter(cpi_pitchshift) * 100.0;
 | 
						m_ppar.pitch_shift.cents = *getFloatParameter(cpi_pitchshift) * 100.0;
 | 
				
			||||||
	m_ppar.freq_shift.Hz = *getFloatParameter(cpi_frequencyshift);
 | 
						m_ppar.freq_shift.Hz = *getFloatParameter(cpi_frequencyshift);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -58,7 +58,7 @@ const int cpi_max_capture_len = 29;
 | 
				
			|||||||
const int cpi_passthrough = 30;
 | 
					const int cpi_passthrough = 30;
 | 
				
			||||||
const int cpi_markdirty = 31;
 | 
					const int cpi_markdirty = 31;
 | 
				
			||||||
const int cpi_num_inchans = 32;
 | 
					const int cpi_num_inchans = 32;
 | 
				
			||||||
const int cpi_playrangeoffset = 33;
 | 
					const int cpi_bypass_stretch = 33;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class MyPropertiesFile
 | 
					class MyPropertiesFile
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,6 +10,7 @@ History :
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
02-21-2018 1.0.2
 | 
					02-21-2018 1.0.2
 | 
				
			||||||
	-Show approximate stretched output duration in info label (only valid if the stretch amount is not automated in the host)
 | 
						-Show approximate stretched output duration in info label (only valid if the stretch amount is not automated in the host)
 | 
				
			||||||
 | 
						-Allow previewing the source sound unprocessed
 | 
				
			||||||
02-16-2018 1.0.1
 | 
					02-16-2018 1.0.1
 | 
				
			||||||
	-Increased maximum number of input channels to 8
 | 
						-Increased maximum number of input channels to 8
 | 
				
			||||||
	-Added zoom/scroll bar for waveform
 | 
						-Added zoom/scroll bar for waveform
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user