Mercurial > hg > ishara
annotate dsp/synth/harmsynth.m @ 34:c75bb62b90a9
Imported audio synthesis tools.
author | samer |
---|---|
date | Sun, 20 Jan 2013 19:05:05 +0000 |
parents | |
children |
rev | line source |
---|---|
samer@34 | 1 function y=harmsynth(N,A,F0,phi) |
samer@34 | 2 % harmsynth - Additive synthesis with harmonic frequencies |
samer@34 | 3 % |
samer@34 | 4 % harmsynth :: |
samer@34 | 5 % N:natural ~'size of buffers to produce', |
samer@34 | 6 % seq([[K]]) ~'sequence of amplitudes for each component', |
samer@34 | 7 % seq(nonneg) ~'sequence of fundamental frequencies', |
samer@34 | 8 % [[K]] ~'initial phases' |
samer@34 | 9 % -> seq([[1,N]]) ~'sum of components'. |
samer@34 | 10 % |
samer@34 | 11 % Note: the number of components must remain constant |
samer@34 | 12 |
samer@34 | 13 y=addsynth(N,A,F0*(1:size(A,1))',phi); |