ModPlug Central

OpenMPT => Help and Questions => Topic started by: Harbinger on July 04, 2009, 22:55:34

Title: What is normalization?
Post by: Harbinger on July 04, 2009, 22:55:34
Did a search in the forums, but can't seem to find an answer. And i need it for the manual....

What exactly is normalization of a sample? What technically is happening, and what is the audial effect?
Title: What is normalization?
Post by: Sam_Zen on July 04, 2009, 23:21:07
Not much of an audial effect, except overall volume.

The normalization formula scans the total sample looking for the highest peak qua amplitude.
Then maths are simple : with how many dB could this peak be amplified before passing the clipping barrier, the 0 dB point?
The same amount of amplification then is applied to the whole sample.

I prefer more sophisticated apps having manual setting for a custom percentage, like 96 %, just to prevent edgy problems.
Normalization seems a good tool to make samples basically stronger in main volume.

Of course a sample should be as loud as possible. It's easy to code it with a less volume, having a more precise range,
while having a weak sample, if one needs to amplify the source in the 'plus', noise artifacts will be amplified as well.
Title: What is normalization?
Post by: Harbinger on July 04, 2009, 23:32:48
Layman's terms, Sam! You explained it perfectly i'm sure and i still don't get it.

Assume i'm new to using samples. When would i need to normalize? What will i get when i use it? Should all samples be normalized? Why or why not?

I can still use the technical info, but i need info on its practicality and its benefits/disadvantages. 8)
Title: What is normalization?
Post by: Saga Musix on July 05, 2009, 00:05:00
Basically, it makes the sample as loud as possible by multiplying all values with a constant which is chosen by taking the maximum amplitude of the sample. Benefits? A sample that has 50% "volume" doesn't have to be played unisono on two channels just to be loud enough to be heared! It's always good to use normalized samples, especially when you plan to convert them to mono or 8-bit, because less information will be lost then.
Title: What is normalization?
Post by: Harbinger on July 05, 2009, 00:39:08
I still only partially understand, but  enough to help new users to sample editing with MPT. Thanks, sam and jojo! 8)
Title: What is normalization?
Post by: psishock on July 05, 2009, 03:30:29
It would be easier if you pick up the parts that are not clear. Sam answered really good, we use normalisation to make everything sounds as loud as possible. It has more than one benefit, but it depends of course from many views, how much these benefits are important to us. For instance, if you want to listen to a playlist of a songs, you don't need to mess with the volume bar on each of them, just set it once for optimal, every other song will sound with "right" volume. If you normalise a fairly low volume sample, messing with it after will cause more precise sounding. Lowering a volume by any percent is not a problem at any time, but if you need more stronger volume than your current sample totally has, it's usually a trouble (Jojo stated this problem 2). I could think of some more examples if needed, so what are the questions about the topic, that are still not totally clear.
Title: What is normalization?
Post by: LPChip on July 05, 2009, 09:07:41
If you want a different explaination, the take this one:

Normalising basically stretches the volume vertically in the samplewindow to fit the entire window. If the sample is already stretched throughout the vertical axis, normalising will not do anything to the sample.

This stretching will usually make the sample louder.

Basically you always would want to normalise, to get the max out of your sample. You can always use the volume settings to make it softer again (both from the sampletab and patterneditor)

Basically, the higher the volume of the sample, the easier you can work with it, but if you would amplify it over the clippingrange (thus it would be stretched outside the view) it will start to cut from your sample where it stretches out resulting in a worse quality (though sometimes people want the side-effects).

Do note: once you amplify your sample outside the patternview, and you then unamplify the sample, you will see that it has cutoff the part that was outside, and instead drawn a straight horizontal line in that cut. This will ensure that the same volume is being reached as was before, but due to the change in waveform, the sound will be sharper, and usually that sharpness is unwanted.
Title: What is normalization?
Post by: Sam_Zen on July 05, 2009, 17:39:11
As LP says, it's a possible expansion vertically, so volume.

The sample of A clearly needs some normalization, one can see the room.
The sample of B can't have any normalization, because the loudest peaks already are at almost 100 %.

