LFO Shape Designer
-
This post is deleted! -
@d-healey ok so I have figured out some of the permutations of drawing tables with the array and joining two or more arrays.
HiseSnippet 1413.3oc2X0sZibCEViSlzX2cKMz8hRgBCAJ3PCFam+ZYorNwwYwz3DScZ1BgvVkYjiEYFoYmQNolxB6aP6iUuoPeD5iPeCZORy3Yz3X630rY2PmKLQ572m9zQ5bTZGvsIgg7.jQ9SF3SPFOxry.lnW8dXJC0bejwJlcZdTCqWr6oMrNY28NrAZuA93vPhCxvXgmKUyH+hH02+7r8vtXlMIcJD5TN0lbH0iJRmscsum55d.1gbB0SS6Mq0zlypyc48AHsfYYjO19J7kjivR0xYhLVpgCUvC5HvBRHxXw83NC5zieCKR+SogzKbIxAUPc.GEM8AbWGIhkyhp2i55zd3RODgLLamRDKDQDOwrE0glLeJg7oJAVoVnyGF4xBuEx.uJ5vqrF7FCjLzfzhQPB1JrCn9hTIR77wlMYBRPWLP65PIRWTt+bIy5bPClnjG9JxAAvfDKJtY4xqasc4xq8zB.yGJrtFGXcBFvXEquyZngWRD04d9bFLn3pQhWMiIGdvwRCTIOR0awc56hAln3pRQYUVHcPmdXeRFaT9MYwcGFp9SvZsoR7QQ4xQyrt.R1MH.O.z+ryfEb4Rpe1p74qacVE3OUiN+b8XwH2nbqlgkpTcq0spDarzV4Tam5unoTJkY7VIgXFiW03.NhokKswNi37M1Y6Q0HchyKTfxboLhU29LaAkyr3LIaH2XC3tEsGtqtNfA29j0J7qExmuPdK3aTxtT.IjHJBTqU72szHb3lHmxDgPplmZ0TLYC.L90vVy3yqjZs5ZRmDCu5XW2KfK.JlAzx81aupBUvX5qKWtM1MgnkTLrCjO+vIJAaF1XQJZWO6lxZOUwM4mLwLFYShRF54oxHQKpIwIYVxSgUpNGrxaAsLxvpefnopSklpNCIOXlS060DnOTTiZkM8rHs0tjhz3li3BxwrhJBnvqKXMpntcGqrXm4RBFqXYc+foYXQVeuKHA5zuTQnXX1JrlStBqdC.1QrilhbVSFUbrOgMo1BPwTprZbLpfvKT0hebbsX0NChBUbW1LptHRAX8NfbvBLx3qLqtYoreWeL7S2uVaLB8iM2WpdbHgnCHxmDHnxEqw9jqgtohZGHu49jvqDbefDR1wQFezcBveQGbCzGbC0QzCbmwuafP8HzK6Iji9CPj+PhoI3pkLk0lkDzng8ShC6d8EBNSE2kLkmGzi590Ri5atpFgIwkrqpCI3.lr4EZXKtG3Wb.noQtP70jlr1pSIRwyVfW1LJ2dRgtF+dKzOxL8X0jB+OGdeuxmXneyqlmPe6NRgdgG1mmdCxxWEDK.NSmoqTYmmrPpXf9qFdm007rBwULaSE18FOFyMFLBmGuOvX7aMdrYitcI1hT.tn4A+z8yCKzC+xQg+KLetK+BraJQA27.HgD8.iuLVrUhbqDEpLkWC9Wy5qA8m4WCZrvzd8Wk470eK9f60eyZd7mcqslv2im1x7F0UhfoorxfBaw0HtS3rG0m6hCjxOHf7p9Dlsl7+9Yx7hlooU09sZu.tXpKOvKtLXrledsCIWBTftuOg.WVBuuzVOEriGmK5QYWlMa6I0Njy8antVzQ2Is6gCks4ntFTyMfaOg2BGBOktNzX3U5BadIiGPhZcRe958CEbugKfYsofNBhupq.iyL2Voej7usN7yFG+tY7ayMbUlddQtYN8ERQrRxJjYwO.KVDgxjbyGnnbpkzV3+2kz9AdeAbdtEVDPgNdLOpuWGnlgMAhNiQbkOSvHm73Wz3xxwpyvDliZv+BewBqHGaDKrxPguWhgG1Nf+R6nmZHOHsrZFXcyT++Oya1RN1ZLuwvCpJ8Ra6rt5VFVcdMbi40vMmWC2ZdMb640vclWC+l61PYSC61Gt5O5nIB0pcinazMRp3.cX+efrRnYF
I'm now wondering how to make the x/y/curve values inside the array to be dynamic. So if I do, for example:
reg x1 = 0.255; const var newShapeArray2 = [[x1, 0, 0.5], [0.375, 1, 0.5], [0.376, 0, 0.5], [0.376, 0, 0.5]] inline function onshape2Control(component, value) { local newShape = []; x1 = 0.355; newShape.concat(flatArray, newShapeArray2); tableShape1table.reset(); tableShape1table.setTablePointsFromArray(newShape); }; Content.getComponent("shape2").setControlCallback(onshape2Control);
... the array doesn't update the value of x1 - because the value is set on oninit. So can you update / refresh the array before calling it? Or maybe I need to clear it then push it?
-
@DanH said in LFO Shape Designer:
So can you update / refresh the array before calling it?
It's just like any other variable, you can change the value whenever you like
-
@d-healey Ok well in this case I can't figure out a neat way to do it... Any ideas?
-
Before you concat the array, assign your new x value.
Something like
local newShape = []; x1 = 0.355; newShapeArray2[0][0] = x1; newShape.concat(flatArray, newShapeArray2);
-
@d-healey said in LFO Shape Designer:
newShapeArray2[0][0] = x1;
what does this line do? Why the [0][0]?
-
@DanH You have arrays inside an array. We are accessing the first element of the first array.
-
@d-healey Got it, thanks :)