[script] pass only if change
Try using SetLength(parameter, 0). The only thing you do have to remember is to keep track of the changes: first set the length to 1 (or some other length for arrays) and assign the value within the same block. Then in the next block set the length to 0. That means you have to use the Process procedure if for nothing else, then to do the SetLength(parameter, 0).
Sometimes you can also end up with a lot of convulted code to keep track of changes and what outputs to update. Unless you have something very specific in mind, using the module might be the best way to go.
Sometimes you can also end up with a lot of convulted code to keep track of changes and what outputs to update. Unless you have something very specific in mind, using the module might be the best way to go.
Bjørn S
ok, why didn't i think about that..
at some point i may have a high nb of outvalues(64) so thought would be better than 64xpassifchgd,
iml is great for that cause it wireless sets the values, acting as a low cpu passif changed for all , but i get some pbs of latency/ dropouts if using two at same time somewhere in the patch, so back to some real outputs in some cases...
but i imagine it can be complex (so the count trick in process?), well at least i know where to search if i really need it, thanks!
at some point i may have a high nb of outvalues(64) so thought would be better than 64xpassifchgd,
iml is great for that cause it wireless sets the values, acting as a low cpu passif changed for all , but i get some pbs of latency/ dropouts if using two at same time somewhere in the patch, so back to some real outputs in some cases...
but i imagine it can be complex (so the count trick in process?), well at least i know where to search if i really need it, thanks!
When you're dealing with a lot of output data of the same type, it might be a good idea to "pack" them into an array instead of using separate outputs, or one array per patch or whatever your destinations are.
I can't say I'm sure of this, but I think that distributing data through a small number of buses and/or data in/outs also costs less CPU than one per data element, even though it will mean that those buses are updated more frequently. Senso might correct me on this though.
The IML is a strong tool, but has AFAIK low priority, which would account for the dropouts I presume. For real time, tight updates it's really not the way to go.
I can't say I'm sure of this, but I think that distributing data through a small number of buses and/or data in/outs also costs less CPU than one per data element, even though it will mean that those buses are updated more frequently. Senso might correct me on this though.
The IML is a strong tool, but has AFAIK low priority, which would account for the dropouts I presume. For real time, tight updates it's really not the way to go.
Bjørn S
yup i think you're right, ive noticed as well using array is often better than X wires.
effectively IML is ultra powerfull to set lots of values once, with low priority, while often changing values should better be dealed
with wires, i start to catch when it worth or not (hehe i started to put scipt/iml combos everywhere, that's not always intelligent)
my pb here is that it's used to drive some captions to some usine panels, but can't pack captions in array, and also array will always pass the value on each output, unless we put a passif change on each of them, applying on whole array don't make output demultiplexed values pass only if changed. Gurulogic once emitted the sugg of geting one feature that would let ouput
values only on chg, so a script could easily add this feature if setting all sizes to 0?, have to try that!
in fact my previous setup was using OSCreceive 64 set on "only on change" so that all captions out where passing only once.
then i could easy reset all captions using IML. but i could deal all internally in one script.
Im just a bit lost of the most efficient way i should go for deal with that, maybe if you have ideas?
basically id like to make a bidimentional array of captions where i could set some index (ie i receive track4,clip3,caption"bass")
and implement some scroll on it.
while this seems relatively easy with float values, im a bit fighting with arrays/captions.
Ive seen delphi seems to handdle "array of arrays of string" i didn't explore yet fully, as i was trying via Tstringlist .
pb with TstingList is I could use add or insert fonction, but couldget the "setItem/getItem" feature working, if anyone has clues on that? also maybe dealing XY 2D "string"array would be simpler, but not sure we can "getStringArrayValue", at least this is not the
fonction to use
.. any tricks, advices?
effectively IML is ultra powerfull to set lots of values once, with low priority, while often changing values should better be dealed
with wires, i start to catch when it worth or not (hehe i started to put scipt/iml combos everywhere, that's not always intelligent)
my pb here is that it's used to drive some captions to some usine panels, but can't pack captions in array, and also array will always pass the value on each output, unless we put a passif change on each of them, applying on whole array don't make output demultiplexed values pass only if changed. Gurulogic once emitted the sugg of geting one feature that would let ouput
values only on chg, so a script could easily add this feature if setting all sizes to 0?, have to try that!
in fact my previous setup was using OSCreceive 64 set on "only on change" so that all captions out where passing only once.
then i could easy reset all captions using IML. but i could deal all internally in one script.
Im just a bit lost of the most efficient way i should go for deal with that, maybe if you have ideas?
basically id like to make a bidimentional array of captions where i could set some index (ie i receive track4,clip3,caption"bass")
and implement some scroll on it.
while this seems relatively easy with float values, im a bit fighting with arrays/captions.
Ive seen delphi seems to handdle "array of arrays of string" i didn't explore yet fully, as i was trying via Tstringlist .
pb with TstingList is I could use add or insert fonction, but couldget the "setItem/getItem" feature working, if anyone has clues on that? also maybe dealing XY 2D "string"array would be simpler, but not sure we can "getStringArrayValue", at least this is not the
fonction to use
mm just tested "array of array of string", this seems to work and be the way to go for me,( using matrix XY exemple to scroll),
cool, will try now the setlength to 0 trick.
still if anyone has exemple how to get/setItem on TstringList im taking!..
cool, will try now the setlength to 0 trick.
still if anyone has exemple how to get/setItem on TstringList im taking!..
-
woodslanding
- Member
- Posts: 1327
- Contact:
Did you figure out how to get/set stringlists??
I couldn't figure that out either. The commands in the docs did not seem to work for me.
I couldn't figure that out either. The commands in the docs did not seem to work for me.
Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
nope i could'nt, still figuring wich is good syntax, senso? i needed then to free and re-ad each time wich is boring, wheras arrays of string works simply like array, so im very curious about set_item/get item, couldn't catch from web search as well arf...
i can get add or insert but not set/get...
i can get add or insert but not set/get...
Who is online
Users browsing this forum: No registered users and 17 guests
