Drawing circular audio waveforms

Hi there. I wonder how to draw audio waveforms in circular form instead of drawing them linear.

I want to draw something like that:

1 Like

In principle you just need to use polar coordinates instead of cartesian. But the underlying trig functions aren’t cheap. So doing it with high performance is a different beast, with some options below off the top of my head:

  1. Lookup table(s) or delta field for the coordinates transform. Trades CPU overhead for memory consumption and cache complexity.
  2. Fragment shader with waveform data passed in. Requires OpenGL or other framework and isn’t trivial to implement, but offloads the trig functions to GPU parallelism
  3. Perform with normal trig functions and sacrifice resolution to save CPU, then upscale when rendering.

Maybe others here have done this and have a better trick to do this efficiently.


Yes this looks great, I need that too

Mate do you know any example codes/projects for Circular Waveform ?
I don’t wanna dive in to OpenGL b’coz it seems a whole different world for me, but Delta Field coordinates sounds more logical & easy, maybe if I find an example…

Here’s a Javascript example: