Thank you @junkato for inviting me to the AIST seminar, I loved the opportunity to present, learn, and be part of the panel. And thanks a lot to @tomoya and Baku for your presentations. I learnt a lot and your projects are really exciting to see. I'm looking forward to witnessing where you go with them, and perhaps to exchanging more ideas in the future.
@xavier @junkato I had no time to mention it but I guess we were using mostly common toolchains for the implementation, I really wanted know how to draw the thumbnail of waveform with egui😂

@tomoya @junkato I don't quite remember because I implemented it once two years ago and then just copy-pasted that code through every prototype that followed 😅 But I can send you a link to the source, and I'm happy to help explain how it works to the best of my memory, by text or over a call.

The source is in this folder, in `audio_clip` and `audio_clip.rs`: https://codeberg.org/xlambein/futile/src/branch/main/paw/src/widgets/track

futile

futile

Codeberg.org

@tomoya @junkato But yeah in short, it's not super simple. IIRC I have two modes depending on whether I'm zoomed in close or not. If I'm far away, I have pre-computed the min/max of samples over a rolling window of say 256 samples, and then I subsample this to compute the visible min/max at the current zoom level. Then I draw a pair of triangles for each pair of consecutive min/max. And there's a lot of caching involved to make this efficient.

Not sure if this made any sense 😅😅

@xavier @junkato really appreciate for that showing source code, it's very well organized... I was surprised that there's almost no standard way for just drawing waveform accurately and efficiently though we see them everywhere😇
@tomoya @junkato Aw thanks! Yeah I remember struggling to figure out how I should draw them. In the end I think it's a combination of looking at the source code from Ardour + some experimentation and some googling