Discrete Fourier style transform with non-sinusoidal/arbitrary waveform components A discrete Fourier transform will produce frequency samples sufficient to recreate the original time sampled signal from sinusoidal waveforms.
That works great as long as the original signal is actually composed of sinusoidal waveforms. Let's assume that we know a signal is composed of non-sinusoidal waveforms, under which assumption its decomposition may be simpler, such as triangular waveforms. Does a discrete Fourier style transform exist which will decompose the sampled signal into triangular, rectangular or other waveforms? Does such a transform exist for any arbitrary waveform?
For example, here is the FFT response of a 150 Hz pure sin wave sampled at 1024 Hz (courtesy numpy and matplotlib):

Here is the FFT of a 150 Hz pure sawtooth, again sampled at 1024 Hz:

It's desirable here to have a similarly &quot;clean&quot; transform using the assumption that the signal is composed of sawtooth waveforms. So my question, does a transform exist that would decompose the signal into some non-sinusoidal waveforms?
Any complete orthogonal set of functions can be used to represent any discrete function—just like trigonometric functions can be used to represent any continuous function in Fourier analysis. You can use &quot;triangular, rectangular or other waveforms&quot;, only mind those represent an orthogonal set. There is also a &quot;wavelet transform&quot;, see Wikipedia. For transforms using Walsh functions, the fast implementations exist: Fast Walsh-Hadamard transform.
For visualization of the concept, see images in Wolfram MathWorld pages:

downloaded from https://mathworld.wolfram.com/WalshFunction.html