Created
October 28, 2022 15:34
-
-
Save WoolDoughnut310/82115c79d471f2bccee4f3de0ffd77de to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Essentia, EssentiaWASM } from "essentia.js"; | |
import fs from "fs"; | |
import decode from "audio-decode"; | |
import { isStream, streamToBuffer } from "../util"; | |
const algorithms = { | |
Danceability: "danceability", | |
KeyExtractor: "key", | |
PercivalBpmEstimator: "bpm", | |
Intensity: "intensity", | |
Energy: "energy", | |
}; | |
const essentia = new Essentia(EssentiaWASM); | |
const SCALE = ["C", "D", "E", "F", "G", "A", "B"]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment