Mercurial > hg > ishara
view dsp/synth/@square/block.m @ 34:c75bb62b90a9
Imported audio synthesis tools.
author | samer |
---|---|
date | Sun, 20 Jan 2013 19:05:05 +0000 |
parents | |
children |
line wrap: on
line source
function [y,phi]=block(o,phi,n,duty,f) % block - generate square wave t=ceil(1/f); y=mod(phi+(0:n-1)/t,1)<duty; phi=mod(phi+n/t,1);