Coder Social home page Coder Social logo

spotify / basic-pitch-ts Goto Github PK

View Code? Open in Web Editor NEW
217.0 20.0 16.0 9.82 MB

A lightweight yet powerful audio-to-MIDI converter with pitch bend detection.

Home Page: https://basicpitch.io

License: Apache License 2.0

JavaScript 3.04% TypeScript 96.96%
lightweight music machine-learning midi pitch-detection polyphonic transcription audio

basic-pitch-ts's People

Contributors

codetheweb avatar dependabot[bot] avatar drubinstein avatar perploug avatar psobot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

basic-pitch-ts's Issues

Any documentation available ?

Hi is there any documentation to start contributing to this interesting project ?
My goal is to try adapt it to real time audio2midi.
I would like to understand better the application flow with some description of the functions and input and output parameters without interpreting all the code.
For example :

  1. How do the OUTPUT_TO_TENSOR_NAME.frames, OUTPUT_TO_TENSOR_NAME.onsets, OUTPUT_TO_TENSOR_NAME.contours are related to note on , note off , pitchbend messages ?
  2. What is melodiatrick ?
  3. What is energy ?
  4. What outputToNotesPoly function does ?

Do you have some performance numbers for the model.execute call in ms (single batch) ?
Thx a lot

Usage in a service worker?

This library is amazing! However, when it's processing it locks up the UI so animations stop and buttons are not clickable.

I was wondering if I could put this in a service worker and am not sure if that has been done before.

The first problem is that a service worker can't import files and I can't figure out how to have my service worker use files in node_modules. I'm guessing I'll need a build step.

I was wondering if there were already a build option in this library for being able to load it the using a single <script> tag, because I think I'd be able to use that in my service worker. I didn't see that.

So I think I might need to write that, which I'll try to do but I'm not sure if I can.

Also I'm not sure if that will even work since there are two other files that get loaded in (the bin and the json files) and I'm not sure if that will work inside the service worker.

Any pointers you can give while I flail away at this would be appreciated.

Thanks!

Pitch range units?

In what units are the values given in the pitchBend array on a note event?

In my experiments, I'm seeing values like 0, -1, 1, 2, 4, and 5. I see from the other basic pitch repo an issue that seems to suggest these values are semitones, but numbers like 4 and 5 make that seem odd. Further, I'm not seeing any non-integer values, meaning that if we're in semitones, the resolution of this library doesn't consider cents, which also seems odd.

Hoping for some clarification, thank you!

Input audio buffer is not mono

Hi everyone ๐Ÿ‘‹
Documentation say: "While you may use stereo audio as an input to our model, at prediction time, the channels of the input will be down-mixed to mono, and then analyzed and transcribed."

I'm trying to get stereo audio notes using basic-pitch and I got this error:
Error: Input audio buffer is not mono! Number of channels is 2. Should be 1

Why this happens?

Why is the model file not exported by default?

I'm trying to use Basic Pitch in my Next.js application and struggling to read the model.json file required to initialize the class. Why is the model not baked into the initializer? Why is the model not importable from the Basic Pitch module? Maybe I'm missing something obvious.

Screen Shot 2024-03-12 at 10 41 18 AM

Thanks!

NoteFramesToTime Issue - TypeError invalid attempt to spread non-iterable instance.

Hey all, amazing library. As I was setting it up I ran into:

Screen Shot 2022-09-28 at 5 44 21 PM

It looks like the onsets, frames, and contours, get defined. Pct is 1 as well after await basicPitch.evaluateModel. The problem i'm running into is after the model runs noteFramesToTime(addPitchBendsToNoteEvents())) keep throwing errors. I was wondering if ya'll had run into this by any chance? It seems to be happening around toMidi && globalMax.

I'm using NextJs and typescript as well. I verified that my audioRecording was a mono recording and set to the correct sampleRate.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.