Skip to content
cccskills
FreePublished on GitHub

faust

Create Faust DSP plugins in Pulp using Pulp-owned reference DSPs, optional external code generation, and the FaustProcessor template wrapper.

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md7.5 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

FAUST DSL

Use this skill when a task involves writing, generating, or testing FAUST-based processors in Pulp.

Truthful Position

Pulp supports a narrow Faust lane built around FaustProcessor<T>, Pulp-owned reference DSP implementations, and optional external code generation. The Faust compiler is supplied and licensed by the developer; Pulp does not vendor, download, redistribute, or require it for normal builds.

Supported now:

  • optional .dsp authoring examples and external code generation to developer-selected artifacts
  • FaustProcessor<T> template that bridges any compatible dsp subclass into Pulp's Processor model
  • Pulp-owned gain, filter, and tremolo reference DSP implementations; no source equivalence to their adjacent .dsp examples is claimed
  • automatic parameter reflection from FAUST buildUserInterface() into StateStore
  • bus layout detection from getNumInputs() / getNumOutputs()
  • real-time-safe processing after prepare() for the exact prepared channel topology and blocks up to the declared maximum size
  • metadata extraction (name, author, version) into PluginDescriptor
  • CMake integration via PulpFaust.cmake (pulp_faust_generate, pulp_add_faust_test)
  • three working examples: gain, filter, tremolo

Not supported by this skill:

  • FAUST MIDI mapping
  • FAUST polyphony / declare options "[midi:on][nvoices:N]"
  • runtime JIT compilation
  • @gfx / FAUST GUI — FaustProcessor reports has_editor() = false
  • soundfile support

Core Files

FilePurpose
core/dsl/include/pulp/dsl/faust_base.hppPulp-owned Faust compatibility interfaces (dsp, UI, Meta)
core/dsl/include/pulp/dsl/faust_processor.hppFaustProcessor<T> template and PulpFaustUI
core/dsl/include/pulp/dsl/dsl_processor.hppDslProcessor base class shared across DSL lanes
tools/cmake/PulpFaust.cmakeCMake module: pulp_faust_generate(), pulp_add_faust_test()
examples/faust-gain/Stereo gain — simplest FAUST example
examples/faust-filter/Parametric filter example
examples/faust-tremolo/Tremolo with rate/depth

How It Works

FaustProcessor<T> accepts a default-constructible class derived from ::dsp. Pulp provides the narrow compatibility interfaces in faust_base.hpp, which are used by its reference DSPs and can also adapt a compatible artifact produced by an externally supplied Faust compiler.

  1. Constructor calls buildUserInterface() to discover parameters and metadata() for plugin info
  2. define_parameters() registers each FAUST zone as a StateStore parameter with correct range/unit/group
  3. prepare() validates the declared input/output channel topology, stores the maximum block size, pre-sizes the raw channel-pointer arrays, and calls dsp::init(sample_rate)
  4. process() accepts only that prepared topology and a block no larger than the declared maximum. It reuses the pre-sized pointer arrays, syncs StateStore values into FAUST zone pointers, and calls dsp::compute() without constructing or resizing vectors. An unprepared call, a channel mismatch, an undersized buffer, or an oversized block fails closed by clearing the output without calling the FAUST DSP.

Creating a FAUST Plugin

1. Write the .dsp source

// examples/faust-myplugin/myplugin.dsp
declare name "MyPlugin";
declare author "YourName";
declare version "1.0.0";

import("stdfaust.lib");

gain = hslider("Gain [unit:dB]", 0, -60, 24, 0.1) : ba.db2linear;
process = _, _ : *(gain), *(gain);

2. Optionally generate a developer-owned C++ artifact

This requires an externally supplied faust executable. Record or pin the compiler identity and verify its output before claiming that an artifact corresponds to a source file.

faust -lang cpp -cn MyPluginDsp -o build/myplugin_faust.hpp \
    examples/faust-myplugin/myplugin.dsp

Or let CMake handle it (regenerates when .dsp changes):

include(PulpFaust)
pulp_faust_generate(
    ${CMAKE_CURRENT_BINARY_DIR}/myplugin_faust.hpp
    ${CMAKE_CURRENT_SOURCE_DIR}/myplugin.dsp
    MyPluginDsp
)

The helper is inactive when faust is unavailable. Pulp's checked-in reference DSPs remain buildable independently of the optional compiler.

3. Write the processor wrapper

// examples/faust-myplugin/faust_myplugin.hpp
#pragma once
#include "myplugin_faust.hpp" // developer-owned, verified external artifact
#include <pulp/dsl/faust_processor.hpp>

namespace pulp::examples {
using MyPluginProcessor = dsl::FaustProcessor<MyPluginDsp>;

inline std::unique_ptr<format::Processor> create_my_plugin() {
    return std::make_unique<MyPluginProcessor>();
}
} // namespace pulp::examples

4. Add CMakeLists.txt

