Hi Folks,<div><br></div><div>I downloaded the project in question and tried it on my iPad. Indeed, it doesn&#39;t run very well at all. I modified the callback so it was filling only 1/10 of every buffer (just so I could get the thing running and try to profile it). Attached is a screen shot of a profile I made with instruments. Most of the time is being spent in Hevy:Metl::tick and FileLoop::tick. I&#39;d think that if there was a bottleneck in one of the stl classes, it would show up here.</div>
<div><br></div><div>I&#39;ve experienced MUCH better performance on iOS by using generator::tick(StkFrames &amp;frames), rather than  generator::tick(), and am slowly moving all of my code to use the buffer-at-a-time, rather than sample-at-a-time approach. Hevy:Metl::tick  looks fairly computationally intense to me on its own, and it&#39;s chock full of calls to member objects&#39; tick methods. Looks to me like it&#39;s simply too expensive, especially with sample-at-a-time calculation.</div>
<div><br></div><div>-m-<br><br><div class="gmail_quote">On Mon, Sep 17, 2012 at 9:56 AM, Gary Scavone <span dir="ltr">&lt;<a href="mailto:gary@ccrma.stanford.edu" target="_blank">gary@ccrma.stanford.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Patrick,<br>
<br>
I think we need to find a profiler that can tell us where the bottleneck is with the FM classes.  The tricky issue might be that the problem doesn&#39;t show up using the simulator (according to Rumi), so we might then then have to revert to a trial-and-error approach.  The first think to try would be replacing the vectors of pointers with a simple array of pointers (in FM.h).<br>

<br>
Regards,<br>
<br>
--gary<br>
<div class="HOEnZb"><div class="h5"><br>
On 2012-09-17, at 12:35 AM, &quot;Patrick J. Collins&quot; &lt;<a href="mailto:patrick@collinatorstudios.com">patrick@collinatorstudios.com</a>&gt; wrote:<br>
<br>
&gt;&gt; Try Voicer with a simple synth like Simple or Plucked and I think you&#39;ll see that it works<br>
&gt;&gt; great.<br>
&gt;<br>
&gt; Wow, you are right..  Polyphony works fine in my game as soon as I<br>
&gt; switched to Simple and Plucked...<br>
&gt;<br>
&gt; That is a huge shame because I really, really, really wanted to feature<br>
&gt; FM synthesis as the &quot;sound&quot; for my app.<br>
&gt;<br>
&gt;&gt; Interesting.  HevyMetl is an FM class, which should not burden the CPU<br>
&gt;&gt; in any way.  There must be something happening in the FM class that<br>
&gt;&gt; doesn&#39;t work well in iOS … perhaps the use of the c++ vector class to<br>
&gt;&gt; hold the ADSR and FileLoop pointers?<br>
&gt;<br>
&gt; Gary, since you don&#39;t have an iPad, is there any chance you&#39;d be up for<br>
&gt; doing some pairing on my system sometime via screen sharing software<br>
&gt; like TeamViewer to try to get to the bottom of this?<br>
&gt;<br>
&gt; Thanks.<br>
&gt;<br>
&gt; Patrick J. Collins<br>
&gt; <a href="http://collinatorstudios.com" target="_blank">http://collinatorstudios.com</a><br>
<br>
<br>
</div></div><div class="HOEnZb"><div class="h5">_______________________________________________<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><br clear="all"><div><br></div>-- <br><div><font size="1" color="#999999">===============</font></div><div><font size="1" color="#999999">Morgan Packard</font></div><div><font size="1" color="#999999">cell: (720) 891-0122</font></div>
<div><font size="1" color="#999999">aim: mpackardatwork</font></div><div><font size="1" color="#999999">twitter: @morganpackard</font></div><br>
</div>