Skip to content

smlib

Contributors

People who contribute to this project.

Objects

  • SMLib SMLib (Signal processing for Mapping) is a collection of objects for analyzing and processing floats and vectors.
  • bp bp is a band-pass filter for a stream of float values, outputting the filtered value.
  • decimator decimator reduces a float stream by passing one out of every n input values.
  • deltas deltas generates a list of differences between values in an input float stream.
  • hip smlib/hip applies a high-pass filter to a stream of float values, producing the filtered values at its outlet.
  • hist hist accumulates input floats into a histogram over a configured scale and outputs the bin values as a list.
  • itov itov converts a binary class index to a scaled value using the first-class value, last-class value, and number of classes supplied as arguments.
  • lavg lavg computes a leaky average of incoming floats and outputs the averaged value.
  • lhist lhist builds a “leaky” histogram from input floats or lists of floats, storing samples across a configurable number of classes.
  • lhisti lhisti creates a leaky histogram from float or list input, assigning samples to a configurable number of classes without clipping out-of-range values.
  • linspace linspace generates a list of linearly spaced floats between a start value and an end value.
  • lmax lmax computes a leaky maximum from incoming float values and outputs the result as a float.
  • lmin lmin is a control-rate filter that computes a leaky minimum from incoming float values and outputs the resulting float.
  • lrange lrange outputs the difference between a leaky maximum and a leaky minimum for incoming float values.
  • lstd lstd calculates a leaky standard deviation from incoming floats, using a decaying accumulator for control-rate filtering.
  • prevl prevl stores float inputs and outputs a list representing a vector of past input values.
  • vabs vabs computes the absolute value of each float in an input list and outputs the resulting list.
  • vclip vclip clips each element of an input vector (list) between lower and upper bounds, outputting the resulting list.
  • vcog vcog computes the center of gravity of a list of floats, representing a virtual position within that list.
  • vdbtorms vdbtorms converts dB values to RMS values across a vector.
  • vdelta vdelta computes the element-wise difference between consecutive input vectors, outputting each current value minus the corresponding previous value.
  • vfmod vfmod computes the modulo of each float in an input vector (list), outputting a list whose elements are the corresponding input values modulo the current base.
  • vftom vftom converts frequency values to MIDI note numbers.
  • vlavg vlavg computes a leaky average for vectors, outputting a list of averages based on the current and previous input values.
  • vlmax vlmax computes a vector leaky maximum from a list of floating-point input values, outputting the maximum value in the list.
  • vlmin vlmin finds the minimum value in a list of floats and its location in the list, outputting both as floats.
  • vlrange vlrange computes a leaky maximum minus a leaky minimum for incoming floats or lists of floats, producing a float or list of range values.
  • vmax vmax finds the maximum value in a list of floats and outputs it as a float.
  • vmin vmin finds the minimum in a list of floats and outputs both the minimum value and its location in the list.
  • vmtof vmtof converts a vector (list) of MIDI note numbers to their corresponding frequencies, for control-rate MIDI-to-frequency conversion.
  • vnmax vnmax finds the maximum value in a list of floats.
  • vpow vpow raises each input float, or each element of an input list, to a specified power, computing y(i) = x(i)^a.
  • vrms vrms computes the root-mean-square of a vector from a list of input values and outputs a float.
  • vrmstodb vrmstodb converts an RMS value or a list (vector) of RMS values to decibels.
  • vstd vstd computes the standard deviation of a vector supplied as a list of float values.
  • vsum vsum computes the sum of a list of floats for control-rate list processing.
  • vthreshold vthreshold monitors a stream of floats and outputs bangs when the input crosses its upper trigger threshold or lower rest threshold.
  • vvconv smlib/vvconv convolves two vectors represented as lists of floats and outputs the resulting convolution as a list.
  • vvminus vvminus subtracts a list of floats—or a single float—from a list, outputting the resulting list of floats.
  • vvplus vvplus adds two lists of floats and outputs the resulting list.