Encoding the signal with 16 bits

I have a sound wave
I have a code
[f,Fs] = wavread('wolf.wav');
sound(f, Fs);
please tell how to encode the soundwave by 16 bits

回答(1 个)

Wayne King
Wayne King 2012-9-13
编辑:Wayne King 2012-9-13
Have you tried using the 'native' option when you read the data.
[f,Fs] = wavread('wolf.wav','native');
class(f)

7 个评论

Thanks Wayne i Tried
[y, fs, nbits]=wavread('wolf.wav');
y0=y*(2^nbits/2)+(2^nbits/2);
but i get class as double ,can u tell where i made mistake plz
Did you try using the 'native' option as I suggested? See my example.
Pat
Pat 2012-9-13
编辑:Pat 2012-9-13
As per your code the class is int16
[f,Fs] = wavread('wolf.wav','native');
class(f)
i tried by
[f1,Fs1] = wavread('wolf.wav');
y0=f1*32768 ,i get the same values
the minimum and maximum values are same for y0 and f
but the class is different ,i get class as double
i tried this code because i need for 14bit also ,
please help
Thanks walter,for decomposing a soundwave wave by dwt haar wavelet i tried
[c,l] = wavedec(f,1,'Haar');f is my sound signal,is it correct
I am not familiar with the wavelet functions.
ok walter Thanks

请先登录,再进行评论。

类别

标签

提问:

Pat
2012-9-13

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by