-
Notifications
You must be signed in to change notification settings - Fork 41
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
*.AMS Velvet Studio pattern decoding #86
base: master
Are you sure you want to change the base?
Conversation
The same fix needs to be applied to the other AMS loader in the same file (see e.g. |
For me, many of the ams files from modland don't play already, with or without this - their durations reported something close to 0... |
As discussed before in another issue or PR, ModPlug's AMS loader is had many deficiencies (including memory safety issues which I believe have been addressed in the meantime); it's one reason why I completely rewrote it for OpenMPT.
|
You seem to be correct, I will update PR later tonight or tomorrow |
…too, meaning that the row is empty.
… without a note/instrument prefix. (Please note that the current parser only keeps the last command if multiple commands are given at the same channel/row position)
I updated that Extreme's Tracker parser uses the same 0xff == no data on row. I also tried to fix Velvet Studio parser with known good logic from Open Cubic Player. Please note that I have not compile-tested the code since I do not use libmodplug - only used it as code-reference. Velvet Studio files that uses multiple commands on the same channel/row coordinate will not playback correctly due to libmodplug only supports one command per channel/row location (unless I have missed something) |
That's mostly correct, there is also the "volume column" which supports a smaller set of effects (like in S3M/IT/XM). OpenMPT, based on the same code, solves this problem by juggling around commands between those two columns, but all of the supporting code for that is completely missing in libmodplug, so probably not worth doing here. |
I pulled this into my fork, and also ported to the libmodplug version embedded in SDL_sound. Let's see how it goes. |
Comparing the algorithm with the one in Open Cubic Player and with Velvet Studio https://github.com/Patosc/VelvetStudio/blob/master/Code/AMS_LOAD.ASM line 402 a minor detail seems to be missing
First byte in a row with value 0xff is special - meaning that the row is empty.
This is not documented the format documentation of Velvet Studio. Please test this against real Velvet Studio module files (can be found on https://modland.com/pub/modules/Velvet%20Studio/ )