Let’s say someone has done a really complex and convoluted script which runs a gui and everything. Let’s say you like one function in the tool, but have no need for the gui, but the tool also does a second thing. How would one go about stripping down a tool to it’s constituent parts in that way that one would be able to only utilize certain functions of it.
I have two examples, but I’m hoping that the first one will be less impossible to do. (Won’t mention the second tool if this thread doesn’t take off)
First example:dBlue’s pattern resizer.
It’s an amazing, GUI based, very complex and very useful method for, for instance, altering all the notes, notedelays, velocities, effect columns of one pattern from 32 to 33 rows, for instance. It can also be used in a rather simpler fashion, which is to go from 32 rows to 64 rows, or from 256 rows to 128 rows (i.e. *2 and *0.5).
I don’t really know what took me so long after dBlue recommended it ages ago that I should just modify the script to give it keyboard shortcuts that do the *2 and *0.5 (Expand and Shrink in the Adv. Edit Parameters). Anyway, after stupidly moaning about it, once again, on IRC, this time to the displeasure of one Conner_BW, I decided to check it out yet again, and this time managed to simplify the script so that one of it’s core functions is called via keyboard shortcuts. That’s yet one step closer to being able to use Adv. Edit Paramets from the keyboard shortcuts. But, dBlue’s script still does what it’s supposed to do, i.e., actually Resize the Pattern ( hence the PatternResizer name, I suppose ). Try as I might, I’m simply not capable of extracting one core function out of the script, without it just starting to shoot errors.
(What I’m after is destructive *2 (Expand) and *0.5 (Shrink) without the pattern actually getting resized. I must admit that I’m fairly sure dBlue’s code is elegant, and he took the time to document it well, but I don’t think I’m quite there yet to be able to read code like that and be able to reverse engineer it and recode it in such a way that all it’s features are kept apart from the actual changing of pattern size)…