PitchNet Manual PitchNet 1.0.2
Manual Home › Building from Source

Building from Source

PitchNet is built with CMake. You need CMake 3.22+, a C++17 compiler and Git.

PlatformRequirements
WindowsVisual Studio 2019+ with the C++ workload, Windows SDK
macOSXcode and the command line tools
LinuxGCC or Clang, ALSA development libraries
git clone https://github.com/SessionLoops/PitchNet.git
cd PitchNet
git submodule update --init --recursive
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release

On macOS you can also generate an Xcode project with cmake -B build-xcode -G Xcode and run the PitchNet scheme.

Options

FlagEffect
-DUSE_CUDA=ONCUDA execution provider (Windows)
-DUSE_DIRECTML=ONDirectML execution provider (Windows)
-DUSE_ASIO=ONASIO audio (Windows)
-DONNXRUNTIME_VERSION=…Override the ONNX Runtime version (downloaded during configure)
AAX_SDK_PATHBuilds AAX when set to a valid AAX SDK

CUDA and DirectML cannot be enabled together. ARA is enabled when the third_party/ARA_SDK submodule is present.

Models

The build expects these files in Resources/models and stops if one is missing: swift_f0.onnx, pc_nsf_hifigan.onnx (on macOS pc_nsf_hifigan.mlmodelc, the CoreML build, from the repository's models release), the GAME/ folder (downloaded by CMake when missing), cent_table.bin and mel_filterbank.bin. The optional basic_pitch_nmp.onnx and yamnet.onnx are downloaded by CMake when missing.

fcpe.onnx and rmvpe.onnx are not in the repository and not needed: FCPE and RMVPE are alternative pitch detectors that only debug builds can select. Release builds always use SwiftF0.