LennyPenny / aubiojs

aubio for javascript, the real-time audio processing library

Home Page:https://qiuxiang.github.io/aubiojs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

aubiojs npm-badge build-badge

Online Demo

aubiojs is a real-time audio processing library based on aubio, now including:

  • pitch detection
  • tempo detection

Usage

Web

<script src="https://unpkg.com/aubiojs"></script>
<script>
  aubio().then(({ Tempo }) => {
    const tempo = new Tempo(bufferSize, hopSize, sampleRate);
    tempo.do(audioBuffer);
    const bpm = tempo.getBpm();
  });
</script>

Node

npm i aubiojs
import aubio from "aubiojs";

const { Tempo } = await aubio();
const tempo = new Tempo(bufferSize, hopSize, sampleRate);
tempo.do(audioBuffer);
const bpm = tempo.getBpm();

Build

This project uses emscripten to compile aubio, make sure you have installed.

npm run build

About

aubio for javascript, the real-time audio processing library

https://qiuxiang.github.io/aubiojs/

License:MIT License


Languages

Language:C++ 44.3%Language:CMake 29.5%Language:JavaScript 22.4%Language:C 3.9%