adsynt2
Prev | Orchestra Opcodes and Operators | Next

## adsynt2

adsynt2 — Performs additive synthesis with an arbitrary number of partials -not necessarily harmonic- with interpolation.

## Description

Performs additive synthesis with an arbitrary number of partials, not necessarily harmonic. (see adsynt for detailed manual)

## Syntax

    ar adsynt2 kamp, kcps, iwfn, ifreqfn, iampfn, icnt [, iphs]

## Initialization

iwfn -- table containing a waveform, usually a sine. Table values are not interpolated for performance reasons, so larger tables provide better quality.

ifreqfn -- table containing frequency values for each partial. ifreqfn may contain beginning frequency values for each partial, but is usually used for generating parameters at runtime with tablew. Frequencies must be relative to kcps. Size must be at least icnt.

iampfn -- table containing amplitude values for each partial. iampfn may contain beginning amplitude values for each partial, but is usually used for generating parameters at runtime with tablew. Amplitudes must be relative to kamp. Size must be at least icnt.

icnt -- number of partials to be generated

iphs -- initial phase of each oscillator, if iphs = -1, initialization is skipped. If iphs > 1, all phases will be initialized with a random value.

## Performance

kamp -- amplitude of note

kcps -- base frequency of note. Partial frequencies will be relative to kcps.

Frequency and amplitude of each partial is given in the two tables provided. The purpose of this opcode is to have an instrument generate synthesis parameters at k-rate and write them to global parameter tables with the tablew opcode.

adsynt2 is identical to adsynt (by Peter Neubäcker), except it provides linear interpolation for amplitude envelopes of each partial. It is a bit slower than adsynt, but interpolation higly improves sound quality in fast amplitude envelope transients when kr < sr (i.e. when ksmps > 1). No interpolation is provided for pitch envelopes, since in this case sound quality degradation is not so evident even with high values of ksmps. It is not recommended when kr=sr, in this case adsynt is better (since it is faster).

## Credits

Written by Gabriel Maldonado.

New in Csound 5 (Previously available only on CsoundAV)

Prev | Up | Next
adsynt | Home | aexprand