An embedded object that I am editing has the following XML code:
MaxValue i="10000"/
I need this to be greater than 10000, but the object editor will not allow me to change the XML code. How do I do it?
An embedded object that I am editing has the following XML code:
MaxValue i="10000"/
I need this to be greater than 10000, but the object editor will not allow me to change the XML code. How do I do it?
I think you forgot to paste in the xml code.....
Anyhow, from the Axo editor you can not edit anything in the xml fan. It is just there fo looking at.
If you need to change something that you can not change from any of the other fans:
Inlets
Outlets
Atributes
Parameters
Displays
Local Data
Init Code
Krate
Srate
Dispose Code
Midi Code
.... Then you need to use code text editor. Like XCode, Atom, Text wrangler, etc.
Thank you for the response. I actually did paste the code, but forgot that XML tags will be parsed by the forum software, so it didn't show.
I was able to edit the XML by opening the axp file in a text editor, but I'm still confused about the patch editing process: I believe I've read in other threads that the developer's goal for editing in the patcher is to make it so the user does not have to interact with the XML at all. Does that mean the XML code for an object is somehow generated automatically based on edits the user makes elsewhere? Otherwise, how can the user have full control over the bits of XML that have bearing on the functionality of the patch, such as in my case, where the max value for an integer input is set in XML?
The max value of an input?
You don't need to edit the XML to set a maximum value for an input on an object.
Here is one example of how to do it:
int MaxRange;
if (inlet_XXX < 10000)
{ MaxRange = 10000;}
else
{ MaxRange = inlet_XXX;}
Basically if the input is LESS than 10.000, then use 10.000 as a value. If the input is above 10.000, then use the actual input value.
Or you could also use the object called "math/max", which is another way of doing the same thing. See the help file on how to use it, by pushing the small triangle in top left corner and selecting "help".
Anyway, that part of code you want to edit, is in the K-rate fan of the object editor. Look where the other code in the object is and add the code to that same fan.
THe object editor is reallly smart once you get to know it and it is relly simple to use. Personally I pretty much NEVER has to edit anything in XML, I can do pretty much everything in the internal object editor. I think you just have to get used to it to understand how it works. My suggestion is to look at a lot of other objects to see how they work.
You can check this object editing guide:
A little bit more here. But be aware that some of the stuff from this guide is obsolete, as the object editor automatically generates a hash and uuid when saving an object through the editor:
So it turns out that my issue all along was that somehow I completely missed that there is a properties editor on the parameters tab. Embarrassing! No need to edit the XML then, as you said.
Happy that you worked it out.
The editor does save a lot of time, once you get to know.
It is much faster doing everything in there rather than having to use Atom or another IDE and then having to sync library all the time
Have fun