hi there,
here's a little GOP-abstraction. Might be usefull to resize the red Graph on Parent rectangle for GUIs.
cheers,
mygop.zip
Graph on Parent box
hi there,
here's a little GOP-abstraction. Might be usefull to resize the red Graph on Parent rectangle for GUIs.
cheers,
mygop.zip
@sensn This is really awesome thanks! Is there like a list of all possible pd messages somewhere? I would never have found out about [donecanvasdialog( on my own.
@rjp9 in Pd-extended, go to Browser -> Pure Data/manuals/pd-msg, there are many examples there
That's a nice tool. However, its usage is far from obvious.
I am going to explain, in an easy-to-understand way, how to use it.
HOW TO USE THE GOP BOX RESIZER (= or, in simpler terms, the red rectangle resizer)
First of all, you have to download and decompress the thing. And put those two files into your abstractions folder (Pd's search path). (They are called mygop_Main and mygop_abs).
Click File, New, and create some abstraction, for example:
In the same patch, put a new object and, within this object, type mygop_Main
You should see the following, in which a mygop_Main thing has appeared:
Select all of your abstraction, except (!) the mygop_Main object, and cut it.
Open the mygop_Main object and, within it, paste your abstraction.
Adjust each of the 4 values until you get the important elements of your abstraction surrounded by the red rectangle.
Delete the following thing:
While you are still in this same window, called mygop_Main.pd, save the thing with a suitable no-spaces-in-between name, (for example, slider&number). Notice that, you should save it in your abstractions folder (so that you can call it at some time in the future, when you'll need it).
That was the end. Now you can close all remaining windows mercilessly.
Have a nice day
I live and love in Argentina
Summarizing, the mygop_Main patch acts a temporary container for your abstraction WITHIN which you should save.
I live and love in Argentina
It doesn't seem useful for working with subpatches, in my opinion.
I live and love in Argentina
Here you have the same files, but I've redesigned them so that you only need to type redsize:
(mygop_Main = redsize)
(mygop_abs = redsize_abs).
All credit goes to @sensn, thanks sensn!
I live and love in Argentina
@LandonPD NIce work! Do you know if there's a way to automatically enable the "hide object names and arguments" upon creation (in otherwords, disable the display of the GOP name? There seems to be a command via message--like [donecanvasdialog( --for every other aspect of GOP except that.
@rjp9 said:
Do you know if there's a way to automatically enable the "hide object names and arguments" upon creation (in otherwords, disable the display of the GOP name?
hi, i tried it,but it doesn't seem to work, you have to do that manually. Unfortunately dynamic patching doesnt always work as expected, theres a bug with Hsliders too, i wish i could fix it.
Be aware that in my gop abstraction there is alittle bug. If you save the patch for later editing and do not remove the gop abstraction the size of GOP will b set to 50 50 or something because i connected a loadbang directly to the numberbox. just have a look inside and reconnect them to the corresponding cold inlets of the corresponding float objects.
it would be cool if there was a way to get the name of a patch abstraction into a message box - that way we could dynamically create the sends. but i think theres no way to get the name of the toplevel patch.
maybe I'll update the abstraction in some days to make it more usefull.
If also noticed that if you have a lot of GUI objects in the abstraction, the myGOP tool can slow down or even freeze pd.
Have fun,
sensn
Hi!
@rjp9 Thank you! About your question: I don't know.
@sensn Oh, how nice is meeting the author. You comments have made me rethink my approach (to using/modifying your abstraction). I think I have a decent and simple solution. I'm posting the link to it right now, to a new forum thread.
I live and love in Argentina
Ok, here it is the link to redsize:
http://forum.pdpatchrepo.info/topic/8791/redsize-a-graph-on-parent-box-resizer
I live and love in Argentina
@sensn said:
it would be cool if there was a way to get the name of a patch abstraction into a message box - that way we could dynamically create the sends. but i think theres no way to get the name of the toplevel patch.
This would be cool. The only possible workaround I can think of is to change the sends and receives with a message. If you look at the [pd edit] subpatch in any of the GUI help files, on the very right hand side there are 4 messages boxes:
So maybe you could take an object argument or $0 value and pack in into the pd message like this:
That's too advanced for me. What I'm thinking of is making Pd write the name of its windows and save them to a file, so that one could read them from there. Maybe it's a silly idea.
I live and love in Argentina
I've found two different things:
canvasname-help.pd
canvas_name-help.pd
I live and love in Argentina
@LandonPD said:
I've found two different things:
canvasname-help.pd
canvas_name-help.pd
Woah canvas_name is blowing my mind right now. This is like the pd version of Inception!
There are some nice things there, to play jokes on people! Imagine that you open a patch, and the transparency of the window oscillates, lol.
I live and love in Argentina
I was gonna post this in technical issues but since it's directly related to this thread I'll post it here.
I'm having trouble saving the state of my GOP window in an abstraction when I have multiple copies of the same abstraction in a patch.
My patch is called [learn_ctl]. Basically you click the "L", move a MIDI control device (like a fader or knob), and it "learns" that device. In short, it acts like a programmable [select] in a minimalist GUI. I wanted to make resizing it easier then wasting time trying to guess at the right pixel dimensions for everything, and since the patch is basically a tgl inside a GOP window, I used the concepts we were talking about to dynamically change the GOP window.
learn_ctl.pd
Make sure to check "hide object name and arguments" in the properties. I can't find a way to automate this
My problem is saving the size state once its changed. If I make two copies of the abstraction, make them different sizes, save the patch and reopen, they both default to the size of the first one. I used @gsagostinho 's save state patch so maybe he/she could weigh in.
Man I really like nice looking GUIs but if this becomes more trouble then its worth I'm going to ditch the whole GOP component.
@rjp9 Hi, I am glad you found that simple state saving patch useful As for your abstraction, it is a very neat idea and it is working well as far as recognizing and saving the ctl used, but the problem with this type of state saving inside an abstraction is that it will modify the abstraction's code (you can see that the when closing a patch that uses your abstraction, the abstraction suddenly opens and you are prompted if you wish to save it or not). So if you have two [learn_ctl] in your patch, and they are used to recognize different values, you will have a problem when reopening your patch, since the last value will be the one saved to the abstraction code and loaded twice. And unfortunately I can't see a solution for it, or at least not right now.
Take care,
Gilberto
@gsagostinho said:
[...]the problem with this type of state saving inside an abstraction is that it will modify the abstraction's code (you can see that the when closing a patch that uses your abstraction, the abstraction suddenly opens and you are prompted if you wish to save it or not). So if you have two [learn_ctl] in your patch, and they are used to recognize different values, you will have a problem when reopening your patch, since the last value will be the one saved to the abstraction code and loaded twice.
Ah yes this was bugging the crap out of me and I had no idea why this was happening until now! Well I think that's far enough down the GOP rabbit hole as I want to go. It's just not worth the time to debug this until its perfect. Thank you everyone for the help.
@gsagostinho said:
you will have a problem when reopening your patch, since the last value will be the one saved to the abstraction code and loaded twice. And unfortunately I can't see a solution for it, or at least not right now.
Gilberto
There is a solution for this! It's a bit complicated, though. You need to save the abstraction's values as creation arguments in the parent patch. The creation arguments will be saved in the .pd file, ready to be retrieved when you open it again. How do you alter the creation argument so that it reflects the values you have selected, you ask? By using [textfile] to edit the parent.pd file! It's a bit of a hack job, but it works. I will post up an example soon.
Oops! Looks like something went wrong!