Пример #1
0
			SPROUT_CONSTEXPR typename std::iterator_traits<Outdirected>::value_type
			calc_2(Outdirected const& x, typename Outdirected::index_type m, value_type const& delta) const {
				return m >= 0 && (m + 1 < x.base().get() || x.base().get() < 0)
					? delta * x[m + 1 - x.index()] + (1 - delta) * x[m - x.index()]
					: 0
					;
			}
Пример #2
0
			SPROUT_CONSTEXPR typename std::enable_if<
				!Left,
				typename std::iterator_traits<Outdirected>::value_type
			>::type
			calc(Outdirected const& x) const {
				return (1 + depth_ * sprout::sin(sprout::math::two_pi<Value>() * rate_ * x.index() / samples_per_sec_ + sprout::math::pi<Value>())) * *x;
			}
Пример #3
0
			SPROUT_CONSTEXPR typename std::iterator_traits<Outdirected>::value_type
			calc(Outdirected const& x, std::size_t i = 1) const {
				return i <= repeat_
					? calc_1(x, i, static_cast<typename Outdirected::index_type>(x.index() - i * delay_ * samples_per_sec_)) + calc(x, i + 1)
					: 0
					;
			}
Пример #4
0
			SPROUT_CONSTEXPR typename std::enable_if<
				!Left,
				typename std::iterator_traits<Outdirected>::value_type
			>::type
			calc(Outdirected const& x) const {
				return x.index() + d_ >= 0 ? *x - x[d_]
					: 0
					;
			}
Пример #5
0
			SPROUT_CONSTEXPR typename std::iterator_traits<Outdirected>::value_type
			operator()(Outdirected const& x) const {
				return (1 + depth_ * sprout::math::sin(sprout::math::two_pi<Value>() * rate_ * x.index() / samples_per_sec_)) * *x;
			}
Пример #6
0
			SPROUT_CONSTEXPR typename std::iterator_traits<Outdirected>::value_type
			calc(Outdirected const& x, value_type const& tau) const {
				return calc_1(x, tau, x.index() - tau);
			}
Пример #7
0
			SPROUT_CONSTEXPR typename std::iterator_traits<Outdirected>::value_type
			calc_1(Outdirected const& x, std::size_t i, typename Outdirected::index_type m) const {
				return m >= 0 ? sprout::math::pow(attenuation_, i) * x[m - x.index()]
					: 0
					;
			}