Ardour and MP3

I had written an article here about using MP3 files with Ardour. Our Linux users often ask why they can't import MP3 files. The article explained the licensing issues that make that tricky, and then went on to explain why using MP3 (or other lossy compression format) files as source material in a project is a bad idea. I am still very strongly convinced that it continues to be a bad idea, but it seems counter-productive to have that debate in this context. I have left everyone's comments in place for those who want to read them.

This is correct and

This is correct and good.

Programs should educate people, like a teacher.

I have studied sound

I have studied sound engineering and as part of it i have also done radio production. The amount of students i have seen using mp3 files, completely not understanding what you just said (having been taught about it), is truely unbelievable . As part of it i did some work experience in a radio station. Spending time with some of the presenters was amazing. Most of them are serious audiophiles and know their stuff. Having said that, a lot of people there felt that an audio file was an audio file. I had some stuff come to me that was in 128kb/s mp3 format. I once had someone (who should have known better) ask what an .aiff file was, as they recieved it for advertising, and were having trouble using it.

I find the best way to explain lossy audio formats is to compare them to lossy image formats. If you have a high quality image and compress it to jpeg, it'll look ok the first time (depending on the compression) but if you do it again you'lll start to see the degradation. It's the exact same with audio formats. People just don't seem to understand this unfortunately.

@LeatusPenguin: There seem to

@LeatusPenguin: There seem to be a lot of things in the audio world which people don't understand, or perhaps more likely are incorrectly informed about. This is often exploited to a greater or lesser extent by "snake-oil" marketing techniques, which unfortunately makes it more difficult to sell a product which genuinely does have some innovative new technology... (e.g. If adding a gold plated AC power cable, or 'directional' speaker wiring really does improve the sound of an amplifier, then its a very badly designed amp...)
As someone who appreciates high quality audio, I've always regretted that mp3 has now become the accepted 'standard' for audio distribution (I've also heard of people trying to use mp3 files as impulse responses for convolution reverbs etc, which is just.. wrong)
I'm hoping that lossy / compressed formats will eventually just go away as storage capacity and bandwidth get greater, but I'm not optimistic..

@linuxdsp: unfortunately,

@linuxdsp: unfortunately, gone are the days of well set up music systems that their owners took pride in. People are now happy enough to listen to their favourite songs on youtube through computer/laptop speakers.

I read about a survey done by some professor. His conclusion was that people are getting so used to the sound of mp3's that in tests they actually preferred them.

It's frustrating seeing where things are going. How many times have you come across a video on youtube that is badly pixelated and has dreadful audio quality cause the uploader downloaded the footage online, threw it into a video editor and exported it in a compressed format, further degrading it's quality. Unfortunately to most people if it sounds like an audio file, it is an audio file.

http://arstechnica.com/apple/

http://arstechnica.com/apple/news/2012/02/mastered-for-itunes-how-audio-engineers-tweak-tunes-for-the-ipod-age.ars/1

Hi Paul, Wouldn't the

Hi Paul,
Wouldn't the recompression problem you cite as the main reason to avoid mp3 source material apply to all lossy formats?

@jancsika: yes, the same

@jancsika: yes, the same problem exists for AAC, Vorbis and all other lossy compression formats. We support Vorbis mostly as a side-effect of support for it existing in libsndfile, which does all our audio I/O on Linux.

This makes me realize that the article is not entirely accurate, because on OS X, Ardour does handle MP3 files - also a side effect of support for it being present in Apple's CoreAudio libraries. I'll need to correct that.

@paul: wouldn't it be better

@paul: wouldn't it be better to attack the problem exclusively at the output side? No mp3s in + lossy format out = severe limits on source material and passing problem on to the next generation (i.e., vicious cycle). But mp3s in + lossless format out = no limits on source material and no problems for next generation IF no one else outputs using lossy format (i.e., virtuous cycle).

btw-- I have the "remix"

btw-- I have the "remix" culture in mind, which does start to blur the line between professional projects and consumer ones.

Why don't you do it like

Why don't you do it like DigiKam does it for pictures? Great big warning window popping up when you save something to a lossy format. Could be the same in Ardour: When importing lossy format audio, big warning. Exporting to MP3 and OGG/Vorbis would be a nice service, though. Much more useful than importing MP3.

But in both cases, lame and mpg123 allow you to do the evil thing anyways. Just one step more away. Which is not to say that anybody should do it. Consider using FLAC if you need to shrink audio data.

@DrNI: ardour3 already does

@DrNI: ardour3 already does export to Vorbis and FLAC.

great article Paul! this is

great article Paul!
this is one of the things people always get wrong...

