Skip to content

rowtype-yoga/purescript-basic-pitch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

purescript-basic-pitch

PureScript FFI bindings to @spotify/basic-pitch — a small TensorFlow.js model that transcribes audio into polyphonic note events (a whole chord at once, unlike monophonic pitch detection).

model <- loadModel (ModelPath "/model/model.json")   -- once
notes <- transcribe defaultOptions model samples      -- per recorded burst
chord = pitches notes                                 -- :: Array MidiPitch

samples must be MONO Float32Array at sampleRate (22050 Hz). basic-pitch processes a 2-second window, so feed it a recorded burst — resample mic audio to sampleRate first.

bun install
spago test

About

PureScript bindings to @spotify/basic-pitch (polyphonic pitch detection)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors