Changing filmstrip via script
-
I found changing filmstrips mentioned in a few places, but I still have the issue of the change not being applied until f5 is pressed again. In this example I want to change the filmstrips of several knobs based on the value of a combobox.
With images, setImageFile works fine. With sliders, Content.setPropertiesFromJSON or slider.set do not work until f5 is pressed again.
The filmstrips are definitely in the correct project folder.
HiseSnippet 1728.3oc4X0raabCDlqs25Xk31jfVzqKzgV4FGEq3zjhFDjMVxNUI1wJVJ1M8PSn2kRhv6RtfKW63FXf.zK8POzGg9n3GfdKG5aPOWzWf1gb2UKk7u0HInAUvW3PNy9My7wYF5VBtGINlKPVS0Y2HBx5B1s2kI6WuOlxPMafrlztEEy3nE1MBGGS7QVViee0lVSMAR+6Ou6B3.LyiTHBgVmS8HKSCoxBosbeHMHXIrOoCMz3z2vsoGmUmGvS.fLt8bnHr2V3djGgUGaLaj0GrnOUxEskXIIFYMwBb+ca2muCK87qSioaFPTKpgZCFJU7R7.eEhURQ06SC7ak6vwHvJsJb+wSc+O1dEpOcf7hvvE0a3TngY7vZriCd0Lg2bmd3YY.uIRg2kra6InQxhcTX671MYRhnKFRAlvJ8rnw9vIrqygSvjUCwaQVR.KFnQkaN+7y5L+Mt9L2d5RSWBRDwRmswBmU.W24NNZ5P0dDoFf5UUJq1q7L214ZWSepXbXT.QXpccd3l7E3unFXh7OtxH7vHNCVTo7fSjZn0HcIBBvhbjbGO0dNaxegoI2AGDDgiHhizjCNQ4QclGx3adzPQualNTV.kQb5lv7jTNyQQLy.pRYAOnhWtlyB1NHgLC.+5vmdSf05zkKLg+KmtjC7Kf6gCbhDjXhTwp0PIyrJvzTRB6PdgrhBDSoBpUwwsSCqUloZ.G6mtZEbTECybEm7bAnF72fHPU3DMCg6PKQCHUJ+xVqs5CVrdmmszpK2Xw01qLnYgYpJ4Ky2gHpiiIUlQYzqp7kdBdByuZDqW4YcjBvQy9JpHZrTkG92a3sfX8UEjsIhM0VVYx7rBnEvrAzKojXflF9f1q9n7zyrNurbWZPH7goQZWq7WqPwdZToOix.UZC6y5Af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+u8yOv8an0MrwO8Z2FvSRg3podKsTmrAvKDMXn4acfABl2YMNOL1oVMm1gvjtNav49DlVpyiSv9U2AuMJT49oYjrtw+EjAB37HfmHj46oDrHyOe+2XU.eWyelLMBdd61XYhPckRydtPw5gHMikItXxZ2R+9quKvatWHjbkCyFHixufoxkiJ6MWyCqSYohO0tvK9eREi2EeiPrmf+LuzWdqxGmSKA7al9F4T1qnV6L3w111yUcN3BmO8YddpQotZMD5v045mAcl+LnyMNC57kmAct4YPmacFz4qNVcT+aluWhjGlx+AAsVT+O8vxZQFFXx5qBn+A.4CkGK
-
@Zorpley This won't work in the exported plugin, you can't change images because they won't be in the image pool, unless they've also been used on another component.
What you can do (I think) is stitch your film strips together into a single image and change the offset from your combo box.
-
I created a few dummy controls with the possible images applied, which should (I think?) guarantee they're loaded into the pool, but switching another knob's filmstrip still doesn't work until 5f is pressed.
It also seems like loadImageIntoPool would be designed to help here? Or is duplicate controls/stitching filmstrips really the only way?
-
@Zorpley I think it must be that images can only be assigned when the instrument first initializes.
-
@Zorpley I think it should work if you use a panel instead of a slider
-
@ustk Awesome, that looks like it'll work great, though I'm getting slight flashbacks to similar control-layering jankyness in Kontakt.
For anyone reading this later, the solution is to script a panel to have mouse interaction slider behavior, or to use an invisible slider for mouse interaction and the panel only for drawing.
You can change which image is loaded using ScriptPanel.loadImage, and update the drawing of the panel with Graphics.drawImage.
David's tutorial covers a lot of relevant stuff here
-
@Zorpley said in Changing filmstrip via script:
though I'm getting slight flashbacks to similar control-layering jankyness in Kontakt.
Just wait until I implement a red pixel dot in order to parse fonts...
-
@Christoph-Hart said in Changing filmstrip via script:
@Zorpley said in Changing filmstrip via script:
though I'm getting slight flashbacks to similar control-layering jankyness in Kontakt.
Just wait until I implement a red pixel dot in order to parse fonts...
Now Christoph that's just mean.