I start to save my audio in .flac , also because i can put tags to find it again, especially filmsound stuff like foleys , ambients and so on. but i m also worried if .flac is future proof and how to convert it the best way. there s audacity and soundconverter if i want to convert outside of ardour (usually i export .wav...) some advice for archiving? maybe that s not the place to ask specific questions for archiving and i should start a new thread...

begins with the usual excuses

begins with the usual excuses for the online translation.
said this:
is a complicated issue, but the main thing is how it is used the mp3 file, if you take an mp3 file and re-exports to mp3 without working it'll definitely problems, but if you take an mp3 file, it works in the mix and I go back there add another to reconstruct music from a capione here is that the situation changes completmente.
inanzi all because the sample we will probably put a set of plugins designed to improve the sound, not its full dynamic range of course, but there are a number of machines dedicated to the psycho who would do their dirty work in the most appropriate compression of signal format, or expansion eq and reverb more as soon as dilay inserting the mp3 file in the musical context here is the quality of quell'mp3 entirely different. then maybe a guitar or other instruments recorded the quality of that sample is improved by signal components of the material recorded live.
more in the studio I work a lot with hip hop and I often get people with the bases loaded from the web in mp3, and just as frequently downloaded from youtube, what am I supposed to do, say, no I do not agree to work hard because I want your just beat in wave? would be counterproductive for me too because I would lose customers.
in more than one would like to point out that thè already the 16-bit format waw loses signal quality, as percepaimo up to twenty-four bits of dynamic range, is that the vinyl record has a dynamic range similar to that mp3. However, the vinyl record is universally accepted by all and if you use the sample from vinyl you're considered an expert, if you use the hand mp3're considered a rookie ...
the ideal thing to do and maybe you do import in mp3 format, but the bounce do so only as a wave formats suitable for 16-bit discs

begins with the usual excuses

begins with the usual excuses for the online translation.
said this:
is a complicated issue, but the main thing is how it is used the mp3 file, if you take an mp3 file and re-exports to mp3 without working it'll definitely problems, but if you take an mp3 file, it works in the mix and I go back there add another to reconstruct music from a capione here is that the situation changes completmente.
inanzi all because the sample we will probably put a set of plugins designed to improve the sound, not its full dynamic range of course, but there are a number of machines dedicated to the psycho who would do their dirty work in the most appropriate compression of signal format, or expansion eq and reverb more as soon as dilay inserting the mp3 file in the musical context here is the quality of quell'mp3 entirely different. then maybe a guitar or other instruments recorded the quality of that sample is improved by signal components of the material recorded live.
more in the studio I work a lot with hip hop and I often get people with the bases loaded from the web in mp3, and just as frequently downloaded from youtube, what am I supposed to do, say, no I do not agree to work hard because I want your just beat in wave? would be counterproductive for me too because I would lose customers.
in more than one would like to point out that thè already the 16-bit format waw loses signal quality, as percepaimo up to twenty-four bits of dynamic range, is that the vinyl record has a dynamic range similar to that mp3. However, the vinyl record is universally accepted by all and if you use the sample from vinyl you're considered an expert, if you use the hand mp3're considered a rookie ...
the ideal thing to do and maybe you do import in mp3 format, but the bounce do so only as a wave formats suitable for 16-bit discs

I think the cause is good and

I think the cause is good and lossy input should be avoided but it would be handy to drop something lossy at a track to use as template or model for a project. The lossy audio track would be ditched later on before exporting the real content.

I tend to think that lossy formats could be a good thing if one knows the limitations.

I only use flac for my own ripped music and compressed projects but I would use the lossy import for temporary tracks during the process if that would be possible.

I can live with no mp3 for the cause of education others :-)

I think it's a useful thing

I think it's a useful thing to import them but after running a daw own the copyright in the format conversion (wave or the one used by daw) so you are able to work on a track of an uncompressed format, but being able to use compressed formats

@DrNI Great big warning

@DrNI

Great big warning windows popping up? I hope I won't live to see the day.

Wow, flashback! @Paul: do you

Wow, flashback!
@Paul: do you remember this? https://ardour.org/node/777 , time flies...

I don't want to sound harsh but i feel there is some personal bias here, and maybe also a bit of apologism for the fact that libsndfile does not support mp3. Also the argument about lossiness is a bit week as Ardour now supports other lossy formats.

Personally I agree that it is unwise to use lossy formats, but often software is used in other ways than what the developer intended.

OSS have a great tradition of mixing politics and personal opinions with software. End users are usually very pragmatic, and find this really unappealing. But kudos for having the balls to try to do something to educate the public, most commercial sw providers don't feel that they can afford that.

@LeatusPenguin: I am really amazed over what people will accept. I caught my son listening to songs on youtube and felt I had been a bad parent :)

