Not quite sure how to even ask this question as I'm new to GW

GoldWave general discussions and community help
Post Reply
New2GW
Posts: 2
Joined: Tue Apr 06, 2021 2:27 am

Not quite sure how to even ask this question as I'm new to GW

Post by New2GW »

In theory it should be easy but I must be doing something wrong.
It's this:

I have an MP3 audio track that I want to copy/layer/merge/unsure of term on top of itself multiple times, it's a problem I've been tasked with. So each time I mix one track onto itself I have to save it as a wav because it farts out while trying to save as MP3, so I save the wav, then open that with GW, make a copy of THAT, open and mix the two together again, ie "original x2" then the next round it is "original x4" then "original x8" etc wash-rinse-repeat. The goal is to have the audio file layered/merged/mixed onto itself 100 times, to test loss of quality etc, but at the 16x mark the sound has already become distorted and volume increased making it difficult to recognize the voice.

So my question is this, is it possible to mix a sound onto itself many, many times yet retain the original, or close to it, quality? I'm not even sure of the vocab for me to ask the question properly.
DougDbug
Posts: 2172
Joined: Wed Feb 16, 2005 3:33 pm
Location: Silicon Valley

Re: Not quite sure how to even ask this question as I'm new to GW

Post by DougDbug »

Mixing is done by summation so if you mix a file with itself you are simply doubling the volume. In decibels that's a gain of +6dB.

Digitally, that's done with sample-by-sample addition (i.e 44,100 samples-per-second, etc.) and analog mixers are built around summing amplifiers. Analog mixers have level controls for each input and a master level control so it's more of a weighted and scaled average than simple summation. DAW software has all of those adjustments but GoldWave (and other "simple" audio editors) don't have that much control. With GoldWave you can adjust the level of the mixed-in file and you can adjust the level after mixing.

Here's the problem - There is a "digital maximum" of 0dB. 0dB is defined as the maximum you can "count to" with a given number of bits. For example, a 16-bit WAV file can hold values between −32,768 and 32,767. If your negative & positive peaks hit those values that's 0dB and if you "try" to go higher you get clipping (distorted waves). A 24-bit file can hold bigger numbers but everything is automatically scaled in software so 0dB 24-bit file is not louder than a 0dB 8-bit file.

So generally when you mix you have to reduce the volume.

Regular (integer) WAV files, audio CDs, analog-to-digital converters (recording) and digital-to-analog converters (playback) are all hard-limited to 0dB. Internally, GoldWave uses floating-point representation, which for all practical purposes has no upper or lower limit. So you can mix, or amplify or boost the bass, or whatever, and the peaks can go over 0dB without clipping. If you play it at "full digital volume" you'll clip your DAC (digital-to-analog converter) but if your playback volume is turned-down you may not hear the clipping until you save and make a clipped file. (This isn't really important but in floating-point 0dB is represented as a value of 1.0.)

You can run Volume Maximize before saving and if your peaks go over 0dB the level will be brought down to the "maximum" if necessary.
it farts out while trying to save as MP3
As you may know, MP3 is lossy compression. It throws-away information to make a smaller file. (It tries to throw-away stuff you can't hear and it can be very good and can often sound identical to the original.) As a side-effect it adds a few milliseconds of silence to the beginning so if you mix it with the original the samples won't line-up perfectly.

MP3 can actually go over 0dB without clipping but I don't know what the limit is (or maybe there's a "fuzzy limit"). But the last time I checked, GoldWave's MP3 decoder will clip at 0dB if you open an MP3 that goes over.

If you open an MP3 (or any compressed file) for editing it get's decompressed. If you then re-save as MP3 it goes through another generation of lossy compression and some "damage" accumulates every time. You may not hear any quality loss with one or two generations but MP3 is one of the worst lossy formats for accumulated damage. If you are stuck with MP3 originals you should try to minimize the number of times it's re-compressed.

There is a FREE special-purpose MP3 editor called MP3DirectCut that can do some limited editing (including volume changes) without decompressing, but it can't mix.
stephen22
Posts: 24
Joined: Fri Dec 03, 2010 12:16 pm

Re: Not quite sure how to even ask this question as I'm new to GW

Post by stephen22 »

Could you tell us exactly what you've been tasked to do? (without any jargon at all.) Is it an assessment of MP3 compression?

Thing about digital sound is it's just a sequence of numbers, and if you mix a track with itself you'll just double each of the numbers, which you'll then have to reduce in some proportion to keep them within the range the previous poster mentioned, so you're back near where you started; if you do this 100 times, it will always sound exactly the same with no distortion, (unlike analogue sound, where "send reinforcements, we're going to advance" gets corrupted to "send three and fourpence*, we're going to a dance".)

I suspect what you may have been asked to do is to decompress and recompress to MP3 100 times to assess quality loss. Load your MP3 file into Goldwave which will decompress it for viewing and editing, and just save it as another MP3 (compressed) file. Load this new file in and save as MP3 again, and so on, 100 times. (Mixing the files doesn't make a lot of sense)

*"three and fourpence" - vintage WW2 British currency
DougDbug
Posts: 2172
Joined: Wed Feb 16, 2005 3:33 pm
Location: Silicon Valley

Re: Not quite sure how to even ask this question as I'm new to GW

Post by DougDbug »

I suspect what you may have been asked to do is to decompress and recompress to MP3 100 times to assess quality loss.
Nine different codecs 100-pass recompression test

But right... That does not involve mixing and there would be no point with WAV or other lossless files.
to test loss of quality etc,
You can use subtraction which is done by inverting one file and mixing with the original. (Mixing is adding and adding a negative is the same as subtraction.) If they are digitally identical you'll get dead silence and that proves they are identical.

But, it doesn't always work the other way around... Subtraction can give you a big-loud difference even when they sound the exactly same.
"The sound of the difference" isn't the same as "the difference in sound". For example, adding a few milliseconds of silence to the beginning creates a delay without changing the sound. Then when you subtract from the un-delayed original the samples don't line-up and you get a "very loud" difference file with comb filtering. If you've done this kind of thing before you'll recognize the comb filtering ("phasing") as a result of a delay but it doesn't sound like delay.

Another "interesting subtraction experiment" is to record your self twice saying "Hello", or something. (It has to be a separate recording, not a copy.) Or you can record two different people saying or singing the same thing. When you mix them together you'll get-sort-of a chorus effect and the interesting thing is that subtraction sounds virtually identical to addition!
New2GW
Posts: 2
Joined: Tue Apr 06, 2021 2:27 am

Re: Not quite sure how to even ask this question as I'm new to GW

Post by New2GW »

Sorry I wasn't able to respond and thank you for your help, I've got pancreas issues that prevent me from doing pretty much anything at times. My issue isn't a work assignment, I'm trying to help a nephew with a subject I'm not really familiar with. But yes, essentially what I'm trying to help with is to determine quality loss and whether It can be prevented, or at least mitigated using Goldwave, he told me that it "had to be Goldwave." I'm still trying to get more details out of him, a bit more specific. As for right now though I've got to pour over your replies and become more familiar with what you guys spoke of. I really appreciate you even answering as I wasn't sure I wouldn't just get some pretentious comments on me not knowing what I was doing, so again, thanks a million for that.
stephen22
Posts: 24
Joined: Fri Dec 03, 2010 12:16 pm

Re: Not quite sure how to even ask this question as I'm new to GW

Post by stephen22 »

If your illness is limiting your activities, you might well get a lot of satisfaction from boning up on sound science and sound processing. Particularly if you happen to have some ancient recordings on disc or tape that could be improved with a bit of processing, or indeed a nephew who's trying to learn the same thing.

I had old 8mm footage of my young family, with sound recorded separately on cheap old-fashioned tape recorders, and it has given me enormous pleasure learning how to clean up the recordings - removing hums and buzzes, levelling up the volume (the early recorders with "automatic" volume control did dreadful things to the sound levels when someone made a suudden loud noise), and then perfectly synchronising them with the films.

I produced a musical show in the 1960s with super singers and a cacophonous orchestra and just recently found out how to extract the voices from the recordings, and give them a new backing. It's just amazing what you can do with sound processing these days. And GW will do most of these things.

There's an enormous amount of free information on the internet - which is where I learnt most of my skills in this area. Wikipedia is good, but there are many other excellent sources too. I find a 7" tablet ideal for studying!
DougDbug
Posts: 2172
Joined: Wed Feb 16, 2005 3:33 pm
Location: Silicon Valley

Re: Not quite sure how to even ask this question as I'm new to GW

Post by DougDbug »

Sorry you're not feeling well.


I really depends on what your nephew is doing or what he's concerned with.

- Most "quality problems" are on the analog & acoustic side. That could be during recording or playback.

- Or you can get a "digital glitch" while recording (analog-to-digital) or while playing (digital-to-analog) if the digital audio is interrupted. That can happen with computers because your operating system is always multitasking, even when you're running only one application. To minimize that, audio (and video) software uses a buffer (memory, like a storage tank) to keep the audio flowing smoothly even when it's interrupted. The buffers introduce a delay which isn't a problem for recording & playback but it can be a problem if you are "performing" while monitoring yourself through headphones with a delay.

- Once a file is digitized you can make a copy of a copy of a copy, etc., and the last copy is the same as the 1st. ...It's "just numbers" and I can write-down a number, or save it in a file, and no matter how many times that number is copied & passed-around it stays EXACTLY the same. Now if I Xerox a print-out of that number, it will become blurry and unreadable after multiple generations. But that's different from copying/sharing the digital value over and over, which does not change.

- The most common "digital problem" is clipping. The data can be clipped during recording or playback, or when you save the file after boosting the bass, or mixing, or anything that boosts the volume too much. Most commercial music is already normalized (maximized) so if you start with an MP3 or music ripped from a CD and do anything that can boost volume you need to check/adjust the levels before saving.

- A low sample rate and/or a low bit depth can reduce quality. 16-bit/44kHz is "CD quality" which is generally better than human hearing. 8-bit/8kHz is "telephone quality".

- And of course, MP3 is lossy. The quality of a (lossy) compressed file roughly corresponds to the bitrate. With a lower bitrate more data is thrown-away so you get a smaller file and lower quality. The bitrate is usually expressed as kbps (kilobits-per-second). If you know there are 8 bits in a byte you can divide by 8 to get the file size in kilobytes-per-second.* A "good quality" MP3 with a bitrate of 256kbps is about 1/5th the size of a CD quality WAV file which has a 1411 kbps.** But MP3 (and AAC) is "smart". It tries to throw-away details you can't hear anyway so it can often sound identical to the original (at least the 1st generation of compression).

FLAC (lossless compression) usually gives you a bitrate & file size about half of the original. FLAC is truly-lossless... When it's decompressed you get the exact-original data back so of course multiple generations of FLAC compression don't degrade the quality at all.




* This doesn't include any embedded artwork or other non-audio metadata.

** 44.1kHz x 16-bits x 2 channels = 1411.2kbps
Post Reply