Skip to content

TEAMuP-dev/HARP

Repository files navigation

HARP

herofig_revised

HARP is a sample editor for hosted, asynchronous, remote processing of audio with machine learning. HARP operates as a standalone application or a plugin-like editor within your DAW, and routes audio, MIDI, and metadata through Gradio endpoints for processing. Gradio apps can be hosted locally or remotely (e.g., HuggingFace Spaces), allowing users of DAWs (e.g. REAPER, Logic Pro X, Ableton Live) to access powerful cloud-based models seamlessly from within their DAW.

Table of Contents

For more information on HARP, please see our website or our most recent NeurIPS workshop paper.

Installation

HARP has been tested on the following operating systems:

OS macOS ARM macOS x86 Windows Ubuntu
Versions 13.0, 13.4, 14.2.1, 14.5 10.15 10, 11 22.04

Please visit our website for instructions on installing HARP and setting it up as an external sample editor for specific operating systems and DAWs.

Usage

HARP can be used to apply deep learning models to your audio either as a standalone or within any DAW (e.g. Logic Pro) that supports external sample editors.

If you use it standalone, just load a file, load a model and apply the model to the audio file. When you're happy with the result, save the output.

In a DAW, select the excerpt you want to process, open it in HARP, process it, and click the Save icon on the track display or media clipboard. This will open a file browser for saving the selected file.

Warning!

HARP is a destructive file editor. When operating HARP as a standalone application, use Save As to avoid overwriting input files. If you save your outputs via the Send-to-DAW feature, HARP will overwrite input regions. By creating a duplicate / bounce / alternate take of the region you want to edit with HARP, you can ensure the original region remains unaffected.

Processing just a portion of a track

HARP processes full regions in the DAW. Therefore, to edit a portion of an audio or MIDI region:

  • Split the region to obtain the excerpt you want to edit as a separate region
  • (Optional) Create a duplicate / bounce / alternate take of the region you want to edit
  • Open with HARP to process

Models

Please visit our website for a full list of supported models.

Workflow

HARP supports a simple workflow: pick an existing model for processing or provide a URL to your own, load the model and it's corresponding interface, tweak controls to your liking, and process.

To get started:

  • Open HARP as a standalone application or within your DAW
  • Select an existing model using the drop-down menu at the top of the screen, or select custom path... and provide a URL to any HARP-compatible Gradio endpoint
  • Load the selected model (and its corresponding interface) using the Load button.
  • Import audio or MIDI data to process with the model either via the Open File button or by dragging and dropping a file into HARP
  • Adjust controls to taste in the interface
  • Click Process to run the model; outputs will automatically be rendered in HARP
  • To save your outputs, click the Save icon (output track or media clipboard) or the Send-to-DAW icon (orange circle with arrow in media clipboard)
text-to-audio

Contributing

To get started building and deploying models for others to use in HARP, see Adding Models with pyharp. To get started developing the HARP app itself, see Building HARP. Please also see our Developer Notes for various conventions and suggestions.

Version Compatibility

The currently available versions of HARP and pyharp are mutually compatible.

HARP pyharp
3.1.0 0.3.0
2.2.0 0.2.1

Adding Models with pyharp

ReadMe Card

pyharp provides a lightweight API to build HARP-compatible Gradio apps. It allows researchers to easily create DAW-friendly interfaces for any audio processing code with minimal Python wrapping.

Building HARP

HARP can be built from scratch with the following steps:

1. Clone Repository

git clone --recurse-submodules https://github.com/TEAMuP-dev/HARP

2. Enter Project

cd HARP/

3. Configure

mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug

ARM vs. x86 MacOS

The OSX architecture for the build can be specified explicitly by setting CMAKE_OSX_ARCHITECTURES to either arm64 or x86_64:

cmake .. -DCMAKE_OSX_ARCHITECTURES=x86_64

Linux

Ensure your system satisfies all JUCE dependencies.

4. Build

MacOS/Linux

make -j <NUM_PROCESSORS>

Windows

cmake --build . --config Debug -j <NUM_PROCESSORS>

Debugging

