diff --git a/cwVectOps.h b/cwVectOps.h index c132838..043c67a 100644 --- a/cwVectOps.h +++ b/cwVectOps.h @@ -249,6 +249,38 @@ namespace cw y[i] = v; } + template< typename T > + T seq( T* dbp, unsigned dn, const T& beg, const T& incr ) + { + const T* dep = dbp + dn; + unsigned i = 0; + for(; dbp + unsigned phasor( T* y, unsigned n, T srate, T hz, unsigned init_idx=0 ) + { + for(unsigned i=init_idx; i + unsigned sine( T* y, unsigned n, T srate, T hz, unsigned init_idx=0 ) + { + init_idx = phasor(y,n,srate,hz,init_idx); + + for(unsigned i=0; i