[Stk] Sequencing with the STK

Carlos Viejo carlos.viejo.muros at googlemail.com
Mon Sep 20 03:41:32 PDT 2010


hi Stephen,

i considered using stk::Instrmnt but i wanted Effects and Filters to be
treated as pluggable nodes too (and also this new tick based sequencer
object). The custom class has also some logic for mapping midi input to
relevant node parameters dynamically.

By the way, (in case anyone is interested) the integration with
openFrameworks is fairly easy as it uses RtAudio for the sound output. The
"audioRequested" callback is a simpler extension of the RtAudioCallback.
This opens a lot of possibilities for the STK what controlling, visualizing
and integration with other technologies goes.

Best,
Carlos


On Mon, Sep 20, 2010 at 1:47 AM, Stephen Sinclair
<sinclair at music.mcgill.ca>wrote:

> On Sun, Sep 19, 2010 at 2:02 PM, Morgan Packard
> <morgan at morganpackard.com> wrote:
> > Thanks Steve,
> > I'll admit, much of this is over my head. But my head is rising, bit by
> bit.
> > My interest in STK is mainly for iPhone development. So speed is
> definitely
> > important! I'm looking for a set of low-level components that are
> designed
> > to be easily pluggable, and as efficient as possible. I realize that's
> not
>
> What I'm not clear on yet is whether you want them "pluggable"
> components to be connected at compile time or at run time?
>
> If the latter, there's no logical way to get this inlining
> optimization anyways, so I wouldn't worry about it.
> Carlos's example in his post of having a set of classes with tick()
> virtual functions is a good explanation of how to go about this.
> (However, his AudioNode class actually sounds a lot like the
> definition of stk::Instrmnt anyways, but perhaps generalized for his
> particular requirements.)
>
> To make things clear, here's how to feed a sinusoid into a reverb:
>
> at initialization:
> SineWave *sw = new SineWav();
> JCRev *rev = new JCRev();
>
> in the audio callback, assuming pSample points to the first item in a
> one-channel sample buffer of length n:
>
> for (i=0; i<n; i++) {
>   *pSample++ = rev->tick( sw->tick() );
> }
>
> On the other hand, if you wanted this graph to change at run-time,
> then, say that  'rev' and 'sw' would be pointers to some class with a
> tick() virtual function, as Carlos explained, and a next() function to
> iterate the list, and then you'd do:
>
> for (i=0; i<n; i++) {
>  StkFloat f = 0;
>  obj = firstObject;
>  while (obj) {
>      f = obj->tick(f);
>      obj = obj->next();
>  }
>  *pSample++ = f
> }
>
> Steve
>
> _______________________________________________
> Stk mailing list
> Stk at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/stk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ccrma-mail.stanford.edu/pipermail/stk/attachments/20100920/71bbac9c/attachment.html 


More information about the Stk mailing list