Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

problem: deleting waves form middle of wave array

For general discussion related FlowStone

problem: deleting waves form middle of wave array

Postby KG_is_back » 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?
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: problem: deleting waves form middle of wave array

Postby Nubeat7 » Sat Feb 08, 2014 11:57 am

delete_if in ruby should do it..
Attachments
delete_if.fsm
(368 Bytes) Downloaded 707 times
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: problem: deleting waves form middle of wave array

Postby KG_is_back » Sun Feb 09, 2014 8:02 pm

That is not what I was looking for - this can easily be done in intArray primitive. I'm trying to do this relative to wave array, so the IntArray will hold indexes of where that particular sample is in the wave array. I have problem adding new "sample" to new slot in wave array while adding index of that wave to the new value in int Array.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: problem: deleting waves form middle of wave array

Postby KG_is_back » Sun Feb 09, 2014 8:10 pm

Actually I was thinking of using ruby to pack the wave index, velocity and key rages and couple of other parameters as a ruby array and create an array of arrays for the samples and all to them related data. However my ruby skills are quite low, so I might need help with that.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: problem: deleting waves form middle of wave array

Postby stw » Mon Feb 10, 2014 10:20 am

Did you already try the SetArray prim form the R&D components for reindexing?
stw
 
Posts: 111
Joined: Tue Jul 13, 2010 11:09 am

Re: problem: deleting waves form middle of wave array

Postby KG_is_back » Mon Feb 10, 2014 10:58 am

Thats not actually a bad idea! copy the last wave onto the place of the deleted and then resize array. Saves place! Reindexing full array would probably be on overshot.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia


Return to General

Who is online

Users browsing this forum: No registered users and 38 guests