What is the preferred way to work with objects?


#1

I got into writing a custom object last night. The way I did it was to copy one of the factory objects and edit it. Currently I'm still using 1.0.6 because in 1.0.8 I couldn't get changes made to objects done in the object editor to take effect. On the other hand some things cannot be edited in the object editor in 1.0.6 so I took to editing the raw XML source with a text editor some of the time. I ran into a couple of issues though:

  • When Axoloti complains about the sha1 and uuid not being correct, does that also cause the object not to get loaded?

  • Even after updating and saving my XML source (using an external text editor), updating the sha1 and uuid, and doing Reload Objects, viewing the object in the patcher or clicking Live showed that the patcher was not aware of my new version. Does it cache the old one somehow? I seem to have gotten around it by deleting the object from my patch, inserting a completely different one, deleting that and then inserting the one I wanted again, but that was rather cumbersome and it seems like I'm missing something obvious.

  • If I changed the code of any object directly in the patcher's object editor, the changes took effect immediately. Do I still need to Save the object for the changes to be permanent?


#2

yes, its a known issue of 1.0.8 - id avoid the editor in 1.0.8 personally.
I think I've solved all these issue in the development version which will become 1.0.9,
but theres a few other (non-related) issues that need fixing before 1.0.9 is released.


#3

When I work on an object, in order to keep connections of my object when I want to reload it, I use "replace" item on contextual menu of my object, suppress and add the last letter of the name of my object (to refresh the list), and select the same object in the list. I think it's more efficient than delete object and re-add it, if inlets not change, of course.


#4

Thanks for the tip. I tried simply creating a (file system) link to the same object so that the same file can be referenced from two different filenames. Apart from hoards of 'duplicate ID' warnings when reloading objects, it actually seems to work: I just select the object with the other name when doing replace on the object, and the new code seems to get loaded.


#5

I downloaded the source from github (latest commit form Johannes on 13/3), built it from scratch using platform_linux/build.sh (which it completed with a resounding DONE), started it with ./Axoloti.sh, but still when I edit some source in the object editor, it doesn't seem to have any effect on the actual code compiled when clicking Live. Is there something else I need to do?


#6

if you have an existing object you want to edit... your first choice is,
do you want this 'refined' object just in this patch or as an external object?

if you want just in the patcher, then you use embed (convert to embedded object)
(this is the most similar to the original approach, without the danger of possibly overwriting a factory object with your modified version)

if you want as a 'free standing object'
edit object definition. then in the menu, select 'add to library' ,select library you want it stored in, and the new object name

of course, if its your own exiting object that your editing, you can just select 'save' to change it.

if you initially choose embed, and edit the object, then you can of course later choose 'add to library' and save it as an external object.

(so short answer, you probably weren't doing save/add to library)


#7

Well, the thing is, if I just edit the object, the Save button in the File menu of the edit window is greyed out, and any change I make makes no difference. I seem to recall that is how it worked in 1.0.6; you just changed the code and clicked Live and whatever change took effect.

But as you say that would be of limited use if you actually change an existing (factory) object, so I'm guessing that I need to embed it or add to a library before I can save anything and changes take effect.

I haven't had time to test this, but I started the patcher just now and I can see that if I embed an object, the Save entry in the File menu in the object editor is not greyed out so perhaps that's the solution.


#8

It works completely differently in 1.0.6, which had various issues, both conceptually and in implementation.
hence the move to a different approach.

yes, a factory object would have save greyed out, as you cannot save it... (since that would overwrite the factory object!) - instead you can either embed a copy, or add it to a library (i.e. take a new copy of it) .. then of course you can save it.

(embed, you do not need to save... as its by definition contained with the the patch, you should use the edit button ... can't quite remember what save does in this case :wink: )

you can think of 'add to library' as Save As... but the difference is we take control over the file side, so we can take more control e.g. stop invalid names, and also ensure its in your path etc. libraries/patches/objects could conceptually be implemented in something other than files (not saying that will happen, but conceptually its possible)

perhaps I should rename "add to library" as "save as", but that doesn't seem better either. perhaps workflow wise it would be better to force you to change the name when you initially edit it but that doesn't work well if your just viewing the object.
alway, as we move forwards, Im sure I will refine this a bit... but Im waiting for 1.0.9 to be released, so that we can see how the object editor now stands up.


#9

Thanks for explaining it in detail. I think it all sounds good; I'll voice some opinion on it once I've tested it more thoroughly.

I think that 'add to library' is better than 'save as', as 'save as' implies that you could in fact save the object to its current location which is neither possible nor desired.

The only problem I think is if you're stuck in the 1.0.6 mindset but I think it's better just to leave that behind and look forward.