Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ideoforms/signalflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ideoforms committed Jul 22, 2024
2 parents 3861fec + f4d410a commit 9e25159
Show file tree
Hide file tree
Showing 21 changed files with 222 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Contributing

- [Building from source](#building-from-source)
- [Creating a new Node](#creating-a-new-node)
- [Authoring a new Node](#authoring-a-new-node)
- [Test](#test)
- [Release](#release)
- [Documentation](#documentation)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ The following Node classes are currently included with the base distribution:
| **Buffer: Granulation** | [SegmentedGranulator](https://signalflow.dev/library/buffer/granulation/segmentedgranulator/), [Granulator](https://signalflow.dev/library/buffer/granulation/granulator/) |
| **Control** | [MouseX](https://signalflow.dev/library/control/mousex/), [MouseY](https://signalflow.dev/library/control/mousey/), [MouseDown](https://signalflow.dev/library/control/mousedown/) |
| **Envelope** | [ADSREnvelope](https://signalflow.dev/library/envelope/adsrenvelope/), [ASREnvelope](https://signalflow.dev/library/envelope/asrenvelope/), [DetectSilence](https://signalflow.dev/library/envelope/detectsilence/), [Envelope](https://signalflow.dev/library/envelope/envelope/), [Line](https://signalflow.dev/library/envelope/line/), [RectangularEnvelope](https://signalflow.dev/library/envelope/rectangularenvelope/) |
| **FFT** | [FFTContinuousPhaseVocoder](https://signalflow.dev/library/fft/fftcontinuousphasevocoder/), [FFTConvolve](https://signalflow.dev/library/fft/fftconvolve/), [FFTContrast](https://signalflow.dev/library/fft/fftcontrast/), [FFTFlipSpectrum](https://signalflow.dev/library/fft/fftflipspectrum/), [FFT](https://signalflow.dev/library/fft/fft/), [FFTNode](https://signalflow.dev/library/fft/fftnode/), [FFTOpNode](https://signalflow.dev/library/fft/fftopnode/), [FFTFindPeaks](https://signalflow.dev/library/fft/fftfindpeaks/), [IFFT](https://signalflow.dev/library/fft/ifft/), [FFTLPF](https://signalflow.dev/library/fft/fftlpf/), [FFTNoiseGate](https://signalflow.dev/library/fft/fftnoisegate/), [FFTPhaseVocoder](https://signalflow.dev/library/fft/fftphasevocoder/), [FFTTonality](https://signalflow.dev/library/fft/ffttonality/), [FFTZeroPhase](https://signalflow.dev/library/fft/fftzerophase/) |
| **Operators** | [Add](https://signalflow.dev/library/operators/add/), [AmplitudeToDecibels](https://signalflow.dev/library/operators/amplitudetodecibels/), [DecibelsToAmplitude](https://signalflow.dev/library/operators/decibelstoamplitude/), [ChannelArray](https://signalflow.dev/library/operators/channelarray/), [ChannelCrossfade](https://signalflow.dev/library/operators/channelcrossfade/), [ChannelMixer](https://signalflow.dev/library/operators/channelmixer/), [ChannelSelect](https://signalflow.dev/library/operators/channelselect/), [Equal](https://signalflow.dev/library/operators/equal/), [NotEqual](https://signalflow.dev/library/operators/notequal/), [GreaterThan](https://signalflow.dev/library/operators/greaterthan/), [GreaterThanOrEqual](https://signalflow.dev/library/operators/greaterthanorequal/), [LessThan](https://signalflow.dev/library/operators/lessthan/), [LessThanOrEqual](https://signalflow.dev/library/operators/lessthanorequal/), [Modulo](https://signalflow.dev/library/operators/modulo/), [Abs](https://signalflow.dev/library/operators/abs/), [If](https://signalflow.dev/library/operators/if/), [Divide](https://signalflow.dev/library/operators/divide/), [FrequencyToMidiNote](https://signalflow.dev/library/operators/frequencytomidinote/), [MidiNoteToFrequency](https://signalflow.dev/library/operators/midinotetofrequency/), [Multiply](https://signalflow.dev/library/operators/multiply/), [Pow](https://signalflow.dev/library/operators/pow/), [RoundToScale](https://signalflow.dev/library/operators/roundtoscale/), [Round](https://signalflow.dev/library/operators/round/), [ScaleLinExp](https://signalflow.dev/library/operators/scalelinexp/), [ScaleLinLin](https://signalflow.dev/library/operators/scalelinlin/), [Subtract](https://signalflow.dev/library/operators/subtract/), [Sum](https://signalflow.dev/library/operators/sum/), [Sin](https://signalflow.dev/library/operators/sin/), [Cos](https://signalflow.dev/library/operators/cos/), [Tan](https://signalflow.dev/library/operators/tan/), [Tanh](https://signalflow.dev/library/operators/tanh/) |
| **FFT** | [FFTContinuousPhaseVocoder](https://signalflow.dev/library/fft/fftcontinuousphasevocoder/), [FFTConvolve](https://signalflow.dev/library/fft/fftconvolve/), [FFTContrast](https://signalflow.dev/library/fft/fftcontrast/), [FFTCrossFade](https://signalflow.dev/library/fft/fftcrossfade/), [FFTLFO](https://signalflow.dev/library/fft/fftlfo/), [FFTMagnitudePhaseArray](https://signalflow.dev/library/fft/fftmagnitudephasearray/), [FFTRandomPhase](https://signalflow.dev/library/fft/fftrandomphase/), [FFTScaleMagnitudes](https://signalflow.dev/library/fft/fftscalemagnitudes/), [FFTTransform](https://signalflow.dev/library/fft/ffttransform/), [FFT](https://signalflow.dev/library/fft/fft/), [FFTNode](https://signalflow.dev/library/fft/fftnode/), [FFTOpNode](https://signalflow.dev/library/fft/fftopnode/), [FFTFindPeaks](https://signalflow.dev/library/fft/fftfindpeaks/), [IFFT](https://signalflow.dev/library/fft/ifft/), [FFTLPF](https://signalflow.dev/library/fft/fftlpf/), [FFTNoiseGate](https://signalflow.dev/library/fft/fftnoisegate/), [FFTPhaseVocoder](https://signalflow.dev/library/fft/fftphasevocoder/), [FFTTonality](https://signalflow.dev/library/fft/ffttonality/), [FFTZeroPhase](https://signalflow.dev/library/fft/fftzerophase/) |
| **Operators** | [Add](https://signalflow.dev/library/operators/add/), [AmplitudeToDecibels](https://signalflow.dev/library/operators/amplitudetodecibels/), [DecibelsToAmplitude](https://signalflow.dev/library/operators/decibelstoamplitude/), [ChannelArray](https://signalflow.dev/library/operators/channelarray/), [ChannelCrossfade](https://signalflow.dev/library/operators/channelcrossfade/), [ChannelMixer](https://signalflow.dev/library/operators/channelmixer/), [ChannelSelect](https://signalflow.dev/library/operators/channelselect/), [Equal](https://signalflow.dev/library/operators/equal/), [NotEqual](https://signalflow.dev/library/operators/notequal/), [GreaterThan](https://signalflow.dev/library/operators/greaterthan/), [GreaterThanOrEqual](https://signalflow.dev/library/operators/greaterthanorequal/), [LessThan](https://signalflow.dev/library/operators/lessthan/), [LessThanOrEqual](https://signalflow.dev/library/operators/lessthanorequal/), [Modulo](https://signalflow.dev/library/operators/modulo/), [Abs](https://signalflow.dev/library/operators/abs/), [If](https://signalflow.dev/library/operators/if/), [Divide](https://signalflow.dev/library/operators/divide/), [FrequencyToMidiNote](https://signalflow.dev/library/operators/frequencytomidinote/), [MidiNoteToFrequency](https://signalflow.dev/library/operators/midinotetofrequency/), [Multiply](https://signalflow.dev/library/operators/multiply/), [Pow](https://signalflow.dev/library/operators/pow/), [RoundToScale](https://signalflow.dev/library/operators/roundtoscale/), [Round](https://signalflow.dev/library/operators/round/), [ScaleLinExp](https://signalflow.dev/library/operators/scalelinexp/), [ScaleLinLin](https://signalflow.dev/library/operators/scalelinlin/), [Subtract](https://signalflow.dev/library/operators/subtract/), [Sum](https://signalflow.dev/library/operators/sum/), [TimeShift](https://signalflow.dev/library/operators/timeshift/), [Sin](https://signalflow.dev/library/operators/sin/), [Cos](https://signalflow.dev/library/operators/cos/), [Tan](https://signalflow.dev/library/operators/tan/), [Tanh](https://signalflow.dev/library/operators/tanh/) |
| **Oscillators** | [Constant](https://signalflow.dev/library/oscillators/constant/), [Impulse](https://signalflow.dev/library/oscillators/impulse/), [LFO](https://signalflow.dev/library/oscillators/lfo/), [SawLFO](https://signalflow.dev/library/oscillators/sawlfo/), [SawOscillator](https://signalflow.dev/library/oscillators/sawoscillator/), [SineLFO](https://signalflow.dev/library/oscillators/sinelfo/), [SineOscillator](https://signalflow.dev/library/oscillators/sineoscillator/), [SquareLFO](https://signalflow.dev/library/oscillators/squarelfo/), [SquareOscillator](https://signalflow.dev/library/oscillators/squareoscillator/), [TriangleLFO](https://signalflow.dev/library/oscillators/trianglelfo/), [TriangleOscillator](https://signalflow.dev/library/oscillators/triangleoscillator/), [Wavetable](https://signalflow.dev/library/oscillators/wavetable/), [Wavetable2D](https://signalflow.dev/library/oscillators/wavetable2d/) |
| **Processors** | [Clip](https://signalflow.dev/library/processors/clip/), [Fold](https://signalflow.dev/library/processors/fold/), [Smooth](https://signalflow.dev/library/processors/smooth/), [WetDry](https://signalflow.dev/library/processors/wetdry/), [Wrap](https://signalflow.dev/library/processors/wrap/) |
| **Processors: Delays** | [AllpassDelay](https://signalflow.dev/library/processors/delays/allpassdelay/), [CombDelay](https://signalflow.dev/library/processors/delays/combdelay/), [OneTapDelay](https://signalflow.dev/library/processors/delays/onetapdelay/), [Stutter](https://signalflow.dev/library/processors/delays/stutter/) |
Expand Down
1 change: 0 additions & 1 deletion auxiliary/libs/signalflow_examples/signalflow_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def download_examples(output_directory: str = "examples") -> None:
"granulation-example.py",
"hello-world-example.py",
"karplus-strong-example.py",
"list-output-devices.py",
"midi-fm-voicer-example.py",
"midi-keyboard-example.py",
"modulation-example.py",
Expand Down
4 changes: 2 additions & 2 deletions docs/library/buffer/bufferplayer/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: BufferPlayer node documentation
description: BufferPlayer: Plays the contents of the given buffer. start_time/end_time are in seconds. When a clock signal is received, rewinds to the start_time.
description: BufferPlayer: Plays the contents of the given buffer. `start_time`/`end_time` are in seconds. When a `clock` signal is received, rewinds to the `start_time`. Set `clock` to `0` to prevent the buffer from being triggered immediately.

[Reference library](../../index.md) > [Buffer](../index.md) > [BufferPlayer](index.md)

Expand All @@ -9,5 +9,5 @@ description: BufferPlayer: Plays the contents of the given buffer. start_time/en
BufferPlayer(buffer=None, rate=1.0, loop=0, start_time=None, end_time=None, clock=None)
```

Plays the contents of the given buffer. start_time/end_time are in seconds. When a clock signal is received, rewinds to the start_time.
Plays the contents of the given buffer. `start_time`/`end_time` are in seconds. When a `clock` signal is received, rewinds to the `start_time`. Set `clock` to `0` to prevent the buffer from being triggered immediately.

2 changes: 1 addition & 1 deletion docs/library/buffer/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- **[BeatCutter](beatcutter/index.md)**: Cuts a buffer into segment_count segments, and stutters/jumps with the given probabilities.
- **[BufferLooper](bufferlooper/index.md)**: Read and write from a buffer concurrently, with controllable overdub.
- **[BufferPlayer](bufferplayer/index.md)**: Plays the contents of the given buffer. start_time/end_time are in seconds. When a clock signal is received, rewinds to the start_time.
- **[BufferPlayer](bufferplayer/index.md)**: Plays the contents of the given buffer. `start_time`/`end_time` are in seconds. When a `clock` signal is received, rewinds to the `start_time`. Set `clock` to `0` to prevent the buffer from being triggered immediately.
- **[BufferRecorder](bufferrecorder/index.md)**: Records the input to a buffer. feedback controls overdub.
- **[FeedbackBufferReader](feedbackbufferreader/index.md)**: Counterpart to FeedbackBufferWriter.
- **[FeedbackBufferWriter](feedbackbufferwriter/index.md)**: Counterpart to FeedbackBufferReader.
Expand Down
13 changes: 13 additions & 0 deletions docs/library/fft/fftcrossfade/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
title: FFTCrossFade node documentation
description: FFTCrossFade: FFT FFTCrossFade. Requires two FFT* inputs.

[Reference library](../../index.md) > [FFT](../index.md) > [FFTCrossFade](index.md)

# FFTCrossFade

```python
FFTCrossFade(inputA=0, inputB=0, crossfade=0.0)
```

FFT FFTCrossFade. Requires two FFT* inputs.

13 changes: 13 additions & 0 deletions docs/library/fft/fftlfo/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
title: FFTLFO node documentation
description: FFTLFO: FFT LFO. Requires an FFT* input.

[Reference library](../../index.md) > [FFT](../index.md) > [FFTLFO](index.md)

# FFTLFO

```python
FFTLFO(input=0, frequency=1.0, spectral_cycles=1.0)
```

FFT LFO. Requires an FFT* input.

13 changes: 13 additions & 0 deletions docs/library/fft/fftscalemagnitudes/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
title: FFTScaleMagnitudes node documentation
description: FFTScaleMagnitudes: Randomise phase values.

[Reference library](../../index.md) > [FFT](../index.md) > [FFTScaleMagnitudes](index.md)

# FFTScaleMagnitudes

```python
FFTScaleMagnitudes(input=0, scale={})
```

Randomise phase values.

13 changes: 13 additions & 0 deletions docs/library/fft/ffttransform/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
title: FFTTransform node documentation
description: FFTTransform: Transforms the FFT magnitude spectrum in the X axis. Requires an FFT* input.

[Reference library](../../index.md) > [FFT](../index.md) > [FFTTransform](index.md)

# FFTTransform

```python
FFTTransform(input=0, flip=0, rotate=0)
```

Transforms the FFT magnitude spectrum in the X axis. Requires an FFT* input.

3 changes: 3 additions & 0 deletions docs/library/fft/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
- **[FFTContinuousPhaseVocoder](fftcontinuousphasevocoder/index.md)**: Continuous phase vocoder. Requires an FFT* input.
- **[FFTConvolve](fftconvolve/index.md)**: Frequency-domain convolution, using overlap-add. Useful for convolution reverb, with the input buffer containing an impulse response. Requires an FFT* input.
- **[FFTContrast](fftcontrast/index.md)**: FFT Contrast. Requires an FFT* input.
- **[FFTCrossFade](fftcrossfade/index.md)**: FFT FFTCrossFade. Requires two FFT* inputs.
- **[FFTLFO](fftlfo/index.md)**: FFT LFO. Requires an FFT* input.
- **[FFTMagnitudePhaseArray](fftmagnitudephasearray/index.md)**: Fixed mag/phase array.
- **[FFTRandomPhase](fftrandomphase/index.md)**: Randomise phase values.
- **[FFTScaleMagnitudes](fftscalemagnitudes/index.md)**: Randomise phase values.
- **[FFTTransform](ffttransform/index.md)**: Transforms the FFT magnitude spectrum in the X axis. Requires an FFT* input.
- **[FFT](fft/index.md)**: Fast Fourier Transform. Takes a time-domain input, and generates a frequency-domain (FFT) output.
- **[FFTFindPeaks](fftfindpeaks/index.md)**: Find peaks in the FFT magnitude spectrum. Requires an FFT* input.
Expand Down
5 changes: 4 additions & 1 deletion docs/library/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

- **[BeatCutter](buffer/beatcutter/index.md)**: Cuts a buffer into segment_count segments, and stutters/jumps with the given probabilities.
- **[BufferLooper](buffer/bufferlooper/index.md)**: Read and write from a buffer concurrently, with controllable overdub.
- **[BufferPlayer](buffer/bufferplayer/index.md)**: Plays the contents of the given buffer. start_time/end_time are in seconds. When a clock signal is received, rewinds to the start_time.
- **[BufferPlayer](buffer/bufferplayer/index.md)**: Plays the contents of the given buffer. `start_time`/`end_time` are in seconds. When a `clock` signal is received, rewinds to the `start_time`. Set `clock` to `0` to prevent the buffer from being triggered immediately.
- **[BufferRecorder](buffer/bufferrecorder/index.md)**: Records the input to a buffer. feedback controls overdub.
- **[FeedbackBufferReader](buffer/feedbackbufferreader/index.md)**: Counterpart to FeedbackBufferWriter.
- **[FeedbackBufferWriter](buffer/feedbackbufferwriter/index.md)**: Counterpart to FeedbackBufferReader.
Expand Down Expand Up @@ -55,8 +55,11 @@
- **[FFTContinuousPhaseVocoder](fft/fftcontinuousphasevocoder/index.md)**: Continuous phase vocoder. Requires an FFT* input.
- **[FFTConvolve](fft/fftconvolve/index.md)**: Frequency-domain convolution, using overlap-add. Useful for convolution reverb, with the input buffer containing an impulse response. Requires an FFT* input.
- **[FFTContrast](fft/fftcontrast/index.md)**: FFT Contrast. Requires an FFT* input.
- **[FFTCrossFade](fft/fftcrossfade/index.md)**: FFT FFTCrossFade. Requires two FFT* inputs.
- **[FFTLFO](fft/fftlfo/index.md)**: FFT LFO. Requires an FFT* input.
- **[FFTMagnitudePhaseArray](fft/fftmagnitudephasearray/index.md)**: Fixed mag/phase array.
- **[FFTRandomPhase](fft/fftrandomphase/index.md)**: Randomise phase values.
- **[FFTScaleMagnitudes](fft/fftscalemagnitudes/index.md)**: Randomise phase values.
- **[FFTTransform](fft/ffttransform/index.md)**: Transforms the FFT magnitude spectrum in the X axis. Requires an FFT* input.
- **[FFT](fft/fft/index.md)**: Fast Fourier Transform. Takes a time-domain input, and generates a frequency-domain (FFT) output.
- **[FFTFindPeaks](fft/fftfindpeaks/index.md)**: Find peaks in the FFT magnitude spectrum. Requires an FFT* input.
Expand Down
2 changes: 1 addition & 1 deletion docs/library/processors/panning/spatialpanner/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: SpatialPanner: Implements a spatial panning algorithm, applied to a
# SpatialPanner

```python
SpatialPanner(env=None, input=0.0, x=0.0, y=0.0, z=0.0, radius=1.0, algorithm="dbap")
SpatialPanner(env=None, input=0.0, x=0.0, y=0.0, z=0.0, radius=1.0, use_delays=1.0, algorithm="dbap")
```

Implements a spatial panning algorithm, applied to a given SpatialEnvironment. Currently, only DBAP is supported.
Expand Down
6 changes: 4 additions & 2 deletions source/include/signalflow/node/buffer/buffer-player.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ namespace signalflow
{

/**--------------------------------------------------------------------------------*
* Plays the contents of the given buffer. start_time/end_time are in seconds.
* When a clock signal is received, rewinds to the start_time.
* Plays the contents of the given buffer. `start_time`/`end_time` are in seconds.
* When a `clock` signal is received, rewinds to the `start_time`.
*
* Set `clock` to `0` to prevent the buffer from being triggered immediately.
*---------------------------------------------------------------------------------*/
class BufferPlayer : public Node
{
Expand Down
25 changes: 25 additions & 0 deletions source/include/signalflow/node/fft/fft-cross-fade.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#pragma once

#include "signalflow/node/fft/fftnode.h"

namespace signalflow
{

/**--------------------------------------------------------------------------------*
* FFT FFTCrossFade.
* Requires two FFT* inputs.
*---------------------------------------------------------------------------------*/
class FFTCrossFade : public FFTOpNode
{
public:
FFTCrossFade(NodeRef inputA = 0, NodeRef inputB = 0, NodeRef crossfade = 0.0);
virtual void process(Buffer &out, int num_frames);

private:
NodeRef inputB;
NodeRef crossfade;
};

REGISTER(FFTCrossFade, "fft-cross-fade")

}
26 changes: 26 additions & 0 deletions source/include/signalflow/node/fft/fft-lfo.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#pragma once

#include "signalflow/node/fft/fftnode.h"

namespace signalflow
{

/**--------------------------------------------------------------------------------*
* FFT LFO.
* Requires an FFT* input.
*---------------------------------------------------------------------------------*/
class FFTLFO : public FFTOpNode
{
public:
FFTLFO(NodeRef input = 0, NodeRef frequency = 1.0, NodeRef spectral_cycles = 1.0);
virtual void process(Buffer &out, int num_frames);

private:
NodeRef frequency;
NodeRef spectral_cycles;
double phase;
};

REGISTER(FFTLFO, "fft-lfo")

}
2 changes: 2 additions & 0 deletions source/include/signalflow/signalflow.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@
*-----------------------------------------------------------------------*/
#include <signalflow/node/fft/continuous-pv.h>
#include <signalflow/node/fft/fft-contrast.h>
#include <signalflow/node/fft/fft-cross-fade.h>
#include <signalflow/node/fft/fft-lfo.h>
#include <signalflow/node/fft/fft-magnitude-phase-array.h>
#include <signalflow/node/fft/fft-random-phase.h>
#include <signalflow/node/fft/fft-scale-magnitudes.h>
Expand Down
2 changes: 2 additions & 0 deletions source/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ set(SRC ${SRC}
${CMAKE_CURRENT_SOURCE_DIR}/node/fft/fft-magnitude-phase-array.cpp
${CMAKE_CURRENT_SOURCE_DIR}/node/fft/fft-random-phase.cpp
${CMAKE_CURRENT_SOURCE_DIR}/node/fft/fft-scale-magnitudes.cpp
${CMAKE_CURRENT_SOURCE_DIR}/node/fft/fft-cross-fade.cpp
${CMAKE_CURRENT_SOURCE_DIR}/node/fft/fft-lfo.cpp
${CMAKE_CURRENT_SOURCE_DIR}/node/processors/delays/comb.cpp
${CMAKE_CURRENT_SOURCE_DIR}/node/processors/delays/allpass.cpp
${CMAKE_CURRENT_SOURCE_DIR}/node/processors/delays/onetap.cpp
Expand Down
Loading

0 comments on commit 9e25159

Please sign in to comment.