Arpeggiator behaviour



  • I have the following problem. I hope there is a solution
    or a workaround

    When the sliderpacks are changed by random and then
    the steps are reduced you can't get back.
    All slider pack values after the lowest step selection have disappeared.

    01.png

    02.png

    03.png

    04.png



  • For now you'll need to manage it yourself through scripting.



  • @d-healey Which brings me to the next question - how?
    Any ideas?



  • @MikeB - randomise them - then save their new values in a variable array, when you resize use this stored value set to update the new sliders..



  • I already thought that - but unfortunately I still lack a bit of understanding.
    Is there an example - or a snippet I can look at?



  • @MikeB - start by posting a snippet showing your randomization call back - and how you would store the values in an array...



  • @Lindon Here is my approach

    HiseSnippet 2216.3oc4Z0sbaiaElz1HwRdUVmelt6kb7zKjmXKKJK+2j1IR9uD2Dmnwxwa1sWjRIBIgZJBFRPsValLSur8t9.zGhdauqOB8QnOB9Mn8.9iHHMkLsZbxzc4LNN3.bN367KN.IMroswNNTaI4bmNzBKI+UnlCMY81qmFwT5n8kj+Vj5lJMzzUZp02x.a+NGShkElIs6PKMGGrtjr7rOiuZ4byI48c4S2UyPyrMNhjjzYTRa7KI8IrHpMp8BhgwgZ53SI8EVc0ZG0lZtG0f5BHaVTYIKs1mq0E+JM9xlAIIemCzILpcSlFC6HIO2tT8gM6Q+QS+0eFwgzx.yGnJ0DDjO4CoF5bDy+6R60iXn2HzB3HIIiZDYOl02d7HzwDcxH5Q1kE8lPIhCQ6g7LSBdphvqbpvSMM3Mi.7lyGd2G0rsMwhEMCGaKfNxjgs6nAt.QX4uVoY9Gyi1iBqvjUpu143CsgAi3nnZkxkWQYqxkW9IExWH+ZqMPy1Y0+2+JjGbpNLEPbJsXlmnYpS6q7aUBgRWLaOZeKpILn3RiVwRbXDwYCMSrg5XYye5D7T21B2sKQC7HbN8hv47Ey0VbIwkkPBLZ2tF3lFDcrcCHVzYr.3JqLgjhloxXkgvZFK2pYf6jZwKLosF+t5MqGGqs1p2Fe7nItv4ajxqb62BCJDCa47oaCHlFDSrRGWy1LB0TgZ5oUbE1lZTrcn1tBXOLbwKWH+GJjWA9H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z4oxTvy5SAOUmBd1XJ3YyofmslBd1dh7vuRUcWFsuepHPnwAdOohrreCadQ8R+W7zD+uH
    


  • @MikeB said in Arpeggiator behaviour:

    Ok well you havent done anything I suggested yet...

    here is your code from the randomise call back:

    inline function onbtnRandomControl(component, value)
    {
    	for (i = 0; i < 16; i++)
            {   
            SliderPack1.setSliderAtIndex(i,Math.randInt(-24, 24) );
            SliderPack2.setSliderAtIndex(i,Math.randInt(0, 127) );       
            }
    };
    Content.getComponent("btnRandom").setControlCallback(onbtnRandomControl);
    

    Now modify this to save the randomised values in some array and post it back here...



  • @Lindon It will probably not work

    Because if the user has selected 10 steps and then clicks the random button, only 10 steps will be randomised.
    If he then goes to 16 steps, steps 11-16 are empty again.

    It only works if 16 steps are always saved.
    But this only works if 16 steps are visible.

    There is no concrete description on this topic and no video by David.

    I tried to save the selected values in var sp1 and sp2.
    but I can't get them back

    HiseSnippet 2323.3oc4Z8tbaiaDmxNHIR9Tt7uo89HGOc5HOwVRjV9eSZmH4+cwMwI7rbR8c2zIkVDRBMTDLjP9raFOS+X625CPeH5iP+Pe.5iPeDxaP6BPRQPZJYZc12MsG8LVZW.r32tXWfcAkgGsC12m5oTn3gm4hUJ7Yn1m4v5uUeShixdaqT3KPZqpZXZo11bfqM16c9NDWWLSYyybM88wVJEJL6Wx6cgh2RQ77omsoosoSGbLKEk2RIcvujLfvh4Zz7EDa6cMsvGRFH06FM2qC0YKpMcHfrYQ0UbM67dyd3WYx61LHkB2dGKBi50lYxv9JEt0lTqyZ2m9cNA8+sDexw1XNglRaPPAr2kZawQLmqxV8I1VFQV.eEkBHiX6wrA1iGi1mXQFwO1tbeQCpwiP1dTXlIAOMY3UO+vaFI3cq.38.T6NdDWVbKbrMGZOGF1qqIrDHCqf9pLy+rDZKJzCGV0AluGuqGPLZDUzzqWeQ00pWegmVtT4R0pchom+Re+eJWBVT8Ypf3TOl4bfoiEcf5uVMBJ8vrsnCboN.Qk4G0i44vHdjFlNXaswNrflSMlVdt3d8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A3EIvKXByYr+myEzNNViQL46VltM54vAwYDx9CV5uWOGHWLBisI7e4H63bBDXAb3X7gPR8cMGZyh3l7b48oNT29TGRGYCvAXlGoWOrmL1yTgZwX7.gQbdbyC.WDS4Tz9EMeIjZkoGXmvSosPK+1hIsd8En.3pxS2T8+OJaY1eZV1xAzgLhSu8MAG0SUJHRuBpV.REHXCA9aonvL7SeCnqyoCJWvwRP7efmvF03zEBaTKpwePliAlc7nuqSvdUbe46J3.5si3WfUQz9bZ0Quu.Dpd05JCfb9eWmNby8Rf8I6wnOEiY4oXLMlhwrxTLlUmhwr1TLl0m3X3ka0ZHiNHHTDXXri3FVJTHHINgWux+ENfYftA
    


  • @MikeB if you store all 16 steps for both slider packs in the Panel1, and set Panel1 saveInPreset to true, like this:

    HiseSnippet 2478.3oc4Z0sbaqaDlz1HIRINm72zdtjimNcjmisrHsrkcSOSj7eININVikOotMSlTZQHILghfgDRG6lwyzKauqO.8gnOB8Qn20o20Gg7Fzt.jTDhlRhVm3bldJufV6BrK9vhcWr.z08nMw99TOE0bGetKVQ8NnFm6v5rcGShix96nn90H800paZo0vrqqM16c9NDWWLSYqycM88wVJppy9TduUyMmh34SOYKSaSml3XVJJulRZheIoKgEysd0WPrs2yzBeLoqTuKWc+lTmso1zd.xlEURw0r46MaiekIuayfTTuwtVDF0qAyjg8UTmaKp04M5P+dmf9+ZhO4TaLmPWoAnn.16Qss3HlyUY6NDaq5QV.eEEUT8X6wrA1iGgNfXQFvO1tbOQCZwRHaOTmYbvSWFdkxN7lQBdyE.u6iZzzi3xhagisai12gg8ZYBKAxvJnuJy7uxi1lB8vgUrq46w64ADCjnftQoRKoUoToEe774mO+Jqz2zye4e3OymGVT8YZf5zNk4bjoiEsq12pEAk1X11zttTGfnvBC5wBbXDKYcSGrs9HEKn4DxTyyE2tMwDVQ3RJ7v4xMzRagEj6VBMvnsaaiaXSrvd0AeQ+QBfK0yDZJtEiQpCo9LRo0yfzImEuvgd5nGUQqBIVYkkuNd3dSbk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3G0acXR3M5qzkc79i4047.zKwNsYcxLZa8d9n+ZNZOgV+yCsR1BMtOB1gvANKXCrMTUAMKg5opneN5vdL2drOSp69nCpuKrGfWjBujILiw9eEWQ65XMB0jsac5FnmAaDmRH6Wrxe+7rgbtHL1fv+OsYWm9PfEvgiwG.E02xrmMKh6v6Ke.0g51g5PZJa.NBy7Hsai8jwdpSnZLFOPX.mGU8HvEwTtDseQ0WBkVY5A1I7TZKzytsXbqWeMJ.tZ7xM09owwVl8+OO1xQzdLhS6CLAG0yTTEkWAmV.JEHHg.+C3nNCe22.5Rb5fiK3XIH9OvSXi5bZ0vF0iZ7KxXz0roG8cMCxUw8kukfCLucD+GqkCc.mVav2O.gJUrjRWnl+20rI2buLXeRWFioPlUmBYJOExr1THy5SgLUlBY1XrxvOtUsdLZ2fPQfQ8cE2vhpZPQbBudk+Kv.HAM2
    


  • @ulrik
    Thank you - I would never have thought of that with Panel1.setValue(storage).
    But unfortunately it is as I described.
    If you set the stepslider to 8, for example, then click Random and then set the stepslider back to 16, the values 9-16 are missing.

    Would it be an idea to define a Ghost-SliderPack that is always set to 16 and the Randombutton works here?
    If you then change the stepslider, only SLiderPack1 and 2 change and then always receive the values from
    from the Ghost-SLiderPack?



  • @MikeB Invert storage and setSlider:

    HiseSnippet 2467.3oc4Z0uaaibDmz1aRj747MZu+jvnnPFmsrHs7WM8Pj7WWbRripkO2zFDjRKtRZgo3xPtRmcMLP+y1+qO.suC8QnOBE8InOB4MncVtjhqnojoUryg1R.Koc1cl82L6L6L6RWyi1.66S8TTyc3YtXE0uBU+LGV6MaaRbT1cKE0uFouhVMSKs5lcbswdev2g35hYJablqouO1RQUcxuiOZ0bSoD77omugosoSCbLIEkinjF3WS5PXwTqU4UDa6cLsvGR5HM5xU1sA0YSpMsKfrIQkTbMabhYK79l7gMARQ8NaaQXTu5LSF1WQcpMnVmUuM8GbDi+HhO4XaLugtRcPPBx6Pss3HlSUYy1DaqZQV.eEEUTsX6wjB6wSQ6QrH8oG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iGvWkkouI0zK0t9zy2ATxT4otIqqWf6R0NztNrAbOlLyqI5Y+MtL0s0KDZxrAuTfjZZtrRE5DfkDk9L.Rl7FBIRmB9IY3PF2GIPQHoreJGIYLC5.dc0WaQHUpxCPCb6PWiCLIIjoCpWH.KiGJdXf.peBYHv3SOOKlCPJTO1qvm4+4XQ.kwEis3UvkT.+7KaMdXn.fJkNlxqYiKBnpc7G6hgMZ5SN6JjDTlAI1dAp+oEd7zlbn5s61roMd77vlFssiI39eHAOJUXzW6vSQQaEJ0wOZ29vUg0nWxV1v5OlWmyiQuF6zh09xHMdQd.z17D9rcDGsukV6losR1BIdDBxL3.GQrN1FplflkP7TEzOE8ltL2traHw8Hzd01F162KRfWxDlwX9GvEz1NVCQLY6lmtC5EPB3TBU+hU16jYq1sqHQbtHLVmv+mjYamdPPEPgiwGCEy2zrqMKh5f4i2i5PcaScHMjM.GfYdjVsvdxXOUEpJiwCD5S4oUN.bQLkKM6mU40PIUldfcBOl1hqQQIiZ85qQB3pwKyT6+MNtxj++4wUNf1kQbZsmI3ndJjqfWVEbJAnD.wFB7WAi5D7rth1k3sEGSvwJnw+FdB6Tm2VMrS8nN+hLGcLa3Q+PCwdUbe46EPAzamf+Yyxg1i2VK98GfJUrjRGnV+OznA2bu.XeRmGiwfmkFCdJOF7r7XvyJiAOqNF7r1H4geLqpcYzNhPQfPssCtYEUUQwaAd8J+G.dmVvu.
    


  • I have the solution!!!! (Simultaneously with @ustk 🙂 )

    Basically, it's much simpler.

    I have simply reversed the two values.

    Instead of

    if(value){
    	for (i = 0; i < 16; i++)
            {          
            SliderPack1.setSliderAtIndex(i,Math.randInt(-24, 24) );
            storage.sp1[i] = SliderPack1.getSliderValueAt(i);
            
            SliderPack2.setSliderAtIndex(i,Math.randInt(0, 127) );  
            storage.sp2[i] = SliderPack2.getSliderValueAt(i);
            }
    

    Simply

    if(value){
    	for (i = 0; i < 16; i++)
            {   
            storage.sp1[i] = Math.randInt(-24, 24);
            SliderPack1.setSliderAtIndex(i, storage.sp1[i] );
            
            storage.sp2[i] = Math.randInt(0, 127);
            SliderPack2.setSliderAtIndex(i, storage.sp2[i]);  
            
            }
    

    This way, 16 values are always stored in "storage.sp1[i] - no matter how the stepslider is positioned.
    And thus 16 values can always be returned - great!

    Thanks @Lindon and @ulrik

    HiseSnippet 2462.3oc4Zrsaaibkx1SRjx5r4F1tORXTTHi0VVjV9h1zEQx2Rbhchfk2zraPPJs3HoYCEGFxQdsqgA5isu0G6C8in+.EneB8SneB4On8LyPJNhlRlQabVrsD1VZNy4bly4LmayP2vm1BGDP80xk+vS8vZ49LTyScYc2rqEwUa2szx8kHiU0aXYq2zpmmC1+MAtDOOLSaiS8rBBv1Z4xM8i3XmK+LZhm2+vMrbrbagiAoo8BJoEdOROBKFZiZOk33rikM9PROErqTa2VT2MoNz9fjMMprlmUq2Z0A+LKNZSgzxcsssILpeSlECGnkalMn1m1rK8Gck3+BR.4HGLefgVSfQRv6Pcr4RLGp1lcIN1Mhr.AZZ4PMhsGSKsG2GsOwlL.drc41hIzioP0djapwIdFphW4rKdSoHdyHEu6fZ1xm3whmgKa2DsqKC621B1BTEKItZS8OJf1jBX3xJ0y5s3c7gACnnngY4xKnuV4xy+fYKLagkV5XK+fE+o+LaAXSMfoCrS+Hl6AVt1zd5eidjnzAy1j1yi5BCJN2.LliKFwT1vxE6XLRxjSmfl59d3NcHVvNBmRgGNmtg1ZKNmJZI3.i1oiCtoCwF62.7ECFo.bALSvo3YLGIOTvYjTajApSpEO0kdznWUwrBJVZoEuJd3dSblenvDopKK9LJCqCa2J.0M0eA1g1hvNMibm35Pbw5s661hQnt5fVlbyfq49TmhshT6E.CiSe77yV3rYKjmzVuXzXc3gCi+oxFRo.LXqNVF.O2B5hnjDHYjDIi4ef.EIWOW9A1I.el7qWB4osFlorFCX+4vWyr6ImQg1kMsbbNBfVbzltOA9GgYF1nOiQc+nw6K5cLHEy38J31zkVBr8PdArdfvhvqGIwIPh.3nZ4nG.n.koz+lAtOQ6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fi5IZ4DsWAmV.ZEPlPf+FXxMEu5qbbY9X4wEbsEC9OvS3jF7w4BmzHZxOIqQOqV9z2zRlqh6KeCADPucE+akkGsOer9f2e.BUtTYsdPO+uoUKt4dQv9jNMlS.MKOAzTYBnYkIflUm.ZVaBnY8wRC+3V06yn8jgh.fFaKtgkb4jMwI7509uTCo4xN
    


  • @ustk already done



  • Here is the final result with three SliderPacks.
    I will post this in the category Snippets if you agree.

    Description: Arpegiator controlled by 3 SliderPacks with random generator
    Clicking on Random always saves 16 values (i) No matter how many steps are displayed You can go back and forth with the StepSlider and all values are kept.

    HiseSnippet 2635.3oc4Zz0baabDPRvwT1xw1wSadDiZmNTiknH.IEEqaFSpurUr9finhiS83wEh3H4MBDGLvQYwnQu29Resuzo+UZ+IzeB8w9n+Gjt6A.B.JRIHFKmzVjIPb281Ou81auCttKqIwyi4JIm4v9NDI46pznuMuy5cLn1Raugj7WpnshZcCS0FFccrHtu0yl53P3Rq02wvyiXJIKO8yvQKmYFIwyGd5ZFVF1MIQnjjdIi1jrCsKkGgsd0WPsr1xvjbHsarQWr51MY1qyrX8.KaZk7RNFMO1nMYOCbXSoHIeqMMoblaCtAm3IIOyZLy9M5vdus+3eI0idjEAAzjZ.BxG8VLKSzhQrRq2gZYVOLB3IIIqTOJdLse73QJ6RMoCvGEWtuffZDGwiGxScYlmVbyKe5MuohYdy3adOPoQSWpCOhBZa2QYaaNwskALED2r7GqzTdYTVmAivlmqqwwjsbAfAbjUSOe9EUKmO+BOYtYma1kW9DCWuk9w+L2rvjpGWEDm5Qb6CLrMYcU+J0PSoMguNqqCyF.xN+fQLOZFQbV2vlXoMV17IODO0bcHsaSMfYDjSQFNxWho1ryGeXCIgFVTShacHKTerpN1XFK2Zof6wq6Bof6BCw8KrYGMdaVPUvwxKuzMwClA4+eKubvL9Z83bl8GM4Sssn1D0V8raxoLaUl8fTGzmcYVYaF5vKBgDqdjEla1ylaVU3Y4kUUa.y2DUOQDDqy3OFO+AXwZZXo5ACAJ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RgLlS4.7TLWaQDq8rOWIwMYdMNVZLgbGQORBaYxrh6KDPiioiwL9vSSS3.jBzHwKH889wDQ.mwgPLwtVGV.+lKFMtef.f1xNhg8ohh.Nd.4c8HPglAnSuCEyTlSwu7Bz8Uaxj4MYTZzoWqVVjIKC6NJaZa.o+GRIWlKb4W5yiTBKEFivOiujpGo7RhEqIrga5s2eJu8uGprCwtMuy3sVoeJt7qQtz3AJvND1vIPaPrftJXoYo9HEzuTY+dbmd7ORh6AJ6VeSXO.2PAdgPXJW6+4nf1z1bLhIc2y2sTdNrQ7HVx9Iq82ONaHmIzFaPw+MDso8IvBK.CZiODZpukQOKdH1j6KuKyl4zgYSaFO.b.g6Ra2l3F21GoCUiywEBCv7npG.oHFwaQ6WWcGn0JCWHNQlvXgV5iEW170Wp3atpX6lp+uwwVl9+OO1xArdbpc6cMfD0SkjEsWAmV.ZEvuf.9A.kmB280GNOB6ebAaSAvO.OAD0PX4.hZgD+jnitFMcYusoesJLW91BLfeaK92hWFkcQX0AetIEk74xK0E54+sMahg6kf3yn4QeB3ovDvSwIfmRS.OqLA7TdB3Y0KkG73V05wYc8WJBHpuo3FVjk8ahSj0K8e.WdYAlC```


  • @MikeB Great job 👍



  • @MikeB

    Yeah pretty awesome 🙂 Would be nice to have a function for easy muting notes.
    (they could be greyed out but idk how to do that)

    1db788fa-5732-4fd7-a8fc-0be29fa065e1-grafik.png



  • @MikeB Actually 😆 this resets the the sliderpacks to the stored values whenever you hit compile. Need a workaround...



  • @DanH i dont understand?



  • @MikeB well if you hit Random, and get a random sliderpack, but then decide you want to change some of the sliders, it will revert to the random values the next time you compile (or open your plugin / daw project)


Log in to reply
 

11
Online

1.3k
Users

4.2k
Topics

38.3k
Posts