question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

only render a segment of the waveform

See original GitHub issue

I’d like “to only render the part of the waveform showing along the horizontal scroll” as described by @ErikOmberg and @katspaugh in #672. I’m wondering if anyone has any insight for how to make it possible with wavesurfer?

I am working with long audio files (using MediaElement and pre-analyzed waveform .json). I don’t need to show the entire file, I’m only trying to zoom in very close on one segment at a time. As I zoom, the main canvas exceeds the max number of pixels (as mentioned before https://github.com/katspaugh/wavesurfer.js/issues/458 https://github.com/katspaugh/wavesurfer.js/issues/692).

I can keep zooming with MultiCanvas (thanks for your work on this, @chrisparton1991). But I only need to show the zoomed in segment, and MultiCanvas is using up resources to draw canvases that aren’t visible.

Would it make sense to adapt MultiCanvas, and tell it not to create/draw the extra canvases if scrollParent is false? Or does this call for a custom renderer, like SegmentRenderer? Is anybody else interested/working on this?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
rockyhubercommented, Dec 21, 2018

@therewasaguy hey mate, how did you go with this? Any updates?

1reaction
katspaughcommented, Apr 14, 2016

I like the approach that peaks.js has taken: they use only one canvas to render the currently visible segment. They redraw the canvas as the track is being navigated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Export to render problem - Tracktion Forum - KVR Audio
For some reason when I try to 'Export: Render To A File' it shows the waveform progress then blanks from about 75%, leaving...
Read more >
Portions of waveforms are not appearing - Apple Community
Anyways, I was fiddling around and was changing Clip Appearance in Timeline, and zoomed super duper in - just on the spots that...
Read more >
Basics of rendering and exporting in After Effects CC
Learn how to render and export in After Effects using the Render Queue ... To render only the part of the composition indicated...
Read more >
How to make waveform rendering more interesting?
What could be the trick here? I don't think they just add random noise. algorithm · audio · graphics · rendering · waveform....
Read more >
Part II: Waveform rendering | SoundCloud Backstage Blog
The waveform samples never need to change in size, but only in tint color. This makes it possible to render the waveform once,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found