ModPlug Central

OpenMPT => Help and Questions => Topic started by: Claypool on March 08, 2007, 19:44:52

Title: Noise in 8-bit samples (.mod)
Post by: Claypool on March 08, 2007, 19:44:52
Hey folks,
Sorry if this has been covered elsewhere before, I couldn't find anything.

I have an assignment to compose some .mod tracks for a Nintendo DS game, but I have little experience with creating xm/mod/s3m and sorts.

I started off importing some drum samples, 16-bit and 44100 Hz. Everything went well and it sounded great in MPT, but when I saved it and listened to it via Modplug Player, there were some strange noises.

I uploaded the .mod file here: http://www.konterbande.org/Drums1.mod
Sounds kinda funky, but that's not exactly what I wanted. ;)

After a while I figured out that the .mod format uses 8-bit samples (?) and a low samplerate, so that could very well cause the noises, I guess.

Now to my question:
How do I set the high quality samples (16-bit) to a low quality (8-Bit) without getting this great deal of noise?
Title: Noise in 8-bit samples (.mod)
Post by: Saga Musix on March 08, 2007, 20:30:59
well, the sample frequency is not touched when saving a file as MOD - sure, the *default* sample rate will be set at 8363hz, but you play your samples still at C-7 which is about 33khz ;) if you want to use 16-bit sampels (which are less noisy!), you have to use modern module formats like XM or IT.

edit: one hint: if you are going to convert your samples  to 8 bit, be sure to NORMALIZE them first (the icon next  to the note icon in the sample editor). this will reduce the noise a bit because you have a greater level and this results into more details ;)
Title: Noise in 8-bit samples (.mod)
Post by: Claypool on March 08, 2007, 21:31:53
Quote from: "Jojo"well, the sample frequency is not touched when saving a file as MOD - sure, the *default* sample rate will be set at 8363hz, but you play your samples still at C-7 which is about 33khz ;) if you want to use 16-bit sampels (which are less noisy!), you have to use modern module formats like XM or IT.
Thanks, now I understand. :)
My client insists using .mod files, though. I guess it's some sort of compatibility problem. I'm used to composing in midi trackers and recording audio, so I guess I'll have to learn fast.

Quoteedit: one hint: if you are going to convert your samples  to 8 bit, be sure to NORMALIZE them first (the icon next  to the note icon in the sample editor). this will reduce the noise a bit because you have a greater level and this results into more details ;)
Thanks, but I already did that, also normalizing and noise gating in Wavelab - it helps up to a point, it's still quite noisy though...  :(

Any other ideas, or do I just have to look for 8-Bit samples?
Title: Noise in 8-bit samples (.mod)
Post by: Snu on March 08, 2007, 21:40:56
whew, sounds like the guy you are writing music for needs a better player engine...  i know there are .xm compatable ones for the gba, im assuming there are for the ds also.
another note, did he specifically say the '.mod' format? or just a 'mod file'? the latter is a universal term that can apply to .mod , s3m, .xm, .it (and newer formats as well).
Title: Noise in 8-bit samples (.mod)
Post by: Claypool on March 08, 2007, 22:06:53
@Jojo:
Danke nochmal - hab grade gelesen: "Location: Germany". :)

Quote from: "Snu"whew, sounds like the guy you are writing music for needs a better player engine...  i know there are .xm compatable ones for the gba, im assuming there are for the ds also.
Yes, I agree. But it's all a bit complicated because there is few documentation about sound engines on the DS, so I'm told by a colleague of mine. Nintendo uses a tool called "Nitro Composer" for most of its music which is probably using some kind of mod format too, but Nintendo is great in keeping secrets, it seems.
Well, there's a small homebrew programm called "Nitro Tracker" for the DS, also developed by a German guy, it uses an .xm format, but without velocity or any effects. Using the stylus to track is neat, but not as comfortable as using a keyboard and a monitor.

Quoteanother note, did he specifically say the '.mod' format? or just a 'mod file'? the latter is a universal term that can apply to .mod , s3m, .xm, .it (and newer formats as well).
I guess I'll have to contact him soon to ask that and hope it's the latter. ;)
Title: Noise in 8-bit samples (.mod)
Post by: Sam_Zen on March 08, 2007, 23:54:43
Quote from: "Jojo"be sure to Normalize them first (the icon next to the note icon in the sample editor). this will reduce the noise a bit because you have a greater level and this results into more details
Sorry, I don't agree on this. Normalization means amplification, as much as possible without clipping, so if there's any noise in the sample, the noise will be amplified too.

