hi Stephen,<div><br></div><div>i considered using <span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">stk::Instrmnt but i wanted Effects and Filters to be treated as pluggable nodes too </span><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">(and also this new tick based sequencer object)</span><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">. The custom class has </span><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">also </span><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">some logic for mapping midi input to relevant node parameters dynamically.<br>
<br>By the way, (in case anyone is interested) the integration with openFrameworks is fairly easy as it uses RtAudio for the sound output. The &quot;audioRequested&quot; 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.<br>
<br>Best,</span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">Carlos<br><br></span></div><div><br><div class="gmail_quote">On Mon, Sep 20, 2010 at 1:47 AM, Stephen Sinclair <span dir="ltr">&lt;<a href="mailto:sinclair@music.mcgill.ca">sinclair@music.mcgill.ca</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Sun, Sep 19, 2010 at 2:02 PM, Morgan Packard<br>
&lt;<a href="mailto:morgan@morganpackard.com">morgan@morganpackard.com</a>&gt; wrote:<br>
&gt; Thanks Steve,<br>
&gt; I&#39;ll admit, much of this is over my head. But my head is rising, bit by bit.<br>
&gt; My interest in STK is mainly for iPhone development. So speed is definitely<br>
&gt; important! I&#39;m looking for a set of low-level components that are designed<br>
&gt; to be easily pluggable, and as efficient as possible. I realize that&#39;s not<br>
<br>
</div>What I&#39;m not clear on yet is whether you want them &quot;pluggable&quot;<br>
components to be connected at compile time or at run time?<br>
<br>
If the latter, there&#39;s no logical way to get this inlining<br>
optimization anyways, so I wouldn&#39;t worry about it.<br>
Carlos&#39;s example in his post of having a set of classes with tick()<br>
virtual functions is a good explanation of how to go about this.<br>
(However, his AudioNode class actually sounds a lot like the<br>
definition of stk::Instrmnt anyways, but perhaps generalized for his<br>
particular requirements.)<br>
<br>
To make things clear, here&#39;s how to feed a sinusoid into a reverb:<br>
<br>
at initialization:<br>
SineWave *sw = new SineWav();<br>
JCRev *rev = new JCRev();<br>
<br>
in the audio callback, assuming pSample points to the first item in a<br>
one-channel sample buffer of length n:<br>
<br>
for (i=0; i&lt;n; i++) {<br>
   *pSample++ = rev-&gt;tick( sw-&gt;tick() );<br>
}<br>
<br>
On the other hand, if you wanted this graph to change at run-time,<br>
then, say that  &#39;rev&#39; and &#39;sw&#39; would be pointers to some class with a<br>
tick() virtual function, as Carlos explained, and a next() function to<br>
iterate the list, and then you&#39;d do:<br>
<br>
for (i=0; i&lt;n; i++) {<br>
  StkFloat f = 0;<br>
  obj = firstObject;<br>
  while (obj) {<br>
      f = obj-&gt;tick(f);<br>
      obj = obj-&gt;next();<br>
  }<br>
  *pSample++ = f<br>
<div><div></div><div class="h5">}<br>
<br>
Steve<br>
<br>
_______________________________________________<br>
Stk mailing list<br>
<a href="mailto:Stk@ccrma.stanford.edu">Stk@ccrma.stanford.edu</a><br>
<a href="http://ccrma-mail.stanford.edu/mailman/listinfo/stk" target="_blank">http://ccrma-mail.stanford.edu/mailman/listinfo/stk</a><br>
</div></div></blockquote></div><br></div>