Skip to content

Pd_Spectral_Toolkit

Contributors

People who contribute to this project.

Objects

  • amptodb~ amptodb~ converts amplitude values at its inlet to dB-FS decibel values at its outlet.
  • amptomag~ amptomag~ converts amplitude values to magnitude values.
  • and~ and~ performs a logical AND comparison between two signals and outputs the result.
  • binindex~ binindex~ outputs ascending sample-index values from zero through one less than the current block size.
  • binmax~ binmax~ finds the maximum sample value in signal block A and outputs that value, the corresponding value from signal block B, and their shared index.
  • binmin~ binmin~ finds the minimum sample value in signal block a and outputs that value, the associated value from signal block b, and their shared index.
  • binmix~ binmix~ mixes the values from inlet 2 for all matching values received at inlet 1, serving as a bin mixer for paired signal values.
  • binmonitor~ binmonitor~ outputs a float representing the value of a specific bin in incoming spectral data.
  • binsort~ binsort~ sorts spectral dataset A by its left-inlet values, in either ascending or descending order.
  • bintrim~ bintrim~ zeroes spectral data outside a specified range of bins, producing trimmed versions of two spectral inputs at its two outlets.
  • blocksmooth~ blocksmooth~ replaces zero values within a signal vector with preceding values, producing a smoother signal from a rough input.
  • cartoamp~ cartoamp~ converts Cartesian coordinates—real values at inlet 1 and imaginary values at inlet 2—into amplitude values at its outlet.
  • cartodb~ cartodb~ converts Cartesian real and imaginary signal values to dB-FS decibel values.
  • cartofreq~ cartofreq~ converts Cartesian spectral coordinates, supplied as real and imaginary values, into magnitude and frequency outputs.
  • cartomag~ cartomag~ converts Cartesian coordinates into magnitude values.
  • cartophase~ cartophase~ converts Cartesian coordinates to phase values.
  • cartopolar~ cartopolar~ converts Cartesian coordinates to polar coordinates, taking the real value at its first inlet and the imaginary value at its second.
  • cmplxabs~ cmplxabs~ calculates the absolute value (magnitude) of a complex number.
  • cmplxadd~ cmplxadd~ adds two complex numbers and outputs the real sum from its first outlet and the imaginary sum from its second.
  • cmplxdiv~ cmplxdiv~ performs complex division on signal inputs, outputting the real and imaginary parts of the result through separate outlets.
  • cmplxmult~ cmplxmult~ multiplies two complex numbers and outputs the real product from its first outlet and the imaginary product from its second.
  • cmplxsqrt~ cmplxsqrt~ calculates the square root of a complex signal, outputting the real and imaginary parts of the result.
  • cmplxsub~ cmplxsub~ subtracts one complex number from another, outputting the real and imaginary parts of the difference through separate outlets.
  • countwrap countwrap is a counter that advances by an arbitrary increment and wraps between specified minimum and maximum limits.
  • ctltosig~ ctltosig~ converts control values into signal values, scaling the control range from 0 to 1 to the signal range.
  • dbtoamp~ dbtoamp~ converts dB-FS decibel values into amplitude values.
  • dbtomag~ dbtomag~ converts dB-FS decibel signal values to magnitude values.
  • degtorad~ degtorad~ converts a signal representing degrees into radians.
  • degtoturn~ degtoturn~ converts an input signal expressed in degrees to turns and outputs the resulting turn values.
  • dspbang~ dspbang~ outputs a bang when DSP is turned on.
  • freqsieve~ freqsieve~ assigns spectral frequency data to the proper bins, taking magnitude and frequency signals as its first two inputs and outputting the reassigned magnitude and frequency signals.
  • freqtocar~ freqtocar~ converts magnitude and frequency pairs into Cartesian coordinates, outputting real values from its first outlet and imaginary values from its second.
  • freqtophase~ freqtophase~ converts frequency values to phase values for each bin, producing phase values from -pi to pi.
  • freqtopolar~ freqtopolar~ converts magnitude and frequency pairs into polar coordinates, outputting magnitude and phase in the range −π to π.
  • fundfreq~ fundfreq~ finds the fundamental frequency with the greatest magnitude from magnitude and phase spectral data, outputting its frequency.
  • geq~ geq~ performs a signal-rate logical greater-than-or-equal comparison between value a and value b and outputs the result.
  • gt~ gt~ performs a logical greater-than comparison between two signals and outputs the result.
  • harmprod~ harmprod~ calculates the harmonic product spectrum of an input raw spectrum.
  • leq~ leq~ performs a signal-rate logical less-than-or-equal comparison between values a and b and outputs the result.
  • lt~ lt~ performs a logical less-than comparison of two signals, comparing value a at the first inlet with value b at the second inlet and outputting the result.
  • magtoamp~ magtoamp~ converts magnitude values at its first inlet into amplitude values at its outlet.
  • magtodb~ magtodb~ converts magnitude values to dB-FS decibel values.
  • magtrim~ magtrim~ zeroes spectral data whose magnitude falls outside a specified lower and upper range, providing trimmed outputs for two spectral data inputs.
  • mod~ mod~ performs a modulo operation on two signals, outputting the remainder of the dividend divided by the divisor.
  • monitor~ monitor~ samples an input signal and outputs its value as a float every 20 milliseconds.
  • nand~ nand~ performs a logical NAND comparison of two signals and outputs the result.
  • neq~ neq~ performs a logical not-equal comparison between two signals and outputs the result.
  • nor~ nor~ performs a logical NOR comparison of two signals and outputs the result.
  • not~ not~ performs a logical NOT operation on an input signal and outputs the result.
  • or~ or~ performs a logical OR comparison between two signals and outputs the result.
  • pafft~ pafft~ performs a phase-aligned FFT by applying a window function and then rotating the signal vector, outputting the real and imaginary values separately.
  • paifft~ paifft~ performs a phase-aligned backward real fast Fourier transform, taking real and imaginary values and outputting an audio signal.
  • pd_spectral_toolkit pd_spectral_toolkit is an overview of the Pd Spectral Toolkit, a collection of objects for frequency-domain processing, including spectral analysis and resynthesis, complex arithmetic, conversions, comparisons, and utilities.
  • peaks~ peaks~ finds peaks in the spectral data received at its first inlet, outputting those peaks from outlet 1 and the associated data from its second spectral-data inlet through outlet 2.
  • phaseaccum~ phaseaccum~ calculates running sums of the phases of successive FFT frames, producing accumulated phase data from spectral phase data.
  • phasedelta~ phasedelta~ calculates the phase deviation between successive FFT frames, converting spectral phase data at its inlet into phase-delta data at its outlet.
  • phasetofreq~ phasetofreq~ converts phase values to frequency values for each spectral bin.
  • piwrap~ piwrap~ wraps an input phase signal into the range from -pi to pi.
  • polartocar~ polartocar~ converts polar coordinates to Cartesian coordinates.
  • polartofreq~ polartofreq~ converts polar-coordinate magnitude and phase signals into magnitude and frequency signals.
  • radtodeg~ radtodeg~ converts a signal containing angles in radians to degrees.
  • radtoturn~ radtoturn~ converts an input signal expressed in radians to turns.
  • recip~ recip~ calculates the reciprocal of each value in an input signal and outputs the resulting signal.
  • rgbtable rgbtable maps a float input to separate red, green, and blue float outputs for use as a color table.
  • rounder~ rounder~ rounds incoming signal values to an arbitrary precision and outputs the rounded signal.
  • sigtoctl~ sigtoctl~ converts signal values into control values, scaling the signal range from -1 to 1 to the control range.
  • softclip~ softclip~ applies the polynomial waveshaping function y[n] = 3x[n]/2 - x[n]^3/2 to an input signal, producing a smoothly clipped signal.
  • tabindex~ tabindex~ writes incoming signal values into a table at arbitrary locations, using a sample-index input to select where values are stored.
  • terminal terminal sends command messages to an instance of the operating system’s terminal and outputs the resulting responses.
  • turntodeg~ turntodeg~ converts an input signal representing turns into degrees.
  • turntorad~ turntorad~ converts a signal representing turns into radians.
  • valleys~ valleys~ finds valleys in spectral data received at its first inlet and outputs the valley data from its first outlet.
  • windower windower writes normalized window functions into Pd arrays, supporting a range of window types including parametric windows.
  • winfft~ winfft~ applies a named window function to an incoming audio signal and then performs a real fast Fourier transform, outputting real and imaginary values through separate outlets.
  • winifft~ winifft~ performs a real inverse fast Fourier transform from real and imaginary inputs, then applies a window and outputs an audio signal.