Skip to content
SessionLoopsPublic
forked from KCKT0112/HachiTune

About

A lightweight pitch editor built with JUCE, featuring neural pitch detection and vocoder resynthesis for real-time preview.git

Resources

Stars

224 stars

Watchers

1 watching

Forks

 
 

Repository files navigation

PitchNet

A free, open-source pitch editor for vocals and polyphonic audio, with neural pitch detection and real-time resynthesis.

PitchNet editor screenshot

Origin, attribution, and license

PitchNet is a modified derivative of HachiTune, an open-source project developed by the HachiTune contributors. It includes substantial code derived from HachiTune, along with subsequent changes by Session Loops and other contributors. This repository does not claim sole authorship of the derived work.

PitchNet is distributed under the GNU Affero General Public License, version 3 (AGPLv3). The complete license text is included in this repository. When conveying copies or modified versions, preserve all applicable copyright, license, and attribution notices, and make the corresponding source available as required by the AGPLv3.

Overview

PitchNet is a standalone app and audio plugin for editing pitch in a piano roll. For vocals it detects pitch with a neural pitch detector (SwiftF0 by default), segments notes with the GAME model, and resynthesizes edits through a neural vocoder (PC-NSF-HiFiGAN) or a classic PSOLA engine. For polyphonic recordings (chords, strums, ensembles) it separates the audio into individual notes that can be edited one at a time. Edits are previewed instantly and exported as audio or MIDI. The plugin supports ARA hosts and a capture workflow for hosts without ARA.

The user manual is at sessionloops.github.io/PitchNet (source in docs/manual); the ? button in the app's toolbar opens it.

Features

Vocals

  • Piano roll editing with Main, Note Separation, Pitch Drawing and Timing tools
  • Neural pitch detection (SwiftF0 default; FCPE and RMVPE also supported)
  • GAME-based note segmentation
  • Per-note handles: fine pitch, pitch drift, pitch modulation (vibrato), left/right slope, amplitude, formant shift and Sibilant Balance
  • Correct Pitch macro (pitch center and drift), scales, Fourier pitch filter, and per-note Restore Original
  • Two render engines: AI Resynthesis (PC-NSF-HiFiGAN, incremental) and Classic (time-domain PSOLA, CPU-only)
  • Breath and sibilance detection: consonants join the note they lead into, breaths stay out of notes, breaths and sibilants keep the original recording when notes are retuned, and both are hatched in the piano roll with no pitch curve over them (details)
  • Stretching a note holds its vowel: consonants keep their recorded length and the original recording (details)
  • Breath notes: every breath is drawn as its own note - drag it to change its level (details)
  • Sibilant Balance per note, like Melodyne's: turn down a note's sibilants or the rest of it (details)

Polyphonic audio

  • Multiple-F0 analysis with a learned note filter and a harmonic sound model, so single notes inside a mix can be re-pitched, re-timed, re-leveled or muted while unedited audio comes back untouched (details)
  • Harmonic and Guided detectors, and Note Assignment Mode for adding missed notes from the candidates
  • Automatic tempo and downbeat detection; Cut, Copy and Paste of notes
  • Automatic input-type detection (voice or polyphonic), with a manual override

Everywhere

  • Chord Track: detected chords above the notes; type a chord to re-voice them
  • MIDI: export, drag notes into a DAW, and a MIDI reference melody to tune against
  • High-quality, band-limited sample-rate conversion with r8brain-free-src
  • Undo/redo for all editing operations; projects saved as .pitchnet
  • Opens WAV, MP3, FLAC, AIFF, OGG and M4A; exports WAV, FLAC, AIFF and OGG, plus MIDI
  • Standalone app plus VST3/AU plugins (AAX when the AAX SDK is available), with ARA
  • GPU inference via CoreML on macOS and DirectML on Windows; CUDA on Linux
  • Multi-language UI (English, Spanish, Japanese, Korean, Portuguese, Russian, Chinese Simplified, Chinese Traditional)

Download

Download PitchNet for Windows, macOS and Linux.

Requirements

  • CMake 3.22+
  • C++17 compiler
  • Git (for submodules)

Platform notes

Platform Requirements
Windows Visual Studio 2019+ with C++ workload, Windows SDK
macOS Xcode + command line tools; macOS 13 or later
Linux GCC/Clang, ALSA development libraries

Models and Assets

