A
dataflow software architecture models computation as a
directed graph, where the
nodes are
pure functions, and the
edges between nodes are data. In addition to recent uses in
deep learning, big data, and
reactive programming, dataflow has long been an ideal fit for
Digital Signal Processing (DSP). In a sense, deep learning's
artificial neural networks can be thought of as DSP with large
adaptive filters and
non-linearities.
Despite the success of dataflow in machine learning (ML) and DSP, there has not yet been to our knowledge a lightweight dataflow library that fulfills these requirements: small (under 50 Kbytes code), portable with few dependencies, open source, and most important: predictable performance suitable for
embedded systems with
real-time processing on the order of one millisecond per graph evaluation.
We describe a real-time dataflow architecture and initial C++ implementation for audio that meet these requirements, then explore the benefits of a unified view of ML and DSP. We also compare this C++ library approach to alternatives such as
ROLI SOUL, which is based on a domain-specific programming language.