Oh No More Lemmings 26 song soundtrack

Started by jkapp76, February 15, 2015, 02:39:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

namida

Tsyu: Do you support the LOOPSTART and LOOPEND (or something like that) metadata?
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Tsyu

Unfortunately not. The reason is that Vorbis SPI, which SuperLemmini uses to play OGG files, does not support the mark feature that's necessary for rewinding a stream to a desired point. Therefore, I had to use two different files to support intros. (All sampled-audio formats are implemented this way, not just OGG.)

SuperLemmini does support two types of loop points in MIDI files: "loopStart" and "loopEnd" text markers to mark the looped section, or controller 111 to mark the beginning of the looped section. And the tracker formats (MOD, S3M, and IT) can do intros natively, which Lemmini (MOD only) and SuperLemmini support.

namida

Hm. Does it support *any* kind of seeking? If so, could you not just save the seek point in a variable and use an "on reaching Point B, jump to point A" type command?
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Tsyu

In Java input streams, bytes are read sequentially and are discarded once they are read. This makes it impossible to seek backward in a stream unless a "mark" was placed at the desired position, in which case it's only possible to seek backward to that position. Not all streams support the "mark" feature, however; such streams cannot seek backward at all.

All Java input streams can seek forward by a specified number of bytes of the raw stream. However, this isn't very useful in audio contexts, especially those involving non-PCM audio (such as pretty much every compressed format), because the number of bits in a sample can vary, and if the audio is encoded in blocks, those blocks will likely have headers.

There's no such thing as absolute seeking in Java streams, nor is there any concept of absolute positions. The only "seek" methods are "jump forward by n bytes" and "jump backward to the mark", the latter of which is supported only by some streams.

And yes, the problem is specific to Vorbis SPI (which, I should state right now, is a plugin that requires no special handling to use, allowing me to use the same code to open OGG, WAV, AIFF, and other sampled-audio files, at least for music). With the audio types that Java natively supports, I can open them in a way that provides mark support (and SuperLemmini is already doing this), but doing the same with Vorbis SPI does not produce mark-supporting streams for some reason. Thus, my only options are to either use two files or write my own code that uses JOrbis, which is surprisingly very difficult to use.

jkapp76

A couple more things...

1. I have completed my Midi versions of these songs, let me know if anyone is interested.

2. I have edited the Great CD audio tracks of Lemmings to loop perfectly with no gaps... (came out perfect)

The Midi has been a project of mine for a month or so, The CD audio was starting to bother me with the fade out and gaps.

...Jeremy
...Jeremy Kapp