EmbeddedRelated.com
Forums

Audio - Wav format

Started by Unknown November 26, 2012
Hello!

I'm working with msp430f2619. I'm using it to sample audio. Fs is equal to
20K Hz, working with 96K B sample.

1) When playing back my low-frequency sampled signal (from 20 to 200 Hz
BW), the audio is crackling, full of clicks....

2) When sampling my voice (just to check if wav algorithm is ok) i can hear
the phrase i just recorded (it's not the best audio record in the world,
but i can understand my phrase)....

QUESTION:

Does the WAV format depends on the bandwidth of the signal? In other words:
Does the quality of the WAV sound is based on how long is the BW or not??

Thx!!

Fero


Beginning Microcontrollers with the MSP430

Hello!

Just ot get right, found my mistake:

I was working with data length double (32 bits), when i've should worked
with int (16 bits).

Cheers!!

Fero
On Mon, Nov 26, 2012 at 2:35 PM, Fero Santos wrote:

> Hello!
>
> I'm working with msp430f2619. I'm using it to sample audio. Fs is equal to
> 20K Hz, working with 96K B sample.
>
> 1) When playing back my low-frequency sampled signal (from 20 to 200 Hz
> BW), the audio is crackling, full of clicks....
>
> 2) When sampling my voice (just to check if wav algorithm is ok) i can
> hear the phrase i just recorded (it's not the best audio record in the
> world, but i can understand my phrase)....
>
> QUESTION:
>
> Does the WAV format depends on the bandwidth of the signal? In other
> words: Does the quality of the WAV sound is based on how long is the BW or
> not??
>
> Thx!!
>
> Fero
>


Nice work,Fero!

Coop, AA1WW

________________________________
> To: m...
> From: f...@gmail.com
> Date: Mon, 26 Nov 2012 14:49:34 -0200
> Subject: [msp430] Re: Audio - Wav format
>
>
>
> Hello!
>
> Just ot get right, found my mistake:
>
> I was working with data length double (32 bits), when i've should worked
> with int (16 bits).
>
> Cheers!!
>
> Fero
>
> On Mon, Nov 26, 2012 at 2:35 PM, Fero Santos
> >wrote:
>
> > Hello!
> >
> > I'm working with msp430f2619. I'm using it to sample audio. Fs is equal to
> > 20K Hz, working with 96K B sample.
> >
> > 1) When playing back my low-frequency sampled signal (from 20 to 200 Hz
> > BW), the audio is crackling, full of clicks....
> >
> > 2) When sampling my voice (just to check if wav algorithm is ok) i can
> > hear the phrase i just recorded (it's not the best audio record in the
> > world, but i can understand my phrase)....
> >
> > QUESTION:
> >
> > Does the WAV format depends on the bandwidth of the signal? In other
> > words: Does the quality of the WAV sound is based on how long is the BW or
> > not??
> >
> > Thx!!
> >
> > Fero
> >
>
>
>
>
>

On Mon, 26 Nov 2012 14:49:34 -0200, you wrote:

>Hello!
>
>Just ot get right, found my mistake:
>
>I was working with data length double (32 bits), when i've should worked
>with int (16 bits).
>
>Cheers!!
>
>Fero

I would have NEVER guessed this problem, had I tried to think
of some explanation. That kind of mistake isn't something I'd
imagine. Glad you found it!

Jon
Yeah, it really anoyed me....

What happens is that my msp saves audio data in a sd card. Those data are
saved not as int, but as a pair of chars. My matlab has to open the txt
file, check for encoding differences and then process data as an integer
(algorithm to make two chars and 1 integer).

When transforming data back to 16 bits long, Matlab automatically saved it
as a double vector (don't know why, because data is restricted to 4095).
Matlab's wavwrite cmd was pre-setted as signed int 16 bits. Just made the
transformation from double (taking off the DC value from signal, 2048) to
signed int and the sound played clear and smooth!

Cheers all!

Fero
On Mon, Nov 26, 2012 at 7:57 PM, Jon Kirwan wrote:

> **
> On Mon, 26 Nov 2012 14:49:34 -0200, you wrote:
>
> >Hello!
> >
> >Just ot get right, found my mistake:
> >
> >I was working with data length double (32 bits), when i've should worked
> >with int (16 bits).
> >
> >Cheers!!
> >
> >Fero
>
> I would have NEVER guessed this problem, had I tried to think
> of some explanation. That kind of mistake isn't something I'd
> imagine. Glad you found it!
>
> Jon
>
>
>