These opcodes present variations on the following transforms:
Haar,
Walsh/Hadamard
Cosine
At current the opcodes will function simply and similar to the fft and fftinv
opcodes in Csound - ie, the user must implement windowing and ksmps in respect
to the desired analysis.
These are experimental and exact usage/manipulation of the functions is subject
to some testing so there may be further development to make the opcodes more
usable.
Tested on Linux with Csound 6.14
mkdir build && cd build
cmake ..
make
sudo make install
Each of the following opcodes receives and emits a k-rate array. The size of the
input array should be a power of two. The output size will match the input.
Cosine transform. Notably slow (probably not for realtime usage)
Inverse cosine transform. As Above
Haar transform, algorithm 1
Inverse Haar transform, algorithm 1
Haar transform, algorithm 2
Inverse Haar transform, algorithm 1
Walsh/Hadamard transform, algorithm 1
Walsh/Hadamard transform, algorithm 2
Inverse Walsh/Hadamard transform, algorithm 2
Code, inspiration and relevant licensing has been derived from the following:
https://people.sc.fsu.edu/~jburkardt/f_src/walsh/walsh.html
https://people.sc.fsu.edu/~jburkardt/f_src/haar/haar.html
https://people.sc.fsu.edu/~jburkardt/f_src/cosine_transform/cosine_transform.html
https://github.com/mochow13/competitive-programming-library/blob/master/Math/Fast%20Walsh-Hadamard%20Transform.cpp
Todo / possibly forthcoming
Implement Daubechies wavelets, sine transform.