Git Product home page Git Product logo

signalflow's Introduction

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, with its core written in portable, hardware-accelerated C++11.

SignalFlow is in beta status. 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.

In brief, SignalFlow can be installed with pip: pip3 install signalflow.

For complete per-platform instructions and setup guides, see Installing SignalFlow.

Examples

Several example scripts are provided in examples.

To download the examples folder:

import signalflow_examples
signalflow_examples.download_examples()

Documentation

In-depth documentation, including a reference guide to each of the Node classes, can be found at signalflow.dev.

Node classes

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

Category Classes
Analysis CrossCorrelate, NearestNeighbour, OnsetDetector, VampAnalysis
Buffer BeatCutter, BufferLooper, BufferPlayer, BufferRecorder, FeedbackBufferReader, FeedbackBufferWriter, SegmentPlayer
Buffer: Granulation SegmentedGranulator, Granulator
Control MouseX, MouseY, MouseDown
Envelope ADSREnvelope, ASREnvelope, DetectSilence, Envelope, Line, RectangularEnvelope
FFT FFTContinuousPhaseVocoder, FFTConvolve, FFTContrast, FFTFlipSpectrum, 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, DCFilter, 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:

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

signalflow's People

Contributors

acarabott avatar chriskiefer avatar danstowell avatar gregwht avatar ideoforms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

signalflow's Issues

Further examples

  • JSON load/save
  • FFT
  • AudioIn
  • Supersaw (multichannel expansion)
  • Waveshaper
  • Index/Counter

Naming review

Review variable, class and function naming for consistency and clarity.

SynthRef

Support for reference-counted Synth objects.

Buffer: Interpolation modes

Buffers or Buffer-reading devices (Sampler, Wavetable, Waveshaper) should be configurable with interpolation modes (none, linear, cubic).

Support for a `Node::init` method

Some units cannot initialise their values until they have been wired into the graph (see signum/rnd/noise.cpp). Implement an init method across the board which allows input and output units to be queried.

SynthRegistry

Add global SynthRegistry object to index Structures by name

Optimization review

Review bottlenecks and locations to optimise, particularly with respect to vectorisation and inlining.

Non-realtime processing

Offline DSP that is not driven by the audio I/O layer, probably based on a dummy device. Useful for batch generation and processing, and rendering audio that is too complex for real-time.

Buffer recording

Support for recording into Buffer objects. Will need some attention to where and when graph->pull_input is called (currently requires that all units are eventually connected to audioout).

Support for non-44k samplerates

Untested, but unlikely to work. Needs better handling of sample rates throughout (with distinct rates for input and output), dictated by the audio I/O layer.

Node: Smooth

To smooth an input over a given time period. Linear / exponential.

Node: Support for constant property values

Nodes should have support for static property values that are not themselves NodeRefs, particularly array and dictionary properties.

Use cases include a segment-based sampler player requiring an array of sample offsets as an input.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.