View Issue Details

IDProjectCategoryView StatusLast Update
0001541OpenMPTFile Format Supportpublic2024-04-08 21:05
ReporterLachesis Assigned To 
PrioritylowSeverityminorReproducibilityalways
Status newResolutionopen 
Platformx64OSWindowsOS Version10
Product VersionOpenMPT 1.30.01.00 / libopenmpt 0.6.0 (upgrade first) 
Summary0001541: Farandole Composer tempo and effects are wrong :-(
Description

OpenMPT notably gets quite a few Farandole Composer effects wrong, like every other player (until recently libxmp and sort-of MikMod). I haven't thoroughly checked these to see which ones are properly supported or not, so here's a general description of all of the effects. If libxmp or MikMod or libmodplug are any indicator, OpenMPT probably gets most of them wrong. The bad support is unfortunate as FAR is an interesting format with several genuinely very good modules that rely on these effects.

Here's a Gist with an in-depth description of the mechanics of each effect that I wrote. This was mainly compiled from discussion on a FAR patch for MikMod. I also had the foresight to more accurately document which issues affected OpenMPT and which modules were good examples to compare against. I've also attached the effects test module I used to fix these in libxmp.

See "Additional Information" for libxmp links, and some sample modules. They should also be of use.

# Effect Description
03 Fulfill loop It's supposed to be sustain release. Emphasis on "supposed to be", it usually cuts the current note due to bugs. Nothing I know of uses it.
04 Old tempo mode Nothing uses this and it can probably be ignored. I tried to add support to libxmp but it's not very good due to libxmp's BPM limit and issues with high BPMs.
05 New tempo mode Switches from the old tempo mode back to the default one, so probably can be ignored.
1? Pitch offset up Increases the frequency by ? * 4 GUS frequency increments.
2? Pitch offset down Decreases the frequency by ? * 4 GUS frequency increments.
3? Tone portamento Persistent tone portamento. The param is supposed to correspond to the number of rows to complete in, but it actually scales with tempo (Amazon Dawn). This applies to all persistent effects, but DON'T unroll it. See the Gist.
4? Retrigger The param is supposed to correspond to the number of row subdivisions. See the Gist.
5? Set vibrato depth This is a persistent GLOBAL variable (default: 4).
6? Vibrato Regular (non-persistent) vibrato. Notably, if persistent vibrato is active, using this sets the rate but it will still be persistent. More details in the Gist.
7? Volume slide up Fine volslide up. One of the few normal effects here, but make sure it accounts for the 0-15 volume base.
8? Volume slide down Fine volslide down.
9? Sustained vibrato Persistent vibrato. See the Gist.
a? Slide-to-volume Persistent volslide, a pretty cool effect that nothing actually uses. It behaves roughly like effect 3? but completes twice as fast. See the Gist.
b? Balance S8x.
c? Note offset It's supposed to be note delay, but it also plays a note on tick 0, so it's more like "retrigger once". The timing is supposed to be similar 4F, but ultimately it ends up playing the second note on tick ?.
d? Fine tempo down See the Gist and far_extras.c for a deep dive on FAR's cursed tempo handling.
e? Fine tempo up See the Gist and far_extras.c
f? Tempo See the Gist and far_extras.c
Steps To Reproduce

Try to play any of the FAR modules below in OpenMPT.

Additional Information

The Gist references other modules that can all be found on ModLand as well.

TagsNo tags attached.
Attached Files
far_effects.far.zip (27,570 bytes)
Has the bug occurred in previous versions?This mostly dates back to Modplug 1.16, I think?
Tested code revision (in case you know it)

Relationships

related to 0001773 new Better support for some auto slide commands 

Activities

Saga Musix

Saga Musix

2022-01-09 13:33

administrator   ~0004979

Note that as with many imported formats, libopenmpt gets some of these things right while OpenMPT doesn't, because it doesn't have to convert stuff to MOD/XM/S3M/IT (again issue 0001456 comes into mind). For example the portamentos should already work. All of the tempo stuff is probably a lot harder to get right though..

Lachesis

Lachesis

2022-01-26 02:28

reporter   ~0005013

I think it's worth noting that FAR tone portamento and slide-to-volume very much rely on working FAR tempo tracking: see amazon dawn.far, which although I haven't checked libopenmpt, didn't work correctly in libxmp when I implemented that effect the way the lying documentation claims it works. If the effect actually completed in the number of rows specified by the parameter, the math would use current tick per row count (OverFlow + 1 in the official FAR source), but it is actually derived off of the tempo (mTempo[PlayTempo] + TempoBend) instead. The end result is if you follow the documentation, the tone portamentos in amazon dawn.far are IIRC twice as fast as they ought to be, and fine tempo ends up affecting them as well :(

Increment[CurVoice]=((sp-fp)*256)/((Pattern[CurSpot+3]&0xF)*
                (mTempo[PlayTempo]+TempoBend));

(If that wasn't bad enough, slide-to-volume uses an increment that's twice what it should be to match tone portamento rate, and you can trick FAR into dividing by zero here thanks to the sketchy fine tempo bounding...)

Issue History

Date Modified Username Field Change
2022-01-09 02:34 Lachesis New Issue
2022-01-09 02:34 Lachesis File Added: far_effects.far.zip
2022-01-09 13:33 Saga Musix Note Added: 0004979
2022-01-26 02:28 Lachesis Note Added: 0005013
2024-04-08 21:05 Saga Musix Relationship added related to 0001773