Messed Up Vinyl

Effects, Recipes, Interfacing with other software, etc.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
GBleaney
Posts: 7
Joined: Thu May 12, 2011 1:23 am
Operating System: Please select

Re: Messed Up Vinyl

Post by GBleaney » Sat May 14, 2011 8:37 pm

I've decided to give SoX a try. Unfortunately, I downloaded and installed it, but how do I actually use it? Command Prompt hasn't had the sox command added to it like it would be in the linux terminal, and I can't seem to find any sort of custom command line that came with the Sox program. (the sox.exe file just opens then immediately closes)

GBleaney
Posts: 7
Joined: Thu May 12, 2011 1:23 am
Operating System: Please select

Re: Messed Up Vinyl

Post by GBleaney » Sat May 14, 2011 8:40 pm

I figured out how to get SoX to work, but I'm now having these errors:

sox FAIL util: Unable to load MAD decoder library (libmad).
sox FAIL formats: can't open input file `C:sox-14-3-21 Memory.mp3':

steve
Site Admin
Posts: 81627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Messed Up Vinyl

Post by steve » Sun May 15, 2011 7:41 pm

MAD decoder is required to decode MP3 files. You could use your favourite MP3 decoder program to convert the MP3s to WAV, then use SoX on the WAV files. I know it's an extra step, but probably quicker than sorting out why libmad isn't loading.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

GBleaney
Posts: 7
Joined: Thu May 12, 2011 1:23 am
Operating System: Please select

Re: Messed Up Vinyl

Post by GBleaney » Mon May 16, 2011 1:59 am

Just thought I would let you all know that I found a way to compile sox with mp3 support, in the form of a wonderful guide:
http://www.codeproject.com/KB/aspnet/Co ... _Lame.aspx

The author also includes a pre-compiled version to save work, if your a trusting kind of person.

Thanks to all that have helped me!

steve
Site Admin
Posts: 81627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Messed Up Vinyl

Post by steve » Mon May 16, 2011 5:00 pm

There's also a note about it in the release notes:
http://sox.git.sourceforge.net/git/gitw ... 32;hb=HEAD
85 Appendix - MP3 Support
86 ----------------------
87
88 SoX contains support for reading and writing MP3 files but does not ship
89 with the DLL's that perform decoding and encoding of MP3 data because
90 of patent restrictions. For further details, refer to:
91
92 http://en.wikipedia.org/wiki/MP3#Licens ... ent_issues
93
94 MP3 support can be enabled by placing Lame encoding DLL and/or
95 MAD decoding DLL into the same directory as SOX.EXE. These
96 can be compiled yourself, they may turn up on searches of the internet
97 or may be included with other MP3 applications already installed
98 on your system. For encoding/writing, try searching for lame-enc.dll,
99 libmp3lame-0.dll, libmp3lame.dll, or cygmp3lame-0.dll. For
100 decoding/reading, try searching for libmad-0.dll, libmad.dll or cygmad-0.dll.
101
102 Instructions are included here for using MSYS to create the DLL's.
103 It is assumed you already have MSYS installed on your system
104 with a working gcc compiler. The commands are ran from MSYS
105 bash shell.
106
107 Obtain the latest Lame and MAD source code from approprate locations.
108
109 Lame MP3 encoder http://lame.sourceforge.net
110 MAD MP3 decoder http://www.underbit.com/products/mad
111
112 cd lame-398-2
113 ./configure --disabled-static --enable-shared
114 make
115 cp libmp3lame/.libs/libmp3lame-0.dll /path/to/sox
116
117 MAD libraries up to 0.15.1b have a bug in configure that will not allow
118 building DLL under mingw. This can be resolved by adding LDFLAGS
119 to configure and editing the generated Makefile to remove an invalid
120 option.
121
122 cd libmad-0.15.1b
123 ./configure --enable-shared --disable-static LDFLAGS="-no-undefined"
124 [edit Makefile, search for "-fforce-mem" and delete it.]
125 make
126 cp libmad-0.dll /path/to/sox/
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply