view dsp/synth/osc.m @ 47:82075c94eed1

adding a bunch of stuff, including graphics and pitch toolboxes.
author samer
date Sat, 17 Jan 2015 15:20:35 +0000
parents c75bb62b90a9
children
line wrap: on
line source
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);