Created
March 10, 2019 15:47
-
-
Save tcdw/28c1979991213b0a97ecb2dc87369bfd to your computer and use it in GitHub Desktop.
echo ripper
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 convertEchoVolume(masterL, masterR, echoL, echoR) { | |
const mL = masterL > 127 ? 256 - masterL : masterL; | |
const mR = masterR > 127 ? 256 - masterR : masterR; | |
const eL = echoL > 127 ? 256 - echoL : echoL; | |
const eR = echoR > 127 ? 256 - echoR : echoR; | |
return { | |
echoL: eL * 128 / mL, | |
echoR: eR * 128 / mR | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment