Skip to content
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

Incorrect OPL2 pitch when playing S3Ms #129

Open
snoopin1 opened this issue Jul 4, 2021 · 1 comment
Open

Incorrect OPL2 pitch when playing S3Ms #129

snoopin1 opened this issue Jul 4, 2021 · 1 comment

Comments

@snoopin1
Copy link

snoopin1 commented Jul 4, 2021

The pitch of OPL2 instruments in S3M files sounds noticeably off when compared to OpenMPT, Schism Tracker, and Scream Tracker 3.21 in DOSBox. This affects instruments regardless of whether they use pitch bends/portamento effects. It is most noticeable with "distorted" instruments like electric guitars.

Here is an example recording.

The first part is the correct sound as heard in trackers that support OPL2 instruments (OpenMPT was used in this case). The second part is the same S3M played with AdPlug. I have tested both the Winamp plugin and the AdPlay DOS frontend, and the issue is present in both of them.

The issue persists even when AdPlug is used to log the S3M to an RDOS RAW; the resulting RAW will also end up with incorrectly-pitched instruments.

@sagamusix
Copy link
Contributor

Having a quick glance at the S3M code, it seems like s3minst::c2spd is never used, so all notes are tuned according to the notetable LUT only and according to the tuning in the file. A c2spd of 8363 should produce a middle-C frequency of 261.626 Hz. Doubling the c2spd doubles the OPL frequency so this is a linear relation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants