Playlist object that loads from dir and plays polyphonic
Hi,
I'm a total newbie and I'm trying to design a small instrument that has a polyphonic sample midi functionality to be used as a backend for a certain application.
I want it to be able to do the following:
- load samples from a directory in sorted order
- given an input message i, T, trigger a sample of id i and play it for a duration T (T is a factor of bpm and should be always capped to the max sample size) - polyphonic because in the sense that if id_t = a starts now I don't want it be interrupted if id_{t+1} = b starts on the next beat (and sample hasn't finished yet) - all this with a != b (otherwise it's ok to retrigger - exactly like a polyphonic sampler.)
This seems an easy thing to do if I was coding it python but I have no idea how to do it in max :(
Can someone help?
Thanks!