[chuck-users] Using Wavelet Transform

fernando alonso lualobus at gmail.com
Mon May 13 12:48:09 EDT 2013


Hi guys,

I have implemented the Wavelet Transform in Chuck (to work with it moreover
of FFT, etc). The code is:

fun int[] discreteHaarWaveletTransform( int input[]){

    int sum, difference,length,i;

    int  output[input.cap()];

     for ( (input.cap() >> 1) => length ; true ;  (length >> 1) => length) {

        for (0 => i; i < length; ++i) {

            input[i * 2] + input[i * 2 + 1] => sum;

            input[i * 2] - input[i * 2 + 1] => difference;

            sum => output[i] ;

            difference => output[length + i];

        }

        if (length == 1) {

            return output;

        }

         //Swap arrays to do next iteration

        for (0=>i; i < (length<<1); i++){

            output[i] => input[i];

        }

    }

}




The only one problem is that I don't know how get from adc the values of
the microphone input signal. I don't want to use FFT or similar. My
implementation of Haar Wavelet Transform need this values.


Anybody knows how get its?

Thanks so much.


-- 
Fernando Alonso Martín
Lualobus at gmail.com
http://roboticnaturalinteraction.com<http://www.roboticNaturalInteraction.com/famartin.html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20130513/6a5ed9ea/attachment.htm>


More information about the chuck-users mailing list