An audio-processing Python library supporting core DAW features
Project description
_____ _____
| __ \ | __ \
| | | | __ _ __ __ | | | | _ __ ___ __ _ _ __ ___ ___ _ __
| | | | / _` | \ \ /\ / / | | | | | '__| / _ \ / _` | | '_ ` _ \ / _ \ | '__|
| |__| | | (_| | \ V V / | |__| | | | | __/ | (_| | | | | | | | | __/ | |
|_____/ \__,_| \_/\_/ |_____/ |_| \___| \__,_| |_| |_| |_| \___| |_|
* * Digital Audio Workstation with Python * *
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.8 or higher
Linux requirements:
- 64-bit Python 3.8 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", INSTRUMENT_PATH)
print('inputs:', synth.get_num_input_channels())
print('outputs:', 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
- fedden, RenderMan creator
- jgefele
- harritaylor
- cannoneyed
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file dawdreamer-0.8.3-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: dawdreamer-0.8.3-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 30.9 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4eff365bf40f373406279c88728c8545b9a3cbd8b1e6ba29458dc4964e90e2c |
|
MD5 | 765152c076f5473ecf3407bfafc18b17 |
|
BLAKE2b-256 | cdb8c2b761c6cdae3b25bb6b5ed2f2dcbe18c3f9fe58d3efea041d4147e63689 |
File details
Details for the file dawdreamer-0.8.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: dawdreamer-0.8.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 40.7 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d021076af78be70dae925ccddece56f1e5d021fda7dfb02ed6e706aac18b865 |
|
MD5 | 93881ea6952156345a11c0b444fadadd |
|
BLAKE2b-256 | c2eb0df1d2c82048e1b02320f2fe9f5f0ad93565ff48102a36bf2e2dedc68788 |
File details
Details for the file dawdreamer-0.8.3-cp312-cp312-macosx_12_0_x86_64.whl
.
File metadata
- Download URL: dawdreamer-0.8.3-cp312-cp312-macosx_12_0_x86_64.whl
- Upload date:
- Size: 33.1 MB
- Tags: CPython 3.12, macOS 12.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddf6d8824a7d038e947be5a951f10695adb77194b03e876e059434644bff239a |
|
MD5 | 0d5fa335266a52b7741ca00c03ed2791 |
|
BLAKE2b-256 | 4dd216aba9fee64aeb2e025cb572470c7b75a1c26ae84f4c7b2d56a43f9799d1 |
File details
Details for the file dawdreamer-0.8.3-cp312-cp312-macosx_12_0_arm64.whl
.
File metadata
- Download URL: dawdreamer-0.8.3-cp312-cp312-macosx_12_0_arm64.whl
- Upload date:
- Size: 30.7 MB
- Tags: CPython 3.12, macOS 12.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c04dd967411a2a7eaf9808349b0fdaa718557303b7ce62d28c2456b678bfee14 |
|
MD5 | 406bc1420c44046081b9958dde78659d |
|
BLAKE2b-256 | 326cea9d3160e7fbdb8666bedbd2dcf8443df1cb57b117d99c94fe421f13f1a7 |
File details
Details for the file dawdreamer-0.8.3-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: dawdreamer-0.8.3-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 30.9 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f603f96e110b1d581f108a3d5f62a09a56cb963bf7f84a0dbbf717e108a5b2a6 |
|
MD5 | 0b9761fea6fbecc20c8f4b967a296b7d |
|
BLAKE2b-256 | 33ccb32cd99d168a44cc4bcc42927329f33f3a9341149ab52b7d9196f5e7038f |
File details
Details for the file dawdreamer-0.8.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: dawdreamer-0.8.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 40.7 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc7b90ee5c149e5a6f9333a347a1380ab2e2985cca96aeafa7ab68f7759280f1 |
|
MD5 | 696c47d54eaee46cf97211f0ab6471c7 |
|
BLAKE2b-256 | e549a737b119a3cd59260b571c52d522af8dc6914c97355d1f80eb1d1fd49358 |
File details
Details for the file dawdreamer-0.8.3-cp311-cp311-macosx_12_0_x86_64.whl
.
File metadata
- Download URL: dawdreamer-0.8.3-cp311-cp311-macosx_12_0_x86_64.whl
- Upload date:
- Size: 33.1 MB
- Tags: CPython 3.11, macOS 12.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6388046df12a83e4b5630143cebf26ff907957886ba13624c3c2c8bed274b7f5 |
|
MD5 | d21f6c0f28def0a54cb7571853c2611e |
|
BLAKE2b-256 | a06a1159d712c92cb0e98cec868d0948597edac66b6912fd1f6c118a5aaa7d41 |
File details
Details for the file dawdreamer-0.8.3-cp311-cp311-macosx_12_0_arm64.whl
.
File metadata
- Download URL: dawdreamer-0.8.3-cp311-cp311-macosx_12_0_arm64.whl
- Upload date:
- Size: 30.7 MB
- Tags: CPython 3.11, macOS 12.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2aa66a90f44cd1c3e174f641c16a1dd5952dcb1caa8d01a0c00188c343d19297 |
|
MD5 | 08980e75fcfb7a64738c1f4111000cdb |
|
BLAKE2b-256 | 57de6809aaa312e7fc8f78e9c417ce1125500265df8304040bb72af75a3a4bd6 |
File details
Details for the file dawdreamer-0.8.3-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: dawdreamer-0.8.3-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 30.9 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e5b17d48522acda643129266f9ab21d791ed832802a217a74e06bbaa0e3c00a |
|
MD5 | a559cd9d0379a35ab27a8c467690d0cb |
|
BLAKE2b-256 | f9b5e01fe914c116a5d735c17fa9c9d49fcc01aafdf6019f82ac4a9f64dc1ff6 |
File details
Details for the file dawdreamer-0.8.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: dawdreamer-0.8.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 40.7 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5a1e0c4798e4794f7f2a9f7b53ea28def9a2ab84f7e050ff798d9462ebc66c2 |
|
MD5 | 78f169f9f2907177064500fe4fb09e1e |
|
BLAKE2b-256 | 3f4e18e3072a7d4fb78a1e69bdf1cb00a0e181aefffa08d4e08b394a05b1e6fe |
File details
Details for the file dawdreamer-0.8.3-cp310-cp310-macosx_12_0_x86_64.whl
.
File metadata
- Download URL: dawdreamer-0.8.3-cp310-cp310-macosx_12_0_x86_64.whl
- Upload date:
- Size: 33.1 MB
- Tags: CPython 3.10, macOS 12.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc3b72e40d62a9db2e3902e3e03831c362269525736c07757e01cfd731f662a9 |
|
MD5 | fe885a0835c19503b3993225d25b7709 |
|
BLAKE2b-256 | 9929ae4319bd48a6786d2d124a101f333e378b8666c82adf5e20707636cc3746 |
File details
Details for the file dawdreamer-0.8.3-cp310-cp310-macosx_12_0_arm64.whl
.
File metadata
- Download URL: dawdreamer-0.8.3-cp310-cp310-macosx_12_0_arm64.whl
- Upload date:
- Size: 30.7 MB
- Tags: CPython 3.10, macOS 12.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4115817dd7b76a2caabe8d5e7ea5e55752cd69f1a279929e46c72fe6f0a30e21 |
|
MD5 | 6fdfb743fdee45c5df8cdbb4fc42392f |
|
BLAKE2b-256 | 15aa61fb5f655c355528e4a48259a355c3dfcf6b086e2d72c200a0d357841256 |