<p>sharing something I've been working on with Go on mobile:
<a href="http://i.imgur.com/M5Jj6hJ.png">http://i.imgur.com/M5Jj6hJ.png</a></p>
<p>This is a piano app. Four controls at the top turn on/off reverb and lowpass filters, a metronome, and a 4-measure 80 BPM record-and-loop.</p>
<p>The floating action button swaps between three different sounds: piano, wobble (connect phone to decent speakers), fancy-beats.</p>
<p>On tablet, phone-landscape, or desktop, there's an empty space to the right where I'm planning to add UI for designing your own sounds to play on the keyboard:
<a href="http://s23.postimg.org/hitbx5i3t/Screenshot_20160228_165851.png">http://s23.postimg.org/hitbx5i3t/Screenshot_20160228_165851.png</a></p>
<p>Graphic perfomance on a cheap phone (moto G 2nd gen) is crap at 20 fps. I intentionally took a naive approach in the pkg snd example to stress pkg material so that's something I'll be working on as well.</p>
<p>All in all, still pretty neat.</p>
<p>sources:</p>
<p><a href="https://github.com/dskinner/snd">https://github.com/dskinner/snd</a></p>
<p><a href="https://github.com/dskinner/material">https://github.com/dskinner/material</a></p>
<hr/>**评论:**<br/><br/>helinwang: <pre><p>mind explain what do you this the graphic bottleneck is? does not sound like a super complicated app. 20 fps is pretty low even on moto g i think.</p></pre>dasacc22: <pre><p>I haven't profiled it yet, but there's a lot of naiveness going on in that screenshot.</p>
<p>Every piano key for example is a material.Material type which means it has its own (same) geometry, it's own (same) shader program.</p>
<p>I considered perhaps the shadows implementation was at fault and disabled shadow rendering but only gained about 5-7 fps. Aside from material/simplex, most other functionality in material has been added rather adhoc so it appears time to go in and clean stuff up.</p>
<p>Then again, the slow down may be due to something completely unexpected and simple.</p></pre>