-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
Worklet Improvents / fixes #963
Conversation
nice! is the shape range now very different / would this change existing patterns using shape audibly? |
yes before 0 -.8 was the usable range. Now it is 0-10 and the exponential curve of the shape param input is different/more predictable. my experience with the prior curve would be that you can carefully adjust it to .8ish or so, but once you hit .9-1 it would blow up your speakers which is very bad for live improvising |
yep shape is dangerous :D I just worry about the breaking change, so maybe find a new name and keep the existing shape as is? iirc the shape of tidal also has a range between 0 and 1 with a similar explosive behavior. |
I adjusted it so 0 - 1 goes from not distorted to very distorted in a linear fashion. if you want to be more extreme you can continue to go above 1. Would that be a decent compromise? It could still affect the sound of patterns that use shape slightly but it makes the function a lot more useful imo. I can also create another version called shape2 or something like that :) I think a somewhat-breaking change like this is justifed here to protect people's ears (especially in a live setting) |
I also agree that a more linear distortion curve is very desirable, it might still make sense to add it as an alias because it changes the mix of a lot of existing stuff + keeping parity with tidal is generally a good thing. Maybe just call it |
Okay I updated it and added another processor to keep shape behavior the same. New processor is called distort, but has a shorthand of dist. It has a much more gradual and predictable curve |
packages/superdough/superdough.mjs
Outdated
@@ -457,7 +458,14 @@ export const superdough = async (value, deadline, hapDuration) => { | |||
// effects | |||
coarse !== undefined && chain.push(getWorklet(ac, 'coarse-processor', { coarse })); | |||
crush !== undefined && chain.push(getWorklet(ac, 'crush-processor', { crush })); | |||
shape !== undefined && chain.push(getWorklet(ac, 'shape-processor', { shape })); | |||
if (shape !== undefined) { | |||
const input = Array.isArray(shape) ? { shape: shape[0], postgain: shape[1] } : { shape }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is a built in way to define controls that may be an array:
export const { shape } = registerControl(['shape','postgain']);
this will automatically define shape
and postgain
in the hap value when ":" notation is used, so this should be enough:
shape !== undefined && chain.push(getWorklet(ac, 'shape-processor', { shape, postgain }));
same can be done for distortion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, I updated it but instead of using "postgain" I used shapevol and distortvol because postgain is already the name of a different control.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is ready to go again
These are fixes for the shape/crush/coarse worklets