From 5df458e44fc2dc4238e66ff9d7bee276c36696ea Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Sun, 14 Jan 2024 16:50:35 +0000 Subject: [PATCH] Deployed 08686a8f with MkDocs version: 1.5.3 --- 404.html | 102 +- buffer/access/index.html | 1840 ++++++++++++++++ buffer/creating/index.html | 1878 +++++++++++++++++ buffer/exporting/index.html | 1790 ++++++++++++++++ buffer/index.html | 139 +- buffer/input/index.html | 1742 +++++++++++++++ buffer/operators/index.html | 1770 ++++++++++++++++ buffer/properties/index.html | 1779 ++++++++++++++++ examples/index.html | 102 +- graph/config/index.html | 104 +- graph/creating/index.html | 102 +- graph/index.html | 102 +- graph/properties/index.html | 102 +- graph/recording/index.html | 102 +- graph/stopping/index.html | 102 +- howto/index.html | 102 +- howto/midi/index.html | 102 +- howto/plotting/index.html | 106 +- index.html | 102 +- installation/command-line-generic/index.html | 102 +- installation/index.html | 102 +- installation/linux/buttons/index.html | 102 +- installation/linux/command-line/index.html | 102 +- installation/linux/index.html | 102 +- installation/macos/buttons/index.html | 102 +- installation/macos/command-line/index.html | 102 +- installation/macos/easy/index.html | 102 +- installation/macos/index.html | 102 +- installation/next-steps/index.html | 102 +- library/analysis/crosscorrelate/index.html | 102 +- library/analysis/index.html | 102 +- library/analysis/onsetdetector/index.html | 102 +- library/analysis/vampanalysis/index.html | 102 +- library/buffer/beatcutter/index.html | 102 +- library/buffer/bufferlooper/index.html | 102 +- library/buffer/bufferplayer/index.html | 102 +- library/buffer/bufferrecorder/index.html | 102 +- .../buffer/feedbackbufferreader/index.html | 102 +- .../buffer/feedbackbufferwriter/index.html | 102 +- library/buffer/grainsegments/index.html | 102 +- library/buffer/granulator/index.html | 102 +- library/buffer/index.html | 102 +- library/buffer/segmentplayer/index.html | 102 +- library/control/index.html | 102 +- library/control/mousedown/index.html | 102 +- library/control/mousex/index.html | 102 +- library/control/mousey/index.html | 102 +- library/envelope/adsrenvelope/index.html | 102 +- library/envelope/asrenvelope/index.html | 102 +- library/envelope/detectsilence/index.html | 102 +- library/envelope/envelope/index.html | 102 +- library/envelope/index.html | 102 +- library/envelope/line/index.html | 102 +- .../envelope/rectangularenvelope/index.html | 102 +- library/fft/fft/index.html | 102 +- .../fft/fftcontinuousphasevocoder/index.html | 102 +- library/fft/fftconvolve/index.html | 102 +- library/fft/fftfindpeaks/index.html | 102 +- library/fft/fftlpf/index.html | 102 +- library/fft/fftnoisegate/index.html | 106 +- library/fft/fftphasevocoder/index.html | 102 +- library/fft/ffttonality/index.html | 102 +- library/fft/fftzerophase/index.html | 102 +- library/fft/ifft/index.html | 102 +- library/fft/index.html | 102 +- library/index.html | 111 +- library/operators/abs/index.html | 102 +- library/operators/add/index.html | 102 +- .../operators/amplitudetodecibels/index.html | 102 +- library/operators/channelarray/index.html | 102 +- library/operators/channelcrossfade/index.html | 102 +- library/operators/channelmixer/index.html | 102 +- library/operators/channelselect/index.html | 102 +- library/operators/cos/index.html | 102 +- .../operators/decibelstoamplitude/index.html | 102 +- library/operators/divide/index.html | 102 +- library/operators/equal/index.html | 102 +- .../operators/frequencytomidinote/index.html | 102 +- library/operators/greaterthan/index.html | 102 +- .../operators/greaterthanorequal/index.html | 102 +- library/operators/if/index.html | 102 +- library/operators/index.html | 102 +- library/operators/lessthan/index.html | 102 +- library/operators/lessthanorequal/index.html | 102 +- .../operators/midinotetofrequency/index.html | 102 +- library/operators/modulo/index.html | 102 +- library/operators/multiply/index.html | 102 +- library/operators/notequal/index.html | 102 +- library/operators/pow/index.html | 102 +- library/operators/round/index.html | 102 +- library/operators/roundtoscale/index.html | 102 +- library/operators/scalelinexp/index.html | 102 +- library/operators/scalelinlin/index.html | 102 +- library/operators/sin/index.html | 102 +- library/operators/subtract/index.html | 102 +- library/operators/sum/index.html | 102 +- library/operators/tan/index.html | 102 +- library/operators/tanh/index.html | 102 +- library/oscillators/constant/index.html | 102 +- library/oscillators/impulse/index.html | 102 +- library/oscillators/index.html | 105 +- library/oscillators/sawlfo/index.html | 102 +- library/oscillators/sawoscillator/index.html | 102 +- library/oscillators/sinelfo/index.html | 102 +- library/oscillators/sineoscillator/index.html | 102 +- library/oscillators/squarelfo/index.html | 102 +- .../oscillators/squareoscillator/index.html | 102 +- library/oscillators/trianglelfo/index.html | 102 +- .../oscillators/triangleoscillator/index.html | 102 +- library/oscillators/wavetable/index.html | 102 +- library/oscillators/wavetable2d/index.html | 102 +- library/processors/clip/index.html | 102 +- .../processors/delays/allpassdelay/index.html | 102 +- .../processors/delays/combdelay/index.html | 102 +- library/processors/delays/index.html | 102 +- .../processors/delays/onetapdelay/index.html | 102 +- library/processors/delays/stutter/index.html | 102 +- library/processors/distortion/index.html | 102 +- .../processors/distortion/resample/index.html | 102 +- .../distortion/sampleandhold/index.html | 102 +- .../processors/distortion/squiz/index.html | 102 +- .../distortion/waveshaper/example-0.py | 4 +- .../distortion/waveshaper/index.html | 102 +- .../processors/dynamics/compressor/index.html | 102 +- library/processors/dynamics/gate/index.html | 102 +- library/processors/dynamics/index.html | 102 +- .../processors/dynamics/maximiser/index.html | 102 +- library/processors/dynamics/rms/index.html | 102 +- .../filters/biquadfilter/index.html | 102 +- .../processors/filters/dcfilter/index.html | 102 +- library/processors/filters/eq/index.html | 102 +- library/processors/filters/index.html | 102 +- library/processors/filters/moogvcf/index.html | 102 +- .../processors/filters/svfilter/index.html | 102 +- library/processors/fold/index.html | 102 +- library/processors/index.html | 102 +- .../panning/azimuthpanner/index.html | 102 +- .../panning/channelpanner/index.html | 102 +- library/processors/panning/index.html | 102 +- .../panning/spatialpanner/index.html | 102 +- .../panning/stereobalance/index.html | 102 +- .../panning/stereopanner/index.html | 102 +- .../processors/panning/stereowidth/index.html | 102 +- library/processors/smooth/index.html | 102 +- library/processors/wetdry/index.html | 102 +- library/processors/wrap/index.html | 102 +- library/sequencing/clockdivider/index.html | 102 +- library/sequencing/counter/index.html | 102 +- library/sequencing/euclidean/index.html | 102 +- library/sequencing/flipflop/index.html | 102 +- library/sequencing/impulsesequence/index.html | 102 +- library/sequencing/index.html | 102 +- library/sequencing/index/index.html | 102 +- library/sequencing/latch/index.html | 102 +- library/sequencing/sequence/index.html | 102 +- library/stochastic/index.html | 102 +- library/stochastic/logistic/index.html | 102 +- library/stochastic/pinknoise/index.html | 102 +- library/stochastic/randombrownian/index.html | 102 +- library/stochastic/randomchoice/index.html | 102 +- library/stochastic/randomcoin/index.html | 102 +- .../stochastic/randomexponential/index.html | 102 +- .../randomexponentialdist/index.html | 102 +- library/stochastic/randomgaussian/index.html | 102 +- library/stochastic/randomimpulse/index.html | 102 +- .../randomimpulsesequence/index.html | 102 +- library/stochastic/randomuniform/index.html | 102 +- library/stochastic/whitenoise/index.html | 102 +- license/index.html | 102 +- node/developing/index.html | 102 +- node/index.html | 102 +- node/inputs/index.html | 159 +- node/multichannel/index.html | 102 +- node/operators/index.html | 102 +- node/playback/index.html | 102 +- node/properties/index.html | 104 +- node/stochastic/index.html | 102 +- patch/auto-free/index.html | 106 +- patch/defining/index.html | 102 +- patch/exporting/index.html | 108 +- patch/index.html | 102 +- patch/inputs/index.html | 102 +- patch/operators/index.html | 102 +- patch/playback/index.html | 102 +- patch/properties/index.html | 106 +- planning/EXAMPLES | 22 - planning/EXAMPLES/index.html | 1697 +++++++++++++++ planning/NAMING/index.html | 106 +- planning/PLAN | 40 - planning/PLAN/index.html | 1724 +++++++++++++++ search/search_index.json | 2 +- sitemap.xml | 396 ++-- sitemap.xml.gz | Bin 1346 -> 1393 bytes 193 files changed, 32611 insertions(+), 467 deletions(-) create mode 100644 buffer/access/index.html create mode 100644 buffer/creating/index.html create mode 100644 buffer/exporting/index.html create mode 100644 buffer/input/index.html create mode 100644 buffer/operators/index.html create mode 100644 buffer/properties/index.html delete mode 100644 planning/EXAMPLES create mode 100644 planning/EXAMPLES/index.html delete mode 100644 planning/PLAN create mode 100644 planning/PLAN/index.html diff --git a/404.html b/404.html index 0af4e8f7..b3424ac5 100644 --- a/404.html +++ b/404.html @@ -1037,7 +1037,7 @@
  • - Exporting and importing patches + Exporting and importing
  • @@ -1086,6 +1086,18 @@ + + + + + + + + + + + + @@ -1093,6 +1105,10 @@ diff --git a/buffer/access/index.html b/buffer/access/index.html new file mode 100644 index 00000000..a97ce682 --- /dev/null +++ b/buffer/access/index.html @@ -0,0 +1,1840 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + Accessing a buffer's contents - SignalFlow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + Skip to content + + +
    +
    + +
    + + + + +
    + + +
    + +
    + + + + + + + + + +
    +
    + + + +
    +
    +
    + + + + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    + + + + + + + +

    Accessing in memory

    +

    The floating-point samples within a SignalFlow Buffer can be read and written directly from Python.

    +

    Using get and set methods

    +

    The get() and set() methods can be used to access individual samples, indexed by channel and frame offset.

    +
    # Create a 2-channel buffer
    +buf = Buffer(2, 256)
    +
    +# Set the sample in channel 1 at index 20 to 0.5
    +buf.set(1, 20, 0.5)
    +
    +# Confirm that the sample is set correctly
    +assert buf.get(1, 20) == 0.5
    +
    +

    As a numpy array

    +

    The .data property of a Buffer points to a numpy array of shape (num_channels, num_frames), which can be used to read or write the buffer's data in real time.

    +
    import time
    +
    +# Create and play a one-second silent buffer
    +buf = Buffer(2, graph.sample_rate)
    +player = BufferPlayer(buf, loop=True)
    +player.play()
    +
    +# Gradually add crackles to the buffer, which will be heard in real-time
    +while True:
    +    buf.data[0][np.random.randint(0, graph.sample_rate)] = 1.0
    +    buf.data[1][np.random.randint(0, graph.sample_rate)] = 1.0
    +    time.sleep(1)
    +
    +

    Filling a buffer with the result of a function

    +

    Just like when creating a buffer, an existing buffer can be filled with the output of a Python function.

    +
    +

    → Next: Arithmetic operators

    + +
    +
    + + + Last update: + 2024-01-14 + +
    + Created: + 2024-01-14 + + +
    +
    + + + + + + +
    +
    + + +
    + + + +
    + + + +
    +
    +
    +
    + + + + + + + + + + + + + \ No newline at end of file diff --git a/buffer/creating/index.html b/buffer/creating/index.html new file mode 100644 index 00000000..53c29f65 --- /dev/null +++ b/buffer/creating/index.html @@ -0,0 +1,1878 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + Creating and loading - SignalFlow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + Skip to content + + +
    +
    + +
    + + + + +
    + + +
    + +
    + + + + + + + + + +
    +
    + + + +
    +
    +
    + + + + + + +
    +
    +
    + + + + + + + +
    +
    + + + + + + + +

    Creating a Buffer

    +

    A Buffer can be created from:

    + +

    Loading a buffer from a sound file

    +

    To load an audio buffer from a sound file, pass the file path to Buffer's constructor.

    +
    # Load and play a buffer
    +buf = Buffer("filename.wav")
    +player = BufferPlayer(buf)
    +player.play()
    +
    +

    The type of the audio file is automatically inferred from the type and contents. Supported formats include wav, aif, mp3, ogg, flac, and many other audio formats.

    +

    Interally, file I/O is handled by libsndfile. For a full list of supported files, see the libsndfile documentation.

    +
    +

    Creating a buffer from an array of samples

    +

    To create and initialise a buffer from an existing array of samples, pass the array to Buffer's constructor. Both native Python arrays and numpy arrays are supported.

    +

    Note that audio samples should always range between -1.0 and 1.0 to avoid distortion.

    +
    # Initialise a buffer from a native 1D array containing a sawtooth wave
    +samples = [(n % 100) / 100 - 0.5 for n in range(44100)]
    +buf = Buffer(samples)
    +player = BufferPlayer(buf)
    +player.play()
    +
    +

    If the array is 1D, a mono buffer will be created. If the array is 2D, a multichannel buffer will be created.

    +
    # Initialise a buffer from a numpy 2D array containing a stereo sine wave
    +import numpy as np
    +
    +t = np.linspace(0, 1, 44100)
    +stereo = np.array([np.sin(220 * t * np.pi * 2),
    +                   np.sin(225 * t * np.pi * 2)])
    +buf = Buffer(stereo * 0.1)
    +player = BufferPlayer(buf)
    +player.play()
    +
    +
    +

    Creating an empty buffer

    +

    An empty buffer can be initialised by specifying its dimensions. All samples will be initialised to zero.

    +
    # Create an empty buffer with 2 channels containing 44100 samples each.
    +buf = Buffer(2, 44100)
    +
    +
    +

    Initialising a buffer with the result of a function

    +

    A buffer can also be populated with the result of a Python function, which takes a single argument containing the index of the frame to be filled.

    +
    # Create a buffer containing a 440Hz ping
    +import numpy as np
    +buf = Buffer(1, graph.sample_rate,
    +             lambda frame: np.sin(frame * 440 * np.pi * 2 / graph.sample_rate) * (1 - frame / graph.sample_rate))
    +player = BufferPlayer(buf)
    +player.play()
    +
    +
    +

    → Next: Saving and exporting a buffer

    + +
    +
    + + + Last update: + 2024-01-14 + +
    + Created: + 2024-01-14 + + +
    +
    + + + + + + +
    +
    + + +
    + + + +
    + + + +
    +
    +
    +
    + + + + + + + + + + + + + \ No newline at end of file diff --git a/buffer/exporting/index.html b/buffer/exporting/index.html new file mode 100644 index 00000000..cf71889b --- /dev/null +++ b/buffer/exporting/index.html @@ -0,0 +1,1790 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + Saving and exporting - SignalFlow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + Skip to content + + +
    +
    + +
    + + + + +
    + + +
    + +
    + + + + + + + + + +
    +
    + + + +
    +
    +
    + + + + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    +
    + + + +
    +
    + + + + + + + +

    Saving and exporting a buffer

    +

    Saving to a sound file

    +

    To export a buffer's audio contents to a sound file, use the save() method:

    +
    import numpy as np
    +buf = Buffer(np.sin(np.linspace(0, 1, graph.sample_rate) * 440 * np.pi * 2))
    +buf.save("buffer.wav")
    +
    +

    The output format will be automatically detected from the filename extension. Supported formats are presently wav, aif and flac.

    +
    +

    → Next: Passing a buffer as an input to a node or patch

    + +
    +
    + + + Last update: + 2024-01-14 + +
    + Created: + 2024-01-14 + + +
    +
    + + + + + + +
    +
    + + +
    + + + +
    + + + +
    +
    +
    +
    + + + + + + + + + + + + + \ No newline at end of file diff --git a/buffer/index.html b/buffer/index.html index 326602f1..d3ff2585 100644 --- a/buffer/index.html +++ b/buffer/index.html @@ -16,7 +16,7 @@ - + @@ -77,7 +77,7 @@
    - + Skip to content @@ -1052,7 +1052,7 @@
  • - Exporting and importing patches + Exporting and importing
  • @@ -1103,6 +1103,18 @@ + + + + + + + + + + + + @@ -1110,6 +1122,10 @@ @@ -1489,23 +1589,18 @@ -

    Buffer

    -
    -

    Warning

    -

    This documentation is a work-in-progress and may have sections that are missing or incomplete.

    -
    -

    A Buffer is an allocated area of memory that can be used to store single-channel or multi-channel data, which may represent an audio waveform or any other type of signal.

    +

    Buffers

    +

    A Buffer is an area of memory that stores single-channel or multi-channel data, which may represent an audio waveform or any other type of signal.


    @@ -1513,7 +1608,7 @@

    Buffer

    Last update: - 2023-01-03 + 2024-01-14
    Created: @@ -1564,13 +1659,13 @@

    Buffer

    -