Module fundsp::hacker32

source ·
Expand description

The 32-bit hacker prelude, a 32-bit environment for audio processing.

Re-exports§

Functions§

  • Add constant to signal.
  • ADSR envelope.
  • A nested allpass. The feedforward coefficient of the outer allpass is set from the second input, which should have an absolute value smaller than one to prevent a blowup. The delay element of the outer allpass is replaced with x. The result is an allpass filter if x is allpass. If x is pass() then the result is a 1st order allpass. If x is a delay element then the result is a Schroeder allpass. If x is a 1st order allpass (allpole) then the result is a 2nd order nested allpass.
  • A nested allpass. The feedforward coefficient of the outer allpass is set from coefficient, which should have an absolute value smaller than one to prevent a blowup. The delay element of the outer allpass is replaced with x. The result is an allpass filter if x is allpass. If x is pass() then the result is a 1st order allpass. If x is a delay element then the result is a Schroeder allpass. If x is a 1st order allpass (allpole) then the result is a 2nd order nested allpass.
  • Allpass filter.
  • Allpass filter centered at f Hz with Q value q.
  • Allpass filter with Q value q.
  • Allpass filter (1st order) with adjustable delay (delay > 0) in samples at DC.
  • Allpass filter (1st order) with delay (delay > 0) in samples at DC.
  • Bandpass filter.
  • Bandpass filter centered at f Hz with Q value q.
  • Bandpass filter with Q value q.
  • Resonant two-pole bandpass filter.
  • Resonant two-pole bandpass filter with fixed center frequency and Q.
  • Resonant two-pole bandpass filter with fixed Q.
  • Bell filter with adjustable gain.
  • Bell filter centered at f Hz with Q value q and amplitude gain gain.
  • Bell filter with Q value q and amplitude gain gain.
  • An arbitrary biquad filter with coefficients in normalized form.
  • Branch into N similar nodes from indexed generator f.
  • Branch into N similar nodes from fractional generator f. The fractional generator is given values in the range 0…1.
  • Brown noise.
  • Bus N similar nodes from indexed generator f.
  • Bus N similar nodes from fractional generator f. The fractional generator is given values in the range 0…1.
  • Butterworth lowpass filter (2nd order).
  • Butterworth lowpass filter (2nd order) with fixed cutoff frequency f Hz.
  • Mono chorus, 5 voices. For stereo, stack two of these using different seed values. seed: LFO seed. separation: base voice separation in seconds (for example, 0.015). variation: delay variation in seconds (for example, 0.005). mod_frequency: delay modulation frequency (for example, 0.2).
  • Clip signal to -1…1.
  • Clip signal to minimummaximum.
  • Constant node. Synonymous with dc.
  • Constant node. Synonymous with constant. (DC stands for “direct current”, which is an electrical engineering term used with signals.)
  • Keeps a signal zero centered. The cutoff of the filter is 10 Hz.
  • Keeps a signal zero centered. Filter cutoff (in Hz) is usually somewhere below the audible range. The default blocker cutoff is 10 Hz.
  • Apply 10 ms of fade-in to signal at time zero.
  • Apply t seconds of fade-in to signal at time zero.
  • Fixed delay of t seconds. Delay time is rounded to the nearest sample. The minimum delay is one sample.
  • Saw-like discrete summation formula oscillator.
  • Saw-like discrete summation formula oscillator. Roughness in 0…1 is the attenuation of successive partials.
  • Square-like discrete summation formula oscillator.
  • Square-like discrete summation formula oscillator. Roughness in 0…1 is the attenuation of successive partials.
  • Control envelope from time-varying function f(t) with t in seconds. Spaces samples using pseudorandom jittering. Synonymous with lfo.
  • Control envelope from time-varying, input dependent function f(t, x) with t in seconds. Spaces samples using pseudorandom jittering. Synonymous with lfo2.
  • Control envelope from time-varying, input dependent function f(t, x, y) with t in seconds. Spaces samples using pseudorandom jittering. Synonymous with lfo3.
  • Control envelope from time-varying, input dependent function f(t, i) with t in seconds and i of type &Frame<f32, I> where I is the number of input channels. Spaces samples using pseudorandom jittering. Synonymous with lfo_in.
  • Feedback delay network. Mix output of enclosed circuit x back to its input. The output is diffused with a Hadamard matrix for feedback. Feedback circuit x must have an equal number of inputs and outputs. The number of inputs and outputs must be a power of two.
  • Feedback delay network. Mix output of enclosed circuit x back to its input, using y for extra feedback processing. The feedforward path does not include y. After y, the feedback signal is diffused with a Hadamard matrix. Feedback circuits x and y must have an equal number of inputs and outputs.
  • Mix output of enclosed circuit node back to its input. Feedback circuit node must have an equal number of inputs and outputs.
  • Mix output of enclosed circuit node back to its input with extra loopback feedback loop processing. Feedback circuits node and loopback must have an equal number of inputs and outputs.
  • FIR filter.
  • Create a 3-point symmetric FIR from desired gain (gain >= 0) at the Nyquist frequency. Results in a monotonic low-pass filter when gain < 1.
  • Mono flanger. feedback_amount: amount of feedback (for example, 0.9 or -0.9). Negative feedback inverts feedback phase. minimum_delay: minimum delay in seconds (for example, 0.005). maximum_delay: maximum delay in seconds (for example, 0.015). ´delay_f´: Delay in minimum_delaymaximum_delay as a function of time. For example, |t| lerp11(0.005, 0.015, sin_hz(0.1, t)).
  • Parameter follower filter with halfway response time t seconds.
  • Hammond wavetable oscillator. Emphasizes first three partials.
  • Fixed Hammond wavetable oscillator at f Hz. Emphasizes first three partials.
  • Highpass filter.
  • Highpass filter with cutoff frequency f Hz with Q value q.
  • Highpass filter with Q value q.
  • One-pole, one-zero highpass filter (1st order).
  • One-pole, one-zero highpass filter (1st order) with fixed cutoff frequency f.
  • High shelf filter with adjustable gain.
  • High shelf filter centered at f Hz with Q value q and amplitude gain gain.
  • High shelf filter with Q value q and amplitude gain gain.
  • Sample-and-hold component. Sampling frequency variability is in 0…1.
  • Sample-and-hold component. Sampling frequency variability is in 0…1.
  • N-channel impulse. The first sample on each channel is one and the rest are zero.
  • Average N channels into one. Inverse of split.
  • Control envelope from time-varying function f(t) with t in seconds. Spaces samples using pseudorandom jittering. Synonymous with envelope.
  • Control envelope from time-varying, input dependent function f(t, x) with t in seconds. Spaces samples using pseudorandom jittering. Synonymous with envelope2.
  • Control envelope from time-varying, input dependent function f(t, x, y) with t in seconds. Spaces samples using pseudorandom jittering. Synonymous with envelope3.
  • Control envelope from time-varying, input dependent function f(t, i) with t in seconds and i of type &Frame<f32, I> where I is the number of input channels. Spaces samples using pseudorandom jittering. Synonymous with envelope_in.
  • Look-ahead limiter with (attack, release) times in seconds. Look-ahead is equal to the attack time.
  • Stereo look-ahead limiter with (attack, release) times in seconds. Look-ahead is equal to the attack time.
  • Lorenz dynamical system oscillator.
  • Lowpass filter.
  • Lowpass filter with cutoff frequency f Hz with Q value q.
  • Lowpass filter with Q value q.
  • One-pole lowpass filter (1st order).
  • One-pole lowpass filter (1st order) with fixed cutoff frequency f Hz.
  • Resonant two-pole lowpass filter.
  • Resonant two-pole lowpass filter with fixed cutoff frequency and Q.
  • Resonant two-pole lowpass filter with fixed Q.
  • Low shelf filter with adjustable gain.
  • Low shelf filter centered at f Hz with Q value q and amplitude gain gain.
  • Low shelf filter with Q value q and amplitude gain gain.
  • Transform channels freely. Accounted as non-linear processing for signal flow.
  • Meter node. Outputs a summary of the input according to the chosen metering mode.
  • Default Maximum Length Sequence noise generator.
  • Maximum Length Sequence noise generator from an n-bit sequence (1 <= n <= 31).
  • Monitor node. Passes through input. Communicates via the shared variable an aspect of the input signal according to the chosen metering mode.
  • Moog resonant lowpass filter.
  • Moog resonant lowpass filter with fixed cutoff frequency and Q.
  • Moog resonant lowpass filter with fixed Q.
  • Morphing filter that morphs between lowpass, peak and highpass modes.
  • Morphing filter with center frequency f, Q value q, and morph morph (-1 = lowpass, 0 = peaking, 1 = highpass).
  • Multiply signal with constant.
  • Average N branches of M channels into one branch with M channels. The input has N * M channels. Inverse of multisplit::<M, N>.
  • Multichannel pass-through.
  • Multichannel sink. Inputs are discarded. -Input(s): signal
  • Split M channels into N branches. The output has N * M channels.
  • Tapped delay line with cubic interpolation. The number of taps is N. Minimum and maximum delay times are in seconds.
  • Tapped delay line with linear interpolation. The number of taps is N. Minimum and maximum delay times are in seconds.
  • Multichannel single sample delay.
  • Multichannel zero generator.
  • Convert an AudioUnit into an AudioNode. The number of input channels (I) and output channels (O) must be specified and must match the provided AudioUnit.
  • White noise generator. Synonymous with white.
  • Notch filter.
  • Notch filter centered at f Hz with Q value q.
  • Notch filter with Q value q.
  • Organ wavetable oscillator. Emphasizes octave partials.
  • Fixed organ wavetable oscillator at f Hz. Emphasizes octave partials.
  • 2x oversample enclosed node.
  • Fixed equal power mono-to-stereo panner with pan value in -1…1 (left to right).
  • Equal power mono-to-stereo panner.
  • Mono pass-through.
  • Peaking filter.
  • Peaking filter centered at f Hz with Q value q.
  • Peaking filter with Q value q.
  • Mono phaser. For stereo, stack two of these with different initial phases. feedback_amount: amount of feedback (for example, 0.5). Negative feedback inverts feedback phase. phase_f: allpass modulation value in 0…1 as function of time, for example |t| sin_hz(0.1, t) * 0.5 + 0.5.
  • Pink noise.
  • Pinking filter.
  • Chain together N similar nodes from indexed generator f.
  • Chain together N similar nodes from fractional generator f. The fractional generator is given values in the range 0…1.
  • Karplus-Strong plucked string oscillator with frequency in Hz. High frequency damping is in 0…1.
  • Pulse wave oscillator.
  • Resample enclosed generator node using cubic interpolation at speed obtained from input 0, where 1 is the original speed. Input 0: Sampling speed. Output(s): Resampled outputs of contained generator.
  • Constant-gain bandpass resonator.
  • Constant-gain bandpass resonator with fixed center frequency (Hz) and bandwidth (Hz).
  • Frequency domain resynthesizer. The number of inputs is I and the number of outputs is O. The window length (in samples) must be a power of two and at least four. The resynthesizer processes windows of input samples transformed into the frequency domain. The user supplied processing function processes frequency domain inputs into frequency domain outputs. The outputs are inverse transformed and overlap-added. The latency in samples is equal to window length. If any output is a copy of an input, then the input will be reconstructed exactly once all windows are overlapping, which takes window_length extra samples.
  • Create a stereo reverb unit. Parameters are room size (in meters, between 10 and 30 meters), reverberation time (in seconds, to -60 dB), diffusion amount (in 0…1), modulation speed (nominal range from 0 to 1, values beyond 1 are permitted and will start to create audible Doppler effects), and a user configurable loop filter. The loop filter is applied repeatedly to the reverb tail and can be used to implement frequency dependent filtering and other effects. More sophisticated (and expensive) than reverb_stereo.
  • Allpass loop based stereo reverb. Parameters are reverbation time (in seconds to -60 dB), diffusion amount (in 0…1), and a user configurable loop filter. The loop filter is applied repeatedly to the reverb tail and can be used to implement frequency dependent filtering and other effects.
  • Create a stereo reverb unit, given delay times (in seconds) for the 32 delay lines and reverberation time (in seconds). WIP.
  • Stereo reverb. room_size is in meters. An average room size is 10 meters. time is approximate reverberation time to -60 dB in seconds. damping is high frequency damping in 0…1.
  • Reverse channel order.
  • Rossler dynamical system oscillator.
  • Rotate stereo signal angle radians and apply amplitude gain. Rotations can be useful for mixing because they maintain the L2 norm of the signal.
  • Saw wavetable oscillator.
  • Fixed saw wavetable oscillator at f Hz.
  • Shape signal according to shaping mode.
  • Shape signal with a waveshaper function.
  • Shared float variable. Can be read from and written to from multiple threads.
  • Sine oscillator.
  • Fixed sine oscillator at f Hz.
  • Mono sink. Input is discarded. -Input 0: signal
  • Snoop node for sharing audio data with a frontend thread. The latest samples buffer has room for at least capacity samples. Returns (frontend, backend).
  • Soft saw wavetable oscillator. Contains all partials, falls off like a triangle wave.
  • Fixed soft saw wavetable oscillator at f Hz. Contains all partials, falls off like a triangle wave.
  • Split signal into N channels.
  • Square wavetable oscillator.
  • Fixed square wavetable oscillator at f Hz.
  • Stack N similar nodes from indexed generator f.
  • Stack N similar nodes from fractional generator f. The fractional generator is given values in the range 0…1.
  • Subtract constant from signal.
  • Mix together N similar nodes from indexed generator f.
  • Mix together N similar nodes from fractional generator f. The fractional generator is given values in the range 0…1.
  • Tapped delay line with cubic interpolation. Minimum and maximum delay times are in seconds.
  • Tapped delay line with linear interpolation. Minimum and maximum delay times are in seconds.
  • Single sample delay.
  • Timer node. A node with no inputs or outputs that maintains current stream time in a shared variable. It can be added to any node by stacking.
  • Triangle wavetable oscillator.
  • Fixed triangle wavetable oscillator at f Hz.
  • Update enclosed node x with approximately dt seconds between updates. The update function is f(t, dt, x) where t is current time, dt is time from previous update, and x is the enclosed node.
  • Outputs the value of the shared variable.
  • Shared variable mapped through a function. Outputs the value of the function, which may be scalar or tuple.
  • Play back a channel of a Wave32. Optional loop point is the index to jump to at the end of the wave.
  • Play back a channel of a Wave32 starting from sample start_point, inclusive, and ending at sample end_point, exclusive. Optional loop point is the index to jump to at the end.
  • Play back a channel of a Wave64. Optional loop point is the index to jump to at the end of the wave.
  • Play back a channel of a Wave64 starting from sample start_point, inclusive, and ending at sample end_point, exclusive. Optional loop point is the index to jump to at the end point.
  • White noise generator. Synonymous with noise.
  • Zero generator.

Type Aliases§