Re: ARRAY Search [RUBY] ??
Posted: Wed Aug 14, 2013 10:28 pm
trogluddite wrote:Keys to solving this, I think, are...
- Get all the information into a single data structure
- Test strings using regular expressions - they take some learning, but are super versatile.
Something like this...
Trog ... Thank-you ! I know you've been trying to take a little time off [at least from here]
What's interesting is looking at the code techniques you've used. I have been reading various Ruby forums [tutorials] and see all these things presented in your code. I'm a long way from understanding most of this.
I've been testing out the code you posted. I've gone in and substituted some of my intended integration via Inputs, and mod'd a bit on the variable names. This help me see some of the logic and syntax for what I'm needing to do.
I did find something confusing on the output. For my test, the outputs are showing as:
[["1", "test1"], ["2", "test2"], ["3", "test3"], ["4", "test4"]]
I'm trying to figure how to 'remove' all the brackets, quotes, & commas to just output a 'clean' Array list.
The destination for all the 'found' arrays are going to be fed into a 'pull-down' menu Selector. The idea is to parse an XML file into the 2 input arrays [patchnames, patchnumber]. From the search routine I can then more quickly organize these patches into a related sub-group. These groups will be fed to the pull-down menu, allowing the User to select a patch from the group.
The patchnames or mostly for display purposes. The patchnumbers are the actual MIDI PRGCHG values that I'll be using to control external VST plugs with.
This is all in effort to ease the User Configuration. Instead of the user manually entering in all the patch data.
It a concept I'm wanting to try to see if this would be better.