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.SuHumWg4xMKbtbg6OOR39D6glQBEi2REfWyF9+y3M4TtMre8jITOcFXKaevY+WORaEfxuIC0LwEGQzJ1eBGneb3rQvcF7n.RDBJOvbHeISOPLcSCsIyLhJ7aldCfDgsLzVIBakJDMi3ojezKthzbN55Qb.LIhtMhi8QFZbqzJQCtmAGt+QOOShXK.4Eaw1qrEsWYK1Yks3oqrEcVYK1cks3Ge.KL2jZ+PsbVbaAB8uPvSheb
-
Do you need to store them in a separate array? There is in fact an issue that it just passes the last changed index at the after compile
onControl
callback (this is why the index 15 has the correct value0.600002
in the Console), but it restores the array data ìnternally correctly:HiseSnippet 951.3ocsV01aaaCDlxIBHVcYXcX+.H7mrgSzjicbVl2vZbZSWvriMlJBV5KniQh1lMzjFTT00cn+m6+fti5kIkEuh3MLBXac2ycmd3cGO5wJY.MJRpPVO3YqVPQVegs+Jgd1oyHLA57Gir1wVSizTEp+pEjnHZHxxZqmZPsptMJY8wepOgSDAzBUHzkRV.c.aNSWn82ezuv37yHgzmwlWx5NO57.o3TIWFCLYKaOzBRvMjozKHFypXidKitLBY4Y29.W0Mst98m3ZV8cyWCd7ym1gStY4YttugSlO7oFsnfXkhJzWBtirrs9DrrreRHSKU9ZBryPVa2WFtxelbov7pagtjEwtlSSE7ANkxnyj7Pyl2nEc5LFObbdxKBAQYbQpbqzT42XOjEx9K8EozuJA.W3Q4TqUk+izyaczypD81NkdOz1OPwVnKPLb6qyz9OvtTPTklUrOUJhjbpa.mRT0azaWmcc.cZHc6FQ0+LkMcltdaOuF8bfpajF+VhB6yYgT0Xn7h+Qbt4jvvB80qU7bs8vcauG9vCfXXheAxkDdLMBhwKdUxatzqnerVKE2N7o5pWK8WHrs6d7d3iZCwcRrHPy.GjhKjZ5HQ8FN+gSUmObGjISVGj4snjbNUsNTSit5y3VcQ77qop8.lCaHvtccpFsjoClkgz.TXTVMfDQy1aeuQtZdAXghIz0q8RwKE6u+9PgCDwmv4Y4ZyQIbV5BvqYpTf2SjJbcFjk75gY3e.2paObylrFIf+sXyvMw0veK7oYoBn6TpNUJI5m.10nQupIA3ZEkbSOmpe.1zPS4saocteszAokuRFJEmKX5QKnhTKxqX2QyjIkUUTgJqMoxrFyxUsti4nrVJ3DUkLygyS5jyS4mbJRPHVXx.0BEIEYyfHyTuPhlfrdgc2NtqFrZPy2Ce00GdTM547q3GKthe0gF42LZ3pA9Gav6TRNAmAVJGYl00z70QF4kiRhmaJcS33Vob7Ky3XZaTB+1wNSHiaEC0Q2clAL4RFFyI5aONybcPF.zbeqAFmaxWQL8pxQdClw4cuGAeeo6CsGaNdsd9VYM70Tr+eluY2Xrq8SlLgFnKH611m8a+audXCnxuJi0LwzgDsh8Nn+7h349vcwATfIBAkGY5YqX5+Sk8x6g8ohPu7aVy.aYjsx.akChlSBTxWGj1QZtSZmDM.mDI2xW0dnQF2JuSzv64vEkuNHvjH1GX9583fM1i1arGc1XONbi8n6F6wQarGe2mwCy+J4jXsbd5wBD5Owxni7f ``
-
I don't need to store them in a separate array, I just need to retrieve the values when I ask for them. My arpeggiator doesn't work until you set every gate slider every time you load the project. My code should not be producing undefined.
Edit: I guess in my case I store them in an array because the array is used by my arpeggiator for gate length.
I thought every GUI widget callback would be hit on init/compile/load:
case ArpSliderPack: MyArpManager.setStepLen(value, ArpSliderPack.getSliderValueAt(value)); break;
But that creates a bunch of undefined indexes in my Arp Manager's step length array.
-
On init, we should all these onControl values be triggered:
number = SliderPack
value = 0number = SliderPack
value = 1number = SliderPack
value = 2etc.
Otherwise I have to create workaround/hacky code that gets triggered once.
-
The problem with your approach is that this would exponentially increase the number of callbacks executed which increases the instrument loading times.
For example I built an instrument which stores the AHDSR values for each note number in a slider pack. This
means 5 * 127 = 635 function callbacks instead of 5.I just need to retrieve the values when I ask for them.
The SliderPack was designed with the idea in mind that you can use its values directly using
SliderPack.getSliderValueAt()
. So unless you don't need array specific functions (like sort or insert and move all subsequent values to the right), I recommend not doubling the data structure with an array but use the SliderPack for the gate length in yourArpManager
directly. -
SliderPack is the gui, ArpManager is the midi handler. I don't want to combine the two.
Edit: Can I build my sliderpack value array on init?
Edit: The reason for the separation is so that you can arbitrarily decide what step has what values. If I have a sliderpack directly connected to that then it becomes inflexible, unportable, unscalable.