[Stk] How can you have a large amount of polyphony with STK?

Patrick J. Collins patrick at collinatorstudios.com
Tue Sep 8 19:31:47 PDT 2015


> I suggest giving it a shot yourself.  It shouldn’t be too hard to
> figure out.  I have too many things going on with the start of the
> academic year and I doubt I will have a chance to look at it until at
> least October.

I am happy to do this, but I want to make sure the work I do is in
alignment with your choices for design, etc.  I would hate to spend time
on this to find that it's done in a way that goes against your goals of
the library.  I have very little context on the approach taken to build
these components.

Off the top of my head, an approach I would go with to solve this
problem would be to give the Voicer an internal hash object which can
store filenames as keys and the corresponding stkFrames array as its
value, in otherwords, preload all the frames of the wave file into
memory.

Then when an FM Instrument is added to the voicer, it would instantiate
a simple object which would have stkFrames and tick().  So the FM
instrument would use this instead of the FileLoop object, but tick()
would allow it to conform to the same interface.

The goal of this design is so that a wave file will only ever be read
from disk once, everything else after that would be completely in
memory.

....

That's off the top of my head how I would solve this problem, but again,
I have no idea if this sort of thing would go against the design
patterns of the project, and I don't want to spend time on something
that would not be well received.

Please give me your feedback.

Patrick J. Collins
http://collinatorstudios.com


More information about the Stk mailing list