(http://www.louigiverona.com/webarchive/samzen/samps/examples/norms.png)

btw : you can find some additonal info and tips at my Sample pages (http://www.louigiverona.com/webarchive/samzen/samps/sample.html)
Title: What is normalization?
Post by: PPH on July 06, 2009, 16:26:51
Very simplified layman explanation: normalizing a sample is making it as loud as possible without distorting it with crackles.
Title: What is normalization?
Post by: machinesmith on July 08, 2009, 13:19:06
*tears himself away from laborious tune manufacturing*
...and to add part 2 to PPH's excellent explanation:

In tracking Normalization is usually applied to All samples in a song so that they sound the same (ie "heya, no unecessary fiddling with that volume column except for fade ins/outs! Nice!" (amongst other things))

(the latter part of Jojo's post pretty much covers the `why' ... LP's comment adds to the `what else can I achieve from it' aspect - works really well with crunchy rock guitars, I know your secret Ramms+ien!)

*runs back to computer!*
Title: What is normalization?
Post by: Louigi Verona on July 08, 2009, 13:26:11
I did however notice that normalized file sounds a bit... mmm... different. I try to not normalize sounds.
Title: What is normalization?
Post by: psishock on July 08, 2009, 15:08:58
that asks for further explanation LV, the procedure does not distorts the sounds in any form, just amplifies it, so i assume that your "different" is a bit....mmm.... louder? :D
Title: What is normalization?
Post by: Saga Musix on July 08, 2009, 19:28:13
Quote from: "Louigi Verona"I did however notice that normalized file sounds a bit... mmm... different. I try to not normalize sounds.
it should sound the same if you turn up the volume of your system or your amp. sure, the "fidelity" is different, but that's not due to the algorithm used. it's just because everything is louder. music sounds different when you listen to it at a higher level. that's completely normal.

BTW: Awesome new avatar, psishock. :P
Title: What is normalization?
Post by: Louigi Verona on July 08, 2009, 20:30:34
I always thought normalization and maximization are different things. Afaik, normalization is when the volume is evened out. Maximization is when it is maximized - all of what you guys said in this thread. I might be wrong, but GoldWave certainly made such a difference in older versions.
Title: What is normalization?
Post by: Saga Musix on July 08, 2009, 20:40:06
normalizitaion in goldwave terms would be compression or limiting then. Normalizing in modplug (and other audio apps) doesn't do such a thing, it simply amplifies the whole sample as much as possible. period.
Title: What is normalization?
Post by: PPH on July 08, 2009, 22:12:33
Quote from: "Louigi Verona"I did however notice that normalized file sounds a bit... mmm... different. I try to not normalize sounds.

Maybe the normalization algorithm of Modplug is not good (I don't know; I remember people complaining; maybe they were wrong; maybe it was fixed).

You can always use another software for normalizing (for example, Audacity; in Audacity, though, the "Normalize" function does not make the volume as loud as possible; it leaves some room; but can use the "Amplify" function, which lets you normalize the sound).
Title: What is normalization?
Post by: Saga Musix on July 08, 2009, 22:16:52
Yes, people always rumour about "algorithms" that are oh-so-complicated. Why don't you just check it yourself? MPT is open source. It's one simple damn multiplication. No noise shaping, no nothing. Just like normalization is supposed to be. How could you do this differently?! Also, this "-2dB headroom" thing does not make sense with samples. It's only useful for final mixes which are usually rendered at -2dB. But for 8-Bit (not so much for 16-Bit) samples, a -2dB headroom would be fatal.
Title: What is normalization?
Post by: Sam_Zen on July 09, 2009, 00:59:28
I don't consider normalization having an algorithm either. It's just a plain simple math formula.
Compressions maybe have algorithms, but that's not relevant here.
Title: What is normalization?
Post by: psishock on July 09, 2009, 03:27:25
Quote from: "LV"I always thought normalization and maximization are different things. Afaik, normalization is when the volume is evened out. Maximization is when it is maximized - all of what you guys said in this thread. I might be wrong, but GoldWave certainly made such a difference in older versions.
Goldwave is my first wave editing tool, maximization == normalization there, that is for sure, i am using it for several years now. It has a separate compressor tool and i'm using it too for pushing loose high peak levels down in the final mix, but those are two different things. Maybe they had the two tools together in (really) older versions.

Quote from: "Jojo"BTW: Awesome new avatar, psishock. :P
Thanks :D, we were on some open air party and i've noticed a hat on my friend. I definitely wanted to try it out on me, and the last avatar was around 5 years old, so it was a good opportunity to change. :)
Title: What is normalization?
Post by: g on July 09, 2009, 15:04:39
Quote from: "Jojo"It's one simple damn multiplication. No noise shaping, no nothing. Just like normalization is supposed to be. How could you do this differently?!
I don't think it's that preposterous to think that normalization algorithm could have dithering. There will always (well almost always) be rounding errors, and when it comes to audio a lot of people will always go for overkill :)
Title: What is normalization?
Post by: Saga Musix on July 09, 2009, 16:00:20
I think it's very unusual (at least with samples - mastering is a completely different story) - correct me if i'm wrong, but i've never seen a program that combines normalization with noise shaping.
Title: What is normalization?
Post by: g on July 09, 2009, 17:16:55
I have no idea :) I agree it is rather pointless (when not mastering), I just wanted to make a point that it's not a silly idea to think that a normalization could be a fairly complex algorithm.

I do however think a gain factor which didn't actually affect the sample other than at playback. I guess it would be like the old pre-amp value except sample based. And it would break all compatibility as we know it. Still, non-destructional editing FTW! Perhaps in OpenMPT 4. :D
Title: What is normalization?
Post by: machinesmith on July 10, 2009, 11:39:58
*runs back again*

Suprisingly my source check for info actually came from Goldwave's Help file (and PPH's explanation was near verbatim)!

I'm just curious though, Louigi I checked Goldwave ( v4.26 - I'm on win98 so Old is necessary) and if you go to `Effects/Volume/Maximize' the tooltip displays: `Maximizes (normalizes) volume' which version are you using ?

Also:
Harbinger did your question get answered?

*runs... o never mind*
Title: What is normalization?
Post by: Louigi Verona on July 10, 2009, 15:27:20
I thought it was version 4.26... perhaps it is my wrong and I have mixed things. Anyway, I did think in OMPT that when you export a song with normalization it sounded differently - a bit more flat on the dynamics.
Title: What is normalization?
Post by: PPH on July 10, 2009, 16:18:03
Quote from: "Jojo"Yes, people always rumour about "algorithms" that are oh-so-complicated. Why don't you just check it yourself? MPT is open source. It's one simple damn multiplication. No noise shaping, no nothing. Just like normalization is supposed to be. How could you do this differently?! Also, this "-2dB headroom" thing does not make sense with samples. It's only useful for final mixes which are usually rendered at -2dB. But for 8-Bit (not so much for 16-Bit) samples, a -2dB headroom would be fatal.

I was afraid someone would take offense. That's why I made it clear that that was not my opinion. I was merely looking for an answer to Louigi's comment.

I agree with you. I know normalizing is a simple multiplication. And I'm not saying that I would have it done like Audacity does (I never use Audacity's normalize function).

EDIT: and I did not check myself, precisely, because I didn't notice any problems.
Title: What is normalization?
Post by: Saga Musix on July 10, 2009, 17:40:15
no offense taken, i'm just.... allergic towards stupid ideas. :)
Title: What is normalization?
Post by: Harbinger on July 10, 2009, 22:41:37
Very thorough explanation. Especially by LPChip and pictures by Sam_Zen. All of you did well to clear it up. I guess "normalize" means "amplify every sample until the sample with the highest peak reaches the top". But "amplify" means "increase the amplitude of every sample by a set amount, no matter what, limited only by the highest setting."

Now my next question is: When would you NOT want to normalize? And if never, why isn't it done automatically to imported samples?
Title: What is normalization?
Post by: Saga Musix on July 10, 2009, 22:44:01
You would want it in some formats which don't support global volume for example, or if you want to use your samples in another way than directly playing them in the pattern - like, if you use mod music in your game and use the mod samples for ingame sample playback - no this is not weird, this is how it's done in many old games. So this is one of the reason why you can't force anyone to use normalization.
Title: What is normalization?
Post by: Sam_Zen on July 11, 2009, 00:01:38
I don't like being forced to automatic functions anyway. The user should have the control and the choice.
QuoteWhen would you NOT want to normalize?
It could be that you have prepared a set of samples, each with its own defined volume in relation to the others.
Normalization would disturb this setting, and you will have to add extra volume codes with each note to correct the relations again.
With several tracks for an album it's the same. Sometimes one wants 1 or more tracks being softer than the rest.

Another reason to NOT normalize : the moment in the process of sample editing.
I stick to the rule : normalization always as last modification.
If you start to normalize, and then apply e.g. some filter to boost some frequency range, big chance of clipping.
The same is valid for other effects as well. Normalization should be seen as a last enhancement of the result.

Tip : if adjustable, never set the normalization factor at 100 %, just leave it at 96 or 98 %.
The hearing-difference can't be noticed, and it's just to be safe.
To be sure that, during some conversion, mix or such, some peaks get a slight higher value due to calculations.
Title: What is normalization?
Post by: Harbinger on July 11, 2009, 00:17:29
Excellent excellent advice. These tidbits will find their way into the Help Manual! :)
Title: What is normalization?
Post by: Saga Musix on July 11, 2009, 11:19:53
I'm not sure, but with all the topics you start here, is your manual not rather going into the direction "how to deal with audio" rather than "how to use modplug"?

Quote
I stick to the rule : normalization always as last modification.
If you start to normalize, and then apply e.g. some filter to boost some frequency range, big chance of clipping.
Not entirely true for modplug as there are no such effects in the sample editor (yet...) - Especially 8-bit samples should be normalized for such processes, and if VST effects are applied, those will use floating point precision anyway (i think), so clipping is not to be expected there (as long as modplug's buffer doesn't clip, of course)
Title: What is normalization?
Post by: PPH on July 11, 2009, 14:21:33
Quote from: "Jojo"I'm not sure, but with all the topics you start here, is your manual not rather going into the direction "how to deal with audio" rather than "how to use modplug"?

Quote
I stick to the rule : normalization always as last modification.
If you start to normalize, and then apply e.g. some filter to boost some frequency range, big chance of clipping.
Not entirely true for modplug as there are no such effects in the sample editor (yet...) - Especially 8-bit samples should be normalized for such processes, and if VST effects are applied, those will use floating point precision anyway (i think), so clipping is not to be expected there (as long as modplug's buffer doesn't clip, of course)

I agree. Besides, you normalize samples, but in many cases you won't use them at the highest volume.

If you apply effects to the samples themselves, then yes: that might be good advice (still, like JoJo said, you don't do that in Modplug; but the advice still applies). But you can always normalize, apply effects, and if clipping occurs, undo and try again. I guess a middle way, in Audacity, is using "Normalize", which doesn't really normalize, but leaves some room to make the sound louder.

If you apply these effects to the mix or to channels in Modplug, then, if clipping occurs, you can always change the volume of the mix or of the channel to avoid clipping. So, normalizing before wouldn't hurt. Besides, in that case, you will never normalize. Once you have mixed everything, normalizing will cause volumes of different samples to lose the relationships between them.
Title: What is normalization?
Post by: Harbinger on July 11, 2009, 21:06:38
Quote from: "Jojo"I'm not sure, but with all the topics you start here, is your manual not rather going into the direction "how to deal with audio" rather than "how to use modplug"?

The direction is rather, "What does this button do exactly?" and "Do i need  to use this?" -- aimed specifically at new users, especially those who want to assemble tracks but are not sure what MPT does with audio.

For me, i consider myself a veteran user of MPT and third-party audio manipulation but i've never had any idea what "normalization" was -- never needed it, never needed to know what it was, and got by fine without it. Well, now i need to know, so i can teach newcomers to our wonderful application.

Concerning explanation of audio techniques, that's definitely a concern for writers, as too much information can be just as discouraging as too little. But that is the skill of a good technical writer; give just enough info for the matter at hand and add more when more advanced techniques are explained.
But in order to do that, it helps the writer to know as much about the subject as possible, which is why i'm asking for an overload of information. I'll glean out the most helpful nuggets where i can for the manual, try to present it succinctly as possible for new users, but explain fully for the reference section.

So that's where i'm coming from. The more i know, the better i can teach! :wink:
Title: What is normalization?
Post by: Saga Musix on July 11, 2009, 21:12:24
See, we are totally different here. And maybe have a completely different view of "newbies".
First of all, I tought me everything about ModPlug myself. I found out what everything does by myself, and I found the sample editor stuff very easy to understand (I've been working with different wave editing software before, though).
Also, my view about newbies (concering Trackers, that is!!!) is that they either give instantly up because they're not interested in learning a couple of hex values and letters by heart or because they get confused by this "technical approach". Those who are really willing to learn tracking are also willing to found out how their tracker works, without reading any manuals or such. That's also why I think that messageboxes every where something "dangerous" could happen are totally useless (sorry Relabs).
Title: What is normalization?
Post by: Harbinger on July 11, 2009, 21:34:48
I concede that there might be a large number of people who approach MPT like you did. In which case the manual is dismissable.

But i believe that there are even more who see the possibilities of using our fine tracker, but are not sure what everything does, or how to get EXACTLY what they want from MPT. I guess it is for those who don't like to dive right in, but would rather get their feet wet first.

Plus, you know, i needed your help a few days ago in Tempo slides, a common Channel effect i had forgotten. If i had a manual with a Reference Section, i could have instantly used that. That's the secondary reason for the manual.

Now YOU, you know the inner workings of MPT. So i don't see you as USING any "manual". :)  You are the GIVER of knowledge, not a page-flipper! :P
Title: What is normalization?
Post by: Saga Musix on July 11, 2009, 21:37:00
Well, the last sentence is only true since last autumn, though... :)
Title: What is normalization?
Post by: Sam_Zen on July 12, 2009, 00:03:51
Quote...If you start to normalize, and then apply e.g. some filter to boost some frequency range, big chance of clipping...

Not entirely true for modplug as there are no such effects in the sample editor (yet...)
I know. This was more a remark in a general way, about how to treat samples.

I think a good manual should be useful for anyone, not only aimed at newbies.
Even an experienced user doesn't know all by heart.

That's why it should not only contain simple explanations, but one shouldn't be afraid to get technical, if necessary.
After all, this is electronics, so it's also about frequencies, modulations, waveforms, codes, conversions, etc.

It's of no use trying to keep people aboard and interested, who are scared off at once by seeing the first hex-value.
I agree with Jojo about the right spirit that beginners should have. Being persistent in learning and finding their way.

Including hex-values or properties of sound doesn't mean a switch to a 'technical approach', I think.
Anyway, these are not high-end complicated things.
I taught my granddaughter in one session how to count hexadecimal (and binary too) when she was eight..
Title: What is normalization?
Post by: LPChip on July 12, 2009, 08:40:29
I share Harbingers vision about the manual actually.

I understand Jojo's one too, but I'm one of those who wants to figure out something by trying it himself, and if its not clear instantly, I want to read about it somewhere. I see good use for this in the manual, so please continue Harbinger. :)
Title: What is normalization?
Post by: Saga Musix on July 12, 2009, 10:19:22
It's not that I don't want to have a manual. :P I just think that a few things could really be left out, and instead of explaining every detail of audio processing in a manual that's supposed to be dedicated to OpenMPT, I'd rather set a link to some Wikipedia articles or something.
Title: What is normalization?
Post by: LPChip on July 12, 2009, 10:32:08
I disagree here, and besides, if Harbinger wants to put it in, why stop him? The more details the manual has, the more usefull it will become.

If I'm reading through an article and it says: for more information, click here, I click there and I later find out that that page has been altered and no longer shares the vision of the manual (not to forget that its supposed to be an off-line manual, I feel screwed. So I rather have it all in one document.
Title: What is normalization?
Post by: PPH on July 12, 2009, 13:15:32
People are different and they learn in different ways. There are people that learn by playing around with the software, and people who prefer to use a tutorial or learn the basic concepts from a manual before starting.

I learned to use Modplug more ore less alone. I knew FastTracker 2 and OctaMED before, though. I knew more or less how to use the basic stuff. And I friend explained some things to me. Modplug, though, was different in some ways, and in those, I learned alone and it was not difficult.

In my case, the help file a were useful to learn the effects like retrigger (although I admit I learned to use stuff like that more with trial and error than with theorical knowledge; but that's my way; others may prefer a more analytical approach).

Looking at other people's mods was useful too. The point is: a reference manual can be very useful to enlarge one's knowledge. It is easy to figure out most of the  workings of Modplug. Even some concepts are not difficult to grasp once you used it a lot (like virtual channels; that I learned alone).
Title: What is normalization?
Post by: Harbinger on July 17, 2009, 22:05:33
I agree, PPH, but let's be honest -- we've ALL had to learn MPT "alone" because there was no manual. There has recently been a smattering of WIKI articles, often with missing information, one maybe two tutorials, and the search function of our forums. That's always been the extent of learning the little nuances of ModPlug. (Everlasting gratitude for those who did contribute to the Wiki! :wink: )

FORTUNATELY, like you said, MPT is pretty intuitive if you have any familiarity with tracking or event-editing. But i want to make it easier to bring in new composers to MPT in case something isn't readily obvious, like using macros, understanding and applying Note FX and Channel FX, or instruments vs. samples, to name a few issues.

As a matter of fact, i want to write it in such a way so that, whether you're a beginner, intermediate, or veteran, you can instinctively go to the part of the manual that gives you the best help. If you're a veteran, for example, you can skip over the "newbie" stuff without bypassing information that could be helpful. The Reference Section should contain EVERYTHING ABOUT EVERYTHING concerning ModPlug Tracker. (Well except for details about the code and how it works!) And plenty of pictures throughout will diminish any confusion from the syntax. And plenty of links between sections in case you need more info.