Systems

vsignal

Signal processing basics, including a plain discrete Fourier transform.

Released v1.0.0 · 2026-09-28
Import
use "stdlib/signal.ven"
vsignal.ven
print discrete_fourier_transform([1.0, 1.0, 1.0, 1.0])
Reference (8 functions)

API reference

discrete_fourier_transform(samples)

Computes the Discrete Fourier Transform of samples by direct summation.

discrete_fourier_transform([1.0, 1.0, 1.0, 1.0])

inverse_discrete_fourier_transform(spectrum)

Reconstructs a real-valued signal from spectrum via the inverse DFT sum.

inverse_discrete_fourier_transform([(4.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0)])

convolve(signal, kernel)

Computes the full linear convolution of signal with kernel.

convolve([1.0, 2.0, 3.0], [0.0, 1.0])

cross_correlate(a, b)

Computes the full cross-correlation of a against b.

cross_correlate([1.0, 2.0, 3.0], [1.0, 0.0])

moving_average_filter(signal, window)

Smooths signal with a simple sliding-window average.

moving_average_filter([1.0, 2.0, 3.0, 4.0], 2)

low_pass_filter(signal, window)

Approximates a low-pass filter with a moving-average box filter.

low_pass_filter([1.0, 2.0, 3.0, 4.0], 2)

power_spectrum(signal, sample_rate)

Computes the one-sided power spectrum of signal at sample_rate.

power_spectrum([1.0, 1.0, 1.0, 1.0], 4.0)

find_peaks(signal, min_height)

Finds the indices of local maxima in signal above min_height.

find_peaks([1.0, 5.0, 2.0, 8.0, 3.0], 3.0)

Get notified when vsignal changes

Get notified about

New versions and security advisories.

New and updated packages, once a day.

News on the math model built in Venutian.