diff dsp/synth/@sine/block_sr.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 diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dsp/synth/@sine/block_sr.m	Sun Jan 20 19:05:05 2013 +0000
@@ -0,0 +1,7 @@
+function [y,phi]=block(o,phi,f)
+% block_sr - generate sine wave
+
+u=cumsum([phi,f],2);
+y=sin(2*pi*u(1:end-1));
+phi=mod(u(end),1);
+