From the original SynthMaker forum (2004–2014), with its members’ names and dates.
exonerate ·
for the project i'm currently working on i really need to be able to resize the string array component. and also delete entries, i can delete them by inserting a blank string into the index but then i am left with a space on my drop list. and also i'm relying on the ''no of entries output'' on the string array to change the size of a wave array.
so what i need is a resize trigger input on the string array, and also an 'N' input to set the size of the array. or even just a resize trigger so when you have an empty slot and trigger the resize it would move all the entries below the space up removing the space alltogether. and then the 'no of entries output' would be one less.
regarding the 'N' input you could make this optional so if you don't want to set a size it would just behave as it does now.
i've been trying for the last six hours now to create a string array that can be resized to the number of used slots. but it's just not possible when using the current array.
i'm thinking now that the only way to do this would be with the parser components, but i really haven't got a clue how your supposed to use them.
if anyone knows of a workaround i would be more than grateful 🙂
cheers 🙂
infuzion ·
I've done similar stuff using the String Array (loader), String Array Get At, & Int Loop with some comparison math, etc. But it is slow if you have an array larger than say 50 items. The newer String Array Split could help out here.
oddson ·
I have a string to stringArray module that makes each line of a text string an array element in a string array. Then it's easy to manipulate string array items using the String Array Split component.
removeLineItem.osm
exonerate ·
thanks guys 🙂
but i've already tried using the split component, and yes it works by removing the selected index, but i can't figure out what i need to do with it once i have it removed, because i then need to replace the original string array with the with the new one so that the original array has less entries.
so basicly what i need to happen is that you can select an entry to delete from a drop list and then that deletes the entry from the original array, there seem to be no way to trigger the split it just does it, i need the array to stay the same until you select an entry to delete from a drop list.
this is what i'm struggling with i can remove the entry but i can't delete it on a trigger.
you can check out my project if you want to get a better understanding of what i mean.
http://www.box.net/shared/4vfnuufoq2
it's called super looper......naff name i know 😉
i've only put one sample in so hopefully it won't take to long to download.
basicly it just a simple looping device, that use's a wave array that dynamicly resizes every time you load a new sample in and then the name of the sample gets added to a string array which is then passed to a drop list , so the drop list updates with each new sample.
i can load in as many samples as i want it's basicly unlimited, i can also delete all the waves with one click.
but i want to add another drop list so you can select a wave file to delete, and then it would remove the entry from the 'select' drop list and then delete the entry from the wave array.
any advice on how to 'trigger' the delete entry and then replace the original would be much appreciated
🙂
cheers 😉
oddson ·
exonerate wrote: ...basicly what i need to happen is that you can select an entry to delete from a drop list and then that deletes the entry from the original array, there seem to be no way to trigger the split it just does it...
You should be able to use something like this.
Why don't you add a 'delete selected wave' button instead of a delete dropdown?
exonerate ·
okay thanks oddson 🙂 i'll run with that and see what i can do.
Why don't you add a 'delete selected wave' button instead of a delete dropdown?
ah yes make more sense that way and saves having to have two drop downs
cheers mate 🙂
infuzion ·
oddson wrote: I have a string to stringArray module that makes each line of a text string an array element in a string array. Then it's easy to manipulate string array items using the String Array Split component.
removeLineItem.osm
This works great Oddson! Very simple inside also.
Tip: In your example, SM doesn't need your String to String Array translator anymore; SM will automatically translate back & forth if the String is return-delimited. Your code is great if it is something like comma-delimited though!
oddson ·
infuzion wrote: ...Tip: In your example, SM doesn't need your String to String Array translator anymore; SM will automatically translate back & forth if the String is return-delimited. Your code is great if it is something like comma-delimited though!
This doesn't seem to be the case again... I was trying to read a text string with return delimiters as an array of strings and it doesn't seem to work again (but either does the String to String Array translator in the above post).
infuzion ·
oddson wrote:
infuzion wrote: ...Tip: In your example, SM doesn't need your String to String Array translator anymore; SM will automatically translate back & forth if the String is return-delimited. Your code is great if it is something like comma-delimited though!
This doesn't seem to be the case again... I was trying to read a text string with return delimiters as an array of strings and it doesn't seem to work again (but either does the String to String Array translator in the above post).
Could be a reportable bug; might be best to post an OSM for others to look at before.
Wrote something here? To have a post removed or your name hidden, write to [email protected].