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, EnvelopeRect
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.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.9+ x86-64

signalflow-0.4.0-cp311-cp311-linux_armv7l.whl (1.2 MB view details)

Uploaded CPython 3.11

signalflow-0.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.10macOS 10.9+ x86-64

signalflow-0.4.0-cp310-cp310-linux_armv7l.whl (1.2 MB view details)

Uploaded CPython 3.10

signalflow-0.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.9macOS 11.0+ ARM64

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

Uploaded CPython 3.9macOS 10.9+ x86-64

signalflow-0.4.0-cp39-cp39-linux_armv7l.whl (1.2 MB view details)

Uploaded CPython 3.9

signalflow-0.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.8macOS 11.0+ ARM64

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

Uploaded CPython 3.8macOS 10.9+ x86-64

signalflow-0.4.0-cp38-cp38-linux_armv7l.whl (1.2 MB view details)

Uploaded CPython 3.8

File details

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

File metadata

File hashes

Hashes for signalflow-0.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e2d3a36d9d6a903b11fe1a03a7ee7801253c7efd5d84b514ee528e5a411b3579
MD5 08796e0bcabdb26e249da415955c98bc
BLAKE2b-256 8c2be685b906d966a08468ca03ba44b50804e7f5b4651e5caf6ecd3e3bd40598

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for signalflow-0.4.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2e24441af2ad5292050f92ce257ccac54e1b8957b3ea66edb55a21ea4ed2dca1
MD5 ee1c3f50c0c2a1f537363575fc4d1446
BLAKE2b-256 4733394d165fba7bb2dcb5acadf479bdc62508d0d5d028ac0fa28f1650b8035e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for signalflow-0.4.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7707a989f53736d7c33895df9d082c786eb5aaade04192dca6828767bf13463d
MD5 ce33f79e1953057fb22d2dcbefccf4ea
BLAKE2b-256 f1e9d1b264b3ca640638063b057aae8395e3d4d25b236e8682e8bc069429b4a0

See more details on using hashes here.

File details

Details for the file signalflow-0.4.0-cp311-cp311-linux_armv7l.whl.

File metadata

File hashes

Hashes for signalflow-0.4.0-cp311-cp311-linux_armv7l.whl
Algorithm Hash digest
SHA256 a133a1489fbf73428ad6e9fab317e5a7a77c9a26a3c36f0c243520485ef31098
MD5 e00ffb22f8d8d9be4f8b22942397e0ce
BLAKE2b-256 8264abee5b1cb444601f740470d7b3569b750bd76f7a1602fbfe1daa7c5ec57f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for signalflow-0.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ec42e6a3772147b7437d99c4597bad25bcaac9d617b2f659da44c37eea0a318a
MD5 9269b4db54e259d409581f490816a25a
BLAKE2b-256 ba21d5089154f9eefad0705b506efd2bafb3ec19a7e062de2c396c0066e64b1d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for signalflow-0.4.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d3155ba5c65d2a1659ef6ee337b918c339a71c9eb5b0fa59eed35bc3a41f5e26
MD5 1d60607c1d8c7b4892371322ea719083
BLAKE2b-256 a101f130d7f663a97654d94896b09d967d9d21d5c69deb1830bc41e636ad5d4f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for signalflow-0.4.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e56b9bf0b9e66a837318ff75ab1ecc537e0e584a0d1d6f0cbf298661cac13c6d
MD5 cca682bb301500bdcf3546ddbac1acba
BLAKE2b-256 9c75f0f1ba39fea07f505ba7f13bdb4ef9139c02c34ca227317345bce4621fef

See more details on using hashes here.

File details

Details for the file signalflow-0.4.0-cp310-cp310-linux_armv7l.whl.

File metadata

File hashes

Hashes for signalflow-0.4.0-cp310-cp310-linux_armv7l.whl
Algorithm Hash digest
SHA256 41e09e0823a5d873ce55ff4347454fba1093154b64be9c92eaeed4753be103b8
MD5 4bb2e5f27003ca149321c0e8699db95e
BLAKE2b-256 73f3827ee056ea3bd97b959ef8ac91db38dfe6e3d61e63a818f11b799d3b208f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for signalflow-0.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1f1cb6da9b68b11e8cf0d6f1bec550f5729297e8c19493546e48b2093f4d5748
MD5 da97e6339a43b4004357dfcfe98679ab
BLAKE2b-256 ff42bc5ada535c18d7391c8cd0a6e637132b4b984c074db582baef4dcf9d8745

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for signalflow-0.4.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1c2a67a134603b080372e7ce4c0a29eb63816c1b8a365f32ac9d5540026c765a
MD5 e8af7fedf74d496edb3ffd3a4cc48bad
BLAKE2b-256 81ba4cf8dd0d9f9b27e8ae5dcd0f8bc61007328bd21a3f6b638e294c6a1a0c86

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for signalflow-0.4.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e6dc16b13fc24b27e6a57b8f056637e4a70a926ef4b0d4fe05681429d47da13b
MD5 6c4e4c03df762281444d5b08b79293f1
BLAKE2b-256 1fd0561071a411bf77911ee995b8a6b85c237031ecea5ebb44424d1e79f4fbec

See more details on using hashes here.

File details

Details for the file signalflow-0.4.0-cp39-cp39-linux_armv7l.whl.

File metadata

File hashes

Hashes for signalflow-0.4.0-cp39-cp39-linux_armv7l.whl
Algorithm Hash digest
SHA256 f668c2762c84a1f63798b1a42e3cf4d44d2654ca021674a425b1ccf0d4b99d07
MD5 73302aabd9abd4b5ed809410a7420894
BLAKE2b-256 25d008f3f5f37ba44cb4b8ab07108fa91043f00c9fe1ebd28ddd021e20ac39fd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for signalflow-0.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a7aef5e3a3dca3bc23c168d07a6c101849cf8eb4c43029fb53bb711e0d2eaf6b
MD5 e02ecd7309fc51e6de071abec4a8d837
BLAKE2b-256 81644cd9b92e30dd2fcbce5b7b877e0921f29ad7d61f9a4d62421b71ac360263

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for signalflow-0.4.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1f83f82e1e983b127194a9ea0da669f0f9028eba095fca33ba58c3e60228edae
MD5 b162ef44792fda9b5ec40cb9ffa40cbd
BLAKE2b-256 afbaa926dac4ad112883c974cf361d59cad5e137975be4ffec2d40e581b347fb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for signalflow-0.4.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 62cd75d0d02ef3e06ccca1efd4b10fb8a86c7cff524c2f49a110f2374c8d30fb
MD5 d2dc82a000ae517320b50f8e2f2d5a6d
BLAKE2b-256 1af5ecee1eb6426d275a2070dd1543c6a2a8422e268dbd4d6d1ab4785dc33199

See more details on using hashes here.

File details

Details for the file signalflow-0.4.0-cp38-cp38-linux_armv7l.whl.

File metadata

File hashes

Hashes for signalflow-0.4.0-cp38-cp38-linux_armv7l.whl
Algorithm Hash digest
SHA256 65d65c80a512d4214e4ce2de15027efd72403dc78c9ce9a507e566fb30c01f4c
MD5 bfcdd35f8aa355208a4a9ccbe0704d6f
BLAKE2b-256 635ff2afdc74988f9ac894510d38228f5339965c097c630ab39cbd20b9a45992

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