view dsp/synth/@sine/block.m @ 34:c75bb62b90a9

Imported audio synthesis tools.
author samer
date Sun, 20 Jan 2013 19:05:05 +0000
parents
children ae596261e75f
line wrap: on
line source
function [y,phi]=block(o,phi,n,f)
% block - generate sine wave

w=2*pi*f;
y=sin(2*pi*phi + w*(0:n-1));
phi=mod(phi+f*n,1);