How to draw a wave shape using nvg from loaded samples

I wanna draw a wave shape using nvg from loaded samples (e.g. a drum kick or snare). As the image shown below, is there some comparatively convenient way doing so? Thanks a lot for help.

1 Like

Effectively this is what the scope does. Start at the left with an nvgMoveTo and then lots of nvgLineTo until you get to the right hand side.

To optimise it, select every n samples according to the sample length, your display width, and some level of zoom that you want to support.

2 Likes

Gotcha. Trying for that. Thx a lot.