The build expects these files in Resources/models and fails if any are missing:

  • swift_f0.onnx (pitch detection)
  • pc_nsf_hifigan.onnx (vocoder; on macOS pc_nsf_hifigan.mlmodelc, the CoreML build, from this repository's models release)
  • GAME/ (note segmentation: encoder.onnx, estimator.onnx, segmenter.onnx, dur2bd.onnx, bd2dur.onnx, config.json); downloaded by CMake from the GAME releases when missing
  • cent_table.bin
  • mel_filterbank.bin

Optional models, downloaded by CMake from this repository's models release when missing (pinned by SHA-256; the features that use them fall back without them):

  • basic_pitch_nmp.onnx (polyphonic note evidence)
  • yamnet.onnx (input-type classifier: is the input a voice?)

rmvpe.onnx (the RMVPE pitch detector) is used when present but is not required.

Other runtime assets live in Resources/lang, Resources/fonts and Resources/images.

Build

Submodules

git submodule update --init --recursive

Configure

cmake -B build -DCMAKE_BUILD_TYPE=Release

Build

cmake --build build --config Release

Optional flags

  • -DUSE_DIRECTML=ON DirectML execution provider (Windows; on by default there)
  • -DUSE_CUDA=ON CUDA execution provider (Linux; uses ONNX Runtime 1.31.0 for CUDA 13)
  • -DUSE_ASIO=ON ASIO support (Windows)
  • -DUSE_BUNDLED_DIRECTML_RUNTIME=ON Bundle the DirectML runtime (Windows)
  • -DPITCHNET_BUILD_TESTS=ON Build the unit tests in tests/ and register them with CTest

Notes:

  • CUDA and DirectML cannot be enabled at the same time. CUDA is not supported on Windows.
  • ONNX Runtime (1.19.2 unless CUDA is enabled) is downloaded from NuGet during CMake configure.

Plugin Formats

  • VST3 and AU are built by default.
  • AAX is built when the AAX SDK is found: -DAAX_SDK_PATH, the AAX_SDK_PATH environment variable, or third_party/AAX_SDK.
  • ARA is enabled when the third_party/ARA_SDK submodule is present.

Usage

  1. Open an audio file or a .pitchnet project.
  2. PitchNet analyzes it automatically: pitch, notes, and whether it is a voice or polyphonic.
  3. Edit notes in the piano roll: pitch, timing, level and tone.
  4. Hear the result straight away; edits are rendered in the background.
  5. Export the edited audio or MIDI, or save the project.

See the manual for every tool, shortcut and setting.

Plugin modes

  • ARA mode: direct audio access in supported hosts (e.g., Studio One, Cubase, Logic Pro).
  • Capture mode: in hosts without ARA, PitchNet records the track as it plays, then analyzes it.

Project Structure

PitchNet/
  Source/
    Audio/        # Audio engine, pitch detection, synthesis, vocoder
      Polyphonic/ # Polyphonic analysis and rendering engine
      Analysis/   # Input-type classification
    Models/       # Project, note, and audio data models
    UI/           # Piano roll, toolbar, panels, and dialogs
    Utils/        # Resampling, localization, mel spectrogram utilities
    Undo/         # Undo/redo action system
    Plugin/       # VST3/AU/AAX/ARA plugin integration
  Resources/
    models/       # ONNX/CoreML models and data files
    lang/         # Localization JSON (8 languages)
    fonts/        # UI fonts
    images/       # Toolbar and UI icons
  docs/
    manual/       # User manual (published to GitHub Pages)
  tests/          # Unit tests
  tools/          # Research, evaluation and export scripts
  third_party/
    JUCE/             # JUCE framework (submodule)
    ARA_SDK/          # ARA SDK (submodule, optional)
    r8brain-free-src/ # High-quality audio resampler (submodule)
  CMakeLists.txt

Acknowledgements

PitchNet builds on HachiTune by the HachiTune contributors.

Models

  • SwiftF0 — default pitch detector, by Lars Nieradzik (MIT)
  • FCPE — pitch detector, by CN_ChiTu (MIT)
  • RMVPE — optional pitch detector, by yxlllc
  • GAME — note segmentation, by OpenVPI (MIT)
  • PC-NSF-HiFiGAN — neural vocoder, by OpenVPI (AGPLv3)
  • Basic Pitch — note evidence for polyphonic analysis, by Spotify (Apache-2.0)
  • YAMNet — audio event model used to tell voice from instruments, by Google (Apache-2.0)

Libraries and SDKs

  • JUCE — application and plugin framework (AGPLv3)
  • ONNX Runtime — model inference, by Microsoft (MIT)
  • ARA SDK — Audio Random Access, by Celemony (Apache-2.0)
  • r8brain-free-src — sample-rate conversion, by Aleksey Vaneev (MIT)
  • AAX SDK — AAX plugin format, by Avid

Data and research

  • The polyphonic note filter was trained on features of recordings from Salamander Grand Piano V3 by Alexander Holm (CC BY 3.0) and VSCO 2 Community Edition by Versilian Studios and Ivy Audio (CC0 1.0). No audio from these libraries is distributed.
  • The polyphonic engine follows published methods: multiple-F0 estimation by harmonic summation with iterative estimation and cancellation (Klapuri 2003, 2006), pitch-informed harmonic NMF (Ewert & Müller 2012), and phase-vocoder shifting of partials (Laroche & Dolson 1999). See docs/polyphonic-editing.md.

The full notices and license texts are in THIRD_PARTY_NOTICES.txt.

License

See LICENSE.

About

A lightweight pitch editor built with JUCE, featuring neural pitch detection and vocoder resynthesis for real-time preview.git

Resources

Stars

224 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages