[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-dev] behaviour of calculating first sample of output
There are two reasons:
Many UGens need to know the initial values of their inputs in order to
initialize themselves without some strange behavior (e.g. an undesired
sweep from zero) at the beginning of a sound. The Ctor calculates an
initial value so that downstream ugens can initialize with some
knowledge of what their inputs will be.
k-rate signals need to be linearly interpolated to a-rate in inner
loops to prevent glitching. In order to interpolate you need a
starting and an ending value. The value calculated in the Ctor serves
as the starting value, then each block after that, the k-rate ugen
calculates the ending value for that block.
On 12/27/06, Andrew Beck <abeck99@xxxxxxxxx> wrote:
When writing a plugin for SC in C, what is the purpose of generating a
single sample during the Ctor phase? Does this sample actually become
output and if so where is it placed in terms of the block size?
Sorry if this has been asked before - I did a brief look and couldnt find
sc-dev mailing list
--- james mccartney