New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing CMF Notes #41
Comments
Very interesting! I had noticed this but not actually checked how the original sounded. With Creative Labs' SBFMDRV the notes are also present, so since that's the gold standard for CMF playback, this is definitely a bug. Both AdPlug and my own libgamemusic are missing the notes. However, listing the song's events with libgamemusic reveals something interesting:
If you look at the last two events (25 and 26) you can see that there is no delay between the note-on (25) and the note-off (26). The note-off is supposed to happen at the same instant as the note-on. The other notes all have a delay (e.g. event 24 has a delay of 21 ticks before the note is silenced.) So technically AdPlug is playing the song correctly! I will have to investigate further as I am not sure whether the solution is to force a delay of at least one tick between note on/off events, or whether that particular instrument will sound even if triggered for only a brief instant - it's possible as of now that it is switched off again before the OPL emulator has noticed it has been switched on, but running the emulator callback at least once between events may be enough for the note to sound in the OPL "release" phase even if switched off immediately. |
PR #44 should solve this issue. Please check whether it affect on other songs playback somehow. This is not related to delays at all, the problem is in the interpreting such event sequence:
|
I'd happily do some thorough testing if you could provide a build of the Winamp plugin with this patch applied (as I'm unable to compile it myself at this point in time). |
@thecoreyburton here you go: in_adlib.zip |
Thank you! I've only done some quick testing as I'm out and about at the moment but as far as I can tell this has resolved the issue. Any notes that were absent in comparison of the Xargon soundtrack between SBFMDRV and ADPlug seem to be fixed, though this was only on a simultaneous play-through of pre-rendered .wav output. I'll have a proper, less subjective look a bit later on but so far so good! |
I have noticed another difference: the lead/pad voice has no chorus-like effect in AdPlug, so the same voice sounds better using SBFMDRV driver. But this is for another issue. |
I'll create it now, I noticed an unrelated missing effect as well and had planned on bringing it up in a separate issue anyway. |
Temporary quick-fix is committed in 4f7d41e. Leaving the issue open for a proper fix. |
That would be up to how the ADSR (Attack-Delay-Sustain-Release) logic is implemented. Handling should be implemented to follow what the original CMF software did, even for this "broken" corner-case. |
https://github.com/viiri/fmdrv - CMF player based on disassemled SBFMDRV. |
There are notes missing on CMF playback. I think it could be to do with the number of instruments (and so could potentially be an easy fix, I hope). @Malvineous, what do you think?
Attached is an example of a file from the game Xargon. Included are the CMF file and two different recordings of it (one through ADPlug and one converted with a CMF Tool several years back). You'll notice that the bass notes are consistent throughout the CMF Tool's output, whereas ADPlug skips over some of them (leaving spaces).
Here's an example: example.zip
The text was updated successfully, but these errors were encountered: