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 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, ChannelCrossfade, 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.2-cp312-cp312-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.9+ x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.9+ x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.10macOS 10.9+ x86-64

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

Uploaded CPython 3.9macOS 11.0+ ARM64

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

Uploaded CPython 3.9macOS 10.9+ x86-64

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

Uploaded CPython 3.8macOS 11.0+ ARM64

signalflow-0.4.2-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.2-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: signalflow-0.4.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.7

File hashes

Hashes for signalflow-0.4.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6887b69828f0dfc35db86fd692a14e5c88fa98dbdeb6fd90e3a265beb38a57a4
MD5 d2b0c8d5af5ddd8b6b4abfc5c88bfcd0
BLAKE2b-256 cd734fed5cb2a85206ab79a784fdf1d10b68fb35bcc019bc7e8626e9448fe6fa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for signalflow-0.4.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bb57f8fcdbaddd86ab22a4d3f5d4a6d96cff7ae87b95c2b62c097abc780b92ec
MD5 1764429f57150b6a22717c9fa18e3edf
BLAKE2b-256 3d7ba65e5a1d1d12ab2500e54f9988a51b567bbe95082622bb1c8347266e8634

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for signalflow-0.4.2-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3d5c9ddb505800afd4e4d5b0d40890e6ddb518bec3a2e322f0803fd5e8b32c08
MD5 6c09beb96fe8c99301449e3b2c0bc486
BLAKE2b-256 83f49c549b693777adb112dc6c2fb900c104c062fb55dfc482e3993144c9bdb2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for signalflow-0.4.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e0bbf597855621a333fb6a5ecb11016c2f876f5fd88a9718a30c6e6e9a2b6b79
MD5 7d24858b1e6b4c6072511c952c28f15f
BLAKE2b-256 289f796b5c4d9b31c4c2096feb4e6641616ce0a5d8cee659bdf56c509e3e17b3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for signalflow-0.4.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c5858748137261731804a07e6d69fabc8604cf35c6586cff0c88f2c2e49dc288
MD5 ccb0dfaacb44a9bd4ea8bb25a6e80387
BLAKE2b-256 49534f517c983428d5256cb9772b6769706a63ce197e5f0fd1120cf887e652d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for signalflow-0.4.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0092d3fc7d3ca7778c36a85e68680dd8aaaec39221950b33df2725b652739e33
MD5 8632e92c92bbd7e1f12d44c144ea1328
BLAKE2b-256 798f7f1d2705afa44d352a12a6a73635ace5000880e978b675d4cf26460227e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for signalflow-0.4.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 42d0344ed89664e6422ccd25d4fe30da7fe3ca89201b934069bae73ef339ec96
MD5 0b2fd3aba54fbdc69cb481865a6e52af
BLAKE2b-256 d46e5853781cc07660d84bd869375b5a9052833289a831d89d13b973cf3d4af6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for signalflow-0.4.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a5f11e3c17ed627eca17b544e717a85aa9bcea8f4b4a0a6cbea789098dbadf1a
MD5 0c7560cd5881a2b1ff55f95c67582c84
BLAKE2b-256 1792b18ab4193b760cbe091f06222c0f64293acef17b0d69380fd47b21fad2e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for signalflow-0.4.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b236ea0ae2d3e63d795addf00d8bc1900d260650579053a9e078ec02914a5e88
MD5 b71ba063951b7d070bc29e2b3a1cd0b1
BLAKE2b-256 e2da32b22b9c20313fd426f24728d344c3c5756721e3676456eab6f8a9824d53

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for signalflow-0.4.2-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 74f79cd07bcc8c37aeb62bcdd00e80f5ff887d093dbae313e32a5e66ec1df75e
MD5 d1e491e9d5b2b2fa5452447ec53ed660
BLAKE2b-256 ee72da209e3d4630d00205d0c280d410ec7a6ba82553b2baf899830a062711e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for signalflow-0.4.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 79cb6338d26233c4bce41159bd6a87a2608aad6799ded79c5f77c5939f8ac4eb
MD5 a44f3316c5b09ffef757e46b58ba8735
BLAKE2b-256 974115cedd676587b69462dcc259e24658f4e43701803a87cad6ca097985c113

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