• Stars
    star
    668
  • Rank 67,542 (Top 2 %)
  • Language
    C++
  • License
    GNU General Publi...
  • Created over 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Digital Audio Workstation with Python; VST instruments/effects, parameter automation, FAUST, JAX, Warp Markers, and JUCE processors
  _____                       _____                                                  
 |  __ \                     |  __ \                                                 
 | |  | |   __ _  __      __ | |  | |  _ __    ___    __ _   _ __ ___     ___   _ __ 
 | |  | |  / _` | \ \ /\ / / | |  | | | '__|  / _ \  / _` | | '_ ` _ \   / _ \ | '__|
 | |__| | | (_| |  \ V  V /  | |__| | | |    |  __/ | (_| | | | | | | | |  __/ | |   
 |_____/   \__,_|   \_/\_/   |_____/  |_|     \___|  \__,_| |_| |_| |_|  \___| |_|   
                                                                                     
* * Digital Audio Workstation with Python * *

Supported Platforms Test Badge PyPI version fury.io GPLv3 license GitHub Repo stars Generic badge

DawDreamer

Read the introduction to DawDreamer, which was presented as a Late-Breaking Demo at the 2021 ISMIR Conference.

DawDreamer is an audio-processing Python framework supporting core DAW features and beyond:

  • Composing graphs of multi-channel audio processors
  • Audio playback
  • VST instruments and effects (with UI editing and state loading/saving)
  • FAUST effects and polyphonic instruments
  • Time-stretching and looping, optionally according to Ableton Live warp markers
  • Pitch-warping
  • Parameter automation at audio-rate and at pulses-per-quarter-note
  • Parameter automation saving in absolute audio-rate time
  • MIDI playback in absolute time and PPQN time
  • MIDI file export in absolute time
  • Rendering and saving multiple processors simultaneously
  • Support for the Faust Box and Signal APIs
  • Transpiling Faust code to JAX/Flax and other target languages (C++, Rust, Wasm, etc.)
  • Machine learning experiments with QDax
  • Multiprocessing support
  • Full support on macOS, Windows, Linux, Google Colab, and Ubuntu Dockerfile

DawDreamer's foundation is JUCE, with a user-friendly Python interface thanks to pybind11. DawDreamer evolved from an earlier VSTi audio "renderer", RenderMan.

Installation

macOS requirements:

  • 64-bit Python 3.9 or higher
  • macOS 11.0 or higher

Windows requirements:

  • 64-bit Python 3.7 or higher

Linux requirements:

  • 64-bit Python 3.7 or higher

Install with PyPI:

pip install dawdreamer

API Documentation

https://dirt.design/DawDreamer/

Basic Example

Using Faust, let's make a stereo sine-tone at 440 Hz and -6 dB. You can run this code as-is.

import dawdreamer as daw
from scipy.io import wavfile
SAMPLE_RATE = 44100
engine = daw.RenderEngine(SAMPLE_RATE, 512)  # 512 block size
faust_processor = engine.make_faust_processor("faust")
faust_processor.set_dsp_string(
    """
    declare name "MySine";
    freq = hslider("freq", 440, 0, 20000, 0);
    gain = hslider("vol[unit:dB]", 0, -120, 20, 0) : ba.db2linear;
    process = freq : os.osc : _*gain <: si.bus(2);
    """
    )
print(faust_processor.get_parameters_description())
engine.load_graph([
                   (faust_processor, [])
])
faust_processor.set_parameter("/MySine/freq", 440.)  # 440 Hz
faust_processor.set_parameter("/MySine/vol", -6.)  # -6 dB volume

engine.set_bpm(120.)
engine.render(4., beats=True)  # render 4 beats.
audio = engine.get_audio()  # shaped (2, N samples)
wavfile.write('sine_demo.wav', SAMPLE_RATE, audio.transpose())

# Change settings and re-render
faust_processor.set_parameter("/MySine/freq", 880.)  # 880 Hz
engine.render(4., beats=True)
# and so on...

Next, let's make a graph with a VST instrument and effect. This graph will be simple, but you can make more complicated ones.

import dawdreamer as daw
from scipy.io import wavfile
SAMPLE_RATE = 44100
INSTRUMENT_PATH = "path/to/instrument.dll"
EFFECT_PATH = "path/to/effect.dll"

engine = daw.RenderEngine(SAMPLE_RATE, 512)
engine.set_bpm(120.)

synth = engine.make_plugin_processor("synth", PLUGIN_PATH)
print('inputs:', synth.get_num_input_channels())
print('inputs:', synth.get_num_output_channels())
print(synth.get_parameters_description())

synth.set_parameter(7, .1234)

# (MIDI note, velocity, start sec, duration sec)
synth.add_midi_note(60, 100, 0.0, 2.)

effect = engine.make_plugin_processor("effect", EFFECT_PATH)

engine.load_graph([
  (synth, []),
  (effect, [synth.get_name()])  # effect needs 2 channels, and "synth" provides those 2.
  ])

engine.render(4.)  # render 4 seconds.
audio = engine.get_audio()
wavfile.write('synth_demo.wav', SAMPLE_RATE, audio.transpose())
synth.clear_midi()
# add midi again, render again, and so on...

Please refer to the Wiki, examples, API documentation, and tests.

License

DawDreamer is licensed under GPLv3 to make it easier to comply with all of the dependent projects. If you use DawDreamer, you must obey the licenses of JUCE, pybind11, Libsamplerate, Rubber Band Library, Steinberg VST2/3, and FAUST.

Thanks to contributors to the original RenderMan

More Repositories

1

TouchDesigner_Shared

TouchDesigner toxes and small projects
Python
623
star
2

TD-FaceCHOP

Face landmark detection with DLib (in TouchDesigner)
C++
85
star
3

PyTorchTOP

GPU PyTorch TOP in TouchDesigner with CUDA-enabled OpenCV
C
69
star
4

TD-Faust

FAUST (Functional Audio Stream) for TouchDesigner
C++
50
star
5

PyTorchTOP-cpumem

PyTorch / libtorch in TouchDesigner based on the CPUMemoryTOP example.
C++
49
star
6

PhaserCHOP-TD-Summit-Talk

Project files associated with http://github.com/dbraun/PhaserCHOP and David Braun's "Quantitative Easing" talk at the 2019 TouchDesigner Summit https://www.youtube.com/watch?v=S4PQW4f34c8
40
star
7

AbletonParsing

Parse an Ableton ASD clip file (warp markers and more) in Python
Python
38
star
8

ChucKDesigner

ChucK audio integration with TouchDesigner
C++
38
star
9

TD-JUCE

JUCE audio and VSTs in TouchDesigner
C++
35
star
10

RealSenseTOP

TouchDesigner C++ TOP for RealSense D435 Depth Camera
C++
29
star
11

kpop_midi

MIDI transcriptions of kpop songs. Most examples focus on piano chord progressions.
25
star
12

Sampler

A sampler made with JUCE
C++
20
star
13

MatrixCHOP

Matrix Multiply CHOP
C++
17
star
14

PhaserCHOP

A TouchDesigner channel operator for phase-staggered animations
C++
16
star
15

SmoothstepCHOP

Smoothstep and linear remap CHOP.
C++
9
star
16

tactile-python

Library for representing, manipulating, and drawing isohedral tilings
Python
8
star
17

TD-Box2D

Box2D in TouchDesigner
CMake
7
star
18

turning-function

Python module of "An efficiently computable metric for comparing polygonal shapes" (Arkin et al.)
C
5
star
19

fastText-for-language-learners

A foreign language study methodology based on https://github.com/facebookresearch/fastText and https://en.wikipedia.org/wiki/Spaced_repetition
Python
3
star
20

dbraun.github.io

CSS
2
star
21

HeadCoupledPerspective

HTML
2
star
22

dj_scrape

Download mp3 A Cappella Tracks Off deejayportal.com
Python
1
star