We provide instructions for debugging your HARP build in Visual Studio Code:

  1. Download Visual Studio Code.
  2. Install the C/C++ extension from Microsoft.
  3. Open the Run and Debug tab in VS Code and click create a launch.json file using CMake Debugger.
  4. Create a configuration to attach to the process (see the following example code to be placed in launch.json).
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Standalone HARP",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/build/HARP_artefacts/Debug/HARP.app", // macOS
            //"program": "${workspaceFolder}/build/HARP_artefacts/Debug/HARP.exe", // Windows
            //"program": "${workspaceFolder}/build/HARP_artefacts/Debug/HARP", // Linux
            "args": ["../resources/media/test.wav", "../resources/media/test.mid"],
            "cwd": "${fileDirname}",
            "MIMode": "lldb" // macOS
        },
        {
            "name": "Attach to HARP",
            "type": "cppdbg",
            "request": "attach",
            "program": "${workspaceFolder}/build/HARP_artefacts/Debug/HARP.app", // macOS
            //"program": "${workspaceFolder}/build/HARP_artefacts/Debug/HARP.exe", // Windows
            //"program": "${workspaceFolder}/build/HARP_artefacts/Debug/HARP", // Linux
            "processId": "${command:pickProcess}",
            "MIMode": "lldb" // macOS
        }
    ]
}
  1. Build the plugin using the flag -DCMAKE_BUILD_TYPE=Debug (see the following configure / build commands for macOS).
# CMake Configure Command:
/opt/homebrew/bin/cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++ --no-warn-unused-cli -S /Users/<USER>/Projects/HARP -B /Users/<USER>/Projects/HARP/build -G Ninja
# CMake Build Command:
/opt/homebrew/bin/cmake --build /Users/<USER>/Projects/HARP/build --config Debug --target all --
  1. Add break points and run the debugger.

Distribution

MacOS

Codesigning and packaging for distribution is done through the script located at packaging/package.sh. You'll need to set up a developer account with Apple and create a certificate in order to sign the plugin. For more information on codesigning and notarization for macOS, please refer to the pamplejuce template.

The script requires the following variables to be passed:

# Retrieve values from either environment variables or command-line arguments
DEV_ID_APPLICATION # Developer ID Application certificate
ARTIFACTS_PATH # should be packaging/dmg/HARP.app
PROJECT_NAME # "HARP"
PRODUCT_NAME # "HARP"
NOTARIZATION_USERNAME # Apple ID
NOTARIZATION_PASSWORD # App-specific password for notarization
TEAM_ID # Team ID for notarization

Usage:

./HARP/packaging/package.sh <DEV_ID_APPLICATION> <ARTIFACTS_PATH> <PROJECT_NAME> <PRODUCT_NAME> <NOTARIZATION_USERNAME> <NOTARIZATION_PASSWORD> <TEAM_ID>

After running package.sh, you should have a signed and notarized dmg file in the packaging/ directory.

Citations

NeurIPS 2025 Workshop on AI for Music Paper:

@inproceedings{cwitkowitz2025harp,
    title     = {{HARP} 3.0: Generalizing {I/O} and {API} Support for Machine Learning in Digital Audio Workstations},
    author    = {Cwitkowitz, Frank and Benetatos, Christodoulos and Deng, Qixin and Yu, Huiran and Pruyne, Nathan and O'Reilly, Patrick and Garcia, Hugo Flores and Duan, Zhiyao and Pardo, Bryan},
    year      = 2025,
    booktitle = {NeurIPS AI for Music Workshop}
}

ISMIR 2024 Late Breaking Demo:

@article{benetatos2024harp,
    title     = {{HARP} 2.0: Expanding Hosted, Asynchronous, Remote Processing for Deep Learning in the {DAW}},
    author    = {Benetatos, Christodoulos and Cwitkowitz, Frank and Pruyne, Nathan and Garcia, Hugo Flores and O'Reilly, Patrick and Duan, Zhiyao and Pardo, Bryan},
    year      = 2024,
    journal   = {ISMIR Late Breaking Demo Papers}
}

NeurIPS 2023 Workshop on Machine Learning for Creativity and Design Paper:

@inproceedings{garcia2023harp,
    title     = {{HARP}: Bringing Deep Learning to the {DAW} with Hosted, Asynchronous, Remote Processing},
    author    = {Garcia, Hugo Flores and O’Reilly, Patrick and Aguilar, Aldo and Pardo, Bryan and Benetatos, Christodoulos and Duan, Zhiyao},
    year      = 2023,
    booktitle = {NeurIPS Workshop on Machine Learning for Creativity and Design}
}

About

A sample editing application allowing for hosted, asynchronous, remote processing of audio and midi with machine learning.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors