pub trait DspNode: Debug + Send {
    fn set_sample_rate(&mut self, _srate: f32);
    fn reset(&mut self);
    fn process(
        &mut self,
        ctx: &mut dyn NodeAudioContext,
        ectx: &mut NodeExecContext,
        nctx: &NodeContext<'_>,
        atoms: &[SAtom],
        inputs: &[ProcBuf],
        outputs: &mut [ProcBuf],
        led: LedPhaseVals<'_>
    ); }
Expand description

This trait represents a DspNode for the crate::matrix::Matrix

Required Methods

Updates the sample rate for the node.

Reset any internal state of the node.

The code DSP function.

  • ctx is the audio context, which informs the node about the number of samples to process. It also provides input/output ports for the in/out nodes.
  • ectx is the execution context, which provides global stuff for all nodes to potentially use. For instance it’s used by the FbWr and FbRd nodes to share an audio buffer.
  • atoms are un-smoothed parameters. they can hold integer settings, samples or even strings.
  • params are smoother paramters, those who usually have a knob associated with them.
  • inputs contain all the possible inputs. In contrast to params these inputs might be overwritten by outputs of other nodes.
  • outputs are the output buffers of this node.

Implementors