boats-animator icon indicating copy to clipboard operation
boats-animator copied to clipboard

Import audio

Open charlielee opened this issue 8 years ago • 8 comments

The ability to import audio files should eventually exist to help with matching animations to dialogue etc.

An audio speed option should be available in conjunction that is independent of the FPS change feature (ie even though FPS = 15, if audio speed = 50%, playback at effectively 7.5 FPS).

charlielee avatar May 02 '16 09:05 charlielee

Was just searching around the web and came across this. I thought I'd link it here.

https://wavesurfer-js.org/

Seems pretty nifty to add some time down the road when we want to add waveforms underneath our frame icons, or on an x-sheet (depending on which way we go with development).

rioforce avatar Dec 20 '17 19:12 rioforce

Should be noted that I have received quite a few user requests for this feature recently

charlielee avatar May 05 '20 17:05 charlielee

Should be noted that I have received quite a few user requests for this feature recently

Yeah, I saw the discussion on BiM. I still need to do some research on how JS handles audio & and possible ways to implement it in the app.

AndreasDemenagas avatar May 05 '20 17:05 AndreasDemenagas

By playing around with https://wavesurfer-js.org/, as suggested by rioforce above, I was able to get the following result with less than 10 lines of JS + HTML. They provide a really powerful framework.

We should set the skipLength property of the waveform to something proportional to their frame rate (1/15th of a second if animating on 15 FPS etc..), and then call the skipForward() and skipBackward() functions when new frames are being added or when the user is moving through frames in the timeline.

Screenshot 2020-05-08 at 13 38 34

AndreasDemenagas avatar May 08 '20 10:05 AndreasDemenagas

Began trying to implement this in the import-audio branch. No promises still :)

AndreasDemenagas avatar Sep 05 '20 11:09 AndreasDemenagas

https://css-tricks.com/introduction-web-audio-api/

charlielee avatar Nov 08 '21 11:11 charlielee

Some of the data structure changes to support this are:

  • Take - add an audioTracks: Track[] field
  • FileRefType - add AUDIO and BLANK file types. A blank file enables audio represents space in the track before/after the audio file

the length (in frames) of an audio TrackItem will need to be calculated on import and recalculated if the take's frame rate is changed.

charlielee avatar Apr 10 '22 16:04 charlielee

A few other notes:

  • Should be able to move the start position of imported audio
  • Audio should be shown on the X-sheet.
  • Perhaps only allow one audio track to start for simplicity?
  • May later wish to make audio trimmable

charlielee avatar Apr 10 '22 16:04 charlielee