How can draw wave line in spark ar?

I want to make a circle audio analyzer
The first challenge to make this filter is to draw a wave line, I will be happy if you help me

Like this picture

Hi @Dallal ,
Unfortunately we can’t make full frequency audio spectrum visualizer and only limited to the 8 band like we can see in the Audio Analyzer patch documentation.
But you can still create something like that by using SDF. I recommend creating your own sdf line using spark sl to create the points and draw the line from each points with bezier curve. Maybe this video will help you to understand how to build one yourself: The Beauty of Bézier Curves - YouTube
here is some references for you to learn how to build an SDF: Inigo Quilez - Distance Function
you can learn how to play around with spark sl from here: Adam Ferriss - SparkSL Shader Example

I haven’t play around with audio reactive effects,
but if I want to make one based on your reference image, I’ll try something like this:

  • Make 8 points (in uv space) and distribute them all evenly in circular fashion. this will be the peak and their radius from center will be driven by the audio analyzer.
  • make another point in between those points. this will be the floor of the peak/interval.
  • make the bezier “handle” point to each of those previous points so they look curvy, not straight lines.
  • use step or smooth step function/patch to generate the field,
  • connect to mix patch to apply color and alpha
  • duplicate it multiple times, and adjust their parameter such as radius and intensity, rotation and color. then layer them just like int the reference.

That’s it. it won’t look like your reference with so many curves, but more like this:

*note, the look will just like a stroke along the white area. and it will be symmetrical, unlike this image. because this particular visualizer uses full audio frequency in fft, but only focus on the low end area to exaggerate the bass part. and then mirror them on Y axis.

I hope you find it helpful.
Good Luck!


Hello, thank you for your good and complete explanation, I will definitely read all your writings carefully and try to implement them, I hope I will get closer to what I want, thank you very much again, if I had any problems in producing this filter, be sure here I raise

I solved this problem with another technique and now I have designed the same effect that I had in mind, thank you all friends

You can test it :heart_eyes:

It looks great! Nice work!