Sample importing problem with .mod and playback/sample rate

Started by Mortis, August 14, 2007, 22:47:46

Previous topic - Next topic

Mortis

Hello all,

I've tried to learn tracking because I'm committed to audio design for a little project and am required to make .mod-based music. As far as trackers go, ModPlug is definitely going to be my weapon of choice - the interface is excellent (for a tracker), but as I'm new to importing samples I just cannot fathom why I cannot import samples at the frequency they have been created.

So here's the scenario: I want to import my real-world samples at C-4 (middle C). The samples have been recorded as such.

The thing is, though, that when I work with .mod and import such a sample, no matter whether the audio files are wav, raw, aiff, unsigned/signed, 8-bit/16-bit, the program always imports the audio at a frustratingly low playback or sample rate (I'm not sure which one is the problem here). Changing the playback rate of the files to a higher octave (C-6, C-7 even) does not help, it's still a low hum.

I don't have this problem with other formats like .XI which I understand support more modern quality files anyhow. Sadly, in this particular project, we're limited to the use of .mod.

So far I've just gone around the problem by pressing the downsample-button three times to get right about the right level of sound, but my god, it's awfully frustrating to work with such low-quality samples.

Could someone explain why and what this is about?

Edit: I actually found an interesting detail in the OpenMPT wiki:

QuoteDownsample

Downsampling halves the samplerate of the currently displayed sample. Since the playback rate is not changed, the sample will actually playback at twice the speed since there are now half as many "samples" to be played. Downsampling will affect the quality of the sound but the sample will take up less space. Downsampling is useful for quickly changing the pitch of the sample beyond that available through changing the playback rate (the value in the {freq} box). This may be used on the whole wave or on a selected part of the wave.

After trying to find the frequency box I realized the .mod file format doesn't have it at all right now! Could anyone tell me why not?

Saga Musix

.MOD is a very old format, thus it is not very advanced. MOD files have the drawback that all samples are stored at one frequency (8363 hz) plus a transpose value, but this is just for finetuning. you may, however, import your samples correctly if you create S3M, XM or IT files. Beware that MOD and S3M have also a limited frequency range, so XM and IT are the recommended formats.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Mortis

Oh! Thanks a lot, that explains the issue, though I don't quite understand what requirements this poses upon me as I create my samples. What kind of audio file do I need to create for importing so that I would be able to maintain correct pitch (i.e. middle C)?

Though tracking feels generally very pleasurable I would rather of course go back to my usual sequencers - I'm more of an ordinary musician and the technical aspect still baffles me. Alas, promises are promises and if I'm required to learn how to track .mod files then I will try and learn how to track .mod files :D

Saga Musix

In fact, if you want your C-5 to play at the intended frequency, you would have to resample your samples to 8363 hz. Quite bad sound quality, i can tell ya. However, a nice trick is to double this frequency: Save your samples at 16726 or even 33452 hz (the latter case is not recommended of you need the sample to be played on many octaves). in addition, the original MOD format did not support 16-bit samples. Summary: You have to save your samples at 16726 hz, 8-bit mono. You sample will be loded one octave below the original sound, so you would just have to transpose all notes one octave up!
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

älskling

Quote from: "Mortis"Oh! Thanks a lot, that explains the issue, though I don't quite understand what requirements this poses upon me as I create my samples. What kind of audio file do I need to create for importing so that I would be able to maintain correct pitch?

An 8-bitt IFF would be ideal... You can use a tool such as Audacity (it's free) to resample your audio files to 8-bit 8363 Hz sample. Be sure to normalize before conversion.

I would also recommend downloading some .mod-files from places like the mod archive to get a good idea on what sound quality you can expect.

And are you sure only the actual .mod format is allowed for your project? Often other superior formats (like XM or IT) are referred to as "mods".

EDIT; Jojo is too fast for me!

Mortis

Quote from: "Jojo"In fact, if you want your C-5 to play at the intended frequency, you would have to resample your samples to 8363 hz. Quite bad sound quality, i can tell ya. However, a nice trick is to double this frequency: Save your samples at 16726 or even 33452 hz (the latter case is not recommended of you need the sample to be played on many octaves). in addition, the original MOD format did not support 16-bit samples. Summary: You have to save your samples at 16726 hz, 8-bit mono. You sample will be loded one octave below the original sound, so you would just have to transpose all notes one octave up!

Aw man! That's awesome! I just tried that trick - way too clever for me! Looks like it's going to be a smooth operation from hereon.

Quote from: "älskling"An 8-bitt IFF would be ideal... You can use a tool such as Audacity (it's free) to resample your audio files to 8-bit 8363 Hz sample. Be sure to normalize before conversion.

And are you sure only the actual .mod format is allowed for your project? Often other superior formats (like XM or IT) are referred to as "mods".

Thanks for the file format tip! I'll stick to IFF. I use Audacity and Goldwave regularly so this does not pose an issue in itself.

I'm sure you guys are blasting your brains thinking, "What on Earth is this guy doing messing himself up on .mod", but the honest fact is that the Nintendo DS library we are using only supports old-fashioned .mod up to 16 channels :D My brain nearly exploded when I heard I could only utilize eight of those for the music - I normally rack up eight layers of guitar alone in my normal songs...

Thanks again, both of you, for such amazingly fast answers to all of my questions! Jojo may be ultra-fast but älskling's tips are appreciated too!

Saga Musix

You're welcome :)
By the way, to improve the sound, you could also try if 16-bit samples are working on the DS.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

älskling

Quote from: "Mortis"Thanks for the file format tip! I'll stick to IFF. I use Audacity and Goldwave regularly so this does not pose an issue in itself.
Actually an 8-bit wav would probably be at least as good, but the sample format of choice on the Amiga was IFF. A *real* .mod only has 4 channels btw.. ;)

Mortis

Quote from: "älskling"A *real* .mod only has 4 channels btw.. ;)

Haha, really! I played with tracking on the PC back at the beginning of the 90s with my friend (Scream Tracker, actually) and I remember having quite a bit of channels at my perusal even back then.

I also read there was a limitation of three octaves in the original Protracker, is that right?

I'll get back to you guys when the actual end product is ready. I hate to say, but my inability to import the samples as I wanted them really sucked the fun out of actually writing the music for a while. And how simple this was, man, I searched all over the place reading about sampling - just for a few tips like this. Thanks again.

LPChip

Although Jojo and älskling were faster than me, this is just a place where we help other people if we can. :)

However, From what you've described as being your music, You made me wondering what kind of music you make.

Could you post one or two of your songs at the Free Downloads forum?
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Saga Musix

Quote from: "Mortis"
Quote from: "älskling"A *real* .mod only has 4 channels btw.. ;)

Haha, really! I played with tracking on the PC back at the beginning of the 90s with my friend (Scream Tracker, actually) and I remember having quite a bit of channels at my perusal even back then.

The original mod trackers on the amiga only had 4 channels, however, you're able to create multichannel mods with ScreamTracker or any other modern tracker.
Yes, .mod has only 3 octaves, s3m has some more, and you really don't have to care about octaves when usting it or xm :)
However, this is only theoretical: if YOUR mod player supports 10 octaves, there's of course no problem with using 10 octaves... it won't be a standard module then, but since it's for a handheld game, who cares?
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.