Created
March 28, 2026 09:30
-
-
Save Dobby233Liu/ade4b1c4d6f22dee48d08b9409dc4645 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function linearClamp(x) { | |
| return Math.min(Math.max(x, 0), 1); | |
| } | |
| function linearPanToDominoPan(x) { | |
| return Math.round(linearClamp(x) * 126) - 63; | |
| } | |
| function linearVolToDominoVol(x) { | |
| return Math.round(linearClamp(x) * 127); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment