All Projects → DBraun → TD-Faust

DBraun / TD-Faust

Licence: other
FAUST (Functional Audio Stream) for TouchDesigner

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
python
139335 projects - #7 most used programming language
shell
77523 projects
Batchfile
5799 projects

Projects that are alternatives of or similar to TD-Faust

DTMF-Decoder
A Java program to implement a DMTF Decoder.
Stars: ✭ 28 (-26.32%)
Mutual labels:  dsp, audio-processing
Kfr
Fast, modern C++ DSP framework, FFT, Sample Rate Conversion, FIR/IIR/Biquad Filters (SSE, AVX, AVX-512, ARM NEON)
Stars: ✭ 985 (+2492.11%)
Mutual labels:  dsp, audio-processing
Dplug
Audio plugin framework. VST2/VST3/AU/AAX/LV2 for Linux/macOS/Windows.
Stars: ✭ 341 (+797.37%)
Mutual labels:  dsp, audio-processing
lavadsp
A bunch of lavaplayer audio filters
Stars: ✭ 55 (+44.74%)
Mutual labels:  dsp, audio-processing
Pyaudiodsptools
Numpy Audio DSP Tools
Stars: ✭ 154 (+305.26%)
Mutual labels:  dsp, audio-processing
RTspice
A real-time netlist based audio circuit plugin
Stars: ✭ 51 (+34.21%)
Mutual labels:  dsp, audio-processing
Guitard
Node based multi effects audio processor
Stars: ✭ 31 (-18.42%)
Mutual labels:  dsp, audio-processing
pedalevite
Pédale Vite — DIY multi-FX pedalboard for guitar/bass/etc.
Stars: ✭ 68 (+78.95%)
Mutual labels:  dsp, audio-processing
Noise reduction
Speech noise reduction which was generated using existing post-production techniques implemented in Python
Stars: ✭ 130 (+242.11%)
Mutual labels:  dsp, audio-processing
Edsp
A cross-platform DSP library written in C++ 11/14. This library harnesses the power of C++ templates to implement a complete set of DSP algorithms.
Stars: ✭ 116 (+205.26%)
Mutual labels:  dsp, audio-processing
audio noise clustering
https://dodiku.github.io/audio_noise_clustering/results/ ==> An experiment with a variety of clustering (and clustering-like) techniques to reduce noise on an audio speech recording.
Stars: ✭ 24 (-36.84%)
Mutual labels:  dsp, audio-processing
gensound
Pythonic audio processing and generation framework
Stars: ✭ 69 (+81.58%)
Mutual labels:  dsp, audio-processing
dspjargon
All the jargon you need to understand the world of Digital Signal Processing.
Stars: ✭ 37 (-2.63%)
Mutual labels:  dsp, audio-processing
AnotherBadBeatSaberClone
This is a discontinued but perhaps helpful VR project created during my Master's degree at FH Wedel.
Stars: ✭ 22 (-42.11%)
Mutual labels:  dsp, audio-processing
Planeverb
Project Planeverb is a CPU based real-time wave-based acoustics engine for games. It comes with an integration with the Unity Engine.
Stars: ✭ 22 (-42.11%)
Mutual labels:  dsp, audio-processing
Q
C++ Library for Audio Digital Signal Processing
Stars: ✭ 481 (+1165.79%)
Mutual labels:  dsp, audio-processing
fogpad
A VST reverb effect in which the reflections can be frozen, filtered, pitch shifted and ultimately disintegrated.
Stars: ✭ 61 (+60.53%)
Mutual labels:  dsp, audio-processing
facet
Facet is a live coding system for algorithmic music
Stars: ✭ 72 (+89.47%)
Mutual labels:  dsp, audio-processing
Regrader
VST delay plugin where the repeats degrade in resolution
Stars: ✭ 44 (+15.79%)
Mutual labels:  dsp, audio-processing
Fourier
Fast Fourier transforms (FFTs) in Rust
Stars: ✭ 206 (+442.11%)
Mutual labels:  dsp, audio-processing

TD-Faust

TD-Faust is an integration of FAUST (Functional AUdio STream) and TouchDesigner. The latest builds are for TouchDesigner 2022.25370 and newer. Older TD-Faust builds can be found in the Releases.

Overview

  • FAUST code can be compiled "just-in-time" and run inside TouchDesigner.
  • Tested on Windows and macOS.
  • Automatically generated user interfaces of TouchDesigner widgets based on the FAUST code.
  • Up to 16384 channels of input and 16384 channels of output.
  • Pick your own sample rate.
  • Support for all of the standard FAUST libraries including
    • High-order ambisonics
    • WAV-file playback
    • Oscillators, noises, filters, and more
  • MIDI data can be passed to FAUST via TouchDesigner CHOPs or hardware.
  • Support for polyphonic MIDI.
    • You can address parameters of individual voices (like MPE) or group them together.

Demo / Tutorial:

Demo Video Screenshot

Examples of projects made with TD-Faust can be found here. Contributions are welcome!

New to FAUST?

Quick Install

Windows

Visit TD-Faust's Releases page. Download and unzip the latest Windows version. Copy faust.dll, TD-Faust.dll, sndfile.dll, and the faustlibraries folder to this repository's Plugins folder. Open TD-Faust.toe and compile a few examples.

If you need to compile TD-Faust.dll yourself, you should first install Python 3.9 to C:/Python39/ and confirm it's in your system PATH. Then you can open a cmd window to this repo's directory and run call build_windows.bat.

macOS

MacOS users need to compile TD-Faust on their own computers due to code-signing requirements.

  1. Clone this repository with git. Then update all submodules in the root of the repository with git submodule update --init --recursive
  2. Install Xcode.
  3. Install CMake and confirm that it's installed by running cmake --version in Terminal.
  4. Install Python 3.9 universal2 and confirm it's in your system PATH.
  5. In a Terminal window, navigate to the root of this repository and run sh build_macos.sh. If you have an Apple Silicon CPU, it will build TD-Faust to be compatible with the Apple Silicon TouchDesigner builds. If you want to build for x86_64 despite this, you can adjust build_macos.sh.
  6. Open TD-Faust.toe

Tutorial

Writing Code

You don't need to import("stdfaust.lib"); in the FAUST dsp code. This line is automatically added for convenience.

Custom Parameters in TouchDesigner

  • Sample Rate: Audio sample rate (such as 44100 or 48000).
  • Polyphony: Toggle whether polyphony is enabled. Refer to the Faust guide to polyphony and use the keywords such as gate, gain, and freq when writing the DSP code.
  • N Voices: The number of polyphony voices.
  • Group Voices: Toggle group voices (see below).
  • Dynamic Voices: Toggle dynamic voices (see below).
  • MIDI: Toggle whether hardware MIDI input is enabled.
  • MIDI In Virtual: Toggle whether virtual MIDI input is enabled (macOS support only)
  • MIDI In Virtual Name: The name of the virtual MIDI input device (macOS support only)
  • Code: The DAT containing the Faust code to use.
  • Faust Libraries Path: The directory containing your custom faust libraries (.lib files)
  • Assets Path: The directory containing your assets such as .wav files.
  • Compile: Compile the Faust code.
  • Reset: Clear the compiled code, if there is any.
  • Clear MIDI: Clear the MIDI notes (in case notes are stuck on).
  • Viewer COMP: The Container COMP which will be used when Compile is pulsed.

Python API

The Faust CHOP's Pyton interface is similar to the Audio VST CHOP.

  • sendNoteOn(channel: int, note: int, velocity: int, noteOffDelay: float=None, noteOffVelocity: int=None) -> None (noteOffDelay and noteOffVelocity aren't used yet)
  • sendNoteOff(channel: int, note: int, velocity: int) -> None
  • panic() -> None
  • sendAllNotesOff(channel: int) -> None
  • sendControl(channel: int, ctrl: int, value: int) -> None
  • sendPitchBend(channel: int, wheel: int) -> None
  • sendProgram(channel: int, pgm: int) -> None

Automatic Custom Parameters and UI

One great feature of TD-Faust is that user interfaces that appear in the Faust code become Custom Parameters on the Faust Base. If a Viewer COMP is set, then it can be automatically filled in with widgets with binding. Look at the simple Faust code below:

import("stdfaust.lib");
freq = hslider("Freq", 440, 0, 20000, 0) : si.smoo;
gain = hslider("Volume[unit:dB]", -12, -80, 20, 0) : si.smoo : ba.db2linear;
process = freq : os.osc : _*gain <: si.bus(2);

If you compile this with a Faust Base, the Base will create a "Control" page of custom parameters. Because of the code we've written, there will be two Float parameters named "Freq" and "Volume". In order to automatically create a UI, pressing compile will save a JSON file inside a directory called dsp_output. These files are meant to be temporary and are deleted each time TD-Faust.toe opens.

Group Voices and Dynamic Voices

The Group Voices and Dynamic Voices toggles matter when using polyphony.

If you enable Group Voices, one set of parameters will control all voices at once. Otherwise, you will need to address a set of parameters for each voice.

If you enable Dynamic Voices, then voices whose notes have been released will be dynamically turned off in order to save computation. Dynamic Voices should be on in most cases such as when you're wiring a MIDI buffer as the third input to the Faust CHOP. There is a special case in which you might want Dynamic Voices off:

  • You are not wiring a MIDI buffer as the third input.
  • Group Voices is off.
  • You are individually addressing the frequencies, gates and/or gains of the polyphonic voices. This step works as a replacement for the lack of the wired MIDI buffer.

Control Rate and Sample Rate

The sample rate is typically a high number such as 44100 Hz, and the control rate of UI parameters might be only 60 Hz. This can lead to artifacts. Suppose we are listening to a 44.1 kHz signal, but we are multiplying it by a 60 Hz "control" signal such as a TouchDesigner parameter meant to control the volume.

import("stdfaust.lib");
volume = hslider("Volume", 1., 0., 1., 0);
process = os.osc(440.)*volume <: si.bus(2);

In TouchDesigner, we can press "Compile" to get a "Volume" custom parameter on the "Control" page of the Faust base. You can look inside the base to see how the custom parameter is wired into the Faust CHOP. By default, this "Volume" signal will only be the project cook rate (60 Hz). Therefore, as you change the volume, you will hear artifacts in the output. To reduce artifacts, there are three solutions:

  1. Use si.smoo or si.smooth to smooth the control signal: volume = hslider("Volume", 1., 0., 1., 0) : si.smoo;

  2. Create a higher sample-rate control signal, possibly as high as the Faust CHOP, and connect it as the second input to the Faust base.

  3. Re-design your code so that high-rate custom parameters are actually input signals.

import("stdfaust.lib");
// "volume" is now an input signal
process = _ * os.osc(440.) <: si.bus(2);

You could then connect a high-rate single-channel "volume" CHOP to the first input of the Faust Base.

Using TD-Faust in New Projects

From this repository, copy the toxes/FAUST structure into your new project. You should have:

  • MyProject/MyProject.toe
  • MyProject/toxes/FAUST/FAUST.tox

and any other files which are sibling to FAUST.tox

Now drag FAUST.tox into your new TouchDesigner project, probably near the root. FAUST.tox acts as a Global OP Shortcut. Next, copy toxes/FAUST/main_faust_base.tox into the project and use it in a way similar to how it's used in TD-Faust.toe.

Licenses / Thank You

TD-Faust (GPL-Licensed) relies on these projects/softwares:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].