How to draw super smooth Waveform?
-
I am experimenting with waveform drawing. I would like to draw a super smooth waveform. I can customize the drawing of a Waveform by drawing the path with LAF. I then use
Path.roundCorners(10)
however it seems like its not getting any rounder after using a value of 15 which is not very round.
I was thinking that I could edit the path on the fly and remove some points to get rid of these sharp inclines but I found no way on how to actually edit the path.
Does anyone have any tips on how to achieve such a look?
-
@oskarsh Posting a snippet might help.
-
There's a dubious function available as LAF callback that lets you customize the audio rendering options:
const var AudioWaveform1 = Content.getComponent("AudioWaveform1"); const var laf = Content.createLocalLookAndFeel(); laf.registerFunction("getThumbnailRenderOptions", function(obj) { Console.print(trace(obj)); obj.manualDownSampleFactor = 4.0; return obj; }); AudioWaveform1.setLocalLookAndFeel(laf);
By changing the
manualDownSampleFactor
property you can get a low-res signal with less edges which you can then make more rounded using the function you mentioned above.