Giter Club home page Giter Club logo

basic-pitch's People

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  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

basic-pitch's Issues

Training Code

Thank you very much for open sourcing this valuable code. Any chance on also releasing the training code to build upon your research and fine tune the model? Probably not too hard to implement the three losses from the paper, but having the "original" would be nice. :)

(Was also briefly mentioned in #21, but I think it is worth an own issue.)

Basic Pitch in an audio plugin

Hey,

I've created an audio-to-midi VST/AU plugin that uses Basic Pitch internally. It's called NeuralNote and with it anyone can now have Basic Pitch's capabilities directly in their DAW!

Everything's open source, the repo is https://github.com/DamRsn/NeuralNote . Feel free to check it out!

Thank you for this amazing work that is Basic Pitch!

Documentation Append Request

Basic Pitch for the end user who clones the repo is confusing as the documentation indicates to use the syntax: basic-pitch <output directory> <input file>
No indication is provided as to whether <> should be included. Including some examples of varying complexities could aid new users.

Support for drums/percussion?

Hi!
Thanks for this amazing open-source work, I'm really enjoying using it. :)

I noticed that Basic Pitch works great for tracks with single mono/polyphonic instrument for most instruments, however it is unable to encode drums at all.

I understand that MIDI encoding for drums/percussion instruments is somewhat different compared to the rest of the instruments, but are there any future plans to add support for percussion instruments?

Windows 10, Python 3.8, ModuleNotFoundError: No module named 'basic_pitch.predict'

I installed basic-pitch ok but when I run it I get:

PS C:\Users\y\Desktop> basic-pitch.exe .\Lifeblood '..\Downloads\That Petrol Emotion - Lifeblood -1986.mp3'
Traceback (most recent call last):
File "C:\Users\y\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\y\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\y\AppData\Local\Programs\Python\Python38\Scripts\basic-pitch.exe_main
.py", line 4, in
ModuleNotFoundError: No module named 'basic_pitch.predict'

M1 Mac mini can not install

python 3.9.6
pip3 23.0
install code
pip3 install basic-pitch

ERROR: Cannot install basic-pitch==0.0.1, basic-pitch==0.1.0 and basic-pitch==0.2.0 because these package versions have conflicting dependencies.

The conflict is caused by:
basic-pitch 0.2.0 depends on tensorflow<2.10 and >=2.4.1
basic-pitch 0.1.0 depends on tensorflow<2.7.0 and >=2.4.1
basic-pitch 0.0.1 depends on tensorflow<2.7.0 and >=2.4.1

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict

install code
pip3 install basic-pitch==0.2.0
ERROR: Could not find a version that satisfies the requirement tensorflow<2.10,>=2.4.1 (from basic-pitch) (from versions: none)
ERROR: No matching distribution found for tensorflow<2.10,>=2.4.1

I try install tensorflow-macos,
pip3 install tensorflow-macos
and I run pip3 install basic-pitch agin,
but does't work, error output don`t change

Difference in pitch bend behavior

If you playback the output MIDI in VLC player and compare it with the rendered audio, the pitch bends sound different. The sonified audio on the webapp and the corresponding MIDI sound different from the output of the pip installed version.

Keras.io tutorial?

Hey everyone! I’m Luke - I work full time on keras. I think you have a really great core base here for audio processing. There aren’t a ton of code samples that use Keras for audio processing right now.

would you guys be interested in contributing a keras.io tutorial showcasing some of your work?

Support for stream in/out?

I see basic-pitch easily process audio files and produces midi files. And I also notice its performance are very good locally: 11s to process a 3 minutes track (and 5 of this 11 seconds are about "Importing Tensorflow").
So I'm wondering whether it would be doable for basic pitch to take audio stream as input? And produce "on the fly" (even with some delay) a midi out stream (basically behave as a midi out device)? Or does it need to have the whole audio content available beforehand to process?

Realtime pitch detection

Thanks for the great product!

Just curious, can we make basic pitch work with realtime input from microphones?
Additionally, What is the shortest buffer size that can be processed? Currently I thought of naive solution which gets the buffer in a callback from PyAudio and uses the callback to send the buffer to the predict function. Not sure if this is the best approach, but has anyone succeeded in getting basic pitch to work with realtime mic input?

Feature Request: Some way to adjust granularity

Feature request: Some way to adjust granularity. It seems that it's too good at interpreting 1/32 rests and stuff like that.
If I know in advance that my audio has, say, nothing shorter than an eighth note or eighth rest, I'd like to be able to give
that info to the app and have it round off anything it analyzes to the nearest eighth note/rest.

Could it handle realtime transcription?

This is more of a question than an issue, but could basic-pitch handle realtime transcription of audio (with low latency)?

It seems that it expects input in chunks of two seconds if I understand the code correctly, which suggests that you'd always have at least that much latency, but I could be wrong.

Very long audio files crash/cause OOM

We are loading the entire audio file at once (calling librosa.load) - if we switch to chunk-wise processing or librosa.stream this would be avoided. A similar issue was raised in #26

error: metadata-generation-failed

Hello,

I'm a bit of a noob but having this issue on an M1 mac:

jonathankawchuk@Jonathans-M1-MacBook-Pro ~ % python3.9 -m pip install basic-pitch
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at Homebrew/homebrew-core#76621
Collecting basic-pitch
Using cached basic_pitch-0.2.3-py2.py3-none-any.whl (373 kB)
Requirement already satisfied: numpy<1.24,>=1.18 in /opt/homebrew/lib/python3.9/site-packages (from basic-pitch) (1.22.3)
Collecting librosa>=0.8.0
Using cached librosa-0.10.0.post2-py3-none-any.whl (253 kB)
Collecting typing-extensions
Using cached typing_extensions-4.5.0-py3-none-any.whl (27 kB)
Collecting pretty-midi>=0.2.9
Using cached pretty_midi-0.2.10.tar.gz (5.6 MB)
Preparing metadata (setup.py) ... done
Collecting resampy>=0.2.2
Using cached resampy-0.4.2-py3-none-any.whl (3.1 MB)
Collecting scipy>=1.4.1
Using cached scipy-1.10.1.tar.gz (42.4 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [40 lines of output]
The Meson build system
Version: 1.0.1
Source dir: /private/var/folders/6g/_dyszwd54rd36jmvjmmd4htw0000gn/T/pip-install-jjew3p2k/scipy_0cbfb8bdcaa44dd990963383ae7fbf3f
Build dir: /private/var/folders/6g/_dyszwd54rd36jmvjmmd4htw0000gn/T/pip-install-jjew3p2k/scipy_0cbfb8bdcaa44dd990963383ae7fbf3f/.mesonpy-zlf_gek8/build
Build type: native build
Project name: SciPy
Project version: 1.10.1
C compiler for the host machine: cc (clang 13.0.0 "Apple clang version 13.0.0 (clang-1300.0.29.30)")
C linker for the host machine: cc ld64 711
C++ compiler for the host machine: c++ (clang 13.0.0 "Apple clang version 13.0.0 (clang-1300.0.29.30)")
C++ linker for the host machine: c++ ld64 711
Cython compiler for the host machine: cython (cython 0.29.33)
Host machine cpu family: aarch64
Host machine cpu: aarch64
Compiler for C supports arguments -Wno-unused-but-set-variable: NO
Compiler for C supports arguments -Wno-unused-function: YES
Compiler for C supports arguments -Wno-conversion: YES
Compiler for C supports arguments -Wno-misleading-indentation: YES
Compiler for C supports arguments -Wno-incompatible-pointer-types: YES
Library m found: YES

  ../../meson.build:63:0: ERROR: Unknown compiler(s): [['gfortran'], ['flang'], ['nvfortran'], ['pgfortran'], ['ifort'], ['ifx'], ['g95']]
  The following exception(s) were encountered:
  Running `gfortran --version` gave "[Errno 2] No such file or directory: 'gfortran'"
  Running `gfortran -V` gave "[Errno 2] No such file or directory: 'gfortran'"
  Running `flang --version` gave "[Errno 2] No such file or directory: 'flang'"
  Running `flang -V` gave "[Errno 2] No such file or directory: 'flang'"
  Running `nvfortran --version` gave "[Errno 2] No such file or directory: 'nvfortran'"
  Running `nvfortran -V` gave "[Errno 2] No such file or directory: 'nvfortran'"
  Running `pgfortran --version` gave "[Errno 2] No such file or directory: 'pgfortran'"
  Running `pgfortran -V` gave "[Errno 2] No such file or directory: 'pgfortran'"
  Running `ifort --version` gave "[Errno 2] No such file or directory: 'ifort'"
  Running `ifort -V` gave "[Errno 2] No such file or directory: 'ifort'"
  Running `ifx --version` gave "[Errno 2] No such file or directory: 'ifx'"
  Running `ifx -V` gave "[Errno 2] No such file or directory: 'ifx'"
  Running `g95 --version` gave "[Errno 2] No such file or directory: 'g95'"
  Running `g95 -V` gave "[Errno 2] No such file or directory: 'g95'"
  
  A full log can be found at /private/var/folders/6g/_dyszwd54rd36jmvjmmd4htw0000gn/T/pip-install-jjew3p2k/scipy_0cbfb8bdcaa44dd990963383ae7fbf3f/.mesonpy-zlf_gek8/build/meson-logs/meson-log.txt
  + meson setup --prefix=/opt/homebrew/Cellar/[email protected]/3.9.16/Frameworks/Python.framework/Versions/3.9 /private/var/folders/6g/_dyszwd54rd36jmvjmmd4htw0000gn/T/pip-install-jjew3p2k/scipy_0cbfb8bdcaa44dd990963383ae7fbf3f /private/var/folders/6g/_dyszwd54rd36jmvjmmd4htw0000gn/T/pip-install-jjew3p2k/scipy_0cbfb8bdcaa44dd990963383ae7fbf3f/.mesonpy-zlf_gek8/build --native-file=/private/var/folders/6g/_dyszwd54rd36jmvjmmd4htw0000gn/T/pip-install-jjew3p2k/scipy_0cbfb8bdcaa44dd990963383ae7fbf3f/.mesonpy-native-file.ini -Ddebug=false -Doptimization=2
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

[notice] A new release of pip available: 22.3.1 -> 23.0.1
[notice] To update, run: python3.9 -m pip install --upgrade pip

Mac M1 illegal hardware instruction

I'm on Mac OS Monterey version 12.6
Just pip installed this tool and tried to run it against a wav file and got this error

basic-pitch ~/basic-pitch-output kay_laughing.wav

✨✨✨✨✨✨✨✨✨
✨ Basic Pitch  ✨
✨✨✨✨✨✨✨✨✨

Importing Tensorflow (this may take a few seconds)...
[1]    41863 illegal hardware instruction  basic-pitch ~/basic-pitch-output kay_laughing.wav

I tried adding the --debug-file option to the above command to see if I could get any more info to share but the file was never even created.

Pls let me know what other info would be useful!

Here is the output of pip show

pip show basic-pitch
Name: basic-pitch
Version: 0.2.0
Summary: Basic Pitch, a lightweight yet powerful audio-to-MIDI converter with pitch bend detection.
Home-page: https://github.com/spotify/basic-pitch
Author: Spotify
Author-email: [email protected]
License: Apache 2.0
Location: /Users/brian.soraham/miniconda3/lib/python3.9/site-packages
Requires: librosa, resampy, typing-extensions, mir-eval, tensorflow, pretty-midi, scipy
Required-by:

and I'm on python 3.9.7

Range Sliders on Website aren't accurate

Is there a way to make the range sliders work with a keyboard or at least type in a value, especially for the MIDI tempo. I can't seem to select 100bpm. It keeps jumping between 99 and 101. Strange choice.

How to get trained model in keras format instead of saved model?

Thanks for this amazing work!

I'm currently working on integrating basic-pitch in an audio plugin. For that, I would need to have the trained basic pitch model as a Keras model in order to convert it into the format that I'm going to use in C++ for inference.

Unfortunately, the ICASSP2022 model is saved as a tensorflow saved_model, even though it is originally a keras model that can be built with the model() function from model.py.

I tried to transfer the weights from the trained model to an untrained keras model but I did not find a straightforward way to do it.

I could gather all the layers' weights manually from the saved_model and apply them one by one to an untrained keras model created with model(), but before getting there: do you have a trained keras model that you could share? Or do you know a way to get it from the trained tensorflow saved_model?

Also, similar to #62 , is there a more recent model I could use, perhaps the one used in the basic-pitch-ts repo for https://basicpitch.spotify.com/ ?

Thanks for your help!

Open sourcing JavaScript version

Hey,

Really cool library, pretty impressive results.

I wondered if you had any plans to open source the JS version, or provide instructions on how to use the model with Tensorflow.js?

Thanks,
Tom

basic-pitch not working with most of the input audio files

I tried basic pitch with 4 input audio files in mp3 format, only 1 of them gave back an ouput, the others showed me the same message as below (Aborted). I then converted one of the files from .mp3 to .wav and tried and it still failed. Is there any limitations on the length or format of the file?
image

Human voice pitch detection

I haven't seen any notion that human voice pitch detection is covered or not but since the claim is to be instrument agnostic I thought it is better to give you a repro. If this is out of context please close and sorry for the inconvenience.

I used the online version at https://basicpitch.spotify.com/ and fed it with a clean noiseless voice from https://samplefocus.com/samples/solo-voice-aah-solo. the result is far from being usable:

image

Is there a plan to support fundamental frequency detection?

Note Segmentation Algorithm for Python

Hi, I am working with vocal data and found basic-pitch can map out the pitches very well. Looking at the demo and I noticed there is a note segmentation slider that can smooth out the notes and combine them. However, since I am programmatically working with the music, so I would like to know how to achieve the note segmentation in Python the same way as the demo on the website.

This might be similar issue to #42.

Realtime detection

Has anyone been successful in using this technology for near real-time detection?

Using basic-pitch in an iOS application

Hi,

I would like to use basic-pitch in an iOS mobile application. It seems that it is possible to convert the model into a tflite. format, but I am stuck trying to change the output into MIDI notes. Can someone help me with suggesting Pretty MIDI alternatives that work well with the basic pitch model for Swift?

Dependencies Issue

Hi everybody!
I'm super curious to try basic-pitch, but I don't get past the pip installation process. Do you have any idea what could be the cause of this problem?

Preparing metadata (pyproject.toml) ... done
ERROR: Cannot install basic-pitch==0.0.1, basic-pitch==0.1.0 and basic-pitch==0.2.0 because these package versions have conflicting dependencies.

The conflict is caused by:
basic-pitch 0.2.0 depends on tensorflow<2.10 and >=2.4.1
basic-pitch 0.1.0 depends on tensorflow<2.7.0 and >=2.4.1
basic-pitch 0.0.1 depends on tensorflow<2.7.0 and >=2.4.1

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

CLI script exists successfully when nothing is written

When output files already exist (e.g. when running the analysis on the same file twice, with the same output directory), CLI tool will currently not write anything, because overwrite behavior is extra cautious. This is fine, but then the script should not exit with a "done" and exit code 0.

E.g.:

$ basic-pitch tmp tests/resources/vocadito_10.wav

✨✨✨✨✨✨✨✨✨
✨ Basic Pitch  ✨
✨✨✨✨✨✨✨✨✨

Predicting MIDI for tests/resources/vocadito_10.wav......  🥁🎷🎸🎻

  Creating midi...
  🚨 tmp/vocadito_10_basic_pitch.mid already exists and would be overwritten. Skipping output files for tests/resources/vocadito_10.wav.

✨ Done ✨

AttributeError: module 'tensorflow.python.training.experimental.mixed_precision' has no attribute '_register_wrapper_optimizer_cls'

C:\Users\MohammedMehdiTBER>basic-pitch "C:\Users\MohammedMehdiTBER\Documents" "C:\Users\MohammedMehdiTBER\Downloads\mytrack.flac" --save-midi --multiple-pitch-bends

✨✨✨✨✨✨✨✨✨
✨ Basic Pitch  ✨
✨✨✨✨✨✨✨✨✨
Traceback (most recent call last):
  File "C:\Program Files\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\Python39\Scripts\basic-pitch.exe\__main__.py", line 7, in <module>
  File "C:\Program Files\Python39\lib\site-packages\basic_pitch\predict.py", line 107, in main
    from basic_pitch.inference import predict_and_save, verify_output_dir, verify_input_path
  File "C:\Program Files\Python39\lib\site-packages\basic_pitch\inference.py", line 125, in <module>
    audio_path: Union[pathlib.Path, str], model: keras.Model, debug_file: Optional[pathlib.Path] = None
  File "C:\Program Files\Python39\lib\site-packages\tensorflow\python\util\lazy_loader.py", line 62, in __getattr__
    module = self._load()
  File "C:\Program Files\Python39\lib\site-packages\tensorflow\python\util\lazy_loader.py", line 45, in _load
    module = importlib.import_module(self.__name__)
  File "C:\Program Files\Python39\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "C:\Users\MohammedMehdiTBER\AppData\Roaming\Python\Python39\site-packages\keras\__init__.py", line 25, in <module>
    from keras import models
  File "C:\Users\MohammedMehdiTBER\AppData\Roaming\Python\Python39\site-packages\keras\models.py", line 20, in <module>
    from keras import metrics as metrics_module
  File "C:\Users\MohammedMehdiTBER\AppData\Roaming\Python\Python39\site-packages\keras\metrics.py", line 27, in <module>
    from keras import activations
  File "C:\Users\MohammedMehdiTBER\AppData\Roaming\Python\Python39\site-packages\keras\activations.py", line 20, in <module>
    from keras.layers import advanced_activations
  File "C:\Users\MohammedMehdiTBER\AppData\Roaming\Python\Python39\site-packages\keras\layers\__init__.py", line 24, in <module>
    from keras.engine.input_layer import Input
  File "C:\Users\MohammedMehdiTBER\AppData\Roaming\Python\Python39\site-packages\keras\engine\input_layer.py", line 21, in <module>
    from keras.engine import base_layer
  File "C:\Users\MohammedMehdiTBER\AppData\Roaming\Python\Python39\site-packages\keras\engine\base_layer.py", line 41, in <module>
    from keras.mixed_precision import loss_scale_optimizer
  File "C:\Users\MohammedMehdiTBER\AppData\Roaming\Python\Python39\site-packages\keras\mixed_precision\loss_scale_optimizer.py", line 1180, in <module>
    mixed_precision._register_wrapper_optimizer_cls(optimizer_v2.OptimizerV2,
AttributeError: module 'tensorflow.python.training.experimental.mixed_precision' has no attribute '_register_wrapper_optimizer_cls'

Unable to install basic-pitch on MacOS 12 and 13

It fails when I install basic-pitch on MacOS 12 and 13. I am on an Apple M1 Pro. I've attempted Python 3.8, 3.9, and 3.10, but they all fail. This issue also happened before I upgraded to macOS 13.

╭─    ~ ··················································································································································································· 1 ✘  at 15:04:33  ─╮
╰─ python -V                                                                                                                                                                                                       ─╯
Python 3.8.14

╭─    ~ ····················································································································································································· ✔  at 15:04:49  ─╮
╰─ pip -V                                                                                                                                                                                                          ─╯
pip 22.3 from /Users/ndiyabongasekhomba/.pyenv/versions/3.8.14/lib/python3.8/site-packages/pip (python 3.8)

╭─    ~ ····················································································································································································· ✔  at 15:04:56  ─╮
╰─
╭─    ~ ·········································································································································································· ✔  took 3s   at 15:09:15  ─╮
╰─ pip install basic-pitch --upgrade --no-cache-dir                                                                                                                                                                ─╯
Collecting basic-pitch
  Downloading basic-pitch-0.2.0.tar.gz (2.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 2.2 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting librosa>=0.8.0
  Downloading librosa-0.9.2-py3-none-any.whl (214 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 214.3/214.3 kB 31.6 MB/s eta 0:00:00
Collecting mir_eval>=0.6
  Downloading mir_eval-0.7.tar.gz (90 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.7/90.7 kB 30.5 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting pretty_midi>=0.2.9
  Downloading pretty_midi-0.2.9.tar.gz (5.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.6/5.6 MB 16.1 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting resampy>=0.2.2
  Downloading resampy-0.4.2-py3-none-any.whl (3.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.1/3.1 MB 52.9 MB/s eta 0:00:00
Collecting scipy>=1.4.1
  Downloading scipy-1.9.3-cp38-cp38-macosx_12_0_arm64.whl (28.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 28.5/28.5 MB 25.9 MB/s eta 0:00:00
Collecting basic-pitch
  Downloading basic_pitch-0.1.0-py2.py3-none-any.whl (373 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 373.6/373.6 kB 45.2 MB/s eta 0:00:00
Collecting typing-extensions
  Downloading typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Collecting numpy<1.20,>=1.19.2
  Downloading numpy-1.19.5.zip (7.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.3/7.3 MB 30.0 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting basic-pitch
  Downloading basic-pitch-0.0.1.tar.gz (2.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 42.5 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
ERROR: Cannot install basic-pitch==0.0.1, basic-pitch==0.1.0 and basic-pitch==0.2.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    basic-pitch 0.2.0 depends on tensorflow<2.10 and >=2.4.1
    basic-pitch 0.1.0 depends on tensorflow<2.7.0 and >=2.4.1
    basic-pitch 0.0.1 depends on tensorflow<2.7.0 and >=2.4.1

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

╭─    ~ ······································································································································································· 1 ✘  took 26s   at 15:09:56  ─╮
╰─                                                                                                                                                                                                                 ─╯

╭─    ~ ······································································································································································· 1 ✘  took 26s   at 15:09:56  ─╮
╰─ pip list installed                                                                                                                                                                                              ─╯
Package    Version
---------- -------
pip        22.3
setuptools 56.0.0

╭─    ~ ····················································································································································································· ✔  at 15:17:10  ─╮
╰─                                                                                                                                                                                                                 ─╯

╭─    ~ ····················································································································································································· ✔  at 15:17:10  ─╮
╰─ uname -a                                                                                                                                                                                                        ─╯
Darwin NdiyaboombasMBP 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct  9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000 arm64

╭─    ~ ····················································································································································································· ✔  at 15:18:21  ─╮
╰─                                                                                                                                                                                                                 ─╯

╭─    ~ ····················································································································································································· ✔  at 15:18:21  ─╮
╰─ system_profiler SPSoftwareDataType SPHardwareDataType                                                                                                                                                           ─╯
Software:

    System Software Overview:

      System Version: macOS 13.0 (22A380)
      Kernel Version: Darwin 22.1.0
      Boot Volume: Macintosh HD
      Boot Mode: Normal
      Computer Name: Ndiyabonga Sekhomba's MacBook Pro
      User Name: Ndiyabonga Sekhomba (ndiyabongasekhomba)
      Secure Virtual Memory: Enabled
      System Integrity Protection: Enabled
      Time since boot: 15 hours, 58 minutes

Hardware:

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro18,1
      Model Number: MK183ZE/A
      Chip: Apple M1 Pro
      Total Number of Cores: 10 (8 performance and 2 efficiency)
      Memory: 16 GB
      System Firmware Version: 8419.41.10
      OS Loader Version: 8419.41.10
      Serial Number (system): JKD7YDJX1N
      Hardware UUID: 133AD749-6093-50EB-81C7-D06792BDA20D
      Provisioning UDID: 00006000-001C095E3423801E
      Activation Lock Status: Enabled


╭─    ~ ····················································································································································································· ✔  at 15:20:00  ─╮
╰─                                                                                                                                                                                                                 ─╯


Model mismatch with basic-pitch-ts ?

Thanks for this great project! I would like to use this python project and get the same results as on https://basicpitch.spotify.com.

I am a newbie with TensorFlow but I'm assuming the models used in the basic-pitch and basic-pitch-ts projects are not exactly the same:

First of all: am I wrong in my assumptions ? If not, it would be great to have both projects use the same model (despite being in a different format).

I myself tried using both tensorflowjs_converter and tfjs_graph_converter but none worked or possibly I did something wrong.

Thanks for any help!

Installation error on ubuntu 20.04

Hi,
I am trying to install on ubuntu 20.04 via virtualenv but I get some dependencies errors (details below).
Any idea? Thanks!
Luigi


lsb_release -a
LSB Version:	core-11.1.0ubuntu2-noarch:printing-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.4 LTS
Release:	20.04
Codename:	focal


python3 --version
Python 3.8.10

python3 -m venv myvenv

. myvenv/bin/activate

python3 -m pip install basic-pitch --upgrade
Collecting basic-pitch
  Using cached basic-pitch-0.0.1.tar.gz (2.0 MB)
Collecting librosa>=0.8.0
  Using cached librosa-0.9.1-py3-none-any.whl (213 kB)
Collecting mir_eval>=0.6
  Using cached mir_eval-0.7.tar.gz (90 kB)
Collecting numpy<1.20,>=1.19.2
  Using cached numpy-1.19.5-cp38-cp38-manylinux2010_x86_64.whl (14.9 MB)
Collecting pretty_midi>=0.2.9
  Using cached pretty_midi-0.2.9.tar.gz (5.6 MB)
Collecting resampy>=0.2.2
  Using cached resampy-0.2.2.tar.gz (323 kB)
Collecting scipy>=1.4.1
  Using cached scipy-1.8.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (41.6 MB)
Collecting tensorflow<2.7.0,>=2.4.1
  Using cached tensorflow-2.6.5-cp38-cp38-manylinux2010_x86_64.whl (464.3 MB)
Collecting typing_extensions
  Using cached typing_extensions-4.2.0-py3-none-any.whl (24 kB)
Collecting scikit-learn>=0.19.1
  Using cached scikit_learn-1.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (31.2 MB)
Collecting pooch>=1.0
  Using cached pooch-1.6.0-py3-none-any.whl (56 kB)
Collecting audioread>=2.1.5
  Using cached audioread-2.1.9.tar.gz (377 kB)
Collecting decorator>=4.0.10
  Using cached decorator-5.1.1-py3-none-any.whl (9.1 kB)
Collecting joblib>=0.14
  Using cached joblib-1.1.0-py2.py3-none-any.whl (306 kB)
Collecting soundfile>=0.10.2
  Using cached SoundFile-0.10.3.post1-py2.py3-none-any.whl (21 kB)
Collecting packaging>=20.0
  Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting numba>=0.45.1
  Using cached numba-0.55.2-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.4 MB)
Collecting future
  Using cached future-0.18.2.tar.gz (829 kB)
Collecting six
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting mido>=1.1.16
  Using cached mido-1.2.10-py2.py3-none-any.whl (51 kB)
Collecting absl-py~=0.10
  Using cached absl_py-0.15.0-py3-none-any.whl (132 kB)
Collecting flatbuffers~=1.12.0
  Using cached flatbuffers-1.12-py2.py3-none-any.whl (15 kB)
Collecting keras<2.7,>=2.6.0
  Using cached keras-2.6.0-py2.py3-none-any.whl (1.3 MB)
Collecting wheel~=0.35
  Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Collecting wrapt~=1.12.1
  Using cached wrapt-1.12.1.tar.gz (27 kB)
Collecting clang~=5.0
  Using cached clang-5.0.tar.gz (30 kB)
Collecting tensorflow-estimator<2.7,>=2.6.0
  Using cached tensorflow_estimator-2.6.0-py2.py3-none-any.whl (462 kB)
Collecting h5py~=3.1.0
  Using cached h5py-3.1.0-cp38-cp38-manylinux1_x86_64.whl (4.4 MB)
Collecting astunparse~=1.6.3
  Using cached astunparse-1.6.3-py2.py3-none-any.whl (12 kB)
Collecting termcolor~=1.1.0
  Using cached termcolor-1.1.0.tar.gz (3.9 kB)
Collecting grpcio<2.0,>=1.37.0
  Using cached grpcio-1.46.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.4 MB)
Collecting opt-einsum~=3.3.0
  Using cached opt_einsum-3.3.0-py3-none-any.whl (65 kB)
Collecting protobuf<3.20,>=3.9.2
  Using cached protobuf-3.19.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)
Collecting google-pasta~=0.2
  Using cached google_pasta-0.2.0-py3-none-any.whl (57 kB)
Collecting keras-preprocessing~=1.1.2
  Using cached Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB)
Collecting gast==0.4.0
  Using cached gast-0.4.0-py3-none-any.whl (9.8 kB)
Collecting tensorboard<2.7,>=2.6.0
  Using cached tensorboard-2.6.0-py3-none-any.whl (5.6 MB)
Collecting threadpoolctl>=2.0.0
  Using cached threadpoolctl-3.1.0-py3-none-any.whl (14 kB)
Collecting appdirs>=1.3.0
  Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Collecting requests>=2.19.0
  Using cached requests-2.28.0-py3-none-any.whl (62 kB)
Collecting cffi>=1.0
  Using cached cffi-1.15.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (446 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
  Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Requirement already satisfied, skipping upgrade: setuptools in ./myvenv/lib/python3.8/site-packages (from numba>=0.45.1->librosa>=0.8.0->basic-pitch) (44.0.0)
Collecting llvmlite<0.39,>=0.38.0rc1
  Using cached llvmlite-0.38.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.5 MB)
Collecting markdown>=2.6.8
  Using cached Markdown-3.3.7-py3-none-any.whl (97 kB)
Collecting google-auth<2,>=1.6.3
  Using cached google_auth-1.35.0-py2.py3-none-any.whl (152 kB)
Collecting tensorboard-plugin-wit>=1.6.0
  Using cached tensorboard_plugin_wit-1.8.1-py3-none-any.whl (781 kB)
Collecting tensorboard-data-server<0.7.0,>=0.6.0
  Using cached tensorboard_data_server-0.6.1-py3-none-manylinux2010_x86_64.whl (4.9 MB)
Collecting google-auth-oauthlib<0.5,>=0.4.1
  Using cached google_auth_oauthlib-0.4.6-py2.py3-none-any.whl (18 kB)
Collecting werkzeug>=0.11.15
  Using cached Werkzeug-2.1.2-py3-none-any.whl (224 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.9-py2.py3-none-any.whl (138 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2022.5.18.1-py3-none-any.whl (155 kB)
Collecting charset-normalizer~=2.0.0
  Using cached charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.3-py3-none-any.whl (61 kB)
Collecting pycparser
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting importlib-metadata>=4.4; python_version < "3.10"
  Using cached importlib_metadata-4.11.4-py3-none-any.whl (18 kB)
Collecting cachetools<5.0,>=2.0.0
  Using cached cachetools-4.2.4-py3-none-any.whl (10 kB)
Collecting rsa<5,>=3.1.4; python_version >= "3.6"
  Using cached rsa-4.8-py3-none-any.whl (39 kB)
Collecting pyasn1-modules>=0.2.1
  Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Collecting requests-oauthlib>=0.7.0
  Using cached requests_oauthlib-1.3.1-py2.py3-none-any.whl (23 kB)
Collecting zipp>=0.5
  Using cached zipp-3.8.0-py3-none-any.whl (5.4 kB)
Collecting pyasn1>=0.1.3
  Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Collecting oauthlib>=3.0.0
  Using cached oauthlib-3.2.0-py3-none-any.whl (151 kB)
Building wheels for collected packages: basic-pitch, mir-eval, pretty-midi, resampy, audioread, future, wrapt, clang, termcolor
  Building wheel for basic-pitch (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: ....../myvenv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-02w9gg2x/basic-pitch/setup.py'"'"'; __file__='"'"'/tmp/pip-install-02w9gg2x/basic-pitch/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-62e6q952
       cwd: /tmp/pip-install-02w9gg2x/basic-pitch/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for basic-pitch
  Running setup.py clean for basic-pitch
  Building wheel for mir-eval (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: ....../myvenv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-02w9gg2x/mir-eval/setup.py'"'"'; __file__='"'"'/tmp/pip-install-02w9gg2x/mir-eval/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-l_jcqoln
       cwd: /tmp/pip-install-02w9gg2x/mir-eval/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for mir-eval
  Running setup.py clean for mir-eval
  Building wheel for pretty-midi (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: ....../myvenv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-02w9gg2x/pretty-midi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-02w9gg2x/pretty-midi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-utsolp75
       cwd: /tmp/pip-install-02w9gg2x/pretty-midi/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for pretty-midi
  Running setup.py clean for pretty-midi
  Building wheel for resampy (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: ....../myvenv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-02w9gg2x/resampy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-02w9gg2x/resampy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-q0hvu8zc
       cwd: /tmp/pip-install-02w9gg2x/resampy/
  Complete output (8 lines):
  /tmp/pip-install-02w9gg2x/resampy/setup.py:2: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    import imp
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for resampy
  Running setup.py clean for resampy
  Building wheel for audioread (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: ....../myvenv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-02w9gg2x/audioread/setup.py'"'"'; __file__='"'"'/tmp/pip-install-02w9gg2x/audioread/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-i0ctyww7
       cwd: /tmp/pip-install-02w9gg2x/audioread/
  Complete output (8 lines):
  /tmp/pip-install-02w9gg2x/audioread/setup.py:17: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    import imp
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for audioread
  Running setup.py clean for audioread
  Building wheel for future (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: ....../myvenv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-02w9gg2x/future/setup.py'"'"'; __file__='"'"'/tmp/pip-install-02w9gg2x/future/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-w1ayku7x
       cwd: /tmp/pip-install-02w9gg2x/future/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for future
  Running setup.py clean for future
  Building wheel for wrapt (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: ....../myvenv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-02w9gg2x/wrapt/setup.py'"'"'; __file__='"'"'/tmp/pip-install-02w9gg2x/wrapt/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-2f0z5drz
       cwd: /tmp/pip-install-02w9gg2x/wrapt/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for wrapt
  Running setup.py clean for wrapt
  Building wheel for clang (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: ....../myvenv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-02w9gg2x/clang/setup.py'"'"'; __file__='"'"'/tmp/pip-install-02w9gg2x/clang/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-_ulttlk9
       cwd: /tmp/pip-install-02w9gg2x/clang/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for clang
  Running setup.py clean for clang
  Building wheel for termcolor (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: ....../myvenv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-02w9gg2x/termcolor/setup.py'"'"'; __file__='"'"'/tmp/pip-install-02w9gg2x/termcolor/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-42erj0wy
       cwd: /tmp/pip-install-02w9gg2x/termcolor/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for termcolor
  Running setup.py clean for termcolor
Failed to build basic-pitch mir-eval pretty-midi resampy audioread future wrapt clang termcolor
ERROR: tensorflow 2.6.5 has requirement six~=1.15.0, but you'll have six 1.16.0 which is incompatible.
ERROR: tensorflow 2.6.5 has requirement typing-extensions<3.11,>=3.7, but you'll have typing-extensions 4.2.0 which is incompatible.
Installing collected packages: numpy, threadpoolctl, scipy, joblib, scikit-learn, appdirs, pyparsing, packaging, urllib3, certifi, charset-normalizer, idna, requests, pooch, audioread, llvmlite, numba, six, resampy, decorator, pycparser, cffi, soundfile, librosa, future, mir-eval, mido, pretty-midi, absl-py, flatbuffers, keras, typing-extensions, wheel, wrapt, clang, tensorflow-estimator, h5py, astunparse, termcolor, grpcio, opt-einsum, protobuf, google-pasta, keras-preprocessing, gast, zipp, importlib-metadata, markdown, cachetools, pyasn1, rsa, pyasn1-modules, google-auth, tensorboard-plugin-wit, tensorboard-data-server, oauthlib, requests-oauthlib, google-auth-oauthlib, werkzeug, tensorboard, tensorflow, basic-pitch
    Running setup.py install for audioread ... done
    Running setup.py install for resampy ... done
    Running setup.py install for future ... done
    Running setup.py install for mir-eval ... done
    Running setup.py install for pretty-midi ... done
    Running setup.py install for wrapt ... done
    Running setup.py install for clang ... done
    Running setup.py install for termcolor ... done
    Running setup.py install for basic-pitch ... done
Successfully installed absl-py-0.15.0 appdirs-1.4.4 astunparse-1.6.3 audioread-2.1.9 basic-pitch-0.0.1 cachetools-4.2.4 certifi-2022.5.18.1 cffi-1.15.0 charset-normalizer-2.0.12 clang-5.0 decorator-5.1.1 flatbuffers-1.12 future-0.18.2 gast-0.4.0 google-auth-1.35.0 google-auth-oauthlib-0.4.6 google-pasta-0.2.0 grpcio-1.46.3 h5py-3.1.0 idna-3.3 importlib-metadata-4.11.4 joblib-1.1.0 keras-2.6.0 keras-preprocessing-1.1.2 librosa-0.9.1 llvmlite-0.38.1 markdown-3.3.7 mido-1.2.10 mir-eval-0.7 numba-0.55.2 numpy-1.19.5 oauthlib-3.2.0 opt-einsum-3.3.0 packaging-21.3 pooch-1.6.0 pretty-midi-0.2.9 protobuf-3.19.4 pyasn1-0.4.8 pyasn1-modules-0.2.8 pycparser-2.21 pyparsing-3.0.9 requests-2.28.0 requests-oauthlib-1.3.1 resampy-0.2.2 rsa-4.8 scikit-learn-1.1.1 scipy-1.8.1 six-1.16.0 soundfile-0.10.3.post1 tensorboard-2.6.0 tensorboard-data-server-0.6.1 tensorboard-plugin-wit-1.8.1 tensorflow-2.6.5 tensorflow-estimator-2.6.0 termcolor-1.1.0 threadpoolctl-3.1.0 typing-extensions-4.2.0 urllib3-1.26.9 werkzeug-2.1.2 wheel-0.37.1 wrapt-1.12.1 zipp-3.8.0

 basic-pitch 
Traceback (most recent call last):
  File "....../myvenv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "....../myvenv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "....../myvenv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 791, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (six 1.16.0 (....../myvenv/lib/python3.8/site-packages), Requirement.parse('six~=1.15.0'), {'tensorflow'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "....../myvenv/bin/basic-pitch", line 6, in <module>
    from pkg_resources import load_entry_point
  File "....../myvenv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3252, in <module>
    def _initialize_master_working_set():
  File "....../myvenv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside
    f(*args, **kwargs)
  File "....../myvenv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "....../myvenv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 585, in _build_master
    return cls._build_from_requirements(__requires__)
  File "....../myvenv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "....../myvenv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'six~=1.15.0' distribution was not found and is required by tensorflow

cannot import name 'dtensor' from 'tensorflow.compat.v2.experimental'

Situation

After basic-pitch installation with poetry, I tried to import predict_and_save.
The version is 0.2.4.

from basic_pitch.inference import predict_and_save
>>> cannot import name 'dtensor' from 'tensorflow.compat.v2.experimental'

How to solve (Coping)

Downgrade the keras version to 2.6.0 (2.12.0 will be installed by default when you install basic-pich).

For example.

poetry add "keras==2.6.0"

See https://stackoverflow.com/questions/72255562/cannot-import-name-dtensor-from-tensorflow-compat-v2-experimental

How to solve (Fundamental)

Please solve the dependence problems...

Training code

Hello! Thank you for your work! The results sound interesting, but sometimes not perfect. I would like to train my model or use yours for fine tuning. Do you provide code for this?

training with custom data

Hi team,

I am currently working with drubinstein/wip-training branches with my custom data. Under the branch, model.py, I can see multiple losses and smoothing parameters I can control, and I wonder if I can get some information from previous training (e.g., previous tensorboard logs etc). For example, how loss worked, some information "contour_loss", "onset_loss", and "note_loss". If I can get that info, that would be greatly helpful for understanding my current training better. Any suggestions?

Output of one Piano cover is a MIDI with 62 instruments in MuseScore

Hi, I input a cover of a piano song into the Python library, and opened the resulting MIDI file in MuseScore. This was the result:
image
Essentially, there were a few notes played by 62 different pianos, despite the original performance being played on 1.

Is this expected behaviour from basic-pitch? Is it because I don't have the CUDA dependencies? Installed CUDA and cuDNN.

If it is expected behaviour, I'm looking for some angles to attack this problem from on the MuseScore side and the Basic-Pitch side.
Any help would be appreciated.

Issues installing basic pitch on Pyton 3.10 with tensorflow 2.9.1

Hello,

I would like to install basic-picth on a Macbook pro running Monterey, with Python 3.10, pip3 and tensorflow 2.9.1, but the tensorflow version supported are only between 2.4.1 and <2.7.0
Is there anything I can do?

Thanks, I can't wait to experiment with it!
Kindest,
Dom

Pitch bend returning to 1365 instead of 0 after initial pitch bend

I'm running Basic Pitch in Python, and it seems that, regardless of the track, if it has any pitch bends present, the pitch bends always get return to a pitch bend value of 1365 (10 in Logic pro).

For the beginning of the track, there are no pitch bends, but once one is encountered, the bend is applied and returned to 1365 and the pitch bend wheel/value seems to stay there for the remainder of the MIDI output.

Any ideas as to why this could be happening? Screenshot attached.
Screenshot 2023-05-23 at 1 43 33 AM

Obtaining multi-pitch estimates

In the paper, the following description is provided for obtaining multi-pitch estimates from the raw output of Basic Pitch:

Multi-pitch estimates are created by simply peak picking $Y_p$ across frequency and retaining all peaks greater than $τ_n$.

Is there any code to go along with this? How do you perform peak-picking and what is the value for $τ_n$?

[Feature Request] Add GM Midi program number for output channel

I have a problem somehow related to issue14 using the webversion basicpitch.

Importing mp3 files with a single instrument

  • walking bass
  • chord melody guitar

I receive impressivly good sounding midi files, but importing them to musescore always gives me two staffs for Midi Channel 1 (electric piano).

Then, these two staffs might be two bass clefs or, in the guitar recording, permanently switch clef between bass and treble, sometimes with bass clef in the upper and treble clef in the lower staff.

In combination with issue72 , i.e. extreme granularity in the score, while the music itself is actually mostly quarter and eight notes, the score becomes almost unreadable. I cannot find any granularity slider in the webapp as is mentioned in this issue.

Feature Request: would it be possible to add an import parameter "midi instrument" GeneralMIDI , so that a bass would be imported as program number 33 (-> one staff, bass clef), a jazz guitar as program number 27 (-> one staff , treble clef, notated one octave lower) etc ?

Dead code?

Hi,

first of all, congratulations to this work!

During examining the model, I noticed that x_contours is not used and overwritten after

x_contours = tfkl.Conv2D(
n_filters_contour,
(5, 5),
padding="same",
kernel_initializer=_initializer(),
kernel_constraint=_kernel_constraint(),
)(x)
x_contours = tfkl.BatchNormalization()(x_contours)
x_contours = tfkl.ReLU()(x_contours)

I also wanted to ask if you plan on releasing the script used for training the model as well.

Thanks,
Martin

Exported midi tempo

In the web demo there's a slider that allows you to choose the midi file tempo, however, today I installed the CLI tool with pip and I liked it because it's a lot faster, but I couldn't find a way to change the midi tempo, it would be nice if it had a parameter like basic-pitch <output> <input> --midi-tempo 75 for instance. Currently, it always exports the file at 120 bpm so I need to manually stretch the notes in the DAW to fit the desired tempo.

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.