ADDSYN

From STX Wiki
Jump to navigationJump to search

ADDSYN - additive synthesis

Usage:

ADDSYN sr l f a p nc df da

Inputs:
sr sampling rate in Hz
l length of output buffer (number of samples / evaluation cycle)
f frequency in Hz
amp amplitude(s) (linear)
p phase (initial phase settings)
nc number of components
df frequency/ies increment in Hz
da magnitude factor
Outputs:
y number (l=1) or vector (l>1), synthesized signal
Function:

This atom using additive synthesis of sine waves to generate a signal. The signal of sampling rate sr is stored in the output y. The inputs (except p and nc) are updated at the beginning of each evaluation cycle to allow modulations. For the additive synthesis the following formula is used:

1200.png

with:

Number of components (3067.png):
f and amp are numbers 3067.png is set to value of input nc (>0)
f is a number, amp is a vector 3067.png is set length of amp
f is a vector, amp is a number 3068.png is set length of f
Component frequencies (3069.png):
f is a number 3070.png = f + i.df
f is a vector 3071.png = f[i]
Component amplitudes (ai):
amp is a number ai = amp.dai
amp is a vector ai = amp[i]
Initial phases of components (ji):
p is a number ji = p
p is a vector ji = p[i]
p is a string: p=SIN ji = 0
p=COS ji = p / 2
p=SINCOS ji = 0 if i is even and p/2 otherwise
p=COSSIN ji = p/2 if i is even and 0 otherwise

Navigation menu

Personal tools