I guess I could do something like that .. except it's not ideal.
The thing is : I want to have a controller button to randomize (i.e : for the currently pressed note) both the sample and the start position.
For the full idea : the randomizer would pick any samples above some specified high note . For example, C6 and above would each have a single loaded .wavs (which I would not use directly) , and the randomizer would 'copy' any from those onto the currently pressed key and randomize the start position. The goal is to end up with only samples I like , and I'm not assuming all samples from the same .wav would be contiguous on the keyboard.
Unless... I add the API calls to 'clone and randomize' sounds, and end up with multiple different ModulatorSampleSound instances having the same filename. Would this duplicate the memory used by each instance ? . Then the only issue would be the duplicates in the table map, which I can live with.