[chuck-users] Get audio samples of adc
fernando alonso
lualobus at gmail.com
Fri Jun 7 12:05:40 EDT 2013
Thanks for the fast reply. I have write this code:
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];
}
}
}
For this reason I need the int input [] array relating to adc input
samples. I need to extract the "raw" values of the input (without
FFT). I have test with something like that:
adc.chan(0) => UGen inputMic;
Thanks for the help!
2013/6/7 Aurélien Bondis <abondis at kerunix.com>:
> Hi,
> I don't know what a wavelet transform is, but can't 'adc =>' work ? or
> 'LiSa' do what you need?
> (http://chuck.cs.princeton.edu/doc/program/ugen_full.html#LiSa)
> Sorry if I did not understand the question...
> Aurélien.
>
> On Fri, 07 Jun 2013, fernando alonso wrote:
>
>> Hi,
>>
>> I want to program de Wavelet Transform, and for it I need to get the
>> audio samples. Do you know some way to get the audio samples?
>>
>>
>> Thanks.
>>
>> --
>> Fernando Alonso Martín
>> Lualobus at gmail.com
>> http://roboticnaturalinteraction.com
>> _______________________________________________
>> chuck-users mailing list
>> chuck-users at lists.cs.princeton.edu
>> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
--
Fernando Alonso Martín
Lualobus at gmail.com
http://roboticnaturalinteraction.com
More information about the chuck-users
mailing list