Horizontal Zoom for Waveform
-
This has been a request we've gotten from a lot of users who use their own audio within our engine. Is this possible from scripting alone or would this require rewriting the AudioWaveform component?
-
@Casey-Kolb Actually I Did this for one of my Plugins, It Zooms in Start point of Sample,
with a Little Code, you can achieve this for the endpoint as well
Hope This Help ( Drop an audio file into The Audiowaveform so You See The effect )HiseSnippet 1263.3oc4W0saaTDEdV6rQ0FZDkVj3xUIfjqTHxNzxeUHbhiMXQRpUbZAghTzjcGaOjYmYY1wNwf5K.Ww07TAuEbIuAgyL6t1yl3j5XoTg.egklybNm467+Y6HE9j3XgD4T5vwQDjya61cLWMnw.LkiZuCxYE28vwJhzKgz1iivwwj.jiSwuVSvozRHyu+9q1FyvbexTRHzKETextzPpZJ0N0+VJi0BGPNjFZw8Sp21WvaHXhg.dJ5VEEg8OE2mrOVyVAWjyxMCnJgrqBqHwHmk1VDLt6.wY7D9eIMldBinOTC0ETTB4VBVfFwZpnFCnrfNY1cLB431YpWnXhW3Qt6QCnSnO0a7NlK7lJgs+vovMAuZ1vq57COGK3sTB7dfaWeIMRM8FM1dK21bHP0CCg.aXkvKpve531P.bvUaDhOkzRBGlHQkMeZ008f+d7yJWtLDGhUdivRuePHB89RuLA6STMDgQBNbnxp5KWUKvT92ZX.U7c3QjdBYXsqUx7rYzAkynbhWugbeEUv8Dbs50hKErJ9YxtN7LrgjGW9WJWJuV1Hl.Z9LZfZvpqmvzyJ+JPy2D30Bk9FMvL1IPFWkbuLnCKHsuPQdNuh40K+pxdW9pd8l4co5hQjy7Zccf7lDrBeX3IDossqYDRHxmw4d8Yb1ED9INDKFE71bp54QD90kGhR8hPFYgTTA0iJS936klOlKdfnA55k7wHjw.r6PHw79D.+RnCgqyDJM4Aly+dQTOJKsEvG513KN5EwDY7QRxOiIGsCI9TkH5nteS0O+3CvmswY3QIH0.uhIvakT30kQCHRCtV1UGhuDZ9w+pN5Es2Aqv5xtT6E7AQDohpcuN6PFA8yRJBK4l95FGRZZExobxad+rRTLmvLO4Ccy7BZMCMT.nbtsmXr8ASZ7DB0E0GPn8GX0EMnNUQBy5VVZ40VasKzzOo+UoMkyMsIqHmqtJyZKeh0rxsN.OulD3rupIEkkv0NP2D1nZucEhHuNL7XhrFJFGFwHs4AjySxkEQ3eRGCcJFCoysljq3TbVdhHrDrKKCbVQkK4tPnKlg6JiJxRY260kuY4b1t9TmS8f5gzf.FoiHlpq7mbyu8qvMb67fP7419v.RO7Pl5k4RjA1PWcpAL6RDLjgU4Gnomhmdg9ksmbnmNvADM1dJ+cxTt4EtOvsCU4OX13svLvqtc0cLdS2Y39tM60i3qlB1kba8828KHXCkGlAESkitvgjravLqkt9c49i4cWtn4dWNXsReHrQrSkLwxCkvLWJuu8SogYSNF7EA1jOPHT5wr16R10zPvL.ATeNtIifIE40Pqa4rDSwWxXISgWxDIF.ubirXF7Fjczo3bGmuE6otz+p2S8MWCmhyGbeMqRWJCico5Dnl7QDFTtXv36Bi1MsUynluVYOAWDMPvo94S2TRZ+9DoM1moAskRAo7So7n5GPXDbrUd8GTeWXTDVd4Jlagun176Kto3066l.WOcAt2+MFTT7+mCJNPLTAMZ2CCIp5dY6OLrKze1m.HgCqop+.BmB5UZRNWMqeVWBOvb3B3W5k0zmcRurV1kuQdiPruTbrexV95b46Yn.1M2zZuj6d5ydS9ZCW2paTE5kGPO12W6t+nZHzrkYyEPlOdAj4IKfLOcAj4SV.Y9zEPlO6FkQOLZqgJQXRoHPnSSy2Y43LYLuSQz+.IOBeZ
-
Here is another Idea to Move around the waveform with a fake slider, It is not Perfect, and It needs some Fine Tune, I Believe Master of Painting & Calculation @ulrik @d-healey @ustk Can make this Up and Work
HiseSnippet 1395.3oc4W0saaTDEd13LU0tjJJsf3xUsfTpTIxtzxOsBgachoVzzZE2VPnHEMY2w1SyryrL63j3V06q3JtlK3FdBP7BjGAdL3RdCBmY1csmM1NwIRsBANRQZNy4bluy+mssRFPSRjJjW4mLLlh7dGbmgBc+F8ILAp0pHuKhWmjnoJ+TR2eXLIIgFh77J8MFB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C3e8ebvLrxW+aG.KfE2g8B3kv3ZqTE1gZhcBfMSjgC3Dcw0UL6nkcgQmt6EXl8Kf2Zn6NbuQ1gYdg6kvsY5f9SGuKLE7B0iuowa1FgKgWqaWZfdLXWD276eyu9mKTtbNTrU9lBeZ5leSsWvr2T+Om2M0im6M0gOZH.BaT2TIar7IJXsClnm6SYf4ZBB3KBcIugTpMKY39kBcrMzriOA0Wfa5tvbxhZn4obRps9KcnrsxLcdLGfWgA1bKdGMu1qzbGmOEeExh+q9qPd60voz7A2S3CkJmiwNLSBzZhcobnbwhw2CVMwNVHmZwZk0kBYbeofETLcSqX85QUtXepFz8zZHkeLkqTeCJmRRbxq+n5ODFkRTGsh4T3KpM+9hiKd8g3T35aJv8+uwfhR++bPwFxAZnQ65DHQ0zK6QCh5.8mCn.RDvZ1lOexaAyJYomql2dqCUDZObH7K6xZlydYWVK+x2JuQDAV5ZqfzuSwjKedKEvtE1V6kwqaN6O5asv3pvJQvxSrsBBLt6OoFBMcYt4YPlO8LHysNCxb6yfLe1YPlO+LHyWbrxXFFcuAZYTZoHPn8Z1uSzyazXduRn+Av.daWt
-
@Natan Ah, that's a clever easy way to do it. I hadn't considered that. I can see the calculations getting rather complicated if you want to have scrolling or the ability to select parts of the waveform at certain scroll depths, etc.
-
@Casey-Kolb @Natan Using simple maths:
HiseSnippet 1628.3oc2XszaaaDDdokYRjZcPRSZQOR3zBHm3GRNOZALJr7K4HjHGAKGk1dwcM4JoEgbWFxU1Von.8WQQQOkeR8mP9IjiE8R5rKIEWZSY6n1TzToKZmcd7MyNyrypVAbaRXHO.YTbug9DjwGa1dHSzei9XJC0XSjwUMahCEj.qHRqOzGGFRbPFFE1VRvn3zH0m2r55XWLyljRBg5vo1jGS8nhTpsp8HpqacrCYOpmF22qVCaNaCtKe.fmBlUP9X6mi6Q1AKYaJSjwk1xgJ3AsEXAIDYL85bmgs6yOhEweGZH8.WhbQUTaPQQjqyccjHVREsQepqSqD+NDgLLakFEJDEEtoYSpCcD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RodWI450q+aw4hir7kO2BgwjMzxulG0wwkjz1LksWuZ3ftcopPyWh73NfA9Lyc.uC6ReIwoEIvFLNLQZFnT57KqRwxqDZXolesQGmGm43bYX03g4YBMcevgzEOvUzIag4qW8hA+j55Tz+yuPC8+P3Xij+wEOR5k8MDdXsyMTs7c.nyxoGPFFMm6LvEKxNut7QJwaHgn9PxxAgY.zGpq4+wFh+hBwqa1hJr6mOFmJGLBMUdefw3m9Li4Vc6RrEo.bZy5e66m24na9ajXdUaKYWKRzSbxsQ13eF5ueQeFp+E9YnvKhsapxgSSSTmY6E.CbRY8zMkDlawvf+6nSdWNWHGyR+YvsUciU27CpOC2jCgIJxpgzly+sm3PUyEcchpdKZJCW.4YFCwU4JilBwnvY856pS3qum9+bu99CfdKY9CBJlfw1TY9zVrCItP0iBieBLVkpCZB0rkNM4LteeNiZmM6SDP60iDni8bcn0DBnBHkxMqsKwkfC0Ry+hZOFFK.GbxBn2gXQ024+rjbOu9byH3ZIq2s9v8NgB++9Ngc4CDPO0lXHIT1aZmAdsgVw1Dv5LX7e4aEMlRNMXz5JIsqZSXNpEuE9DuYU4Zi3Mqlr4+J1vCCy9suczymj4oWQQA7alpKdQylx0VidXooYkEqHm5itussLDuPUDJeYVdBj4tSfL2aBj49SfLOXBj4ql.Y95yTF4kKqMPv8hJ4.Bs1R89UCiQ2naT.8Wfq1PIK
It is to be noted that the vertical zoom only works for mono samples as stereo ones will badly spread from the center. I'd rather prefer to paint the audio buffer in a panel than moving a waveForm component anyway...
-
@ustk Awesome stuff! I'd have to figure out how to interpret sample start positions based on the zoom factor, but other than that, this solves most of it.
-
@Christoph-Hart Any chance of getting proper zoom in/out for the waveform like we have in the sampler workspace?
-
@d-healey Also can we get the spectrogram view in the waveform tile?
@ustk said in Horizontal Zoom for Waveform:
I'd rather prefer to paint the audio buffer in a panel than moving a waveForm component anyway...
You got a way to do this with zoom?
-
@d-healey said in Horizontal Zoom for Waveform:
@d-healey Also can we get the spectrogram view in the waveform tile?
That would be neat indeed!
You got a way to do this with zoom?
Yeah I've did it for an analyser but vertically. I'll try to extract an example from it as soon as I get some time
Do you have a snippet with the buffer in question painted already? -
@ustk Wow that's awesome. I'm just using a waveform control with a sampler in my project.