piper-audio / ugly-duckling

Technology demo for Piper components using Waves-UI
4 stars 0 forks source link

Render features as they're calculated #19

Closed LucasThompson closed 7 years ago

LucasThompson commented 7 years ago

Rendering features as they're calculated, a la Sonic Visualiser, might be nice - if not just because it provides meaningful feedback to the user.

Some limitations as it stands:

cannam commented 7 years ago

Would it just work?

No, not as things stand, at least not for matrix shapes (others may vary). Matrix caches its data into images once, between render and update phases.

LucasThompson commented 7 years ago

Perhaps an argument for extracting the cache stuff? i.e. the backing data for a layer is itself a cache, the layer would be constructed with a cache object for the data property

cannam commented 7 years ago

Only the shape knows what sort of cache it needs.

LucasThompson commented 7 years ago

This is mainly an upstream dependency issue: piper-audio/piper-js#3

LucasThompson commented 7 years ago

Streaming features

LucasThompson commented 7 years ago

For later reference: It seems posting a message from the worker for each feature block swamps the event queue, and results in the overall extraction taking significantly longer. I may have missed something and it is actually something else, but that is my current understanding.

For now, I throttle the messages, sending one with the features so far when (blocks to process / total blocks to process) * 100 increases by one, ultimately to update the progress bar.