marcolarosa / pdsc-collection-viewer

Paradisec Collection Viewer
MIT License
4 stars 0 forks source link

add wave surfer #2

Open marcolarosa opened 8 years ago

marcolarosa commented 8 years ago

Can you add this to the audio viewer? http://wavesurfer-js.org/ It should give a wave form that can be used to navigate the file. (I'm still hoping to get the more detailed image of the noise visualiser pre-generated and stored but that is taking time) If it is too slow to load maybe it could be an option for the user to select, I'm not sure.

I noticed that wavesurfer also plays Elan files (our .eaf files) so that could be added to the player. http://wavesurfer-js.org/example/elan/

marcolarosa commented 8 years ago

@nthieberger I assume this was meant for the collection viewer rather than the olac-vis?

marcolarosa commented 8 years ago

@nthieberger

I'm not sure adding wavesurfer is a good idea.

Wavesurfer needs to download the whole wav file in order to read it and produce the vis. The two examples I've been working from each have massive wav files: http://catalog.paradisec.org.au/collections/BN1/items/001 (150MB) and http://catalog.paradisec.org.au/collections/BN1/items/002 (332MB). That's a lot of data to download and it would place a huge load on mobile devices using mobile networks.

What do you think?

nthieberger commented 8 years ago

Yes, wavesurfer sounds like it is a bad idea. I have an alternative which is to pre-generate the image files using the noise visualiser I commissioned from Fraunhoffer, but this would then result in files like these: http://catalog.paradisec.org.au/repository/SAW2/009/SAW2-009-A-spectrum-PDSC_ADMIN.jpg and http://catalog.paradisec.org.au/repository/SAW2/009/SAW2-009-A-spectrum-PDSC_ADMIN.htm

Can you try to include them in the visualiser if they are in the item? I will get them generated for more files if it looks like it cold work.

marcolarosa commented 8 years ago

Wavesurfer supports pregenerated waveform files. See the FAQ question "How to generate waveform data on the server?" (http://wavesurfer-js.org/faq/). The program they reference (https://github.com/bbcrd/audiowaveform) says it can generate waveform data from either MP3, WAV, or FLAC file formats.

Perhaps this program is worth a look as the format of the generated waveform datafile is understood by wavesurfer which seems to have some nice functionality.