Drawing Sine Waves
-
This post is deleted! -
@ustk just trying to automate this animation with a macro lfo assigned to the knob. It works, but the animation isn't at all smooth. Any advice welcome!
HiseSnippet 1533.3oc6X8taaTDDeujbkXSSEUsRf3Smh3CNzTisiSZhJndDmjhUyeL3zVjpph1b2Z6U87tW2acBoU4a7c3QnemWBdD3Q.dC3M.lc26OqolP.0BMpbJx41Ylc1eyL6MyraGAOfjjvEHmR6eRLA4bY2tmvjCZM.SYn1afbth6N3DIQ3YHs9Iw3jDRHxwY56pH3TZFj94Wuy53HLKfTPBgd.mFP1lNjJKn1w+dznnsvgj8oCsjtoe6.NqEOhOBvyzt0Pw3fmf6S1EqDaJWjyk1LjJ4htRrjjfblYcd3IcGvOlYj+AzD5gQD0f5ntfhLj2hGEpPr5cTqAznvNY1cBB431ovKLswKbc2cngzb5Edi2SyvqXF19CmoNK3U2Fd0lH7pOI34XAuYLv6ptcCDzXYAGE1dW21LHP0CCg.aXYjEM0Jy31hCRvjUGheBYKALHeFUVoVsE8VtVsEt8bk2j0mxHUSHRsPDV3N3.AOoxile6s1q97OVIDDqRjdGgEdwdelWllCDDv36fkCpLtP6d+cNnyds2c+tfzKWuAvbtxBReudBxSUjpVSSxdNcvLRTcKs2mHawGFyYvfJyaXO+Boyixh.T60aDKPR4LOA4vQfy7tBbL.l4J+74J6AOwUChHXgFdlwIRrPtK43tiNTC7ZUAWA7SlDlei3A3Hu9vNA.P0znsfYOtnBUQ+1dTuO0xXgw23FKXDJE.pmT0rCrbUSdpPVw7FkAZ4Sr8UerQlNsWHCMEKpA8JidedE5hFklNgIppFUqUnP3MkqGzqVYmZaNFOaUAIFToL2UU9zI6o4r6w3GVWEkD7nJAYgnEgnXzHhw2WJMPmyUEMefhuV+kFObATNUGWmbnWudyufZKZ5p1BGEcHjunx3fIaywKo84JmZjfJ5nrxuhORBVUkLqpR+EJ+7xk5aVCURoJl+kT83ATIQC59UCE3i06ZhWz6QMVzC9SNflnv6CogpOCtYyBReAg1efTQ6wK5U2rE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asty CPU usage. What about a timer?
-
@d-healey Was just looking into a timer... not sure how to make it move the knob tho
-
@DanH
setValue()
-
@d-healey Fancy doing a video on timers any time soon David?! :face_with_tears_of_joy:
-
@DanH Sure, I can do that as next months video. I have touched on timers in some other videos:
https://youtu.be/8JO4m-OloqA?t=412
https://www.youtube.com/watch?v=hVF2vkmrpME -
@d-healey Great! Let me know if you need some completely broken code to get the video started with....
-
@d-healey So here is a snippet with a timer controlling the knob (referenced from an lfo). The knobs moves but the animation does not....
HiseSnippet 1514.3oc6X0saaTDEd23rkXCohR6UHgzpHtXSSpwtIozpBpKwIoX03DKbZKRUUUi2cr8P2cls6N1gzpbGWhD7HviBOB7H.u.HdCfyYl8O25lZjZQEAqh134Lm4Lemel47Y2MV3QSRDwFlUO5jHpg46Y06DtbTqQDF2n8NFlm2pCIQRis0h19jHRRB02vzrxsQAlUWzP87G2ZaR.g6QKDYXbOAyitOKjIKj108Nrff8H9ziXgkzdS21dBdKQfXLfmJVMLhHdOlLjd.AUaAKCyysqOSJh6IIRZhg4haK7Oo2Hwwbs92ikv5GPwAMM5AFRKdOQfOhXTpQqQr.+tY9chggoU2hnPEcT3RVcX9rb4EQi2WMgcwJJGOLW3rfWyxvqw7COyRvaQM7tfUOuXVjrXFDauqUaNjnFPfTPYXo00Xgu2xpk.zfKqGRdLcuXXP9JbtViFqauUiFqdykqsKeHiSqmPkJknb+NDuXQhyCVY+8Nr4JODUBxUIR6IjX66vE8aZ+41YVeHU1RDFI3v.mUTytxzq.rRGg+3.BDsvUpp4v0kK0A2I6BkddCLPzQLgFB6.VDEC1HEzdwTH5qDdX+ug5IcvU975i9l5CsHAA8gxLmAi4dRlf6r5x0d1x0rgGbil.VdJzp7twwwfk1mNgFnLOpsxOQ6dORvXpyjKukJVdJ9ZV.PRh0ezYiFZcJbunRQSsC0kHG4LcL3f614QcOr8AG0CzdqlWUYiX5P6Awzmfhp2PIp7Z5R3zfWdtRO8JqltNFO.Bo1YgF6XZ+wP44siIQiJEmhp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Lindon ahh of course! Thanks mate. It's either that or 'save in preset' that catches me out!!
Nice one :)
-
@DanH Hmmmm.... weird that this doesn't work in the compiled plugin...
Ah, needed the flag 'ENABLE_ALL_PEAK_METERS=1' in the project settings
-
@ustk Sir, Can You Draw Sine/Saw/Square Paths With Painting?
I Mean Fixed Shapes, With No Motion, In A Panel -
@Natan Yes, but why not just use an svg path?
-
@d-healey Just Need To Keep It In Codes, And Move It Freely, SVG Needs More Fine Drawing, And Takes Too Much Time For Paths Like This.
-
Here is Sine Waveform:
HiseSnippet 973.3ocsV02aiSCF2oaAcMPQbR7Av59qz650kN1FHsCQYcaGUv5hH6NPBgl7RbarVpcvw4JUmlDej4a.7X6zlLn2zoJsnpz77lyO+7xOmPoHlVTHjHm1WsLmhb9L2nkbU5nTBiiFeJx4ycufTnnRrU0IKyIEEzDjiyNuVqvo8tHy0e+cmPxH7XZsJD5sBVL8mXyYpZsgC+QVV14jD5Ur4M79fgiiE7QhLQIfmcbCP4j3aIynSHZ2Z4hb9jyRXJgLRQTzBjytmHRVFkJVvs9+VVA6lLpVX.JBVHq5yEYIZDq0hFkxxRBWsuKPvpDVmE1wlE9R2KXIr05qyFegw.tNhl4CmVOD7FzDdAe7vyoA710Bum5FEKY4pZKZr8oti4PgZJAJAMgk0WTK2cbGI.O3p9yI2ROWBBqiv+nffd3CCB5dbGuNdPgnPgeGQhyweKdUXwRJryBIpTesa0NM4MWbc3kimbUD389GdjYMjzY3oR5e.pNrefQUyXBIbZ1fFq9LpZjXdtfCB9OyZ9YcqhiwyXbJdZIOVwDbrjdSIjodsjjCfoi2663ggq79wYThz.OqbghHUSnKhJuw.7f9v9DtsxC68oBoOCvRvwXF9UM1Of7KdQWqSUuC80d6giz3IJkjSqUm2WixqD9rd3A3miu.di8KXbXs2qYR54386Grxd3X3oAc6drYYtqIrrIg9RZNz.pVuq7tSmcal.LYoJuKnpPs6+rnTAnweUNyeVWu260dl1A6Tlu8uh9KRYJpdQ.qIRxBSlJuG921uGF9oRY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