Editing parameters without the patcher


#1

Is there any way to edit parameters inside an object via krate code and then to store values inside presets without having to use the axoloti patcher?
I'm thinking about parameter exchange objects, but don't know actually where to start


#2

archive/tests/io/spi_lkm1638.axh
shows how to alter a parameter from within a script context


#3

That's perfect! Thanks!
What about saving presets, is it possible to do it via code?
I'd like to save different configurations of parameters, and the preset system is quite handy. An alternative could be to use tables, but then i'd have to figure out how tables work..


#4

Hey @johannes, i'm sorry to bother you, but i'm not quite an ace in C language and i have to ask you something else..

i made some copy/paste work and came to a line that looks like this (making a custom axo object):
PExParameterChange(xxxxxxxxx,!(param_b),0xFFFFFFFE);

What can i put inside that xxxxxxxx space that will edit a parameter inside the same object i'm working on?
I mean, i could write &parent->PExch[PARAM_INDEX_nameoftheobject_b], but that's not really useful inside an object that could be named in 100000 different ways

EDIT: found it!
For anyone interested you can put PARAM_INDEX_attr_legal_name_yyyy in that space
yyyy=param name you want to control


#5

add +1 to that yyyy and you'll be editing the next parameter from that one

So you only need one line of code to be able to control multiple parameters, just add a selector, adding an integer value to select the next parameter in the list

Though, I got a question from here, the other way around...
Is it possible to read out parameters by index?
like:
&parent->PExGET[PARAM_INDEX_attr_legal_name_p1+param_sel];
(only changed the ch to GET, though I know this doesn't work..)

I want to add a selector and control knob to a big drumvoice module, that first updates the control knob to the chosen knob when changing the selector.