problem: deleting waves form middle of wave array
Posted: Sat Feb 08, 2014 11:36 am
I'm working on a sampler and I came across a problem regarding sample indexing. Let's say I have 7 samples loaded and couple of parameters (array-parameters - one value for each sample per parameter). If I want to delete value form end of an array, that's no problem. However when I want to delete sample somewhere form the middle, let's say sample at index 4. It is no problem with the parameter arrays to delete value at index 4 leaving only 6 values in the array. However that doesn't work for wave array - you can only clear the wave leaving empty wave at that index (so the array will still have 7 waves with the 4th being empty).
Is there a way around it?
Apparently, reloading the whole array every time I delete a wave is stupid idea. I was thinking of creating an integer array, that would hold indexes of the actual samples related to parameters. So when I delete the wave at index 4, the int array would say [0,1,2,3,5,6]. However I have problem achieving that. Can anyone help me?
Is there a way around it?
Apparently, reloading the whole array every time I delete a wave is stupid idea. I was thinking of creating an integer array, that would hold indexes of the actual samples related to parameters. So when I delete the wave at index 4, the int array would say [0,1,2,3,5,6]. However I have problem achieving that. Can anyone help me?