_____ _____
| __ \ | __ \
| | | | __ _ __ __ | | | | _ __ ___ __ _ _ __ ___ ___ _ __
| | | | / _` | \ \ /\ / / | | | | | '__| / _ \ / _` | | '_ ` _ \ / _ \ | '__|
| |__| | | (_| | \ V V / | |__| | | | | __/ | (_| | | | | | | | | __/ | |
|_____/ \__,_| \_/\_/ |_____/ |_| \___| \__,_| |_| |_| |_| \___| |_|
* * Digital Audio Workstation with Python * *
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
- 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.
Install with PyPI:
pip install dawdreamer
https://dirt.design/DawDreamer/
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...
Please refer to the Wiki, examples, API documentation, and tests.
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