[Stk] Implementing Drummer instrument class?

Rumi Humphrey rumi at refresh.vu
Sat May 28 13:25:00 PDT 2011


Hi All,

First off since is my first post on this list I'd like to say thanks very much for the STK and related libraries and for this list, I"m really excited to be using STK for my music and sound projects. 

I'm not the most experienced coder so please excuse me is this a dumb question, I was wondering if anyone was/is using the Drummer class? I've been messing with it a bit and it doesn't seem to make any sounds for me unless I manually increment the number of voices. I think there may be a bug in the noteOn method although it is probably my misunderstanding or poor implementation. It appears to me that the nSounding_ variable that tracks the voice number is never getting incremented initially. In the noteOn method I don't see where nSounding_ gets incremented initially, and when I manually increment it initially I get sound whereas before I don't get any sound when calling noteOn.

Has anyone experienced anything like this or had any experience using the Drummer class?

I'm using STK on iOS using the MoMu toolkit for the Core Audio Render_IO handling. I have gotten numerous instruments working and have messed with the Voicer class successfully. Again if I set nSounding_ to 1 initially I get sound at least after the second call of the method. If I leave it as is the nSounding_ never gets beyond 0 despite numerous calls to noteOn. I know the noteOn method is getting called and that the sample source is being set correctly. It's just not sounding unless I say init the nSounding_ variable at 1. wheras it should start at 0.

I'd like to use the polyphony in this class rather than use the Voicer class if possible.

Any help is most appreciated.

Thanks,
rumi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ccrma-mail.stanford.edu/pipermail/stk/attachments/20110528/dba015b1/attachment.html 


More information about the Stk mailing list