Skip to content

Repository files navigation

audio player (ap)

audio player

workflow

  1. get .wav via url using fetch api
  2. decode audio using web audio api
  3. apply audio data (getChannelData(0) one channel only) with custom filter schema (should use webaudio api iirfilter)
  4. fft with configuration (hann algorithm by default) and resample fft frequency in web worker to avoid blocking main thread
  5. drawing data with chromajs on canvas
  6. plugins -> minimap, spectrogram, spectrogram frequency labels and timeline.

All elements mentioned above follows in DOM structure

<xx>
    <canvas></canvas>
</xx>

E.g.

<mainwave>
    <canvas></canvas>
</mainwave>

Used in central

<div>
    <timeline-top>
        <canvas></canvas>
    </timeline-top>
    <mainwave>
        <canvas></canvas>
        <progresswave>
            <canvas></canvas>
        </progresswave>
    </mainwave>
    <spectrogram>
        <spectrogram-frequency-label>
            <canvas></canvas>
        </spectrogram-frequency-label>
        <canvas></canvas>
    </spectrogram>
    <timeline-bottom>
        <canvas></canvas>
    </timeline-bottom>

</div>

Usage

too lazy to write it up.

TODO:

About

preparing for npm publication of ap repo github.com/chiamtc/ap

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages