Expand description
Audio waveforms: decoding a file to mono peaks and drawing the waveform picture Eagle uses as an audio item’s thumbnail (see the Thumbnails chapter of the docs). Eagle caches no peak data on disk, so neither does falcon.
Constants§
- COLOR
- Eagle’s waveform colour, #0072EF.
- HEIGHT
- WIDTH
- Size Eagle records for an audio item and draws its waveform at.
Functions§
- peaks
- Decodes an audio file and returns
buckets(min, max) pairs of the mono mix, in -1..=1.Noneif it can’t be decoded. - rebucket
- Merges (min, max) pairs into
bucketsevenly spread groups. - render
- Draws peaks as a mirrored waveform, one column per peak, scaled so the loudest peak fills the height (Eagle’s waveform is normalised), on a transparent background.
- thumbnail
- The audio thumbnail: a 280×140 waveform.