Wohlstand / libADLMIDI

A Software MIDI Synthesizer library with OPL3 (YMF262) emulator
GNU Lesser General Public License v3.0
174 stars 17 forks source link

Implement support for Apogee Sound System loops #118

Open Wohlstand opened 6 years ago

Wohlstand commented 6 years ago

Apogee Sound System has support of loop points. While our current implementation which allows only single and infinite-only loop, Apogee Sound System can have loops with a specified count and having multiple loops in the same file!

A document EMIDIAPI.TXT taken from DukeNukem source code package from the AudioLib folder.

Event it doesn't supports nested loops, a nested loops at us are easily can be supported as we are doing preprocessing of entire MIDI data, we will don't do re-allocations to increase/decrease the stack of nested loops: we will scan full data for any possible loop related events and will allocate stack into the necessary size before we will begin a playback.

Interrupt commented 6 years ago

Supporting the XMI loop points would be awesome as well, System Shock music seems to use these a bunch.

Wohlstand commented 6 years ago

The XMI loops are already implemented in recent time, the only EMIDI loops wasn't made, there are related to Duke Nukem 3D and related games.

Wohlstand commented 6 years ago

Related to Apogee loops: it was made some experiment, however, looks it needs to have the manual switch of this support due to conflict with different loop configs, and also, provide the ability for per-track loops that EMIDI wants to have.