Signal:
Filter:
Classes | Collections > Ordered

Signal : FloatArray : RawArray : ArrayedCollection : SequenceableCollection : Collection : Object

Sampled audio buffer
Source: Signal.sc

Description

A Signal is a FloatArray that represents a sampled function of time buffer. Signals support math operations.

Class Methods

Signal.sineFill(size, amplitudes, phases)

Fill a Signal of the given size with a sum of sines at the given amplitudes and phases. The Signal will be normalized.

Arguments:

size

the number of samples in the Signal.

amplitudes

an Array of amplitudes for each harmonic beginning with the fundamental.

phases

an Array of phases in radians for each harmonic beginning with the fundamental.

Signal.chebyFill(size, amplitudes, normalize: true, zeroOffset: false)

Fill a Signal of the given size with a sum of Chebyshev polynomials at the given amplitudes. For eventual use in waveshaping by the Shaper ugen; see Shaper helpfile and Buffer:cheby too.

Arguments:

size

the number of samples in the Signal.

amplitudes

an Array of amplitudes for each Chebyshev polynomial beginning with order 1.

normalize

a Boolean indicating whether to normalize the resulting Signal. If the zeroOffset argument is true, the normalization is done for use as a transfer function, using normalizeTransfer, otherwise it just uses normalize to make the absolute peak value 1. Default is true.

zeroOffset

a Boolean indicating whether to offset the middle of each polynomial to zero. If true, then a zero input will always result in a zero output when used as a waveshaper. If false, then the "raw" (unshifted) Chebyshev polynomials are used. Default is false.

Discussion:

NOTE: In previous versions, chebyFill always offset the curves to ensure the center value was zero. The zeroOffset argument was added in version 3.7, and the default behavior was changed, so that it no longer offsets.

Signal.hanningWindow(size, pad: 0, sym: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/ExtraWindows/SystemOverwrites/ExtraWindowsOverwrites.sc

Fill a Signal of the given size with a Hanning window.

Arguments:

size

the number of samples in the Signal.

pad

the number of samples of the size that is zero padding.

Signal.hammingWindow(size, pad: 0, sym: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/ExtraWindows/SystemOverwrites/ExtraWindowsOverwrites.sc

Fill a Signal of the given size with a Hamming window.

WARNING: In versions of SuperCollider before 3.11, the implementation of Signal.hammingWindow had incorrect coefficients. To get the old behavior back, use Signal.hammingWindow_old.

Arguments:

size

the number of samples in the Signal.

pad

the number of samples of the size that is zero padding.

Signal.welchWindow(size, pad: 0)

Fill a Signal of the given size with a Welch window.

Arguments:

size

the number of samples in the Signal.

pad

the number of samples of the size that is zero padding.

Signal.rectWindow(size, pad: 0)

Fill a Signal of the given size with a rectangular window.

Arguments:

size

the number of samples in the Signal.

pad

the number of samples of the size that is zero padding.

Signal.fftCosTable(fftsize)

Fourier Transform: Fill a Signal with the cosine table needed by the FFT methods. See also the instance methods -fft and -ifft.

Signal.hammingWindow_old(size, pad: 0)

This used to be Signal.hammingWindow, but the coefficients were incorrect (making it a different window in the generalized Hamming window family). It is provided to assist in porting code to 3.11 and later.

Windows from ExtraWindows Quark

For more information, check out the Guide: ExtraWindows

Signal.bartlettWindow(size, pad: 0, sym: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/ExtraWindows/ExtraWindows.sc

Fill a Signal of the given size with a Bartlett/triangular window.

Arguments:

size

the number of samples in the Signal.

pad

the number of samples of the size that is zero padding.

sym

a Boolean indicating whether the window is symmetric or periodic. Default is false.

Signal.blackmanHarrisWindow(size, pad: 0, sym: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/ExtraWindows/ExtraWindows.sc

Fill a Signal of the given size with a Blackman-Harris window.

Arguments:

size

the number of samples in the Signal.

pad

the number of samples of the size that is zero padding.

sym

a Boolean indicating whether the window is symmetric or periodic. Default is false.

Signal.blackmanNuttallWindow(size, pad: 0, sym: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/ExtraWindows/ExtraWindows.sc

Fill a Signal of the given size with a Blackman-Nuttall window.

Arguments:

size

the number of samples in the Signal.

pad

the number of samples of the size that is zero padding.

sym

a Boolean indicating whether the window is symmetric or periodic. Default is false.

Signal.gaussianWindow(size, pad: 0, a: 3, sym: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/ExtraWindows/ExtraWindows.sc

Fill a Signal of the given size with a Gaussian window.

Arguments:

size

the number of samples in the Signal.

pad

the number of samples of the size that is zero padding.

a

the inverse of standard deviation (width) of the Gaussian. Higher means narrower; analogous to quality factor.

sym

a Boolean indicating whether the window is symmetric or periodic. Default is false.

Signal.hanningWindow(size, pad: 0, sym: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/ExtraWindows/SystemOverwrites/ExtraWindowsOverwrites.sc

Fill a Signal of the given size with a Hanning window. Overwrote SCClassLibrary to have the symmetry argument.

Arguments:

size

the number of samples in the Signal.

pad

the number of samples of the size that is zero padding.

sym

a Boolean indicating whether the window is symmetric or periodic. Default is false.

Signal.hammingWindow(size, pad: 0, sym: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/ExtraWindows/SystemOverwrites/ExtraWindowsOverwrites.sc

Fill a Signal of the given size with a Hamming window. Overwrote SCClassLibrary to have the symmetry argument.

Arguments:

size

the number of samples in the Signal.

pad

the number of samples of the size that is zero padding.

sym

a Boolean indicating whether the window is symmetric or periodic. Default is false.

Signal.hannWindow(size, pad: 0, sym: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/ExtraWindows/ExtraWindows.sc

Synonymous with hanningWindow method with the extra symmetry argument.

Arguments:

size

the number of samples in the Signal.

pad

the number of samples of the size that is zero padding.

sym

a Boolean indicating whether the window is symmetric or periodic. Default is false.

Signal.kaiserWindow(size, pad: 0, a: 3, sym: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/ExtraWindows/ExtraWindows.sc

Fill a Signal of the given size with a Kaiser window.

Arguments:

size

the number of samples in the Signal.

pad

the number of samples of the size that is zero padding.

a

the alpha value. Reduces to rectangular window at zero and narrows at higher values. Parameterized as described here: https://ccrma.stanford.edu/~jos/sasp/Kaiser_Window.html

sym

a Boolean indicating whether the window is symmetric or periodic. Default is false.

Signal.lanczosWindow(size, pad: 0, sym: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/ExtraWindows/ExtraWindows.sc

Fill a Signal of the given size with a Lanczos window.

Arguments:

size

the number of samples in the Signal.

pad

the number of samples of the size that is zero padding.

sym

a Boolean indicating whether the window is symmetric or periodic. Default is false.

Signal.tukeyWindow(size, pad: 0, a: 0.5, sym: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/ExtraWindows/ExtraWindows.sc

Fill a Signal of the given size with a Tukey window (tapered-cosine window).

Arguments:

size

the number of samples in the Signal.

pad

the number of samples of the size that is zero padding.

a

the alpha value. At 0, reduces to Hann window. At 1, reduces to rectangular. Default to 0.5.

sym

a Boolean indicating whether the window is symmetric or periodic. Default is false.

Signal.rfftCosTable(rfftsize)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Fourier Transform: Fill a Signal with the cosine table needed by the Real-FFT methods. See also the instance methods -rfft and -irfft.

Signal.rfftTwoCosTable(rfftsize)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Fourier Transform: Fill a Signal with the cosine table needed by the Real-FFT-Two methods. See also the instance methods -rfftTwo and -irfftTwo.

Signal.cosineFill(size, amplitudes, phases)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Fill a Signal of the given size with a sum of cosines at the given amplitudes and phases. The Signal will be normalized.

Arguments:

size

the number of samples in the Signal.

amplitudes

an Array of amplitudes for each harmonic beginning with the fundamental.

phases

an Array of phases in radians for each harmonic beginning with the fundamental.

Signal.packetFill(size, amplitudes, phases)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Fill a Signal of the given size with a sum of Hann enveloped cosines at the given amplitudes and phases. The Signal will be normalized.

Arguments:

size

the number of samples in the Signal.

amplitudes

an Array of amplitudes for each harmonic beginning with the fundamental.

phases

an Array of phases in radians for each harmonic beginning with the fundamental.

Signal.zeroFill(size)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Fill a Signal of the given size with zeros. A synonym for *newClear.

Arguments:

size

the number of samples in the Signal.

Signal.read(path, size, startFrame: 0, channel: 0)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Read a soundfile.

Arguments:

path

a String representing the path of the soundfile to be read.

size

the number of samples. If size is nil, defaults to the soundfile's number of frames.

startFrame

the first frame of the soundfile to read. The default is 0, which is the beginning of the file. May be a negative number, which indicates the number of zeros to fill before reading the soundfile.

channel

soundfile channel to read. The default is 0, the first channel.

Signal.readWave(path, size, frame: 0, channel: 0, freq: 440.0, alpha: 3, winScale: 1)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Read a periodic waveform from a soundfile.

Arguments:

path

a String representing the path of the soundfile to be read.

size

the number of samples. If size is nil, return a waveform of the original number of samples at the soundfile sample rate.

frame

center frame of the soundfile about which to read. I.e., the synthesis window is centered on this frame. The default is 0, which is the beginning of the file.

channel

soundfile channel to read. The default is 0, the first channel.

freq

analysis frequency of the waveform, in Hz. The default is 440 Hz.

alpha

Kaiser window alpha. The default is 3.

winScale

power of two scaling coefficient for the window size. The default is 1.

Discussion:

freq

Successful synthesis of a periodic waveform from a soundfile depends largely on closely estimating the frequency of the waveform. The folding frequency of the Kaiser synthesis window is mapped to this analysis frequency.

alpha

Time domain smoothing is directly specified by the Kaiser window alpha. Choosing alpha = 0; winScale = 0 specifies a rectangular window, and allows us to view an unsmoothed period of the source waveform. Higher values of alpha mean more time domain smoothing.

NOTE: An unsmoothed waveform will usually result in unintended distortion artifacts when used as a Wavetable.

winScale

The window scale argument scales the Kaiser window folding frequency with respect to the period of the waveform, like this:

winScalewaveform periods
12
01
-10.5

The default, winScale = 1, is optimimal in the sense that frequency domain artifacts are relected furthest from the harmonics of the periodic waveform of interest, without excessive oversampling.

Signal.readPacket(path, size, frame: 0, channel: 0, freq: 440.0, alpha: 3, winScale: 1)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Read a Hann enveloped wave packet from a soundfile.

Arguments:

path

a String representing the path of the soundfile to be read.

size

the number of samples. If size is nil, return a wave packet of the original number of samples at the soundfile sample rate.

frame

center frame of the soundfile about which to read. I.e., the synthesis window is centered on this frame. The default is 0, which is the beginning of the file.

channel

soundfile channel to read. The default is 0, the first channel.

freq

analysis frequency of the waveform, in Hz. The default is 440 Hz.

alpha

Kaiser window alpha. The default is 3.

winScale

power of two scaling coefficient for the window size. The default is 1.

Discussion:

See *readWave discussion above.

Signal.windowedSinc(size, freq, sampleRate)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Return a rectangular windowed sinc filter kernel.1

Arguments:

size

the number of samples in the Signal.

freq

the cutoff frequeny, in Hz.

sampleRate

sample rate, in Hz.

Signal.logShelf(size, freq0, freq1, gainDC, gainNy, phase: 'lin', sampleRate)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Return a log shelf filter kernel.2 See also: FreqSpectrum: *logShelf.

Arguments:

size

the number of samples in the Signal.

freq0

the frequeny, at which to begin transition from gainDC to gainNy, in Hz.

freq1

the frequeny, at which to end transition from gainDC to gainNy, in Hz.

gainDC

the gain at DC, in dB.

gainNy

the gain at Nyquist, in dB.

phase

phase response.

\linlinear phase
\minminimum (system) phase
sampleRate

sample rate, in Hz.

Signal.gaussianBank(size, freqs, alpha: 1, sampleRate)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Return an Array of gaussian windowed filter kernels.

Arguments:

size

the number of samples in the Signals.

freqs

the cross-over frequenies, in Hz.

alpha

window smoothing coefficient

= 1ideal bandwidth
> 1flatter response, greater side band rejection
< 1smoother response, less side band rejection
sampleRate

sample rate, in Hz.

Noise

Signal.gaussianNoise(size)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Return gaussian white noise, with a mean of 0 and standard deviation of 1.

See also SimpleNumber: -gauss.

Arguments:

size

the number of samples in the Signal.

Signal.periodicPLNoise(size, beta: 0)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Return periodic power-law noise, aka fractional noise. Magnitude at Nyquist is normalized to 1.

Arguments:

size

the number of samples in the Signal.

beta

power spectral density.

colorbetadB / octave
brown2-6
pink1-3
white00
blue-1+3
violet-2+6

Chirps

Signal.cosineChirp(size, freq0, freq1, phase: 0, beta: 0, sampleRate)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Return a rectangular windowed sinus power-law chirp.3

Arguments:

size

the number of samples in the Signal.

freq0

initial frequeny, in Hz.

freq1

final frequeny, in Hz.

phase

initial phase, in radians.

beta

power spectral density.

colorbetadB / octave
brown2-6
pink1-3
white00
blue-1+3
violet-2+6
sampleRate

sample rate, in Hz.

Discussion:

Synthesized in the time domain.

Signal.sineChirp(size, freq0, freq1, phase: 0, beta: 0, sampleRate)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Return a rectangular windowed sinus power-law chirp.

Arguments:

size

the number of samples in the Signal.

freq0

initial frequeny, in Hz.

freq1

final frequeny, in Hz.

phase

initial phase, in radians.

beta

power spectral density.

colorbetadB / octave
brown2-6
pink1-3
white00
blue-1+3
violet-2+6
sampleRate

sample rate, in Hz.

Discussion:

Synthesized in the time domain.

Signal.analyticChirp(size, freq0, freq1, phase: 0, beta: 0, sampleRate)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Return a rectangular windowed complex analytic sinus power-law chirp.

Arguments:

size

the number of samples in the Signal.

freq0

initial frequeny, in Hz.

freq1

final frequeny, in Hz.

phase

initial phase, in radians.

beta

power spectral density.

colorbetadB / octave
brown2-6
pink1-3
white00
blue-1+3
violet-2+6
sampleRate

sample rate, in Hz.

Discussion:

Synthesized in the time domain.

Analytic & Hilbert

Signal.analyticFill(size, amplitudes, phases)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Return a complex analytic Signal of the given size with a sum of cosines and a sum of sines at the given amplitudes and phases. The Signal will be normalized.

Arguments:

size

the number of samples in the Signal.

amplitudes

an Array of amplitudes for each harmonic beginning with the fundamental.

phases

an Array of phases in radians for each harmonic beginning with the fundamental.

Signal.hilbert(size, pad: 0, sym: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Hilbert Transform: Return complex Hilbert Transform coefficients.

Arguments:

size

the number of samples in the Signal.

pad

the number of samples of the size that is zero padding.

sym

a Boolean indicating whether the window is symmetric or periodic. Default is false.

Ambisonic Toolkit

Signal.hoaDist(size, radius, order, sampleRate, speedOfSound)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/atk-sc3/Classes/extSignal.sc

Return an Array of Higher Order Ambisonic signal (HOA) near-field effect (NFE), distance radial filters collected by Associated Legendre degree (ℓ).

Arguments:

size

The number of samples in the Signals.

radius

Radius, in meters.

order

Ambisonic order.

sampleRate

Sample rate, in Hz.

speedOfSound

Speed of sound, in meters per second.

Discussion:

Offers FIR coefficients, equivalent to the IIR coefficients returned by NFECoeffs: -dist. Implemented as a frequency sampling design, with coefficients returned by HoaOrder: -distWeights. See also: FreqSpectrum: *hoaDist.

NOTE: In most cases, users will use the high level near-field effect (NFE) pseudo-UGen: HoaNFDist.

Signal.hoaCtrl(size, encRadius, decRadius, order, sampleRate, speedOfSound)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/atk-sc3/Classes/extSignal.sc

Return an Array of Higher Order Ambisonic signal (HOA) near-field effect (NFE), control radial filters collected by Associated Legendre degree (ℓ).

Arguments:

size

The number of samples in the Signals.

encRadius

Encoding radius, in meters.

decRadius

Decoding radius, in meters.

order

Ambisonic order.

sampleRate

Sample rate, in Hz.

speedOfSound

Speed of sound, in meters per second.

Discussion:

Offers FIR coefficients, equivalent to the IIR coefficients returned by NFECoeffs: -ctrl. Implemented as a frequency sampling design, with coefficients returned by HoaOrder: -ctrlWeights. See also: FreqSpectrum: *hoaCtrl.

NOTE: In most cases, users will use the high level near-field effect (NFE) pseudo-UGen: HoaNFCtrl.

Signal.hoaFocl(size, radius, order, window: 'reg', sampleRate, speedOfSound)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/atk-sc3/Classes/extSignal.sc

Return an Array of Higher Order Ambisonic signal (HOA) near-field effect (NFE), focalisation radial filters collected by Associated Legendre degree (ℓ).

Arguments:

size

The number of samples in the Signals.

radius

Radius, in meters.

order

Ambisonic order.

window

Angular weighting window.

\regRegularised4
\hp(Butterworth) High Pass5
\cosCosine6
\sinSine7
sampleRate

Sample rate, in Hz.

speedOfSound

Speed of sound, in meters per second.

Discussion:

Offers FIR coefficients; implemented as a linear phase frequency sampling design, with coefficients returned by HoaOrder: -foclWeights. See also: FreqSpectrum: *hoaFocl.

Signal.hoaMultiBandFocl(size, radius, beamDict, dim: 3, match: 'amp', numChans, order, window: 'reg', sampleRate, speedOfSound)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/atk-sc3/Classes/extSignal.sc

Return an Array of Higher Order Ambisonic signal (HOA) filters combining multi-band beamforming and near-field effect (NFE) focalisation, collected by Associated Legendre degree (ℓ).

Arguments:

size

The number of samples in the Signals.

radius

Radius, in meters. Set to nil to exclude focalisation.

beamDict

A dictionary specifying beam shapes and edge frequencies.

See Beaming & Decoder Matching and discussion below.

dim

The number of dimensions: 2D or 3D.

match

Matching criteria, see Beaming & Decoder Matching:

\amppressure (loudspeaker sum)
\rmsspherical harmonic energy
\energyloudspeaker energy

NOTE: Prepend f to include focalisation in normalisation. E.g., \frms.
numChans

Number of loudspeakers.

NOTE: Must be set when choosing match: \energy.
order

Ambisonic order.

window

Focalisation angular weighting window. See *hoaFocl.

NOTE: Ignored if radius is set to nil.
sampleRate

Sample rate, in Hz.

speedOfSound

Speed of sound, in meters per second.

Discussion:

Offers FIR coefficients; implemented as a linear phase frequency sampling design, with coefficients returned by *logShelf and *hoaFocl. See also: FreqSpectrum: *hoaMultiBandFocl for design examples.

Inherited class methods

Undocumented class methods

Signal.listOfWindows

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/ExtraWindows/ExtraWindows.sc

Signal.readNew(file)

Instance Methods

.plot(name, bounds, discrete: false, numChannels, minval, maxval, separately: true)

From superclass: ArrayedCollection

Plot the Signal in a window. The arguments are not required and if not given defaults will be used.

For details, see plot

.play(loop: false, mul: 0.2, numChannels: 1, server)

Loads the signal into a buffer on the server and plays it. Returns the buffer so you can free it again.

Arguments:

loop

A Boolean whether to loop the entire signal or play it once. Default is false.

mul

volume at which to play it, 0.2 by default.

numChannels

if the signal is an interleaved multichannel file, number of channels, default is 1.

server

the server on which to load the signal into a buffer.

.waveFill(function, start: 0.0, end: 1.0)

Fill the Signal with a function evaluated over an interval.

Arguments:

function

a function that should calculate the value of a sample.

The function is called with three arguments:

x
the value along the interval.
old
the old value (if the signal is overwritten)
i
the sample index.

As arguments, three values are passed to the function: the current input value (abscissa), the old value (if the signal is overwritten), and the index.

start

the starting value of the interval.

end

the ending value of the interval.

.asWavetable

Convert the Signal into a Wavetable.

.fill(val)

Fill the Signal with a value.

.scale(scale)

Scale the Signal by a factor in place.

.offset(offset)

Offset the Signal by a value in place.

.peak

Return the peak absolute value of a Signal.

.normalize(beginSamp: 0, endSamp)

Normalize the Signal in place such that the maximum absolute peak value is 1.

.normalizeTransfer

Normalizes a transfer function so that the center value of the table is offset to zero and the absolute peak value is 1. Transfer functions are meant to be used in the Shaper ugen.

.invert(beginSamp: 0, endSamp)

Invert the Signal in place.

.reverse(beginSamp: 0, endSamp)

Reverse a subrange of the Signal in place.

.fade(beginSamp: 0, endSamp, beginLevel: 0.0, endLevel: 1.0)

Fade a subrange of the Signal in place.

.integral

Return the integral of a signal.

.overDub(aSignal, index: 0)

Add a signal to myself starting at the index. If the other signal is too long only the first part is overdubbed.

.overWrite(aSignal, index: 0)

Write a signal to myself starting at the index. If the other signal is too long only the first part is overdubbed.

.blend(that, blendFrac: 0.5)

Blend two signals by some proportion.

Fourier Transform

.fft(imag, cosTable)

Perform an FFT on a real and imaginary signal in place. See also the class method *fftCosTable.

.ifft(imag, cosTable)

Perform an inverse FFT on a real and imaginary signal in place. See also the class method *fftCosTable.

.fftToRfft(imag)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Return a complex Real-FFT spectrum from a complex FFT spectrum. See also the instance method -rfftToFft.

.rfft(cosTable)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Perform a Real-FFT on a real signal.8 See also the class method *rfftCosTable.

.irfft(imag, cosTable)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Perform an inverse Real-FFT on a real and imaginary signal. See also the class method *rfftCosTable.

.rfftToFft(imag)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Return a complex FFT spectrum from a complex Real-FFT spectrum. See also the instance method -fftToRfft.

.rfftTwo(real2, cosTable)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Perform a Real-FFT on two real signals. See also the class method *rfftTwoCosTable.

.irfftTwo(imag1, real2, imag2, cosTable)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Perform an inverse Real-FFT on two real and imaginary signals. See also the class method *rfftTwoCosTable.

.dft(imag, method: 'czt')

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Perform a DFT on a real and imaginary signal.

NOTE: size is not restricted to a power of two.

Arguments:

imag

imaginary signal.

method
'czt'Chirp z-Transform
'dir'evaluate directly

.idft(imag, method: 'czt')

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Perform an inverse DFT on a real and imaginary signal.

NOTE: size is not restricted to a power of two.

Arguments:

imag

imaginary signal.

method
'czt'Chirp z-Transform
'dir'evaluate directly

.dftZoom(imag, zoomsize, k0, k1)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Perform a Zoom DFT on a real and imaginary signal.

NOTE: Signal.size is not restricted to a power of two.

Arguments:

imag

imaginary signal.

zoomsize

the number of coefficients to return.

k0

lowest DFT coefficient. Not required to be an integer.

k1

highest DFT coefficient. Not required to be an integer.

.rdftZoom(zoomsize, k0, k1)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Perform a Zoom DFT on a real signal.

NOTE: Signal.size is not restricted to a power of two.

Arguments:

zoomsize

the number of coefficients to return.

k0

lowest DFT coefficient. Not required to be an integer.

k1

highest DFT coefficient. Not required to be an integer.

.goertzel(imag, k, method: 'iir')

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Return individual terms of a DFT on a real and imaginary signal.9

NOTE: Signal.size is not restricted to a power of two.

Arguments:

imag

imaginary signal.

k

DFT coefficient(s) as a single value or an Array. Not required to be an integer.

method
'iir'Goertzel's algorithm
'dir'evaluate directly
'czt'Chirp z-Transform

.rgoertzel(k, method: 'iir')

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Return individual terms of a DFT on a real signal.

NOTE: Signal.size is not restricted to a power of two.

Arguments:

k

DFT coefficient(s) as a single value or an Array. Not required to be an integer.

method
'iir'Goertzel's algorithm
'dir'evaluate directly
'czt'Chirp z-Transform

Unary Messages

Signal will respond to unary operators by returning a new Signal.

.neg

.abs

.sign

.squared

.cubed

.sqrt

.exp

.log

.log2

.log10

.sin

.cos

.tan

.asin

.acos

.atan

.sinh

.cosh

.tanh

.distort

.softclip

.isPositive

From superclass: SequenceableCollection

.isNegative

From superclass: SequenceableCollection

.isStrictlyPositive

From superclass: SequenceableCollection

.flip

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

The flip operator.10

Binary Messages

Signal will respond to binary operators by returning a new Signal.

.thresh(aNumber)

Thresholding replaces every value < threshold with 0.

NOTE: Before SuperCollider 3.13 this function was implemented incorrectly, evaluating the square of provided threshold. This behavior is now fixed, but note that older code might give different results.

+(aNumber)

-(aNumber)

*(aNumber)

/(aNumber)

.div(aNumber)

.pow(aNumber)

.mod(aNumber)

.min(aNumber)

.max(aNumber)

.ring1(aNumber)

.ring2(aNumber)

.ring3(aNumber)

.ring4(aNumber)

.difsqr(aNumber)

.sumsqr(aNumber)

.sqrdif(aNumber)

.absdif(aNumber)

.amclip(aNumber)

.scaleneg(aNumber)

.clip2(aNumber: 1)

.wrap2(aNumber: 1)

.excess(aNumber: 1)

%(that)

From superclass: Object

**(that)

From superclass: Object

<!(that)

From superclass: Object

Extensions by MathLib

.thresh2(thresh, adverb)

From superclass: SequenceableCollection

Bilateral thresholding.

Arguments:

thresh

When the input.abs < thresh, the output is forced to 0. Should be a positive value.

adverb

Optional, for processing Collections. See Adverbs for Binary Operators.

Discussion:

.addCosine(harmonicNumber: 1, amplitude: 1.0, phase: 0.0)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Add a single cosine to myself with the given harmonic, amplitude and phase.

.cosineFill(amplitudes, phases)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

A sum of cosines with the given amplitudes and phases, returned in place.

Arguments:

amplitudes

an Array of amplitudes for each harmonic beginning with the fundamental.

phases

an Array of phases in radians for each harmonic beginning with the fundamental.

.cosineFill2(list)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

A sum of cosines with the given harmonics, amplitudes and phases, returned in place.

Arguments:

list

a rank 2 collection containing harmonic numbers, amplitudes and phases.

.packetFill(amplitudes, phases)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

A sum of Hann enveloped cosines at the given amplitudes and phases, returned in place.

Arguments:

amplitudes

an Array of amplitudes for each harmonic beginning with the fundamental.

phases

an Array of phases in radians for each harmonic beginning with the fundamental.

.packetFill2(list)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

A sum of Hann enveloped cosines with the given harmonics, amplitudes and phases, returned in place.

Arguments:

list

a rank 2 collection containing harmonic numbers, amplitudes and phases.

.wavePacket

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Given a periodic waveform, returns a Hann enveloped wave packet. The receiver is unchanged.

.cola(size)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Given a superposition density window, returns a constant-overlap-add (COLA) window.11 The receiver is unchanged.

.wrapExtend(size)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Returns a new Signal whose elements are repeated sequences of the receiver, up to size length. The receiver is unchanged.

.resize(newSize)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Returns a new Signal resampled in the frequency domain to a new size. The receiver is unchanged.

.discardDC

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Remove the DC component the Signal in place.

.writeFile(path)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Writes the entire Signal to a file, where every chunk of four bytes is a 32-bit floating point sample.

.write(path, headerFormat: "WAV", sampleFormat: "float", sampleRate: 44100)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Writes the entire Signal to a soundfile.

Arguments:

path

a String representing the path of the soundfile to be written.

headerFormat

a String for the soundfile format. Valid strings are listed at SoundFile: -headerFormat. If not given, the default "AIFF" is used.

sampleFormat

a String for the sample format. Valid strings are listed at SoundFile: -sampleFormat. If not given, the default "float" is used.

sampleRate

an Integer sample rate (44100 by default).

Convolution

.convolve(aSignal, method: 'fft')

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Convolve myself with a signal.

Arguments:

aSignal

the multiplier.

method
'fft'Radix-2 Discrete Fourier Transform
'dft'Discrete Fourier Transform
'dir'evaluate directly

.periodicConvolve(aSignal, method: 'fft')

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Periodic convolve myself with a signal.

Arguments:

aSignal

the multiplier.

method
'fft'Radix-2 Discrete Fourier Transform
'dft'Discrete Fourier Transform
'dir'evaluate directly

.partConvolve(aSignal, size, method: 'fft')

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Partition convolve myself with a signal.

Arguments:

aSignal

the multiplier.

size

the partition size.

method
'fft'Radix-2 Discrete Fourier Transform
'dft'Discrete Fourier Transform
'dir'evaluate directly

Analytic & Complex

.analytic

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Hilbert Transform: Return a complex analytic signal from a real signal.12

.instaneousFreq(mindb: -120.0, sampleRate)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Return the instantaneous frequency from a real signal.13

Arguments:

mindb

a minimum value in dB to clip amplitude response to. Prevents singularities.

sampleRate

sample rate, in Hz.

.complex(imag)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Return a complex signal with the given real and imaginary parts.

Rotation & Phase

.rotateWave(phase)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Rotate the Signal by a value in radians, in place.

NOTE: The signal is regarded as one period of a waveform.

.rotatePhase(phase)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Rotate the phase of Signal by a value in radians, in place.

.linearPhase(sym: false)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Return a linear phase kernel, preserving the magnitude, in place.

Arguments:

sym

a Boolean indicating whether the window is symmetric or periodic. Default is false.

.minimumPhase(mindb: -120.0, oversample: 1)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Return a minimum phase kernel, preserving the magnitude, in place.14

Arguments:

mindb

a minimum value in dB to clip amplitude response to. Reduces time aliasing.

oversample

time oversampling scale factor. May be a float or an integer. Reduces time aliasing.

.gaussianPhase

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Return a gaussian noise phase kernel, preserving the magnitude, in place.

.even

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Return the even part of a signal.15

.odd

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Return the odd part of a signal.

RMS & Magnitude

.rms

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Return the RMS of a signal.

.peakMagnitude(oversample: 1)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Return the peak of the frequency domain magnitude of a signal.

Arguments:

oversample

time oversampling scale factor. May be a float or an integer.

.normalizeMagnitude(oversample: 1)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Normalize the Signal in place such that the maximum magnitude in the frequency domain is 1.

Arguments:

oversample

time oversampling scale factor. May be a float or an integer.

Cepstrum

.rceps

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Return the real part of the cepstrum of a real signal.16

.irceps

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Return the real part of the inverse of the real part of the cepstrum.

Chirp z-Transform

.czt(imag, cwtsize, step, start)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Perform a Chirp z-Transform on a real and imaginary signal.17

Arguments:

imag

imaginary signal.

cwtsize

the number of coefficients to return. Defaults to this.size.

step

ratio between points along the z-plane spiral contour of interest. Defaults to (0.0.complex(-2pi/cwtsize)).exp.

start

complex starting point on that contour. Defaults to 1.

NOTE: The default nil values of cwtsize, step, and start return the DFT.

.rczt(cwtsize, step, start)

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/SignalBox/Classes/extSignal.sc

Perform a Chirp z-Transform on a real signal.

Arguments:

cwtsize

the number of coefficients to return. Defaults to this.size.

step

ratio between points along the z-plane spiral contour of interest. Defaults to (0.0.complex(-2pi/cwtsize)).exp.

start

complex starting point on that contour. Defaults to 1.

NOTE: The default nil values of cwtsize, step, and start return the DFT.

Inherited instance methods

Undocumented instance methods

!=(aNumber)

==(aNumber)

.addChebyshev(harmonicNumber: 1, amplitude: 1.0)

.addSine(harmonicNumber: 1, amplitude: 1.0, phase: 0.0)

.asComplex

.asFloat

.asInteger

.asSignal

.asWavetableNoWrap

.chebyFill(amplitudes, normalize: true, zeroOffset: false)

.chebyFill_old(amplitudes)

.clip(lo, hi)

.fftCosTable

.firstArg(aNumber)

.fold(lo, hi)

.fold2(aNumber: 1)

.hanWindow

.imag

.ramp

.real

.rectWindow

.rotate(n: 1)

.scurve

.sineFill(amplitudes, phases)

.sineFill2(list)

.sqrsum(aNumber)

.triWindow

.welWindow

.wrap(lo, hi)

.zeroPad(minSize)

[1] - Smith, Steven W. “Windowed-Sinc Filters,“ in The Scientist and Engineer's Guide to Digital Signal Processing, https://www.dspguide.com/ch16.htm, online book, 2011 edition, accessed 2019-11-15.
[2] - Baird, J; Jackson, B; and D McGrath. “Raised Cosine Equalization Utilizing Log Scale Filter Synthesis.“ 117th Audio Engineering Society Convention, San Francisco, USA. October 2004. Permalink: http://www.aes.org/e-lib/browse.cfm?elib=12914
[3] - Weinzierl, S; Giese, A; and A Lindau. “Generalized Multiple Sweep Measurement.“ 126th Audio Engineering Society Convention, Munich, Germany. May 2009. Permalink: http://www.aes.org/e-lib/browse.cfm?elib=14963
[4] - S. Favrot and J. Buchholz. 2010. “Impact of Regularization of near Field Coding Filters for 2D and 3D Higher-Order Ambisonics on Auditory Distance Cues.” in Proc. of the 2nd International Symposium on Ambisonics and Spherical Acoustics. Paris.
[5] - J. Daniel. 2003. “Spatial sound encoding including near field effect: Introducing distance coding filters and a viable, new ambisonic format,” in Proc. of the 23rd International Conference of the Audio Engineering Society.
[6] - J. Ahrens and S. Spors. 2009. “Spatial encoding and decoding of focused virtual sound sources,” in Proc. of the 1st Ambisonics Symposium. Paris.
[7] - A sine function variation of the window proposed by Ahrens & Spors.
[8] - Sorensen, H, et al. “Real-Valued Fast Fourier Transform Algorithms.” IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. 35, no. 6, 1987, pp. 849–863.
[9] - Sysel, Petr, and Pavel Rajmic. “Goertzel Algorithm Generalized to Non-Integer Multiples of Fundamental Frequency.” EURASIP Journal on Advances in Signal Processing, vol. 2012, no. 1, 2012, pp. 1–8.
[10] - Smith, J.O. “Flip Operator,“ in Mathematics of the Discrete Fourier Transform (DFT) with Audio Applications, Second Edition, https://www.dsprelated.com/freebooks/mdft/Flip_Operator.html, online book, 2007 edition, accessed 2019-05-19.
[11] - Borss, C, and R Martin. “On the Construction of Window Functions with Constant-Overlap-Add Constraint for Arbitrary Window Shifts.” 2012 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2012, pp. 337–340.
[12] - Marple, L. “Computing the Discrete-Time ‘Analytic’ Signal via FFT.” IEEE Transactions on Signal Processing, vol. 47, no. 9, 1999, pp. 2600–2603.
[13] - Georgopoulos, V. C., Preis, D. “A Comparison of Computational Methods for Instantaneous Frequency and Group Delay of Discrete-Time Signals.” Journal of the Audio Engineering Society, vol. 46, no. 3, 1998, pp. 152-163.
[14] - Damera-Venkata, N, and B.L Evans. “Optimal Design of Real and Complex Minimum Phase Digital FIR Filters.” 1999 IEEE International Conference on Acoustics, Speech, and Signal Processing. Proceedings. ICASSP99 (Cat. No.99CH36258), vol. 3, 1999, pp. 1145–1148 vol.3.
[15] - Smith, J.O. “Even and Odd Functions,“ in Mathematics of the Discrete Fourier Transform (DFT) with Audio Applications, Second Edition, https://www.dsprelated.com/freebooks/mdft/Even_Odd_Functions.html, online book, 2007 edition, accessed 2019-05-19.
[16] - Childers, D.G, et al. “The Cepstrum: A Guide to Processing.” Proceedings of the IEEE, vol. 65, no. 10, 1977, pp. 1428–1443.
[17] - Rabiner, Lawrence R, et al. “The Chirp z-Transform Algorithm and Its Application.” The Bell System Technical Journal, vol. 48, no. 5, 1969, pp. 1249–1292.