ready $ENGINE_PAR(s) from array

Aulicon
Aulicon Member Posts: 4 Member
edited October 2024 in Scripting Workshop

Hi All,

I cannot find a solution to this and I've been searching for a while. I want to store the $ENGINE_PAR built in variables in an array and then recall that array in set_engine_par kind of like this:

on init

declare slider $knob_filter_freq (0,100000)
declare !filterdata[2*5] := (...
{0} $ENGINE_PAR_CUTOFF, 1, "Cutoff", "NONE", "NONE", ...
{1} $ENGINE_PAR_PAN, 2, "Cutoff", "Resonance", "NONE", ...
end on

on ui_control ( $knob_filter_freq)

set_engine_par(!filterdata[0], $knob_filter_freq, -1, 6, -1)

end on

In this case specifically I'm using a string array and obviously this doesn't work. Is there a way to achieve this?
..

Comments

  • theodorech
    theodorech Member Posts: 72 Member

    You need two different arrays for this task. One array will be a string array to hold the text, and the other will hold your engine parameters.

  • Aulicon
    Aulicon Member Posts: 4 Member

    Thanks! This works. Many thanks again!

This discussion has been closed.
Back To Top