« Return to Thread: Reverse nibbles

Re: Reverse nibbles

by Rob Sykes :: Rate this Message:

| View in Thread





From: Jan Stary <hans@...>
To: sox-users@...
Sent: Saturday, 3 March 2012, 8:18
Subject: Re: [SoX-users] Reverse nibbles

All this leads Miroslav to conclude that possibly
the -N parameter is only honored on the INPUT file.

That is probably not true, given the verbose output above.
Can someone please shed some light on this?
I'm afraid Miroslav is correct; here is something that shows the problem:

r="-r 11025"
sox $r -n in.wav synth gain -3 fade h .1 2 .1

sox -R in.wav test1.vox
sox -R in.wav -N test2.vox
cmp test[12].vox

(no output: the files are the same).

Here is a quick-and-dirty work-around:

sox -R in.wav -t vox - | sox -N -t u8 -c 1 -r 8k - -t u8 test2.vox

play $r test1.vox $r -N test2.vox


Also, is there a way to tell whether a VOX file has
nibbles reversed beside listening to it with/without -N?
Not guaranteed, but you can try this:

$ sox -r8k test2.vox -n
sox WARN adpcms: test2.vox: ADPCM state errors: 272

The warning about ADPCM state errors is a good indication that the file is invalid in some way, which could well be nibble reversal.

Cheers,
Rob


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

 « Return to Thread: Reverse nibbles