Skip to main content

signalflow

Project description

SignalFlow

ci stability-beta

SignalFlow is a sound synthesis framework designed for clear and concise expression of complex musical ideas. It has an extensive Python API, for fluid audio experimentation in iPython/Jupyter. Its core is written in C++11, so it can also be embedded into other cross-platform applications.

SignalFlow is in alpha status. All interfaces may be subject to change.

Example

from signalflow import *

#--------------------------------------------------------------------------------
# An AudioGraph is made up of a network of interconnected Nodes, which generate
# and process audio. 
#--------------------------------------------------------------------------------
graph = AudioGraph()

#--------------------------------------------------------------------------------
# Passing an array of frequencies creates a stereo output.
#--------------------------------------------------------------------------------
sine = SineOscillator([440, 880])

#--------------------------------------------------------------------------------
# Simple attack/sustain/release envelope with linear curves.
#--------------------------------------------------------------------------------
env = ASREnvelope(0.01, 0.1, 0.5)

#--------------------------------------------------------------------------------
# Use standard arithmetic operations to combine signals. When a multi-channel 
# signal is multiplied by a mono signal, the mono signal is auto-upmixed.
#--------------------------------------------------------------------------------
output = sine * env

#--------------------------------------------------------------------------------
# Connect the output to the graph, and begin playback.
#--------------------------------------------------------------------------------
output.play()
graph.wait()

Installation

SignalFlow requires Python 3.8 or above.

Installation: macOS

macOS

Install an up-to-date version of Python 3 using Homebrew (guide): brew install python3

Install SignalFlow using pip:

pip3 install signalflow

That's it! To test that it is installed successfully, play a test tone by running: signalflow test

From source

To build on macOS from source, install dependencies with Homebrew:

brew install cmake python libsndfile libsoundio

Clone this repository, then build and install with pip:

pip3 install .
Installation: Linux, Raspberry Pi

Linux, Raspberry Pi

SignalFlow supports Linux (verified on Ubuntu 20.04 and Raspberry Pi OS buster) with alsa and pulseaudio backends.

Via pip

Installation via pip is supported for Linux x86_64. To install:

pip3 install signalflow

That's it! To test that it is installed successfully, play a test tone by running: signalflow test.

If installation does not succeed, follow the instructions for building from source below.

From source

To build the Python library from source on Linux, install dependencies with apt:

apt-get install -y git cmake g++ python3-pip libasound2-dev libsndfile1-dev libsoundio-dev fftw3-dev

If you experience an error on Raspberry Pi libf77blas.so.3: cannot open shared object file:

sudo apt-get install -y libatlas-base-dev

Clone this repository, then build and install with pip:

pip3 install .
Installation: Windows

Windows

This is work in progress.

Currently, dependencies need to be downloaded and built by hand. These can be placed anywhere.

To build SignalFlow, use the CMake GUI. Press configure and you will see three empty fields to fill in with the path to the two build folders and the FFTW binaries folder (see above). Set these parameters then press Configure, then Generate then Open. Then build in Visual Studio 2019.

As of 2021-03-03, only the signalflow project has been ported to build correctly on Windows. Only tested in x64 and for Debug builds. Tested using Visual Studio 2019.

Installation: C++ only (no Python layer)

To build and install the C++ core without the Python binding layer:

mkdir build
cd build
cmake ..
make -j8

Examples

See examples/python for a number of example scripts.

Documentation

More detailed documentation can be found at signalflow.dev.

Node classes

The following Node classes are currently included with the base distribution:

Category Classes
Analysis CrossCorrelate, OnsetDetector, VampAnalysis
Buffer BeatCutter, BufferLooper, BufferPlayer, BufferRecorder, FeedbackBufferReader, FeedbackBufferWriter, GrainSegments, Granulator, SegmentPlayer
Control MouseX, MouseY, MouseDown
Envelope ADSREnvelope, ASREnvelope, DetectSilence, Envelope, Line, RectangularEnvelope
Fft FFTContinuousPhaseVocoder, FFTConvolve, FFT, FFTNode, FFTOpNode, FFTFindPeaks, IFFT, FFTLPF, FFTNoiseGate, FFTPhaseVocoder, FFTTonality, FFTZeroPhase
Operators Add, AmplitudeToDecibels, DecibelsToAmplitude, ChannelArray, ChannelMixer, ChannelSelect, Equal, NotEqual, GreaterThan, GreaterThanOrEqual, LessThan, LessThanOrEqual, Modulo, Abs, If, Divide, FrequencyToMidiNote, MidiNoteToFrequency, Multiply, Pow, RoundToScale, Round, ScaleLinExp, ScaleLinLin, Subtract, Sum, Sin, Cos, Tan, Tanh
Oscillators Constant, Impulse, LFO, SawLFO, SawOscillator, SineLFO, SineOscillator, SquareLFO, SquareOscillator, TriangleLFO, TriangleOscillator, Wavetable, Wavetable2D
Processors Clip, Fold, Smooth, WetDry, Wrap
Processors: Delays AllpassDelay, CombDelay, OneTapDelay, Stutter
Processors: Distortion Resample, SampleAndHold, Squiz, WaveShaper
Processors: Dynamics Compressor, Gate, Maximiser, RMS
Processors: Filters BiquadFilter, EQ, MoogVCF, SVFilter
Processors: Panning AzimuthPanner, ChannelPanner, SpatialPanner, StereoBalance, StereoPanner, StereoWidth
Sequencing ClockDivider, Counter, Euclidean, FlipFlop, ImpulseSequence, Index, Latch, Sequence
Stochastic Logistic, PinkNoise, RandomBrownian, RandomChoice, RandomCoin, RandomExponentialDist, RandomExponential, RandomGaussian, RandomImpulseSequence, RandomImpulse, RandomUniform, StochasticNode, WhiteNoise

Contributors

Thanks to the following contributors:

  • Arthur Carabott (@acarabott), Tim Murray-Browne (@timmb): Windows support
  • Dan Stowell (@danstowell): Build improvements
  • Marc Fargas (@telenieko): Generous donation of the signalflow pypi namespace

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

signalflow-0.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

signalflow-0.4.1-cp312-cp312-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

signalflow-0.4.1-cp312-cp312-macosx_10_9_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

signalflow-0.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

signalflow-0.4.1-cp311-cp311-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

signalflow-0.4.1-cp311-cp311-macosx_10_9_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

signalflow-0.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

signalflow-0.4.1-cp310-cp310-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

signalflow-0.4.1-cp310-cp310-macosx_10_9_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

signalflow-0.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

signalflow-0.4.1-cp39-cp39-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

signalflow-0.4.1-cp39-cp39-macosx_10_9_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

signalflow-0.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.4 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

signalflow-0.4.1-cp38-cp38-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

signalflow-0.4.1-cp38-cp38-macosx_10_9_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

File details

Details for the file signalflow-0.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for signalflow-0.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ded6ce440c53bd8c43e00060454faddc3c53348489b71b979775adef8663ccf3
MD5 72d7626553ffd3415b38bfbd9e9eae42
BLAKE2b-256 d672cb9c19e4a8d96152b4ad046f847a6f0237f03459248e5cb5588e22ae7d42

See more details on using hashes here.

File details

Details for the file signalflow-0.4.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for signalflow-0.4.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0eccb20031f9f1f584026a3f16214209b59998a792db1316113cb150b6277ef9
MD5 5ef1f61f83e4321948f83e4df327cca3
BLAKE2b-256 c4e8d353ec528f8d615bcac940ba752f4d5bd28b82f17a260af0d9a6798eeaeb

See more details on using hashes here.

File details

Details for the file signalflow-0.4.1-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for signalflow-0.4.1-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 29c38336d4465137b26c1374165b2c598fd011469ddba7e9c4929555f0ac33f8
MD5 c643cbe780e2cdcb74bd4729f445dd5a
BLAKE2b-256 48f338862ad9c74431f9b6af42ab132f72f748f942f50c740e3c2d45c349fe1c

See more details on using hashes here.

File details

Details for the file signalflow-0.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for signalflow-0.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ee0497777f5cc1de0a6eb522829e44b72206f14df4acf8898831e8258d5d6004
MD5 f0f80ced0b8c06ce40a9682ad86d39c0
BLAKE2b-256 3c91135b106874012320b1331ab5a65ba5a16a2643b39c72ad1c02cf7e8ba089

See more details on using hashes here.

File details

