How to Auto rotate Film strip knob
-
How to Auto rotate & Loop (a film strip) knob. I know it is possible through scripting but I am total newbie in HISE and scripting . How can I make similar auto rotating knob by a filmstrip?
Thanks
TM -
@Tania-Mosh said in How to Auto rotate Film strip knob:
How to Auto rotate & Loop (a film strip) knob. I know it is possible through scripting but I am total newbie in HISE and scripting . How can I make similar auto rotating knob by a filmstrip?
Thanks
TMGot this code
reg angle = 0; const var Panel1 = Content.getComponent("Panel1"); Panel1.loadImage("{PROJECT_FOLDER}myimg.jpg", "test"); Panel1.setPaintRoutine(function(g){ g.rotate(Math.toRadians(angle), [this.get("width")/2, this.get("height")/2]); g.drawImage("test", [0, 0, this.get("width"), this.get("height")], 0, 0); }); Panel1.setTimerCallback(function(){ angle = (angle + 1) % 360; Console.print(angle); this.repaint(); }); Panel1.startTimer(25);
-
But I need to animate the filmstrip like this.
-
HiseSnippet 955.3ocsV8+ZaaDE+ji0n1cdrB6OfCCCjYdNxoMYCJilF+kg2ZRDwYkAiR3hzYoiHcm3z4lYBA1+L6+u8Ovn6c5jsjaTKsFl9I+95848t26yYOovmlkIjHqVWtJkhr9R64q3pnQQDFGMaLx5qrOkjonRrQ0IqRIYYz.jk0d+rVgUqln7u+4EmPhIbeZoJD50BlO8UrDlpTq2w+JKNdJIfdIKoh2O63Y9B9HQrXIfm8rcQoD+aHgzyHZ2ZXir9hIALkPNWQTzLvmSDAqlGItka7+0rL10wTsvPzbHQF0nQQr3.u00ZFBY0zqrx2yT4ei8or.1F8kcfuN2.tLhp8.qFaColaAogeHHMUDGnSvG.dVUfWSC7dh8beIKUUZQisGaOiCWNKHPauJrL9hZ72MrGI.O3pAIjanSkfvlHbNx0sO9PW2dOuS6NskzPLgGFSw+D1MW2w77Xcd1zWpHLpawtZutifLQfFLK3yb5ZL20jGivfXAIXVBb84z8NuKN+WlL5xqld9qFO4h6yTD4fTdX293tPWSscfYTkGz6UWHVpXbpyhkbeESvcB6cWm1X3KbfTn62NmRTQCThKHALBOyIG885i+CUDKSCQmt2xBTQc6s+A8wkJinrvHkV6azmrIkARxsE3MGSPZftia03JRVco5M4tBcx12+9EidJWNhDGeMLNWVMqKl0sbC5weGdXO72he5QtEHa+8gddlHlNHUBckhhrvXNPjzTc+x4gGNzmMGuyAG164qOZrfelPQOGvP66Z2p88swuuoEKp0l91WJhigDVmYyQ8QBzguL4ZprOLSEujtwQXHe6snG+osE4aFFq3nfOiyTmmRKjK2yz1LU8ZqtnMEaUUk0XUs4kVMtUp5gqwnhkE3W+1rwDEQuYWnC7KkJULc0ZMl9Vflzrm2xdLM6FkHM22hMLf4SkasyZV.8ELhAU1irMW1n+rjIcxwq1H7WSNNerEYYa8ufrYfUK8tbx3GPz.zchfkwD01bfZx9BCvU5VjMZBEdFSsp5iAeFDit0RLNrtN5mHbehsGS4GUOdaTCdgal+uwawyLcrmrXA0WUB1l1S+8c8MkOCnXnSCAJSIClUrOaYxb3kVeJfDNLAkomIZnmZMxtZYcmYNkGjK7N3qv3PsrUgwgqMhRH9RwU9lUC8CYOJWCfId9a3sf+LAHiGhxI.f3rcG3hRf2Wux2W2J9d.60GyA6PLOcGh4Y6PLGtCwbzNDyOrCw7iezXz+0lWtTIRLqIfBuI4TUVVS3DXJKehD8eQmMwP.
-
Check This Thread
https://forum.hise.audio/topic/1110/rotate-an-image/11 -
@Natan I have tried this . I want to animate Knob (film strip image).
-
Show us the image you want to use. Are you tring to apply it to a knob/slider control or are you trying to make a knob/slider using a panel?
-
@d-healey It is some think like... Using GIF image. I think HISE doesn't support GIF. So, I want to make a Auto Slider/Knob from a vertical Film strip image.
-
-
@d-healey said in How to Auto rotate Film strip knob:
Show us the image you want to use. Are you tring to apply it to a knob/slider control or are you trying to make a knob/slider using a panel?
Both Slider and Panel.
-
Well for a slider you just set it as the slider's film strip image. For the panel you need to use a paint routine.
-
@d-healey No no... I want this type of animation using Hise. I want to create this with Film strip.
https://www.studiolinked.com/product/infinitiplayer/infiniti-player/#tab-description
-
I think a paint routine is the only way to do that (but I could be wrong).
-
@Tania-Mosh Please Download The Below ZIp File, And Load It, I Guess This Is What You Try To Get :)
Star Animation.zip -
@Natan Exactly. Yeah Yeah... That's what I wanted. Thank you so very much. :)
How do you all know HISE !! I wanna learn HISE badly. You guys are my inspiration.Thank you,
TM -
@Tania-Mosh Glad to Help
-
@Natan
Fr some reason I keep getting this code...'%' is not allowed on the String type
anyone have any idea why?
-
@BWSounds
You Just Need To Change The Below Numbers, So They Match To Your Png Image:reg Star_total_frames = 65; // total frames in the filmstrip reg Star_frame_height = 100; // the height(y) of each frame
And The Image PNG Name, Or Just Rename Your PNG To star.png And You're All Set.
Star.loadImage("{PROJECT_FOLDER}star.png", "Star"); // Just Change The star.png
I Don't See Any Errors Here