### Build Log - Docker Start and Warnings Source: https://docs.rs/crate/fundsp/latest/builds/2803676/x86_64-unknown-linux-gnu.txt Output from starting the Docker container, including warnings about un-scraped examples due to missing dev-dependencies and a target filter warning. ```text [INFO] running `Command { std: "docker" "start" "-a" "4882794cf9385964b4210058084cbdeec13f14728d4383770bf5c28a2a0b6be4", kill_on_drop: false }` [INFO] [stderr] warning: Rustdoc did not scrape the following examples because they require dev-dependencies: beep, file, grain, grain2, keys, live_adsr, network, optimize, peek, plot, sequence, type [INFO] [stderr] If you want Rustdoc to scrape these examples, then add `doc-scrape-examples = true` [INFO] [stderr] to the [[example]] target configuration of at least one example. [INFO] [stderr] warning: target filter specified, but no targets matched; this is a no-op ``` -------------------------------- ### Build Log - Docker Start Command Source: https://docs.rs/crate/fundsp/latest/builds/2803676 The command used to start the Docker container and execute the build process. ```bash [INFO] running `Command { std: "docker" "start" "-a" "4882794cf9385964b4210058084cbdeec13f14728d4383770bf5c28a2a0b6be4", kill_on_drop: false } ``` -------------------------------- ### Cargo.toml Examples Source: https://docs.rs/crate/fundsp/latest/source/Cargo.toml Defines the examples that can be built and run for the fundsp crate. ```toml [[example]] name = "beep" path = "examples/beep.rs" [[example]] name = "file" path = "examples/file.rs" [[example]] name = "grain" path = "examples/grain.rs" [[example]] name = "grain2" path = "examples/grain2.rs" [[example]] name = "keys" path = "examples/keys.rs" [[example]] name = "live_adsr" path = "examples/live_adsr.rs" [[example]] name = "network" path = "examples/network.rs" [[example]] name = "optimize" path = "examples/optimize.rs" [[example]] name = "peek" path = "examples/peek.rs" [[example]] name = "plot" path = "examples/plot.rs" [[example]] name = "sequence" path = "examples/sequence.rs" [[example]] name = "type" path = "examples/type.rs" ``` -------------------------------- ### Audio Graph Combination Example Source: https://docs.rs/crate/fundsp/latest Demonstrates a simple audio graph combination using operator overloading. ```rust noise() & constant(440.0) >> sine() ``` -------------------------------- ### evcxr display method example Source: https://docs.rs/crate/fundsp/latest Demonstrates how to use the `display` method within evcxr to visualize the frequency response of a node, specifically a bell filter, and displays key properties like peak magnitude, inputs, outputs, latency, and footprint. ```APIDOC ## evcxr display method example ### Description This example shows how to use the `display` method in `evcxr` to visualize the frequency response of a `fundsp` node. It includes setting up the environment, defining a bell filter, and printing its frequency response chart along with its properties. ### Usage ``` use fundsp::prelude64::*; let node = bell_hz(1000.0, 1.0, db_amp(50.0)); println!("{}", node.display()); ``` ### Output Example ``` 60 dB ------------------------------------------------ 60 dB 50 dB -------------------------.---------------------- 50 dB * 40 dB -------------------------*---------------------- 40 dB ** 30 dB -----------------------.***--------------------- ******. 20 dB -------------------..*********.----------------- ..**************. 10 dB -------------..********************..----------- ..*****************************... 0 dB ....***************************************..... 0 dB | | | | | | | | | | 10 50 100 200 500 1k 2k 5k 10k 20k Hz Peak Magnitude : 50.00 dB (1000 Hz) Inputs : 1 Outputs : 1 Latency : 0.0 samples Footprint : 96 bytes ``` ``` -------------------------------- ### Setting Lowpass Filter Parameters Source: https://docs.rs/crate/fundsp/latest/source/README.md Demonstrates sending updated parameters to a lowpass filter node that was previously set up with a listener. This example specifically sets the cutoff frequency to 2 kHz and the Q value to 2.0. ```rust sender.try_send(Setting::center_q(2000.0, 2.0)).expect("Cannot send setting."); ``` -------------------------------- ### Build Log - Rustdoc Scrape Examples Warning Source: https://docs.rs/crate/fundsp/latest/builds/2803676 A warning indicating that certain examples were not scraped because they require dev-dependencies. It suggests how to enable scraping for these examples. ```text [INFO] [stderr] warning: Rustdoc did not scrape the following examples because they require dev-dependencies: beep, file, grain, grain2, keys, live_adsr, network, optimize, peek, plot, sequence, type If you want Rustdoc to scrape these examples, then add `doc-scrape-examples = true` to the [[example]] target configuration of at least one example. ``` -------------------------------- ### FM Oscillator Example Source: https://docs.rs/crate/fundsp/latest/source/README.md An example of expressing an FM oscillator using FunDSP's composable graph notation. This notation aims to minimize typed characters for common audio tasks. ```rust sine_hz(f) * f * m + f >> sine() ``` -------------------------------- ### Create 20 Noise Bands with Indexed Generator Source: https://docs.rs/crate/fundsp/latest/source/README.md Uses `busi` to create multiple nodes from an indexed generator function. The generator is issued `u64` integers starting from 0. This example creates 20 noise bands within a specified frequency range. ```rust use fundsp::prelude64::*; let partials = busi::(|i| noise() >> resonator_hz(xerp(1_000.0, 2_000.0, rnd1(i) as f32), 20.0)); ``` -------------------------------- ### adsr_live(a, d, s, r) Source: https://docs.rs/crate/fundsp/latest Implements a live ADSR (Attack, Decay, Sustain, Release) envelope. It takes attack time, decay time, sustain level, and release time as parameters. The envelope starts its attack phase when the input is greater than 0.0 and its release phase when the input is less than or equal to 0.0. The output is normalized to the range [0.0, 1.0]. ```APIDOC ## adsr_live(a, d, s, r) ### Description Provides a live ADSR envelope generator. The envelope's behavior is controlled by the input signal: a positive input triggers the attack, and a non-positive input triggers the release. The output is a smoothed value between 0.0 and 1.0. ### Function Signature `adsr_live(a, d, s, r)` ### Inputs * `a` (number): Attack time in seconds. * `d` (number): Decay time in seconds. * `s` (number): Sustain level (a value between 0.0 and 1.0). * `r` (number): Release time in seconds. ### Outputs * 1 (signal): The ADSR envelope output, ranging from 0.0 to 1.0. ``` -------------------------------- ### Function Returning AudioNode with Arity Source: https://docs.rs/crate/fundsp/latest/source/README.md Example of declaring a function that returns an AudioNode with a specified input and output arity using `impl AudioNode`. ```rust use fundsp::prelude64::* fn split_quad() -> An> { pass() ^ pass() ^ pass() ^ pass() } ``` -------------------------------- ### Get Mono Sample Source: https://docs.rs/crate/fundsp/latest/source/README.md Retrieves the next mono sample from a generator node with no inputs and one or two outputs. ```rust let out_sample = node.get_mono(); ``` -------------------------------- ### Get Stereo Samples Source: https://docs.rs/crate/fundsp/latest/source/README.md Retrieves the next stereo sample pair from a generator node with no inputs and one or two outputs. ```rust let (out_left_sample, out_right_sample) = node.get_stereo(); ``` -------------------------------- ### Applying Settings to a Node Source: https://docs.rs/crate/fundsp/latest/source/README.md Demonstrates how to initialize a node and apply settings using the `set` method. This is useful for configuring node parameters that do not have dedicated inputs. ```rust use fundsp::prelude64::*; let mut node = afollow(0.1, 1.0); node.set(Setting::attack_release(0.2, 2.0)); ``` -------------------------------- ### Pure Tone Amplitude Suppression Example Source: https://docs.rs/crate/fundsp/latest/source/README.md This Rust code defines a function to calculate the amplitude suppression for pure tones. It uses de-interpolation and clamping to get a 0-1 value based on frequency, then applies a smooth interpolation to suppress tones above 20 kHz. ```rust use fundsp::prelude64::*; fn pure_tone_amp(hz: f32) -> f32 { lerp(1.0, 0.0, smooth5(clamp01(delerp(20_000.0, 22_050.0, hz)))) } ``` -------------------------------- ### Command-line Type Unscrambling Source: https://docs.rs/crate/fundsp/latest/source/README.md Demonstrates how to use the `examples/type.rs` utility to unscramble opaque fundsp types from the command line. ```sh cargo run --example type -- "fundsp::combinator::An>, Sine>>>" ``` -------------------------------- ### Buffer Processing with BufferArray and BufferVec Source: https://docs.rs/crate/fundsp/latest/source/README.md Demonstrates creating and processing audio data using both stack-allocated BufferArray and heap-allocated BufferVec. Shows how to initialize nodes and filters, and process samples. ```rust use fundsp::prelude64::*; // Create a stereo buffer on the stack. let mut buffer = BufferArray::::new(); // Declare stereo noise. let mut node = noise() | noise(); // Process 50 samples into the buffer. There are no inputs, so we can borrow an empty buffer. node.process(50, &BufferRef::empty(), &mut buffer.buffer_mut()); // Create another stereo buffer, this one on the heap. let mut filtered = BufferVec::new(2); // Declare stereo filter. let mut filter = lowpole_hz(3000.0) | lowpole_hz(3000.0); // Filter the 50 noise samples. filter.process(50, &buffer.buffer_ref(), &mut filtered.buffer_mut()); ``` -------------------------------- ### Listening to a Lowpass Filter Node Source: https://docs.rs/crate/fundsp/latest/source/README.md Illustrates how to set up a listener for a `lowpass_hz` node. This allows for dynamic adjustment of filter parameters like cutoff frequency and Q value. ```rust use fundsp::prelude64::*; let (sender, node) = listen(lowpass_hz(1000.0, 1.0)); ``` -------------------------------- ### Build Log - Docker Command Source: https://docs.rs/crate/fundsp/latest/builds/2803676/x86_64-unknown-linux-gnu.txt The full Docker command executed to build the documentation, including volume mounts, environment variables, and cargo rustdoc arguments. ```text # build log [INFO] running `Command { std: "docker" "create" "-v" "/home/cratesfyi/workspace/builds/fundsp-0.23.0/target:/opt/rustwide/target:rw,Z" "-v" "/home/cratesfyi/workspace/builds/fundsp-0.23.0/source:/opt/rustwide/workdir:ro,Z" "-v" "/home/cratesfyi/workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/home/cratesfyi/workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "DOCS_RS=1" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "6442450944" "--cpus" "6" "--user" "1001:1001" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:845e597a41426bbf2703be69acdb67d10b6de511142d05cba7bbe119c898b2c7" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "rustdoc" "--lib" "-Zrustdoc-map" "--all-features" "--config" "build.rustflags=[\"--cfg\", \"docsrs\"]" "-Zhost-config" "-Ztarget-applies-to-host" "--config" "host.rustflags=[\"--cfg\", \"docsrs\"]" "--config" "build.rustdocflags=[\"--cfg\", \"docsrs\", \"-Z\", \"unstable-options\", \"--emit=invocation-specific\", \"--resource-suffix\", \"-20260106-1.94.0-nightly-0aced202c\", \"--static-root-path\", \"/-/rustdoc.static/\", \"--cap-lints\", \"warn\", \"--extern-html-root-takes-precedence\"]" "--offline" "-Zunstable-options" "--config=doc.extern-map.registries.crates-io=\"https://docs.rs/{pkg_name}/{version}/x86_64-unknown-linux-gnu\"" "-Zrustdoc-scrape-examples" "-j6" "--target" "x86_64-unknown-linux-gnu", kill_on_drop: false } ``` -------------------------------- ### Add Events to Sequencer Source: https://docs.rs/crate/fundsp/latest/source/README.md Adds new events to the sequencer with specified start/end times and fade envelopes. Returns an `EventId` for future edits. Supports relative start times and indefinite playback. ```rust // Add a new event with start time 1.0 seconds and end time 2.0 seconds. // Fade-in time is 0.1 seconds, while the fade-out time is 0.2 seconds. // This returns an `EventId`. let id1 = sequencer.push(1.0, 2.0, Fade::Smooth, 0.1, 0.2, Box::new(noise() | noise())); // Add a new event that starts immediately and plays indefinitely. let id2 = sequencer.push_relative(0.0, f64::INFINITY, Fade::Smooth, 0.1, 0.2, Box::new(pink() | pink())); ``` -------------------------------- ### Manage Real-time Audio Backend with Net Source: https://docs.rs/crate/fundsp/latest/source/README.md Separate the Net into a frontend and a backend for real-time audio processing. Changes made to the frontend can be committed to the backend, and nodes can be replaced smoothly with crossfades. ```rust use fundsp::prelude64::* let mut net = Net::new(0, 1); let noise_id = net.chain(Box::new(pink())); // Create the backend. let mut backend = net.backend(); // The backend is now ready to be sent into an audio thread. // We can make changes to the frontend and then commit them to the backend. net.replace(noise_id, Box::new(brown())); net.commit(); // We can also use the graph syntax to make changes, as long as connectivity // is maintained at commit time. net = net >> peak_hz(1000.0, 1.0); net.commit(); /// Nodes can be replaced smoothly with a crossfade to avoid clicks. net.crossfade(noise_id, Fade::Smooth, 1.0, Box::new(white())); net.commit(); ``` -------------------------------- ### Dynamically Build a Network with Net Source: https://docs.rs/crate/fundsp/latest Instantiate a network with a specified number of inputs and outputs, add nodes, and connect them using pipe operations. This is useful when the graph structure is not known at compile time. ```rust use fundsp::prelude64::* // Instantiate network with 0 inputs and 1 output. let mut net = Net::new(0, 1); // Add nodes, obtaining their IDs. let dc_id = net.push(Box::new(dc(220.0))); let sine_id = net.push(Box::new(sine())); // Connect nodes. net.pipe_all(dc_id, sine_id); net.pipe_output(sine_id); ``` -------------------------------- ### Manage Real-time Processing with Net Frontend and Backend Source: https://docs.rs/crate/fundsp/latest Separate a Net into a frontend for modifications and a real-time safe backend for audio rendering. This allows dynamic changes to be committed to the backend, with options for smooth transitions using crossfade. ```rust use fundsp::prelude64::* let mut net = Net::new(0, 1); let noise_id = net.chain(Box::new(pink())); // Create the backend. let mut backend = net.backend(); // The backend is now ready to be sent into an audio thread. // We can make changes to the frontend and then commit them to the backend. net.replace(noise_id, Box::new(brown())); net.commit(); // We can also use the graph syntax to make changes, as long as connectivity // is maintained at commit time. net = net >> peak_hz(1000.0, 1.0); net.commit(); /// Nodes can be replaced smoothly with a crossfade to avoid clicks. net.crossfade(noise_id, Fade::Smooth, 1.0, Box::new(white())); net.commit(); ``` -------------------------------- ### Create 20 Noise Bands with Fractional Generator Source: https://docs.rs/crate/fundsp/latest/source/README.md Uses `busf` to create multiple nodes from a fractional generator function. The generator is issued values evenly distributed in the unit interval 0...1. This example creates 20 noise bands within a specified frequency range. ```rust use fundsp::prelude64::*; let partials = busf::(|f| noise() >> resonator_hz(xerp(1_000.0, 2_000.0, f), 20.0)); ``` -------------------------------- ### Rustc and Docs.rs Versions Source: https://docs.rs/crate/fundsp/latest/builds/2803676/x86_64-unknown-linux-gnu.txt Displays the versions of rustc and docs.rs used during the build process. ```text # rustc version rustc 1.94.0-nightly (0aced202c 2026-01-06) # docs.rs version docsrs 0.1.0 (7bfb09c2 2026-01-03 ) ``` -------------------------------- ### Instantiate and Connect Nodes with Net Source: https://docs.rs/crate/fundsp/latest/source/README.md Use Net to dynamically build a graph by instantiating nodes, obtaining their IDs, and connecting them. This is useful when the graph structure is not known at compile time. ```rust use fundsp::prelude64::* // Instantiate network with 0 inputs and 1 output. let mut net = Net::new(0, 1); // Add nodes, obtaining their IDs. let dc_id = net.push(Box::new(dc(220.0))); let sine_id = net.push(Box::new(sine())); // Connect nodes. net.pipe_all(dc_id, sine_id); net.pipe_output(sine_id); ``` -------------------------------- ### Wrap a Unit into a Network and Conditionally Add Filters Source: https://docs.rs/crate/fundsp/latest Convert an existing audio unit into a network using Net::wrap, allowing for dynamic modification such as conditionally adding filters. This demonstrates crossing from the static to the dynamic realm. ```rust use fundsp::prelude64::* // Wrap saw wave in a network. let mut net = Net::wrap(Box::new(saw())); // Now we can add filters conditionally. let add_filter = true; if add_filter { net = net >> lowpass_hz(1000.0, 1.0); } ``` -------------------------------- ### Initialize 12-Band Parametric Equalizer Source: https://docs.rs/crate/fundsp/latest Initializes a 12-band parametric equalizer with bands spaced at 1 kHz increments, Q values of 1.0, and 0 dB gain. This sets up the basic structure for audio processing. ```rust use fundsp::prelude64::* let mut equalizer = pipei::(|i| bell_hz(1000.0 + 1000.0 * i as f32, 1.0, db_amp(0.0))); ``` -------------------------------- ### Equivalent Graph Expressions: Busing and Summing Source: https://docs.rs/crate/fundsp/latest/source/README.md Demonstrates alternative ways to express graph structures, highlighting the convenience of busing over explicit branching and summing. ```rust (pass() ^ mul(2.0)) >> sine() + sine() ``` ```rust sine() & mul(2.0) >> sine() ``` -------------------------------- ### Scale FIR Filter to Vanish at Nyquist Source: https://docs.rs/crate/fundsp/latest/source/README.md Demonstrates how appropriate scaling can make a 3-point FIR filter's frequency response vanish at the Nyquist frequency. Assumes `fundsp::prelude64::*` is imported. ```rust use fundsp::prelude64::*; assert!((0.5 * pass() & tick() & 0.5 * tick() >> tick()).response(0, 22050.0).unwrap().norm() < 1.0e-9); ``` -------------------------------- ### Create Stereo Sequencer Source: https://docs.rs/crate/fundsp/latest/source/README.md Initializes a new stereo sequencer. The `ReplayMode` can be set to `All` to replay events after a reset. ```rust use fundsp::prelude64::*; // Create stereo sequencer. // The third argument should be set to `ReplayMode::All` if we want to replay events after `reset`. let mut sequencer = Sequencer::new(0, 2, ReplayMode::None); ``` -------------------------------- ### Stereo Buffer Processing with BufferArray and BufferVec Source: https://docs.rs/crate/fundsp/latest Demonstrates creating and processing audio data using both stack-allocated `BufferArray` and heap-allocated `BufferVec`. This snippet shows how to initialize nodes, process noise into a buffer, and then filter that buffer. ```rust use fundsp::prelude64::*; // Create a stereo buffer on the stack. let mut buffer = BufferArray::::new(); // Declare stereo noise. let mut node = noise() | noise(); // Process 50 samples into the buffer. There are no inputs, so we can borrow an empty buffer. node.process(50, &BufferRef::empty(), &mut buffer.buffer_mut()); // Create another stereo buffer, this one on the heap. let mut filtered = BufferVec::new(2); // Declare stereo filter. let mut filter = lowpole_hz(3000.0) | lowpole_hz(3000.0); // Filter the 50 noise samples. filter.process(50, &buffer.buffer_ref(), &mut filtered.buffer_mut()); ``` -------------------------------- ### Interactive Frequency Response Analysis with evcxr Source: https://docs.rs/crate/fundsp/latest/source/README.md Use evcxr to load Fundsp, define a bell filter, and display its frequency response. This is useful for interactively exploring the characteristics of audio filters. ```rust C:\rust>evcxr Welcome to evcxr. For help, type :help >> :dep fundsp >> use fundsp::prelude64::*; >> print!("{}", bell_hz(1000.0, 1.0, db_amp(50.0)).display()) 60 dB ------------------------------------------------ 60 dB 50 dB -------------------------.---------------------- 50 dB * 40 dB -------------------------*---------------------- 40 dB ** 30 dB -----------------------.***--------------------- ******. 20 dB -------------------..*********.----------------- ..**************. 10 dB -------------..********************..----------- ..*****************************... 0 dB ....***************************************..... 0 dB | | | | | | | | | | 10 50 100 200 500 1k 2k 5k 10k 20k Hz Peak Magnitude : 50.00 dB (1000 Hz) Inputs : 1 Outputs : 1 Latency : 0.0 samples Footprint : 96 bytes >> ``` -------------------------------- ### Set Initial Oscillator Phase Source: https://docs.rs/crate/fundsp/latest/source/README.md To set an initial phase for an oscillator, use the `phase` builder method. The phase is specified in the range of 0 to 1. ```rust let mut A = sine_hz(220.0).phase(0.0) ``` -------------------------------- ### fundsp Cargo.toml Configuration Source: https://docs.rs/crate/fundsp/latest/source/Cargo.toml.orig Defines the metadata, dependencies, and features for the fundsp Rust crate. Includes package information, version, authors, license, and repository links. It also specifies various dependencies required for audio processing, synthesis, and development, along with optional features like file support and FFT. ```toml [package] name = "fundsp" description = "Audio processing and synthesis library." keywords = ["dsp", "audio", "synthesizer", "sound", "no_std"] categories = ["multimedia::audio", "no-std"] license = "MIT OR Apache-2.0" version = "0.23.0" authors = ["SamiPerttu "] homepage = "https://github.com/SamiPerttu/fundsp" repository = "https://github.com/SamiPerttu/fundsp" readme = "README.md" edition = "2024" [dependencies] numeric-array = { version = "0.6.1", default-features = false } dyn-clone = "1.0.20" libm = "0.2.15" wide = { version = "1.1.1", default-features = false } num-complex = { version = "0.4.6", default-features = false, features = ["libm"] } tinyvec = { version = "1.10.0", features = ["alloc"] } hashbrown = "0.16.1" microfft = { version = "0.6.0", features = ["size-32768"] } funutd = { version = "0.16.0", default-features = false } thingbuf = { version = "0.1.6", default-features = false, features = ["alloc"] } once_cell = { version = "1.21.3", default-features = false, features = ["race", "alloc"] } symphonia = { version = "0.5.5", optional = true, features = ["all"] } resampler = { version = "0.4.0", features = ["no_std"] } fft-convolver = { version = "0.3.0", optional = true } [dev-dependencies] anyhow = "1.0.89" criterion = "0.8.1" cpal = "0.17.0" assert_no_alloc = "1.1.2" eframe = "0.33.3" plotters = "0.3.7" midi-msg = "0.5.0" midir = "0.9.1" read_input = "0.8.6" rayon = "1.10.0" [features] default = ["std", "files", "fft"] std = [] files = ["dep:symphonia"] fft = ["dep:fft-convolver"] [[bench]] name = "benchmark" harness = false [package.metadata.docs.rs] all-features = true rustc-args = ["--cfg", "docsrs"] ``` -------------------------------- ### Render 10 Seconds of Pink Noise Source: https://docs.rs/crate/fundsp/latest/source/README.md Renders 10 seconds of pink noise at a sample rate of 44100.0. Requires the `fundsp::prelude64::*` import. ```rust use fundsp::prelude64::*; let wave1 = Wave::render(44100.0, 10.0, &mut (pink())); ``` -------------------------------- ### join Source: https://docs.rs/crate/fundsp/latest Average together U channels. This is the inverse of `split`. ```APIDOC ## join::() ### Description Average together `U` channels. Inverse of `split`. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **output** (any) - Description not available #### Response Example None ``` -------------------------------- ### Build Log - Docker Create Command Source: https://docs.rs/crate/fundsp/latest/builds/2803676 The command used to create a Docker container for the build environment, specifying volumes, environment variables, and network settings. ```bash [INFO] running `Command { std: "docker" "create" "-v" "/home/cratesfyi/workspace/builds/fundsp-0.23.0/target:/opt/rustwide/target:rw,Z" "-v" "/home/cratesfyi/workspace/builds/fundsp-0.23.0/source:/opt/rustwide/workdir:ro,Z" "-v" "/home/cratesfyi/workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/home/cratesfyi/workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "DOCS_RS=1" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "6442450944" "--cpus" "6" "--user" "1001:1001" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:845e597a41426bbf2703be69acdb67d10b6de511142d05cba7bbe119c898b2c7" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "rustdoc" "--lib" "-Zrustdoc-map" "--all-features" "--config" "build.rustflags=[\"--cfg\", \"docsrs\"]" "-Zhost-config" "-Ztarget-applies-to-host" "--config" "host.rustflags=[\"--cfg\", \"docsrs\"]" "--config" "build.rustdocflags=[\"--cfg\", \"docsrs\", \"-Z\", \"unstable-options\", \"--emit=invocation-specific\", \"--resource-suffix\", \"-20260106-1.94.0-nightly-0aced202c\", \"--static-root-path\", \"/-/rustdoc.static/\", \"--cap-lints\", \"warn\", \"--extern-html-root-takes-precedence\"]" "--offline" "-Zunstable-options" "--config=doc.extern-map.registries.crates-io=\"https://docs.rs/{pkg_name}/{version}/x86_64-unknown-linux-gnu\"" "-Zrustdoc-scrape-examples" "-j6" "--target" "x86_64-unknown-linux-gnu", kill_on_drop: false } ``` -------------------------------- ### Docs.rs Version Source: https://docs.rs/crate/fundsp/latest/builds/2803676 Displays the version of the docs.rs build environment. ```rust # docs.rs version docsrs 0.1.0 (7bfb09c2 2026-01-03 ) ``` -------------------------------- ### Enable Real-time Settings Listener Source: https://docs.rs/crate/fundsp/latest/source/README.md Equips the equalizer with a setting listener for real-time control. This allows changing parameters like center frequency, Q, and gain dynamically. ```rust let (sender, equalizer) = listen(equalizer); ``` -------------------------------- ### Wrap Unit in a Network and Add Filters Source: https://docs.rs/crate/fundsp/latest/source/README.md Wrap an existing AudioUnit into a Net to enable dynamic modifications, such as conditionally adding filters. The graph can be updated by reassigning the `net` variable. ```rust use fundsp::prelude64::* // Wrap saw wave in a network. let mut net = Net::wrap(Box::new(saw())); // Now we can add filters conditionally. let add_filter = true; if add_filter { net = net >> lowpass_hz(1000.0, 1.0); } ``` -------------------------------- ### Basic Prelude Functions Source: https://docs.rs/crate/fundsp/latest/source/README.md These are fundamental functions defined as graph expressions in the fundsp prelude. ```rust white() >> lowpole_hz(10.0) * constant(13.7) ``` ```rust mls_bits(29) ``` ```rust white() >> pinkpass() ``` ```rust constant(f) >> saw() ``` ```rust constant(f) >> sine() ``` ```rust constant(f) >> square() ``` ```rust constant(f) >> triangle() ``` ```rust constant(0.0) ``` -------------------------------- ### Docs.rs Version Source: https://docs.rs/crate/fundsp/latest/builds/2803676/x86_64-unknown-linux-gnu_json.txt Displays the version of the docs.rs build tool. ```rust docsrs 0.1.0 (7bfb09c2 2026-01-03 ) ``` -------------------------------- ### Declare 12-Band Parametric Equalizer Source: https://docs.rs/crate/fundsp/latest/source/README.md Initializes a 12-band parametric equalizer with bands spaced at 1 kHz increments, Q values of 1.0, and 0 dB gain. This sets up the basic processing pipeline. ```rust use fundsp::prelude64::*; let mut equalizer = pipei::(|i| bell_hz(1000.0 + 1000.0 * i as f32, 1.0, db_amp(0.0))); ``` -------------------------------- ### AudioUnit to AudioNode Conversion Source: https://docs.rs/crate/fundsp/latest/source/README.md Demonstrates converting an AudioUnit to an AudioNode using the 'unit' wrapper. The input and output arities must be provided as type-level constants. ```rust use fundsp::prelude32::*; // The number of inputs is zero and the number of outputs is one. let type_erased: An> = unit::(Box::new(white() >> lowpass_hz(5000.0, 1.0) >> highpass_hz(1000.0, 1.0))); ``` -------------------------------- ### FFT Bandpass Filter using resynth Source: https://docs.rs/crate/fundsp/latest/source/README.md This snippet demonstrates how to create a highly selective FFT bandpass filter using the `resynth` opcode. It configures the window length for frequency resolution and latency, and defines the passband frequencies. The processing function iterates through frequency bins, setting the magnitude for frequencies within the passband. ```rust use fundsp::prelude32::*; // The window length, which must be a power of two and at least four, // determines the frequency resolution. Latency is equal to the window length. let window_length = 1024; // Passband in Hz. let pass_min = 1000.0; let pass_max = 2000.0; // The number of input and output channels is user configurable. // Here both are 1 (`U1`). let synth = resynth::(window_length, |fft| for i in 0..fft.bins() { if fft.frequency(i) >= pass_min && fft.frequency(i) <= pass_max { fft.set(0, i, fft.at(0, i)); } }); ``` -------------------------------- ### Cargo.toml Bench Configuration Source: https://docs.rs/crate/fundsp/latest/source/Cargo.toml This snippet shows the benchmark configuration within the Cargo.toml file, disabling the default harness for custom benchmarking. ```toml [[bench]] harness = false name = "benchmark" path = "benches/benchmark.rs" ``` -------------------------------- ### Load WAV File Source: https://docs.rs/crate/fundsp/latest/source/README.md Loads audio data from a WAV file named 'test.wav' into a Wave object. This functionality requires the `files` and `std` features to be enabled. An expect is used to handle potential errors during loading. ```rust let wave3 = Wave::load("test.wav").expect("Could not load wave."); ``` -------------------------------- ### Cargo.toml Dependencies Source: https://docs.rs/crate/fundsp/latest/source/Cargo.toml Lists the various dependencies required by the fundsp crate, including optional and development dependencies. ```toml [dependencies.dyn-clone] version = "1.0.20" [dependencies.fft-convolver] optional = true version = "0.3.0" [dependencies.funutd] default-features = false version = "0.16.0" [dependencies.hashbrown] version = "0.16.1" [dependencies.libm] version = "0.2.15" [dependencies.microfft] features = ["size-32768"] version = "0.6.0" [dependencies.num-complex] default-features = false features = ["libm"] version = "0.4.6" [dependencies.numeric-array] default-features = false version = "0.6.1" [dependencies.once_cell] default-features = false features = ["race", "alloc"] version = "1.21.3" [dependencies.resampler] features = ["no_std"] version = "0.4.0" [dependencies.symphonia] features = ["all"] optional = true version = "0.5.5" [dependencies.thingbuf] default-features = false features = ["alloc"] version = "0.1.6" [dependencies.tinyvec] features = ["alloc"] version = "1.10.0" [dependencies.wide] default-features = false version = "1.1.1" [dev-dependencies.anyhow] version = "1.0.89" [dev-dependencies.assert_no_alloc] version = "1.1.2" [dev-dependencies.cpal] version = "0.17.0" [dev-dependencies.criterion] version = "0.8.1" [dev-dependencies.eframe] version = "0.33.3" [dev-dependencies.midi-msg] version = "0.5.0" [dev-dependencies.midir] version = "0.9.1" [dev-dependencies.plotters] version = "0.3.7" [dev-dependencies.rayon] version = "1.10.0" [dev-dependencies.read_input] version = "0.8.6" ``` -------------------------------- ### Listening and Sending Settings from Other Threads Source: https://docs.rs/crate/fundsp/latest/source/README.md Shows how to wrap a node in a setting listener to adjust its settings from different threads. The `sender` can be cloned and used to send settings, such as a scalar value to a constant node. ```rust use fundsp::prelude64::*; let (sender, node) = listen(dc(0.5) >> resample(pink())); sender.try_send(Setting::value(0.6).left()).expect("Cannot send setting."); ``` -------------------------------- ### Send Setting to Equalizer Band Source: https://docs.rs/crate/fundsp/latest/source/README.md Sends a setting to change the center frequency, Q, and gain for band 1 of the equalizer. This demonstrates real-time parameter updates using the `listen` functionality. ```rust sender.try_send(Setting::center_q_gain(1000.0, 2.0, db_amp(3.0)).index(1)).expect("Cannot send setting."); ``` -------------------------------- ### pluck Source: https://docs.rs/crate/fundsp/latest/source/README.md Karplus-Strong string synthesis oscillator. ```APIDOC ## pluck(f, gain, damping) ### Description [Karplus-Strong](https://en.wikipedia.org/wiki/Karplus%E2%80%93Strong_string_synthesis) plucked string oscillator with frequency `f` Hz, `gain` per second (`gain` <= 1) and high frequency `damping` in 0...1. ### Parameters #### Path Parameters - **f** (f64) - Required - Frequency in Hz. - **gain** (f64) - Required - Gain per second (must be <= 1). - **damping** (f64) - Required - High frequency damping in the range 0...1. ``` -------------------------------- ### Build Log - Cleanup Commands Source: https://docs.rs/crate/fundsp/latest/builds/2803676/x86_64-unknown-linux-gnu.txt Commands executed to inspect and remove the Docker container after the build process has completed or failed. ```text [INFO] running `Command { std: "docker" "inspect" "4882794cf9385964b4210058084cbdeec13f14728d4383770bf5c28a2a0b6be4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4882794cf9385964b4210058084cbdeec13f14728d4383770bf5c28a2a0b6be4", kill_on_drop: false }` [INFO] [stdout] 4882794cf9385964b4210058084cbdeec13f14728d4383770bf5c28a2a0b6be4 ``` -------------------------------- ### Build Log - Docker Inspect Command Source: https://docs.rs/crate/fundsp/latest/builds/2803676 The command used to inspect the status of the Docker container after the build. ```bash [INFO] running `Command { std: "docker" "inspect" "4882794cf9385964b4210058084cbdeec13f14728d4383770bf5c28a2a0b6be4", kill_on_drop: false } ``` -------------------------------- ### Build Log - Thingbuf Compilation Failure Source: https://docs.rs/crate/fundsp/latest/builds/2803676 Indicates that the `thingbuf` crate failed to compile due to a previous error, specifically the removed feature. ```text [INFO] [stderr] error: could not compile `thingbuf` (lib) due to 1 previous error ``` -------------------------------- ### stackf Source: https://docs.rs/crate/fundsp/latest/source/README.md Stacks multiple nodes from a fractional generator. ```APIDOC ## stackf::(f) ### Description Stack `U` nodes from fractional generator `f`, e.g., `| x | delay(xerp(0.1, 0.2, x))`. ### Parameters #### Path Parameters - **U** (usize) - Required - The number of nodes to stack. - **f** (FractionalGenerator) - Required - The fractional generator. ``` -------------------------------- ### Analyze FIR Filter Response (Non-Zero Gain) Source: https://docs.rs/crate/fundsp/latest Analyzes the frequency response of a 3-point averaging FIR filter to show it does not have zero gain at the Nyquist frequency. Requires `fundsp::prelude64::*`. ```rust use fundsp::prelude64::*; assert!((pass() & tick() & tick() >> tick()).response(0, 22050.0).unwrap().norm() > 0.1); ``` -------------------------------- ### Cargo.toml Library Configuration Source: https://docs.rs/crate/fundsp/latest/source/Cargo.toml Specifies the library name and path for the fundsp crate. ```toml [lib] name = "fundsp" path = "src/lib.rs" ``` -------------------------------- ### Analyze FIR Filter Response (Zero Gain) Source: https://docs.rs/crate/fundsp/latest Analyzes the frequency response of a 2-point averaging FIR filter to confirm it has near-zero gain at the Nyquist frequency. Requires `fundsp::prelude64::*`. ```rust use fundsp::prelude64::*; assert!((pass() & tick()).response(0, 22050.0).unwrap().norm() < 1.0e-9); ``` -------------------------------- ### Equivalent Graph Expressions: Sink Operations Source: https://docs.rs/crate/fundsp/latest/source/README.md Illustrates that branching, busing, and arithmetic operations on sinks are effectively no-ops. ```rust --sink()-42.0^sink()&---sink()*3.14 ``` ```rust sink() ``` -------------------------------- ### Analyze FIR Filter Frequency Response Source: https://docs.rs/crate/fundsp/latest/source/README.md Compares the frequency response of a 2-point averaging filter (expected to be near zero at Nyquist) with a 3-point averaging filter. Assumes `fundsp::prelude64::*` is imported. ```rust use fundsp::prelude64::*; assert!((pass() & tick()).response(0, 22050.0).unwrap().norm() < 1.0e-9); assert!((pass() & tick() & tick() >> tick()).response(0, 22050.0).unwrap().norm() > 0.1); ``` -------------------------------- ### Build Log - Thingbuf Compilation Error Source: https://docs.rs/crate/fundsp/latest/builds/2803676 An error indicating that a feature used in the `thingbuf` crate has been removed, causing a compilation failure. It provides a link to the relevant pull request for more information. ```text [INFO] [stderr] error[E0557]: feature has been removed [INFO] [stderr] --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/thingbuf-0.1.6/src/lib.rs:2:38 [INFO] [stderr] | [INFO] [stderr] 2 | #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] [INFO] [stderr] | ^^^^^^^^^^^^ feature has been removed [INFO] [stderr] | [INFO] [stderr] = note: removed in 1.92.0; see for more information [INFO] [stderr] = note: merged into `doc_cfg` [INFO] [stderr] [INFO] [stderr] For more information about this error, try `rustc --explain E0557`. ``` -------------------------------- ### stack Source: https://docs.rs/crate/fundsp/latest/source/README.md Stacks two nodes. ```APIDOC ## stack(x, y) ### Description Stack `x` and `y`. Identical with `x | y`. ### Parameters #### Path Parameters - **x** (Node) - Required - The first node. - **y** (Node) - Required - The second node. ``` -------------------------------- ### Equivalent Graph Expressions: Channel Concatenation Source: https://docs.rs/crate/fundsp/latest/source/README.md Shows how stacking operations concatenate channels, and that the order does not matter for sinks and zeros. ```rust constant(0.0) | dc(1.0) ``` ```rust constant((0.0, 1.0)) ``` ```rust sink() | zero() ``` ```rust zero() | sink() ``` -------------------------------- ### Smooth Parameter Changes with Follow Filter in Rust Source: https://docs.rs/crate/fundsp/latest/source/README.md Pipe a shared variable through a `follow` filter to smooth parameter changes. This is useful for preventing abrupt jumps in audio parameters, with a specified response time. ```rust let amp_controlled = noise() * (var(&) >> follow(0.1)); ``` -------------------------------- ### afollow(a, r) Source: https://docs.rs/crate/fundsp/latest Applies an asymmetric smoothing filter to a signal. This filter has separate time constants for attack and release phases, defined by `a` (attack time) and `r` (release time) in seconds. It's useful for creating smoothed transitions in audio signals. ```APIDOC ## afollow(a, r) ### Description Implements an asymmetric smoothing filter, allowing for different response times during signal increases (attack) and decreases (release). This is often used for smoothing control signals or audio envelopes. ### Function Signature `afollow(a, r)` ### Inputs * `a` (number): Halfway attack time in seconds. * `r` (number): Halfway release time in seconds. ### Outputs * 1 (signal): The smoothed output signal. ``` -------------------------------- ### resynth Source: https://docs.rs/crate/fundsp/latest/source/README.md Frequency domain resynthesis. ```APIDOC ## resynth::(w, f) ### Description Frequency domain resynthesis with window length `w` and processing function `f`. ### Parameters #### Path Parameters - **w** (usize) - Required - The window length. - **f** (Function) - Required - The processing function. ```