[Stk] problems implementing polyphony...
Tristan Matthews
le.businessman at gmail.com
Tue Sep 18 07:39:25 PDT 2012
2012/9/17 Rumi Humphrey <rumi at refresh.vu>:
> I think you can get your (modified for momu) FM class to compile if you
> comment out this line in FM.h:
>
> virtual StkFrames& tick( StkFrames& frames, unsigned int channel = 0 ) = 0;
>
> I'm not exactly sure why that is or how to use tick with frames i think the
> MoMu version of STK might implement it differently or something.
>
> Unfortunately though doing this and using arrays instead of vectors didn't
> seem to help performance that much at least not on my ipod touch. I'm still
> only able to get one voice to play using HevyMetl.
How does your hardware handle denormal floats? The FM class contains a
TwoZero filter,
which I believe can lead to denormals. You could try adding a small DC
offset the samples
before they are input to the TwoZero filter.
This article has some background, as well as how to test denormal
computation on your hardware:
http://stackoverflow.com/questions/9350810/denormalized-floating-point-in-objective-c
The only other thing I might try is changing StkFloat from double to float.
Best,
Tristan
>
> On Sep 17, 2012, at 7:27 PM, Patrick J. Collins wrote:
>
> Hmmm.. So after I put replaced the FM files with those two that you
> provided, building failed first because of:
> #include "SKINI.msg"
>
> Claiming that file was not found... I changed it to what it was
> previously:
>
> #include "Skini_msg.h"
>
> Then the .cp failed with:
> if ( nOperators_ == 0 ) {
> oStream_ << "FM::FM: Number of operators must be greater than
> zero!";
> handleError( StkError::FUNCTION_ARGUMENT );
> }
>
> Saying "use of undeclared identifier oStream_"... So I changed that to
> errorString_ as it was before...
>
> Then finally after doing that, the build fails at a point in my own code
> where I am doing:
>
> // in my .h:
> HevyMetl *instrument[4];
>
> // in my .mm:
> voicer = new Voicer();
> instrument[0] = new HevyMetl();
> instrument[1] = new HevyMetl();
> voicer->addInstrument(instrument[0]);
> voicer->addInstrument(instrument[1]);
> voicer->silence();
>
> ... It's failing at "new HevyMetl()" saying "Allocating an object of
> abstract class type 'HevyMetl'"...
>
> Patrick J. Collins
> http://collinatorstudios.com
>
> _______________________________________________
> Stk mailing list
> Stk at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/stk
>
>
>
> _______________________________________________
> Stk mailing list
> Stk at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/stk
>
--
Tristan Matthews
web: http://tristanswork.blogspot.com
More information about the Stk
mailing list