Details for the file signalflow-0.4.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for signalflow-0.4.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1c6acab73a1f01128087bb7381cd2a4255d226bb8c7f48c3c1411193da5494da
MD5 cbf3a9133a602f115c1a2ab9864f2202
BLAKE2b-256 f45a3b42d4bbcb56c6608ae1f464697f16b12c5b50e9342e3f67b241b9785651

See more details on using hashes here.

File details

Details for the file signalflow-0.4.1-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for signalflow-0.4.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 95b044094634a7269c2608fff70c992a9d66d8557756ae9daae1fc6ee44fbaa7
MD5 ec69f633615bc239a6729da930f1a1e0
BLAKE2b-256 6632d0aae973966b9e053e62c3a85cebc6cdb66122791bebda06d4406179e29c

See more details on using hashes here.

File details

Details for the file signalflow-0.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for signalflow-0.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e2dfacf6c3624544b6ca7098d90e456b2469f45e18d288519b272a23d6ec43e2
MD5 d2b169f9d4092065037fa26178d17085
BLAKE2b-256 aecf98f806c9e008a2f8f686ad904ec404b730dfee92c50589ea1defd24ea881

See more details on using hashes here.

File details

Details for the file signalflow-0.4.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for signalflow-0.4.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f412cebfb299a741fd6b10dda3002236d27fa5e76f91b415a5a2d6beac55b1ed
MD5 9de3c4d6f88869d342070f17e654a817
BLAKE2b-256 11c0db7c281f5f3e76d5a9df5146efd51bd98a60a0edf792c3115c6d6587a1bf

See more details on using hashes here.

File details

Details for the file signalflow-0.4.1-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for signalflow-0.4.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 609f137759a40698c4fc520c0c7ec19d824a30fcaed35604cd4277226463a757
MD5 14534a1c4085daf114994c2132c73607
BLAKE2b-256 c58b125253f3d32de0cc3a4e1383c7de534d43e7fbe378049f1983cfc3cb037e

See more details on using hashes here.

File details

Details for the file signalflow-0.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for signalflow-0.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a0b2ae3e052feef517ba917c5a58d5d78924cc07784f10d2a4ae09daf5d6ffd6
MD5 04f1b6b19e772bc078b6b7a86cf5c56e
BLAKE2b-256 071321bb0d7ed08eafe763db710d1e9ad67355bebde40d059331ebc5e00f7ff6

See more details on using hashes here.

File details

Details for the file signalflow-0.4.1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for signalflow-0.4.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 394b9028cb71fc334a108636fb1a2a1fa2c6c83a9afdedc3fe238f639b72e737
MD5 3140ba32e8524ab752ae2c9ad664e14b
BLAKE2b-256 72784e94dfe3b4d1432a202b07b7bef9fd7c78177b8308cf058a45885c1e0df3

See more details on using hashes here.

File details

Details for the file signalflow-0.4.1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for signalflow-0.4.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 435e765bca0c72df0f8b5ae30fada62beef6d09333c88f602194eb79797a1ca0
MD5 28f76b072022ca72de137a6e511c0c96
BLAKE2b-256 ea2760cf72cb9bb79ced2b6874ad8d0f66b5c4ee6df8a2a711c9205dabc2db57

See more details on using hashes here.

File details

Details for the file signalflow-0.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for signalflow-0.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a3d5bf2a459bdbd847c3363bfaa848833831a71fd7639355ebe4221adc45a727
MD5 b0edc82f31634201c8801ec6f265decd
BLAKE2b-256 a9d18b11807982e3c63c70ff273f2e33e7a277bb5c2bb365e99c5494487b22f4

See more details on using hashes here.

File details

Details for the file signalflow-0.4.1-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for signalflow-0.4.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b184ebe1c53f01dee9cd154dc5cfe9aaf2346b3f67f5ec8a1aff177239c80861
MD5 cce6b45bac51acfbcf1f7aef97fc729b
BLAKE2b-256 34dcf3285c9d0d8ccf64060c9d130311bdc958213d5e8ea2c2c0382488e18875

See more details on using hashes here.

File details

Details for the file signalflow-0.4.1-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for signalflow-0.4.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9a57c749263497a7151bcc82d682763a4ac19d271e02686ecdaf240584d8f8a1
MD5 0fb10ae7e5b76703adaa0564e7b391e3
BLAKE2b-256 713d9b5e6b417aa47900a9f01f605f878d78ec7458de0bb672d41f2341c6e308

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page