Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (args.numArguments == 1)
- {
- // standard dB to kontakt dB
- double db = args.arguments[0];
- db *= 1.0034333188799371111111111111111;
- db = -db;
- // kontakt dB to kontakt amplitude
- double amplitude = pow(10, (db / 20));
- amplitude = round(amplitude*1000000)/1000000;
- if (amplitude < 0.015625 || amplitude > 64.0)
- throw SaltJavascriptFatalError(obj, __FUNCTION__, args, "amplitude `"+String(amplitude)+"` is outside of range: 0.015625 to 64.");
- return amplitude;
- }
Advertisement
Add Comment
Please, Sign In to add comment