[Stk] problems implementing polyphony...

Patrick J. Collins patrick at collinatorstudios.com
Fri Sep 14 00:23:52 PDT 2012


On Thu, 13 Sep 2012, Gary Scavone wrote:
> From a quick glance, the basic approach you are using seems fine.  Why
> don't you step through the code (particularly when you call a NoteOn)
> to see what is happening?  Maybe there's a bug somewhere in there.

Hi Gary, thanks for the reply...

Well, I've been at it for many hours, and am beyond frustrated-- just
getting no where...

I've stepped through the entire process of playing a 2nd note, and it
really makes no sense..  It seems like I can step through the code fine,
it eventually returns back to my game code, but-- if I just attempt to
play two tones at once, both my iPad and XCode completely freeze up, and
I have to reboot my iPad, and force quit xcode.  If I call
voicer->silence() prior to noteOn, everything is fine.. It's just as
soon as I try to play two notes simultanouesly, everything dies.

To do further testing (and to further confuse myself), I created a brand
new project with just MoMu and STK...  I made a simple audio class
that creates two instruments and assigns them to a voicer..  Then
attempts to play two tones.

So, when I first ran it on my iPad, I heard one tone...  The upper tone
of the two..  However, after the tone sounded for a few seconds, it
began to turn into white noise...  Eventually crashed.  After I rebooted
my iPad, and quit/relaunched XCode-- I tried running it again and got NO
SOUND.  If I run the app now, I will hear a crackle, a click, a pop
every few seconds.. but I get no tone what-so-ever...  I rebooted my
computer..  and the iPad again..  Same thing.. no tone..  Nothing drives
me more crazy than illogical inconsistencies!

Strangely, if I run the app with the iOS simulator, I hear the two
tones.

The only thing I can think of is that the simulator is running 5.1, and
my iPad is on 4.3...

Anyway, I uploaded my test app so if you happen to have XCode and an iOS
device, please let me know if you see anything that could possibly
result in this bizarre nonsense.

http://collinatorstudios.com/polyphonyHell.zip

Thanks.

Patrick J. Collins
http://collinatorstudios.com



More information about the Stk mailing list