@froh: would it be clearer if

@froh: would it be clearer if i retitled it "Why you should not even think about using lossy compression formats as source material when working with Ardour (even if you can) ?" ....

It is handy when I'm on a

It is handy when I'm on a slow/mobile connection to be able to receive an MP3, do some edits and then send an edited project file back to whoever has the uncompressed files, who can then import those into a project file to create masters.

But I can convert the MP3 to a wav manually before importing to do that.

@tgoose - converting mp3 to

@tgoose - converting mp3 to wav will end up in unwanted artefacts no matter how good the algorithm that you use is. that is just what the originally post is saying.

cheers,

doc

@nowhiskey: I think what he

@nowhiskey: I think what he meant was sending the .ardour project file to the one who has the uncompressed files.

ok, but i am not sure if

ok, but i am not sure if ardour would think that the file 'guitar.wav' is the same as the file 'guitar.mp3' (or flac or what ever).

but yes, it should be possible to replace the files manually. but that could be a lot of tricky work.

i do not need to import mp3's but exporting to that format would be good, when doing some test exports in the middle of a proces of mixing/mastering.

cheers,

doc

the C.L.A/nowhiskey.: Yeah,

the C.L.A/nowhiskey.: Yeah, that is what I meant (although I wasn't talking about Ardour specifically since I have not done it and I'm not aware of how it would be done, which is why my wording may have been a bit vague or misleading... sorry!). Just wanted to point out that there are some workflows where using MP3s can make things quicker without affecting the final audio quality.

I'm aware of the problems that can arise from using MP3s/lossily compressed files directly at any stage (although to be achingly precise, it's not actually the conversion to WAV that causes artifacts).

regarding exchanging MP3/ogg,

regarding exchanging MP3/ogg, or even FLAC, as "quick and dirty" exchange format for tracks, one problem would be the scaling: Ardour uses floating-point WAV so there's no "hard 0db" limit to how loud a track can be, or any sort of real "bit quantisaton danger" level.

So at least you'd have to normalise and bounce each segment of audio before compressing it.

It might be a nice thing to have automated with "Ardour Session Exchange", as an option (not sure if ASE has been brought up to date with ardour3 or even ardour2).
It would remain "Quick&Dirty" even with FLAC since it would compromise quality because you have to convert to 16bit integer audio.

@Seb: According to Wikipedia

@Seb: According to Wikipedia FLAC can do from 4 to 32 bits, but only fixed- not floating-point. I've been using 24 bit FLAC myself.

Wavpack on the other hand can do 32 bit floating-point as well.

Regarding the usage of lossy

Regarding the usage of lossy formats: I've been working on a collaborative project where we exchanged our guiding tracks in a lossy format to keep the traffic and space on our server low. Only the final tracks would be uploaded in 24 bit lossless format.

So there is certainly some use for lossy formats, but personally I try to stick to a format wich is not patent encumbered, when possible.

I understand what you're

I understand what you're saying, but I don't agree with your approach. One point I feel you're not taking seriously enough is that people may be used to using MP3 files - as you say, other tools support it. Or people may wish to work with their MP3 collection when they are just starting out.

The lack of support becomes an extra barrier that may help put them off trying out Ardour in the first place. They may instead choose another tool, and never become an Ardour user.

I think that you've got to ask yourself what is more important to you: getting Ardour in the hands of more users (and therefore, I might add, the chance of more development income) or educating people about lossy file formats in sound production. Deliberately avoiding supporting MP3 for reasons of principle has no benefit for Ardour, only potential downsides. And I would argue that even for the latter cause it would be better to get these errant users working with Ardour and educate them from within the program, rather than take any steps that will reduce the chance of them seeing Ardour in the first place.

Of course, when it's a question of allocating precious development hours then that's another matter (and of course it always is), and there is the licensing issue.

Anyway, it is your call and I respect your opinion, I hope you will not be offended by this comment.

Well, I think Paul is wize to

Well, I think Paul is wize to stick to his principles - keeping a solid clean basis. As is clearly evidenced by some of the examples found in "Made with Ardour" , high quality sound can be attained using Ardour. That is a key point and a (the) raison d' etre of Ardour.

I think processing (sampling) of MP3 files is mosly relevant within genres of music where noise is considered a quality in itself.

@justyn: given that Ardour on

@justyn: given that Ardour on OS X does, in fact, support the use of MP3 files as part of the editing & mixing workflow, I don't think its much of a barrier. In fact, the existence of this article is probably now a bigger issue than anything technical. I don't believe that Ardour's lack of MP3 support on Linux represents much, if any, missing potential revenue, and whatever tiny amount it might be is over-ruled by the actual argument I presented above.