-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fallback Limiter in Playground #4
Comments
Hi @nick-thompson! Happy to help with this one. Are you intending for the limiter to be applied to the runtime, or as an addition to the editor's default constant? |
Awesome, thanks @mark-mxwl! I was imagining it would go right here: https://github.com/elemaudio/website/blob/main/src/components/playground/runtime.js#L46-L49. Basically whatever the user exports from their playground module, we evaluate it and then pass the results through some |
Sounds good @nick-thompson! I think dialing in |
Great, thanks! |
Hey @nick-thompson! I was hoping to make this one easy on you and just knock it out. However, I'm running into an issue. I'm still new to your library, so I may be overlooking the obvious, but here's where I'm at. Looking at
While the Playground editor itself accepts Any guidance you could offer would be greatly appreciated! |
Hey @mark-mxwl, mind sharing the code you wrote? Without looking at it, my only guess is this: const limit = (xn) => el.compress(10, 100, -48, 4, xn, xn);
const userOutput = render();
const stats = Array.isArray(userOutput)
? await this.core.render(...userOutput.map(limit))
: await this.core.render(limit(userOutput), limit(userOutput)); Something like that, with more sensible parameters for the atk/rel/thresh/ratio. The error you're seeing there just suggests that one of the arguments you've passed to |
@nick-thompson, really appreciate the help! Funny, but the code I had was nearly identical, just with the limiter dialed in as so: const userOutput = render();
const limit = (n) => el.compress(1, 10, -3, 20, n, n);
const stats = Array.isArray(userOutput)
? await this.core.render(...userOutput.map(limit))
: await this.core.render(limit(userOutput), limit(userOutput)); If you log the user output from both the Playground UI and runtime.js, you return the same True when logging from Playground; false when logging from runtime.js:
|
Ah, I got it. Just updated I'll get a PR up in a bit. |
Add a default limiter to the Playground which ideally stays out of the way but which would clamp anything going over 0dB. Mostly as a safety/panic mechanism to catch unexpected loud noises while the user is working
The text was updated successfully, but these errors were encountered: