Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem converting wav file to binary in MATLAB

Status
Not open for further replies.

testing test

Member level 3
Joined
Mar 3, 2010
Messages
65
Helped
5
Reputation
10
Reaction score
3
Trophy points
1,288
Activity points
1,656
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:

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.
 

Hi,

chekc these links below,

converting wav files into binary form using matlab




matlab convertion from .wav to binary
 

Can anyone please suggest me a code? I am not able to get any useful information from hanif's provided links.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top