I think it makes more sense to do those substitutions on the level of the library loading mechanism than in the GUI.
In your example, what I would want is to put an abstraction called [repeat] in the same directory as my patch. Inside my [repeat] abstraction I'd have a [num.repeat]. Then when I load the patch I would want Pd to load my abstraction instead of loading any external by the same name. That's a much easier process because it doesn't require any changes to the original patch.
Pd doesn't work that way currently, but IIUC it would work this way using IOhannes' recent revisions to the loader mechanism. For more complex cases maybe a massive search/replace is necessary, but I'd still prefer your sed/awk approach to massive search/replace in a running patch. It's just way safer to substitute "foo" for "bar" when you know there aren't side effects like memory allocation of associated objects, binding-symbols, class search, socket traffic, GUI redrawing, maybe even forgetting that audio was running the whole time, etc. -Jonathan
On Sunday, November 1, 2015 5:10 PM, me.grimm <megrimm@gmail.com> wrote:
Hello, say i have [repeat] in older patches but now i want to substitute this, for example, for my own [num.repeat] vanilla abstraction without changing original patch. can this be done with gui-plugin? i am noticing since moving from pdx that its quite a pain to replace once relied upon pdx objects with others that have same functions even with perl/sed scripts in tips_and_tricks. if ability to substitute directly with plugin then custom user libs could draw from only needed objects from pdx based patches i was thinking.... cheersm _______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list