[Stk] Using filters in non-reatime

Perry R Cook prc at CS.Princeton.EDU
Wed, 3 Oct 2007 19:19:36 -0400 (EDT)


Nick,

Just make a filter of your liking, set
the parameters however you like, and
tick it with the output of your generator:

     pcmdata[i] = A * nicks_filter.tick(generator.tick());

The argument to the filter tick is the input, and
the return value is the output.

PRC

On Wed, 3 Oct 2007, pravoe@gmail.com wrote:

> Hello there, I'm developing an OpenAL application using STK to generate and
> process my data, but I'm having trouble figuring out how to apply a filter.
> Take the following piece of code for example, using a generator to fill an
> array of pcm data.
>
> for(int time=0; time<length; time+=1)
>        pcmdata[i] = A * generator.tick();
>
> For arguements sake, lets say this data is sometimes supplied by an external
> PCM file, so I'm not always going to be using a generator.
>
> My question is would it be possible to apply say a 1-pole lp filter to this
> data?
>
> - Mick
>