Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

napPd

napPd logo

Integrate PureData audio processing and synthesis patches into your NAP project. Built on libpd.

Important

Currently under active development. Tested on Linux x86_64, with source build context. Other platforms and build environments coming soon - pull requests welcome!

Installation

Simply git clone this repo into {NAP_ROOT}/modules, then in {NAP_ROOT}/tools run the script $ ./setup_module.sh napPd.

Quick Setup Guide

  1. Add "napPd" to the list of required modules in app.json.

  2. In napkin:

    1. Create an entity name AudioEntity and add it to the Scene.
    2. Add a nap::audio::PdComponent to the AudioEntity.
    3. In the Properties panel of the PdComponent, set the patch and, if you want to process audio input, add the input component to the Input field (e.g. a nap::audio::PlaybackComponent). If you don't plan to process audio input, set Num Inputs to 0.
    4. To output audio to the speakers, add a nap::audio::OutputComponent to the AudioEntity, set Input to the PdComponent, and configure the output routing by right clicking and adding integers 0 and 1. (You may need to include "napportaudio" to app.json to actually hear this output)
  3. In your app's myApp::init() function:

    // Get the Pd instance:
    auto pdComponent = mAudioEntity->findComponent<audio::PdComponentInstance>();
    
    // Load the Pd patch:
    pdComponent->load();
    
    // Start processing audio:
    pdComponent->setDSP(true);

Check out demo/pd_demo_basics for an explanation of how to interact with the Pd patch through sending and receiving messages. For more advanced usage (e.g. MIDI, integration into the NAP ecosystem), see the other demos.

Important

Currently, only one instance of Pd can be created in a single App. You can still use multiple PdComponents to load multiple patches, however only 1 can be attached to an audio output node! The channel count (in, out) must also be the same in all PdComponents. Better to only use one with a single patch. This may change in the future if the need arises.

To-do

  • Platforms:
    • Windows
    • RaspberryPi (arm64)
  • Build contexts
  • Add demos
    • messages
    • MIDI
    • nap sequencer
    • dashboard
    • externals
  • Add documentation

About

libpd module for NAP-Framework

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages