Author Topic: Having difficulty with sample Loop points  (Read 13338 times)

Having difficulty with sample Loop points
« on: 25 Apr '14 - 16:41 »
I tried converting some ImpulseTracker modules to MO3s, and while I am pleased with the sound quality and compression ratios I am not so pleased by the lack of loop points. It doesn't remember the loop points I set for each sample in ModPlug tracker, just deleting everything in the sample after the Loop End and going right back to the beginning, ignoring the Loop Start point. Could you do a fix regarding this, such as a modified Vorbis codec (it should be Open-Source IIRC)?

EDIT: Nevermind, it seems to be cooperating now. Mostly... the loop points are off because the sample was encoded at 44100 Hz, and the sample that came out was 44092. Is there a way to fix it to 44100 Hz while keeping the Ogg Codec, or have it automatically re-adjust the sample loop points to fit the new sample rates?
« Last Edit: 25 Apr '14 - 16:52 by Amaroq_Dricaldari »

Ian @ un4seen

  • Administrator
  • Posts: 26177
Re: Having difficulty with sample Loop points
« Reply #1 on: 25 Apr '14 - 16:52 »
That's strange, as loop points should be retained in a MO3 conversion. Are you having the problem with a particular IT file? If so, please upload it to have a look at here...

   ftp.un4seen.com/incoming/

Re: Having difficulty with sample Loop points
« Reply #2 on: 25 Apr '14 - 16:58 »
I attached a RAR archive containing both files. Sorry, I overwrote the one without loop points before I received your reply, but this one was encoded at 44092 instead of 44100, and as such the IT version and MO3 version are now looping slightly off-sync. I could adjust the loop points on the MO3 version manually, but ModPlug would turn it back into an IT.

I am trying to port the Unreal Tournament 3 soundtrack to Unreal Engine 1, and ImpulseTracker modules are way too big (I am using a special OpenAL plugin that lets me use MO3s.)
« Last Edit: 25 Apr '14 - 17:03 by Amaroq_Dricaldari »

Ian @ un4seen

  • Administrator
  • Posts: 26177
Re: Having difficulty with sample Loop points
« Reply #3 on: 25 Apr '14 - 17:47 »
The encoding rate won't affect the sample's playback rate, so it shouldn't really matter if they are different. The only issue could be if the encoder strongly filters the sample data (to remove less audible frequencies), but if there's only 8 Hz difference between the rates then that shouldn't be much of an issue. The encoding rate also won't affect the loop point positions, but note that lossy encoding will change the waveform slightly, which could result in imperfect looping, eg. a "click" sound. Is that what you're hearing? Ogg Vorbis is usually pretty good at keeping the waveform shape close to the original. To confirm whether the problem you're hearing is due to the lossy encoding, you could try using the MO3 encoder's built-in lossless encoding option and compare the result.

saga

  • Posts: 2778
Re: Having difficulty with sample Loop points
« Reply #4 on: 25 Apr '14 - 18:37 »
the loop points are off because the sample was encoded at 44100 Hz, and the sample that came out was 44092.
That sounds like you worked with an XM file rather than IT. 44092 is the closest you get to 44100 in XM, but in IT the frequency is not restricted, so you should be able to use a sample at 44100 Hz perfectly fine.

Re: Having difficulty with sample Loop points
« Reply #5 on: 25 Apr '14 - 20:57 »
Well, the song I used was put directly in an ImpulseTracker module. And the sample rate was 44100 Hz.

When I converted it to an MO3, the song got downsampled to 44092 Hz, which desynced the loop.
Edit: I got it working now.


@un4seen Also, you should check this out for future versions of MO3: http://en.wikipedia.org/wiki/Opus_(audio_codec)
« Last Edit: 28 Apr '14 - 13:46 by Amaroq_Dricaldari »