I checked this mod-file, and it is strongly the case here. These samples are of very poor quality (8-bit or not) and have lots of noise in them. And they have a length which makes no sense. As you can see on the screenshot (sample 4 : HH-Op.wav), the actual sound is already faded out before the arrow. What's left after the arrow is just noisy nothing (it should be a clean zero-line).
(http://i19.tinypic.com/2u78ys9.png)
Some remedies :
~ First remove the noise in a wav-editor with some noise-reduction tool, before using them in a tracker module.
~ Crop the sample just to the point where the sound has faded out completely (the 'arrow-point')
But : Search for some other drum-samples. These ones are really not good enough for professional purposes.
Title: Noise in 8-bit samples (.mod)
Post by: MisterX on March 09, 2007, 01:24:35
Use different samples altogether?

http://download.modplug.com/Drums1.mod
Title: Noise in 8-bit samples (.mod)
Post by: Snu on March 09, 2007, 05:15:56
Quote from: "Sam_Zen"
Quote from: "Jojo"be sure to Normalize them first (the icon next to the note icon in the sample editor). this will reduce the noise a bit because you have a greater level and this results into more details
Sorry, I don't agree on this. Normalization means amplification, as much as possible without clipping, so if there's any noise in the sample, the noise will be amplified too.

I checked this mod-file, and it is strongly the case here. These samples are of very poor quality (8-bit or not) and have lots of noise in them. And they have a length which makes no sense. As you can see on the screenshot (sample 4 : HH-Op.wav), the actual sound is already faded out before the arrow. What's left after the arrow is just noisy nothing (it should be a clean zero-line).
Some remedies :
~ First remove the noise in a wav-editor with some noise-reduction tool, before using them in a tracker module.
~ Crop the sample just to the point where the sound has faded out completely (the 'arrow-point')
But : Search for some other drum-samples. These ones are really not good enough for professional purposes.

im thinking he suggested the normalization because normalizing it before its converted to 8bit will increase the amplitude before the majority of the noise floor is introduced (as opposed to the tracker changing the volume after the noise floor is introduced).
good idea on the cropping, i shoulda thought to mention that!
Title: Noise in 8-bit samples (.mod)
Post by: Claypool on March 09, 2007, 09:53:42
@Sam-Zen:
Thanks so far - well, I could crop the "noisy nothing", but there's also a considerable amount of noise during the attack of the note, resulting in a sound like a laser gun fired, and that's what I'm concerned about. ;)

@MisterX:
Sounds nice - Were those samples originally in 16-Bit or were they already 8-Bit?
Title: Noise in 8-bit samples (.mod)
Post by: CrazyAznGamer on March 10, 2007, 06:00:41
Quote from: "Claypool"@Sam-Zen:
Thanks so far - well, I could crop the "noisy nothing", but there's also a considerable amount of noise during the attack of the note, resulting in a sound like a laser gun fired, and that's what I'm concerned about. ;)

@MisterX:
Sounds nice - Were those samples originally in 16-Bit or were they already 8-Bit?

Well, that's what Sam-Zen was talking about: not cropping the noise, but instead, first putting it through a wave editor's noise filter.
I'm gonna guess those samples were originally 16-bit (or possibly 24). But it really doesn't make *that* much of a difference whether it was sampled at 8 bit or converted to 8 bit from a higher bitrate.
Title: Re: Noise in 8-bit samples (.mod)
Post by: Atlantis on March 10, 2007, 16:13:06
Quote from: "Claypool"How do I set the high quality samples (16-bit) to a low quality (8-Bit) without getting this great deal of noise?
You need to process at a high bit depth and dither down to the final bit depth at the end. This would mean loading your 16 bit samples, processing them, and applying 8 bit dither, before saving them as 8 bit files.
Title: Noise in 8-bit samples (.mod)
Post by: MisterX on March 10, 2007, 19:44:34
Quote from: "Claypool"Sounds nice - Were those samples originally in 16-Bit or were they already 8-Bit?

The samples were originally SF2 files that I loaded as Sound Banks, and then replaced the samples that you had with the 16-bit samples from the SF2 files.  I then went to the sample editor in MPT, right-clicked on the sample and selected "convert to 8-bit".

Note the difference in file size as well as sound quality.  The "tail" of the samples that were originally used (as well as tom and cymbal samples that weren't used) were adding to the file size.
Title: Noise in 8-bit samples (.mod)
Post by: Claypool on March 11, 2007, 21:16:17
Gee, thanks a bunch. I'm beginning to catch up on a few things here. Mod tracking sure is a lot of fun, and I realized that as a kid I already used to fool around with a DOS tracker on my ol' 386 SX.
It's not quite what I'm used to, but the nostalgic feeling makes up for everything. I can't believe I'm using a file format that was created for '80s Amiga computers to make music for a DS game. That's oldskool. :)
Title: Noise in 8-bit samples (.mod)
Post by: Saga Musix on March 11, 2007, 23:58:11
Quote from: "Snu"
Quote from: "Sam_Zen"
Quote from: "Jojo"be sure to Normalize them first (the icon next to the note icon in the sample editor). this will reduce the noise a bit because you have a greater level and this results into more details
Sorry, I don't agree on this. Normalization means amplification, as much as possible without clipping, so if there's any noise in the sample, the noise will be amplified too.

I checked this mod-file, and it is strongly the case here. These samples are of very poor quality (8-bit or not) and have lots of noise in them. And they have a length which makes no sense. As you can see on the screenshot (sample 4 : HH-Op.wav), the actual sound is already faded out before the arrow. What's left after the arrow is just noisy nothing (it should be a clean zero-line).
Some remedies :
~ First remove the noise in a wav-editor with some noise-reduction tool, before using them in a tracker module.
~ Crop the sample just to the point where the sound has faded out completely (the 'arrow-point')
But : Search for some other drum-samples. These ones are really not good enough for professional purposes.

im thinking he suggested the normalization because normalizing it before its converted to 8bit will increase the amplitude before the majority of the noise floor is introduced (as opposed to the tracker changing the volume after the noise floor is introduced).
good idea on the cropping, i shoulda thought to mention that!

yes, that's what i mean... if you have a 16bit sample which is NOT noisy you should go and amplify it BEFORE you convert it to 8bit...
Title: Noise in 8-bit samples (.mod)
Post by: Sam_Zen on March 12, 2007, 00:24:02
2 Jojo
In that case, it's of course the right procedure.

In fact, one should always do the preparations to optimize a sample with another soundtool, if available, like a wav-editor, before importing the samples in OMPT. Which has quite limited edit-options, so more suited for some final adjustments.
Like in mixing-techniques, it's always better to have an input pre-amped as strong as possible, even if one uses the source on a lower volumelevel after all. Because attenuation is straightforward, but amplification afterwards will raise the common noise floor as well.
Title: Noise in 8-bit samples (.mod)
Post by: Atlantis on March 12, 2007, 06:09:12
Quote from: "Jojo"
Quote from: "Snu"
Quote from: "Sam_Zen"
Quote from: "Jojo"be sure to Normalize them first (the icon next to the note icon in the sample editor). this will reduce the noise a bit because you have a greater level and this results into more details
Sorry, I don't agree on this. Normalization means amplification, as much as possible without clipping, so if there's any noise in the sample, the noise will be amplified too.

I checked this mod-file, and it is strongly the case here. These samples are of very poor quality (8-bit or not) and have lots of noise in them. And they have a length which makes no sense. As you can see on the screenshot (sample 4 : HH-Op.wav), the actual sound is already faded out before the arrow. What's left after the arrow is just noisy nothing (it should be a clean zero-line).
Some remedies :
~ First remove the noise in a wav-editor with some noise-reduction tool, before using them in a tracker module.
~ Crop the sample just to the point where the sound has faded out completely (the 'arrow-point')
But : Search for some other drum-samples. These ones are really not good enough for professional purposes.

im thinking he suggested the normalization because normalizing it before its converted to 8bit will increase the amplitude before the majority of the noise floor is introduced (as opposed to the tracker changing the volume after the noise floor is introduced).
good idea on the cropping, i shoulda thought to mention that!

yes, that's what i mean... if you have a 16bit sample which is NOT noisy you should go and amplify it BEFORE you convert it to 8bit...
Yes, and before you do that you should make sure you're maintaining the high bit depth process and applying 8 bit dither at the end. As Sam_Zen said, it's better to do this in an audio editor, using a plugin like iZotope Ozone to apply dither rather than truncating the sound in OpenMPT.

Sam_Zen, just remember that attentuation adds quantisation noise too if the process is handled in 16 bit, and if you turn the listening volume up on the attenuated signal, you'll still hear the same noise floor as with the amplified signal. What I'm trying to suggest is to mask the quantisation noise with dither, but of course it's a good idea to get the original sample as clean as possible before that.
Title: Noise in 8-bit samples (.mod)
Post by: Sam_Zen on March 12, 2007, 23:52:10
Quote from: "Atlantis"if you turn the listening volume up on the attenuated signal, you'll still hear the same noise floor
You're right, but that imo is part of 'post-production' circumstances. If one burns the tracks of an audio-cd on a too low volume level, so one has to amplify the tracks too much. Of course artifacts will occur.
This is about the preparations of the material before starting to compose, and, quite important, the right order of steps in that process.
Title: Noise in 8-bit samples (.mod)
Post by: Saga Musix on March 13, 2007, 16:38:47
i think modplug did a better conversion from 16 to 8 bit when i tested it some years ago than audio programmes.. but maybe i've just chosen the wrong programmes :D