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

Dump and load correct volume and pitch values for T6 sound aliases #274

Merged
merged 3 commits into from
Oct 6, 2024

Conversation

Jbleezy
Copy link
Contributor

@Jbleezy Jbleezy commented Oct 1, 2024

I became a scholar of music theory to figure out what these values were representing.

BO1 and BO3 sound aliases have volume values ranging from 0 to 100, and pitch values ranging from -2400 to 1200.

The amp ratio value is due to 100 decibels being equal to 100,000 amplitude, but the value is stored in 16 bits.

Decibel converter

Cents converter

Copy link
Owner

@Laupetin Laupetin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR :) Your guess about the input formats was very correct.
I reversed a bit of the T5 modding tools to find out the exact formulas used though, so i adjusted them a bit.
And made the code a bit better to read.
Thanks a lot :D

@Laupetin
Copy link
Owner

Laupetin commented Oct 6, 2024

Oh also: I will follow up with another Pull Request to refactor a good bit of the loading and dumping code.
Your changes are already backwards incompatible so i thought i could just as well add a couple more to not break existing csvs more than once.
It should fix a good amount of weird quirks, small mistakes and missing data, so afterwards it might be worth checking whether the odd sound issues are fixed.

@Laupetin Laupetin merged commit ff98b53 into Laupetin:main Oct 6, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants