SliderPack Randomize, How?
-
Hey folks
A Quick QuestionTrying to make a Slider that is connected to an LFO, To Change Its value with a Randomizer button.
I also have a Steps Knob, That I Need to randomize as wellany advice is much appreciated
HiseSnippet 1301.3oc4X0sTaaDEdkMKA6Txzz1qxjKzvUlVpiMPRalLchBFHimZ.OXJM2kYQZs0NHsqpzJRLL7Pz2fdaeC5k8QnOB8QnuAsmUqjkLwX73jlgNULC387ypuy2tmeLcCE1znHQHxnxQCCnHiOA2aHW51xkv3n1aiLtGdORjjFZpEs0v.RTD0AYXT9kJAFUV.k77WOeKhGgaSyEgPGKX1zNLelLWZWqum44sKwgdDyuf0aZ01VvaI7Dw.dJiafBH1mRFP2mnLqDFYr3NNLoHrmjHoQHiE1R3Lrmq3Mbs8GyhXm3QUKZh5AajV7tBOGEhUeF0xk44zMKtiPHCb2bVnrlE9B7dLG1H44rwmlnvL2ih7gQooAulEgWiYGdFEf2BZ3cebO6PVfLWiBa2E2lCGT8IvQPQXosEU52JgaI.K3x59jSo6FBKF4QsmznwZlOtQiUe1xUy9ANNhjlmQBM64wbngcgyCyuyLaWFPksD9ABNrn1J4lrhZOJ3qjFDc8tozdEONjvcD9WqKZ0qjgTF2iwol8i41RlfaJ3ZCTNGJ7pYm44Zvl6ESWc4pWrb0Jr90xVZBOWn+i5Q+oG8nznVcK74iDeUylZTUOhJOV8RpsGQ5VODvEv30VeMyMVeUE9u4cv1kvGPcps5yF6km7gKWt5kIjvz4IEJRIiVDOuSf3o1UHIEVJPf6KjzC30Vs5EUqT8xplWUU+9STW5l4QCmnZU5d3zbrFO1+DZX14Tlgv89wSrV75SrJl2aqYkBFJ3s4L4AAzz04odMmPpGJkVgjvRoHDfhLIE7yRSAyu0iXNIkOyEjDE402dnkCQRPF+LtYiMquiz47mddmgc1rU85023.3W8+J3W0e5G805.MI5Jqit6MVzkDY2AmbiLKnvFOPES+P6sUwDTlIkq.9KfFJYpiIisomAk+00rpf2lFcpTD.ujQ2QQFKM6z4ayox8sFNZg0gVug4HcUX5WMPHWJafqTs5BPaP14YaX6VDmzxJeOaycnuM63OGT28FYgbr7KzBX428sfdkA8XmqnHby5MP9E6Qhr7IEBiWX4ybb7ncEQLUlPtl0sbn8Iwd5pG4xMslT.EPBgVjPkbkrp38i80nrXLcmwioshkR3Ephokv5RAEI3WUHn9yXqHxYz17tgTnRhpkBKZOgOrsjPvLiRTNAR+TcF6PIgbkEn2sqEz6T3D6Qji2PUEAoJTTPwNWptSbfZFVbJi26trSLUeFg68wcYRa2Ii2RS.upZG+Ki2zYVVFuS+9TaYNXW.u6q9vNfxMAkkzP4A3W5INg3kSfPwA.UT8fJOLUs4H8l4Fb8CX9Gy5.lAy7.lFkGmPJOaMVlvTZKbqYHx2mq2e96bxD8AMgr47M168zPFi6r6AI3Lst2MBscCo+TLkaWP3WZotXztXQYzOBk25KB8S6TMpecG5.fCJtgGQgBpv2Pxtnvd9BgzkwGL90MDpiPDrSRsQmh120kDolgJoXZt0shijB+Lrj7EdTkw29V5PCW8Xe9ycJMy2NgyeyQGzpKo2xaWnQ7nag+G.wSsAW4+e1f6PQrDxtguBWHClQJY9JnEhMEPBmS8hTCaVRkAqW2PsVwL8nbmjE+M7jproZsQpxlYJ+n7N7I1ghWaqm0Wk3sThDHt4I+GVpf2Ss1r4ng7wMRlf0g8ZaaEc+0.+LYeVeN7Yi4vmMmCed7b3ySlCe9l4vmucp9nlS3EwPWAcpHHn6N59AFi5q.yZ+O.MP4rE
-
inline function randomizeArpNotes() { if (randomizationButtonsArp[0].getValue() == 1) { for (s=0; s<SliderPack_ArpNotes.getNumSliders(); s++) { SliderPack_ArpNotes.setSliderAtIndex(s, Math.randInt(-24,24)); SliderPack_ArpNotes.changed(); } } }
From NEAT Player
-
@iamlamprey Thanks a Lot Mate, Giving it a Go Right NOW :folded_hands:
-
@iamlamprey said in SliderPack Randomize, How?:
for (s=0; s<SliderPack_ArpNotes.getNumSliders(); s++) { SliderPack_ArpNotes.setSliderAtIndex(s, Math.randInt(-24,24)); SliderPack_ArpNotes.changed(); }
Here is My Attempt and yeah It Works Just Fine :)
inline function onRandomControl(component, value) { local minMix = "0"; local maxMix = "75"; if(value) { // Sliderpack? Content.getComponent("Steps").setValue(Math.randInt(2, 32)); Content.getComponent("Steps").changed(); for (s=0; s<SliderPack.getNumSliders(); s++) { SliderPack.setSliderAtIndex(s, Math.randInt(minMix, maxMix)/100); SliderPack.changed(); } } }; Content.getComponent("Random").setControlCallback(onRandomControl);
-
@natan said in SliderPack Randomize, How?:
inline function onRandomControl(component, value)
{local minMix = "0"; local maxMix = "75";
if(value)
{// Sliderpack? Content.getComponent("Steps").setValue(Math.randInt(2, 32)); Content.getComponent("Steps").changed(); for (s=0; s<SliderPack.getNumSliders(); s++) { SliderPack.setSliderAtIndex(s, Math.randInt(minMix, maxMix)/100); SliderPack.changed(); } }
};
Content.getComponent("Random").setControlCallback(onRandomControl);
Nice... @Natan @iamlamprey
If I want to randomize Arppegiator Note Numbers and length with Slider packs.. How can I do it? -
https://docs.hise.audio/hise-modules/midi-processors/list/arpeggiator.html#parameters
In your case I believe it would be SemiToneSliderPack and LengthSliderPack
-
@iamlamprey Ok.. I will try