BasicPitch 1.0.3
dotnet add package BasicPitch --version 1.0.3
NuGet\Install-Package BasicPitch -Version 1.0.3
<PackageReference Include="BasicPitch" Version="1.0.3" />
<PackageVersion Include="BasicPitch" Version="1.0.3" />
<PackageReference Include="BasicPitch" />
paket add BasicPitch --version 1.0.3
#r "nuget: BasicPitch, 1.0.3"
#:package BasicPitch@1.0.3
#addin nuget:?package=BasicPitch&version=1.0.3
#tool nuget:?package=BasicPitch&version=1.0.3
The content in this document was translated by AI.
basic-pitch-dotnet
basic-pitch is a project by Spotify that converts audio into MIDI. It is developed in Python itself, and this project is its ported version to .net.
How to use
Introduce it using NuGet: https://www.nuget.org/packages/BasicPitch/
You can refer to the ToMidiSample project for how to use it at the code level.
Basic principles of technology
basic-pitch itself completes its work in 3 steps:
- Use the nmp model to infer the audio input.
- Use the postprocessing algorithm to process the output of the nmp model.
- Convert the data from the previous step into a MIDI file.
This project also follows this principle:
- Use the onnx model version of nmp in conjunction with Microsoft's Windows.AI.MachineLearning framework for inference.
- Port the post-processing algorithms implemented in Python by Numpy/scipy using Microsoft's System.Numerics.Tensors framework.
- Use NAudio.Midi to generate MIDI files.
Among them, the audio data input to the nmp model in the first step will be slightly different in the Python version:
- The downmix algorithm used in the Python version is to calculate the average of multiple channels, and the resampling algorithm used is soxr_hq.
- This project uses NAudio.MediaFoundationResampler to implement these two steps. The output results may not be exactly the same as those of the Python version, but the final results are basically the same.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0-windows10.0.17763 is compatible. net9.0-windows was computed. net10.0-windows was computed. |
-
net8.0-windows10.0.17763
- NAudio (>= 2.2.1)
- System.Numerics.Tensors (>= 9.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.