if(PULP_BUILD_TESTS)
    add_executable(pulp-faust-myplugin-test test_faust_myplugin.cpp)
    target_link_libraries(pulp-faust-myplugin-test PRIVATE pulp::dsl pulp::format Catch2::Catch2WithMain)
    target_include_directories(pulp-faust-myplugin-test PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
    catch_discover_tests(pulp-faust-myplugin-test)
endif()

5. Write tests

Follow the pattern in examples/faust-gain/test_faust_gain.cpp:

  • verify descriptor() metadata matches the values exposed by the selected dsp class
  • verify parameter count, names, ranges, and units
  • verify audio processing at known parameter values (unity gain, boost, cut)
  • verify state serialization round-trip
  • verify DSL reflection (dsl_name() == "faust", dsl_params(), bus_layout())

Build and Test

# Build the Pulp reference DSP examples (no faust needed)
tools/ci/governed-build.sh cmake --build build

# Run all FAUST tests
ctest --test-dir build -R "faust" --output-on-failure

# Run one example
ctest --test-dir build -R "FaustGain" --output-on-failure

# Generate every registered optional artifact (target exists when faust is found)
cmake --build build --target faust-regenerate

What To Check

When modifying the FAUST lane, verify:

  • Pulp reference DSPs compile and their numerical tests pass without faust installed
  • optional compiler output is treated as a distinct developer-owned artifact unless a pinned compiler and verification receipt prove a stronger claim
  • parameter names, ranges, and units round-trip correctly from the selected dsp class's buildUserInterface() metadata
  • bus layout matches getNumInputs() / getNumOutputs()
  • audio output is correct at known parameter values
  • prepare() declares the largest block a test or host will submit; larger runtime blocks are rejected and cleared rather than processed
  • zero, ordinary, and maximum prepared blocks produce the expected output, while unprepared and mismatched shapes fail closed
  • allocation-abort and real-time lock probes remain green inside process()
  • DslProcessor reflection (dsl_name, dsl_params, bus_layout) is accurate
  • new examples are added to examples/CMakeLists.txt

Boundaries

This skill covers the Pulp reference DSP and optional external Faust codegen lane only.

  • The FAUST compiler is external, not vendored
  • Pulp's reference DSP implementations are checked in and build without Faust
  • External compiler artifacts are developer-owned inputs and are not Pulp reference implementations by default
  • No runtime JIT or FAUST interpreter embedding
  • No FAUST GUI — Pulp provides its own UI layer

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

aax

Free

Optional AAX support for Pulp, including developer-supplied Avid SDK setup, CMake enablement, DigiShell/AAX Validator workflows, and local AAX builds on macOS or Windows.

The English summary is being prepared. Showing the original description.

Generous-Corp/pulp22Updated Oct 20, 2026

Configure, implement, and test Pulp's optional desktop Ableton Link tempo-sync adapter while preserving the developer-supplied SDK, licensing, realtime, latency-compensation, and no-install boundaries.

The English summary is being prepared. Showing the original description.

Generous-Corp/pulp22Updated Oct 20, 2026

Maintain Pulp's installed design-time agent capability manifest and public-surface ledger. Use when adding, removing, renaming, or materially changing public audio, MIDI, signal, timebase, or sequence APIs; registering a new algorithm for generators; changing capability support or deprecation state; or repairing agent-capabilities freshness, schema, fingerprint, tombstone, or installed-SDK tests.

The English summary is being prepared. Showing the original description.

Generous-Corp/pulp22Updated Oct 20, 2026

Android platform development for Pulp — NDK cross-compilation, Oboe audio, Dawn/Skia GPU rendering, JNI bridge, touch interaction, emulator workflows, and end-to-end smoke validation. Covers build, deploy, debug, and the gotchas discovered during bringup.

The English summary is being prepared. Showing the original description.

Generous-Corp/pulp22Updated Oct 20, 2026

ara

Free

Optional ARA support for Pulp, including developer-supplied ARA SDK setup, CMake enablement, adapter companion APIs, validation, and ARA-aware plugin implementation guidance.

The English summary is being prepared. Showing the original description.

Generous-Corp/pulp22Updated Oct 20, 2026

The measurement surface for ALL Pulp DSP and audio-pipeline work — read it BEFORE writing or gating DSP, not only when something already sounds wrong. Covers the C++ harness (signal generators, metrics, assertions, RenderScenario, contracts), the offline Audio Doctor (magnitude/frequency response, THD/THD+N, phase/group delay), and their Python sibling the Audio Quality Lab (tools/audio/quality-lab — null residual + alignment, LTAS log-spectral distance, spectral flux/centroid, HNR, Theil-Sen drift slope, Kaiser-sinc resampling, license-guarded corpus, regression-net ratchet). TRIGGER on AUTHORING work — "build/design an oscillator/filter/synth/effect", "add a DSP module", "what should the acceptance gate be", "how do I measure aliasing / anti-aliasing / alias floor", "null against a reference", "is this DSP correct", "choose a tolerance", "golden/regression corpus for audio", "measure drift or jitter", "A/B two renders" — AND on DEBUGGING work — "is there sound / no audio / I hear nothing", "does this filter/compressor/synth/delay produce the right signal", "prove the DSP / prove the contract", "measure the frequency response", "what's the THD / is it distorting", "what's the group delay / phase response / measured latency", "magnitude response curve", "render a test tone and assert", "audio regression", "64-frame works but 128 is silent", "sample-rate change pitch-shifted it", "describe what's in this buffer", "audio doctor", "compare before/after a DSP refactor". Reach for this BEFORE hand-rolling any FFT, null test, alias measurement, pitch tracker, or golden-render script — most of it already exists in one of the two lanes. Test/tool layer over HeadlessHost — deterministic, no audio device, no speakers. Off the realtime thread entirely.

The English summary is being prepared. Showing the original description.

Generous-Corp/pulp22Updated Oct 20, 2026

See all skills by Generous-Corp

Report a problem with this skill