Ejemplo n.º 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
					;
			}
Ejemplo n.º 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;
			}
Ejemplo n.º 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
					;
			}
Ejemplo n.º 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
					;
			}
Ejemplo n.º 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;
			}
Ejemplo n.º 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);
			}
Ejemplo n.º 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
					;
			}