Skip to main content

Topic: Loudest possible volume for an audio file? (Read 4381 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • WAZAAAAA
  • [*]
Loudest possible volume for an audio file?
So I would like to make a short audio file that has the virtually highest possible volume for the whole duration of it. How can I achieve that?

I'm trying some stuff with Audacity but I'm finding ways to make the volume higher and higher continuously.
Also, using lossless codecs such as WAV and FLAC gives a better result?

By the way, with all these tests... ouch my ears. Someone more knowledgable save me I don't want to test this anymore duh

  • Kohlrabi
  • [*][*][*][*][*]
  • Global Moderator
Loudest possible volume for an audio file?
Reply #1
I'm trying some stuff with Audacity but I'm finding ways to make the volume higher and higher continuously.
Also, using lossless codecs such as WAV and FLAC gives a better result?
The closest I can imagine you're looking for is to create a square wave with half the sampling frequency of your file, at an amplitude of 1.0. But what are you trying to achieve? And I don't understand the remark about lossless encoding, this is fairly orthogonal to that.

By the way, with all these tests... ouch my ears. Someone more knowledgable save me I don't want to test this anymore duh
Who is forcing you to do them? 
  • Last Edit: 21 June, 2013, 03:50:44 AM by Kohlrabi
It's only audiophile if it's inconvenient.

  • WAZAAAAA
  • [*]
Loudest possible volume for an audio file?
Reply #2
The closest I can imagine you're looking for is to create a square wave with half the sampling frequency of your file, at an amplitude of 1.0. But what are you trying to achieve? And I don't understand the remark about lossless encoding, this is fairly orthogonal to that.
What do you mean with "half the sampling frequency of my file"? I'm working with a 44100Hz file, should I switch to 22050?
Also, I've asked if lossless codecs were better because lossy codecs can... you know, reduce the quality of the audio and mess up with my file.

Does it make a difference if I use the Mono or Stereo option? What's the loudest?

I'm inexperienced in all of this, so excuse me if I'm asking stupid things. What I'm trying to achieve is having a file that I can use as a "joke".

Who is forcing you to do them?
No one, I was just joking and asking for support there.
  • Last Edit: 21 June, 2013, 04:03:17 AM by WAZAAAAA

  • db1989
  • [*][*][*][*][*]
  • Global Moderator
Loudest possible volume for an audio file?
Reply #3
By definition, the loudest possible amplitude is represented by a signal that consistently peaks at +1 and troughs at –1, a.k.a. 0 dBU/full scale, played through software and hardware stages all of which are set to maximal volume.

Beyond that, you can amplify the signal past those limits, but the exceeding peaks/troughs are clipped to flat tops at +/– 1. This can make the signal sound louder due to perceptual effects, but you sacrifice quality. This might explain why so many of the ‘shock’ sites have such distorted audio. Anyway, the perceptual increase in volume only applies to a certain point.

Before doing that, the first thing to try is to get a compressor and a limiter (maximiser) and process the file through those. This combination will squash out dynamics to make things louder on average. This is how many modern recordings are mistreated, sometimes even invoking pure clipping as described above: you might have heard of the ‘loudness war’.

Quote
What do you mean with "half the sampling frequency of my file"? I'm working with a 44100Hz file, should I switch to 22050?
Again, by definition, the highest frequency that can be represented by a digitally sampled file is just (actually, an infinitely small distance) below the sampling frequency (fs) divided by two. A frequency of fs/2 can ‘sort of’ be represented but not really, for it’s actually ambiguous. This is the Nyquist/Shannon sampling theorem.

And since I’ve mentioned a theorem just three paragraphs in : Short of just applying amplification to full scale and beyond, you might have to read up on some basics of digital audio. It depends how dedicated you are to this prank!  Perhaps a really effective one would also try to force all the recipient’s volume controls to full (or beyond?), but even if that were possible, it would involve a whole other set of skills.
  • Last Edit: 21 June, 2013, 04:14:32 AM by db1989

  • 2Bdecided
  • [*][*][*][*][*]
  • Developer
Loudest possible volume for an audio file?
Reply #4
Generate white noise, amplify by 100dB, save to a normal 16-bit wave file. That usually does the trick in most audio editors.

A 0dB FS 3.5kHz sine wave is the loudest pure tone (because human ears are most sensitive around 3.5kHz). Make it a square wave and it'll sound a little louder.

Take your pick.

Cheers,
David.

  • WAZAAAAA
  • [*]
Loudest possible volume for an audio file?
Reply #5
Thanks to everyone, especially to 2Bdecided, you're awesome, I now have what I needed. I played the file with VLC, set the player volume to 200%, and as expected, there was no audible difference I could notice when playing the file because it's already loud as hell. But hey, if I did something wrong I'm still open to your wisdom pills.

So I basically generated with Audacity a 10 seconds long note with these settings: Square Wave - 3500Hz Frequency - Amplitude 1, and this is the result:
http://www.mediafire.com/play/e77spkt7cmwi...withdespair.ogg

^Btw, it's not in WAV because for some reason the file would get corrupted, so I picked FLAC instead and it worked, but then I thought why don't I also try lossy codecs like MP3 and OGG for the sake of it. MP3's quality seemed pretty shitty even with the maximum settings, while with OGG the audio was virtually identical to the original and had a lower file size too, so I went for the excellent OGG.

Thank you again, hydrogenaudio is simply the best.
  • Last Edit: 21 June, 2013, 06:36:33 AM by WAZAAAAA

  • dhromed
  • [*][*][*][*][*]
Loudest possible volume for an audio file?
Reply #6
I played the file with VLC, set the player volume to 200%, and as expected, there was no audible difference


VLC +100% volume is a boost beyond 1, but if your OS is Windows 7 or 8, there's an intrinsic limiter active that can completely nullify that boost.

You could always social-engineer your victim into turning up their own volume, such as prefacing the sound with a whisper, or some quiet passages from classical music.
  • Last Edit: 21 June, 2013, 06:48:31 AM by dhromed

  • Kohlrabi
  • [*][*][*][*][*]
  • Global Moderator
Loudest possible volume for an audio file?
Reply #7
MP3's quality seemed pretty shitty even with the maximum settings, while with OGG the audio was virtually identical to the original and had a lower file size too, so I went for the excellent OGG.
MP3 was not designed to encode square waves/noise but music. Still, I wonder how you can assess the quality of MP3 encoding using a pure tone.
It's only audiophile if it's inconvenient.

  • WAZAAAAA
  • [*]
Loudest possible volume for an audio file?
Reply #8
VLC +100% volume is a boost beyond 1, but if your OS is Windows 7 or 8, there's an intrinsic limiter active that can completely nullify that boost.
Oh is that so. Well at the moment I'm on a Windows XP Service Pack 3, and if I change the player to 200% with other files, the volume increases.
You could always social-engineer your victim into turning up their own volume, such as prefacing the sound with a whisper, or some quiet passages from classical music.
Classic. For both the music genre and the method hah. I tell you not to worry about that, I know ways to implement the loud thing.



MP3 was not designed to encode square waves/noise but music. Still, I wonder how you can assess the quality of MP3 encoding using a pure tone.
I've played both the original and the MP3 versions, and the MP3 sounded different, the sound was slightly lower. I could confirm this by playing the FLAC and the OGG at the same time. If I played only OGG, the sound was the same as FLAC. If I played FLAC, the sound was the same of OGG. If I played both at the same time, there would be NO difference at all. But, if I played MP3 and FLAC at the same time, there would've been a pretty clear audible difference.

Additionally, it seems that the conversion to MP3 ate my first 50 milliseconds of the file, and made the file 30 milliseconds longer for some reason.
  • Last Edit: 21 June, 2013, 07:18:06 AM by WAZAAAAA

  • db1989
  • [*][*][*][*][*]
  • Global Moderator
Loudest possible volume for an audio file?
Reply #9
Clearly, an encoder cannot create audio where none existed to begin with, so the file has been shifted later in time and cut by at most 20 ms.

As for why? Probably well-known side-effects of MP3 as a format and/or a careless decoder in Audacity.

  • Porcus
  • [*][*][*][*][*]
Loudest possible volume for an audio file?
Reply #10
[...] sounded different, the sound was slightly lower.


That is why you align volume when you compare sound quality. Otherwise the slightly louder one tends to be perceived as better, everything else equal.

If you use foobar2000's ABX component, it will do volume alignment for you.


Additionally, it seems that the conversion to MP3 ate my first 50 milliseconds of the file, and made the file 30 milliseconds longer for some reason.


The MP3 format does, at the outset, not provide for any (integer) number of samples, only integer number of mp3 frames – anything else is achieved by retrofitted “hacks” to the format.

  • TomasPin
  • [*][*][*]
Loudest possible volume for an audio file?
Reply #11
Not long ago I made some experiments with applying ReplayGain values to MP3 files, as I was playing them on a feature phone with no support for those tags whatsoever. I found that if you edit the value of the track or album gain to, say, +10 or +20 decibels and then you apply that value to the file it sounds really loud without producing audible distortions when played back*. I read on the matter and found the reason for that is MP3 and most lossy audio codecs work in floating-point internally.

Perhaps you could download foobar2000 and try that. You'll have to hold shift when right-clicking the file to make the option to edit tag value show up under the ReplayGain context menu.

*Hope I'm not talking baloney here, everybody feel free to correct me.
  • Last Edit: 21 June, 2013, 04:00:40 PM by TomasPin
A man and his music: http://tubular.net/

  • saratoga
  • [*][*][*][*][*]
Loudest possible volume for an audio file?
Reply #12
Transform codecs do not use integer sample values internally, no, but the output to the DAC is ultimately going to be an integer. If boosting the volume up +20 dB didn't add clipping, you've probably got the "prevent clipping" option enabled in your replaygain program.

  • TomasPin
  • [*][*][*]
Loudest possible volume for an audio file?
Reply #13
Transform codecs do not use integer sample values internally, no, but the output to the DAC is ultimately going to be an integer. If boosting the volume up +20 dB didn't add clipping, you've probably got the "prevent clipping" option enabled in your replaygain program.


I was applying the value to the file (= changing the file), not using a ReplayGain-enabled program to play them. I don't know how foobar handles that, perhaps it does prevent the audio from clipping but wouldn't that mean it won't be as loud as they were? The files were originally peaking at 0 dbfs and had values of around -5db if I remember correctly (before I edited the tags).

Edit: And if most portable players (be it dedicated players or cellphones, smartphones, etc) output in integer values, don't they truncate the peaks above 0db? If so it should have sounded terribly distorted, and it did not (well, not terribly). Interesting...
  • Last Edit: 21 June, 2013, 06:04:17 PM by TomasPin
A man and his music: http://tubular.net/

  • WAZAAAAA
  • [*]
Loudest possible volume for an audio file?
Reply #14
That is why you align volume when you compare sound quality. Otherwise the slightly louder one tends to be perceived as better, everything else equal.
Well, in my specific case, louder=better

If you use foobar2000's ABX component, it will do volume alignment for you.
That's what I just did, and well it was already hard to distinguish between the before two but now it was impossible

  • Woodinville
  • [*][*][*][*][*]
Loudest possible volume for an audio file?
Reply #15
So I would like to make a short audio file that has the virtually highest possible volume for the whole duration of it. How can I achieve that?

I'm trying some stuff with Audacity but I'm finding ways to make the volume higher and higher continuously.
Also, using lossless codecs such as WAV and FLAC gives a better result?

By the way, with all these tests... ouch my ears. Someone more knowledgable save me I don't want to test this anymore duh


Do you want the highest energy or the highest loudness?
-----
J. D. (jj) Johnston

  • db1989
  • [*][*][*][*][*]
  • Global Moderator
Loudest possible volume for an audio file?
Reply #16
That is why you align volume when you compare sound quality. Otherwise the slightly louder one tends to be perceived as better, everything else equal.
Well, in my specific case, louder=better
Yes, but what Porcus means is that there is also a well-known psychoacoustic phenomenon whereby people judge subliminally louder versions of otherwise identical signals as sounding better.

Quote
If you use foobar2000's ABX component, it will do volume alignment for you.
That's what I just did, and well it was already hard to distinguish between the before two but now it was impossible
Q.E.D.

  • jkauff
  • [*][*][*]
  • Members (Donating)
Loudest possible volume for an audio file?
Reply #17
This is interesting to me because I bought a new car that can play MP3 and AAC files, but doesn't support Replay Gain. I have quite a few files that are not loud enough when I'm driving with the windows open, especially classical guitar recordings.

  • stephan_g
  • [*][*][*][*]
Loudest possible volume for an audio file?
Reply #18
They weren't smart enough to include a dynamic range compressor in the radio? Having to keep a second DRC'd version of stuff is such a hassle.

I probably would resort to using the analog input with some Rockbox'd player, using RB's built-in compressor.
My little "blogalike":
http://stephan.win31.de/music.htm

  • knutinh
  • [*][*][*][*][*]
Loudest possible volume for an audio file?
Reply #19
The (e.g. CD) format itself is amplitude-limited to +/- "1", allowing for inter-sample overshoots depending on the D/A-converter/resampler used at the receiver.

So the question can perhaps be formulated as "how much perceived loudness can a waveform that is amplitude-limited cause?". For that, a square-wave that has its fundamental right in the most sensitive part of our hearing (like suggested by 2BDecided) sounds like a good starting-point. 

Not sure how that compares to white noise that has been bandpass-filtered by the inverse of the C-weighted sensitivity curves, then amplified until some undetermined amount of samples are clipped at +/-1?

-k