예제 #1
0
bool SPECTACLE2_BASE::set_freqrange(float min, float max, const char *type)
{
	if (min != _minfreq || max != _rawmaxfreq) {
		_rawmaxfreq = max;
		if (max == 0.0f)
			max = _nyquist;
		if (max < min)
			_fswap(&min, &max);
		if (max > _nyquist)
			max = _nyquist;
		_minfreq = _fclamp(0.0f, min, max);
		update_bin_groups(_bin_groups, _minfreq, max, _control_table_size, type);
		return true;
	}
	return false;
}
예제 #2
0
// --------------------------------------------------------- set_eq_freqrange --
// Similar to set_freqrange in base class, but for _eq_bin_groups.
bool SPECTACLE2::set_eq_freqrange(float min, float max)
{
	if (min != _eq_minfreq || max != _eq_rawmaxfreq) {
		_eq_rawmaxfreq = max;
		if (max == 0.0f)
			max = _nyquist;
		if (max < min)
			_fswap(&min, &max);
		if (max > _nyquist)
			max = _nyquist;
		_eq_minfreq = _fclamp(0.0f, min, max);
		update_bin_groups(_eq_bin_groups, _eq_minfreq, max, _eqtablen, "EQ");
		return true;
	}
	return false;
}
예제 #3
0
bool SpectacleBase::set_freqrange(float min, float max)
{
	if (min != _minfreq || max != _maxfreq) {
		if (max == 0.0f)
			max = _nyquist;
		if (max < min)
			_fswap(&min, &max);
		if (max > _nyquist)
			max = _nyquist;
		_maxfreq = max;
		_minfreq = _fclamp(0.0f, min, max);
		update_bin_groups(_bin_groups, NULL, _minfreq, max, _control_table_size);
		return true;
	}
	return false;
}
예제 #4
0
파일: Spectacle.cpp 프로젝트: Angeldude/pd
// ------------------------------------------------------ set_delay_freqrange --
// Similar to set_freqrange in base class, but for _delay_bin_groups.
bool Spectacle::set_delay_freqrange(float min, float max)
{
	if (min != _delay_minfreq || max != _delay_maxfreq) {
		if (max == 0.0f)
			max = _nyquist;
		if (max < min)
			_fswap(&min, &max);
		if (max > _nyquist)
			max = _nyquist;
		_delay_maxfreq = max;
		_delay_minfreq = _fclamp(0.0f, min, max);
		update_bin_groups(_delay_bin_groups, _delay_binmap_table,
		                             _delay_minfreq, max, _delay_table_size);
		return true;
	}
	return false;
}