Mercurial > hg > ishara
diff dsp/synth/osc.m @ 34:c75bb62b90a9
Imported audio synthesis tools.
author | samer |
---|---|
date | Sun, 20 Jan 2013 19:05:05 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dsp/synth/osc.m Sun Jan 20 19:05:05 2013 +0000 @@ -0,0 +1,13 @@ +function [y,phi]=osc(f,phi0) +% osc - sequence of oscillator output +% +% osc :: seq [[N]] ~'persample normalised frequencies' -> seq [[N]] ~'sinusoidal data'. +% +% osc :: +% seq([[N]]) ~'persample normalised frequencies', +% real ~'initial phase' +% -> seq([[N]]) ~'sinusoidal data', +% seq([[N]]) ~'phase data'. + +if nargin<2, phi0=zeros(size(f,1),1); end +y=srdata(sine,phi0,f);