testing test
Member level 3
Hi,
I am trying to convert a .wav file which has negative floating point samples as well to binary. However, when I apply the following code, it do change all the samples to positive and non floating point integer values, but the .wav file becomes too much distorted.
There is so much noise in the retrieved signal. What I actually want is to convert the original .wav file to binary samples with minimum noise. Can anyone provide improvement to my following code:
I am attaching the .wav file as well. Please help me out.
Thank you.
I am trying to convert a .wav file which has negative floating point samples as well to binary. However, when I apply the following code, it do change all the samples to positive and non floating point integer values, but the .wav file becomes too much distorted.
There is so much noise in the retrieved signal. What I actually want is to convert the original .wav file to binary samples with minimum noise. Can anyone provide improvement to my following code:
Code:
clc, clear all;
[x,fs,nbits]=wavread('test.wav');
y=((2^(nbits-1)*x(:,1)));
bin=str2num(dec2bin((y<0)*256+y));
wavplay(bin);
I am attaching the .wav file as well. Please help me out.
Thank you.