FDWaveformView icon indicating copy to clipboard operation
FDWaveformView copied to clipboard

Incremental rendering

Open fulldecent opened this issue 12 years ago • 13 comments

For a large audio file, update the view incrementally rather than all at once

fulldecent avatar Oct 19 '13 17:10 fulldecent

Can use fading between updates if we will render each frame as a PNG:

 UIImage * toImage = [UIImage imageNamed:@"myname.png"];
 [UIView transitionWithView:self.view
 duration:5.0f
 options:UIViewAnimationOptionTransitionCrossDissolve
 animations:^{
 self.imageView.image = toImage;
 } completion:nil];

fulldecent avatar Oct 19 '13 17:10 fulldecent

This is partially solved by Anton Tikhonov's commit 3fab424f675e7bbe8f4adbdc8aa840909212649e

fulldecent avatar Jan 06 '14 14:01 fulldecent

See work from @simonbs and the new FDWaveformDelegate. We should add a method to show progress updates from incrementally rendering.

fulldecent avatar Jan 14 '14 15:01 fulldecent

It should look like this

- (void)waveformView:(FDWaveformView *)waveformView 
        renderProgress(unsigned long int):progress;

fulldecent avatar Mar 05 '14 04:03 fulldecent

This feature conflicts slightly with the current feature of incrementally adding resolution

fulldecent avatar Jan 18 '15 18:01 fulldecent

So this is similar to the EZAudio audio recording project that could either show real time or rolling buffer display while recording audio from microphone? https://github.com/syedhali/EZAudio

scheung38 avatar Jun 19 '15 19:06 scheung38

No, live rendering will always be out of scope of this project (sans some hack) because we need to have the waveform in memory for zooming

fulldecent avatar Jun 19 '15 20:06 fulldecent

Hi! I'm trying to render a waveform for a 1 hour track. Of course it takes a lot of time, so I was wondering how to implement the incremental update. Would you call your completionHandler at the end of each loop in the method "sliceAndDownsampleAsset" and then do as you suggested in your second comment? Thanks for your help ;)

RomeHein avatar Jun 28 '16 00:06 RomeHein

This issue is blocked by consideration of #80. That may affect how we would be able to implement this.

fulldecent avatar Apr 14 '17 19:04 fulldecent

This issue is now reopen for consideration.

Items include:

  • Chunking the input file and only loading parts of the file into memory at a time. This will require storing multiple waveforms, something we currently do not support.

  • Reporting the partial progress of a render operation as a callback.

fulldecent avatar Jul 24 '17 22:07 fulldecent

Any progress on this feature? It would be a massive UX improvement. Thanks a lot!

nuthinking avatar Dec 19 '18 09:12 nuthinking

No progress. This issue is in scope for the project. But it is "pull requests welcome" for the foreseeable future.

fulldecent avatar Dec 19 '18 22:12 fulldecent