Jump to content
  • Advertisement
Sign in to follow this  
Trapper Zoid

Creating short looping samples

This topic is 4811 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Yet another question from me, I'm afraid. At this rate, about half of the threads on the first page of the music forums will have been created by me. Forgive me if I incorrectly use some terminology here; I'm still very much a beginner. I've been teaching myself basic music composition using ModPlug Tracker, and have been using recorded WAV files as my samples. However, since I wanted high quality on the long notes, I've used really long samples at 44kHz for each instrument (about 10 seconds). This makes the S3M file really large. While this is fine during the composition stage, it means the files will be a bandwidth hog if I share them over the Internet, either for feedback or when I distribute them with a game. Plus while I could use MP3s or OGGs, I'd like to use a module format at least for the actual use in games, since it will be easier to interactively modify the music. I think I have to do one (or more) of the following: Lower the quality of the samples Self-explanatory. This is easy to do; shouldn't make the music too terrible Shorten the samples and use looping I'm not sure how to do this without getting "pops" when the samples loop. I've tried to do this already, and the resulting sound always bugs me. I can only seem to do this with obviously electronic sounding waveforms. Use a software synthesiser I'm also not sure how to splice in a software synthesiser into my own code. I suppose I could do it myself; use a Fourier analysis to calculate the sum of sine waves needed to generate the sample, and get the game engine to make the sounds from the underlying maths. Obviously I can only really do this in my own engine, and this is tricky, and the result will more likely sound very synthetic. This is probably the programmer in me that's suggesting something as whacked as this as a solution, I'm afraid. Shorting the samples and using looping seems by far the most appropriate, but is there some trick to doing that and getting the sound appropriate? While I suppose I could mock up some synth keyboard loops, I'd prefer to have decent sounding strings and woodwind samples in my music. Thanks in advance! You've all been very helpful so far!

Share this post


Link to post
Share on other sites
Advertisement
Or you could release your modules in the MO3 format which features compressed samples, if you don't mind using BASS for audio playback at least..

Share this post


Link to post
Share on other sites
Do you have any other audio editing software at your disposal, or are you trying to do this 100% in Modplug?

I can help give some pointers on good looping, but first I'd like to know what tools you can use. MPT is....okay...but something like COol Edit, Sound Forge, or Audacity would be better.

Share this post


Link to post
Share on other sites
Audacity is a free sound editor and and comes highly recommended. It should be a fairly painless download.

(off topic)
Why are you using .S3M as your format? Modplug tracker supports more powerful formats than that...

Share this post


Link to post
Share on other sites
A common problem when looping instrument samples is dealing with the decay of the note over time; even if a cyclical loop doesn't click it will sound weird if it is jumping fom quiet to loud on the loop-marker. Try using a ping-pong loop to combat this.

Although you get better at creating loops with experience, much of it is still trial and error. Get stuck in!

One of the nice things about the various mod formats is the ability to open up other peoples' work and have a look at how they did things...

Share this post


Link to post
Share on other sites
Quote:
Original post by krikkit
Do you have any other audio editing software at your disposal, or are you trying to do this 100% in Modplug?

I can help give some pointers on good looping, but first I'd like to know what tools you can use. MPT is....okay...but something like COol Edit, Sound Forge, or Audacity would be better.


At the moment, all I have is Modplug and Audacity. I've been using Audacity to create the samples. I think I have the trial version of an old copy of Cool Edit around on a disk somewhere too, but using Audacity would be easier for now.


Quote:
Original post by samuraicrow
(off topic)
Why are you using .S3M as your format? Modplug tracker supports more powerful formats than that...


Admittedly I only picked S3M for now because I have a collection of game music stored in that format (taken from Deus Ex and Unreal Tournament); I haven't researched the various natures of the capabilities of the different formats. However I don't particularly want to use an overly powerful file format because I'll probably be writing my own music player. At the moment I'm limiting the types of effects I'm using so that I can test what it will sound like. I'm pretty sure I can write something that mixes samples at different frequencies and volumes, but the other features will make things more difficult.

But it might be better to use a different format if that makes distribution or the coding easier. What do you recommend?

Share this post


Link to post
Share on other sites
If you don't mind using an LGPL licenced player, MikMod will play almost any freeware module format and a few commercial ones. If you want to use multiple samples per instrument the most powerful format to date is Impulse Tracker. The problem is that it is so advanced that some of the freeware players like MikMod don't always play them quite the same way. If you steer clear of .VSTs and so on you should be able to play simple .it files just fine with MikMod or others without getting too far into uncharted territory. I sometimes do some editing with Skale Tracker and in that case i'll save my modules as .xm instead but .it should be the best freeware module format out there and MPTracker is the best editor for it.

[Edited by - samuraicrow on September 12, 2005 4:00:58 PM]

Share this post


Link to post
Share on other sites
(Back on main topic)

One thing you have to be careful with when making loops on samples is that a long sample may have much higher sampling resolution than your editor can display on the screen at once. If MPTracker's editor is anything like Med SoundStudio then it should have a zoom function that lets you zoom in on your waveform until you get down to the individual sample. Try to pick starting and ending values close to zero to avoid clicking.

Share this post


Link to post
Share on other sites
Quote:
Original post by samuraicrow
(Back on main topic)

One thing you have to be careful with when making loops on samples is that a long sample may have much higher sampling resolution than your editor can display on the screen at once. If MPTracker's editor is anything like Med SoundStudio then it should have a zoom function that lets you zoom in on your waveform until you get down to the individual sample. Try to pick starting and ending values close to zero to avoid clicking.


That's what my strategy was; I'd pick a start point at zero, then look for an end point close to zero as well. I also tried to look for a zero point that was approximately at the same point in a similar wave pattern, or at least had the same derivative (slope) at the zero point. But I couldn't remove the "click" entirely; the jump points were still very noticable and off-putting.

By the way, in Audacity is there an easy way to get some grid lines (or at least a line at zero) for the display of the wave form? I had a hunt through the interface but I must have overlooked that option.

Share this post


Link to post
Share on other sites
Modules are pretty old news in my opinion...you might learn a lot now but you will definitely be moving on to something else if you take this seriously. Look at film/games/anything these days; with the exception of unreal engine based games, I don't see them anywhere.

I advise you to continue in MPT for a while until you know the ins and outs, then move to something else when you know what more you want/need out of a program.

As for module formats, I think there's .IT and .XM you can try.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!