Skip to content
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

Enable setting filter frequency in hertz and notes #88

Open
ianhattwick opened this issue Sep 6, 2022 · 4 comments
Open

Enable setting filter frequency in hertz and notes #88

ianhattwick opened this issue Sep 6, 2022 · 4 comments

Comments

@ianhattwick
Copy link

Normalizing the filter frequency to (0, 1) doesn't make sense for choosing appropriate filter settings. . .

@charlieroberts
Copy link
Collaborator

charlieroberts commented Oct 2, 2022

The final cutoff frequency used in synths for a given sample is determined by the cutoff value, the note being played, the envelope of the synth, and the filterMult property. So selecting an actual frequency is somewhat meaningless given the combination of all these parameters. I guess I could make the actual equation used more explicit in the docs? Alternatively you could have synths where the cutoff frequency is not changed by all these other parameters, but that becomes a question of instrument design rather than how the filter frequency is specified.

@charlieroberts
Copy link
Collaborator

Here's the relevant code for the Synth instrument. I forgot that the global loudness property of the synth also plays a role in the filter cutoff, as well as the loudness of individual notes that are triggered (this is triggerLoudness in the code). So many elements control the final cutoff frequency!

@charlieroberts
Copy link
Collaborator

charlieroberts commented Oct 2, 2022

oh wait, are you talking about in standalone filters? hmmm. that could make more sense. I guess the problem then becomes you get different syntax for the standalone filters vs the instrument filters.

@ianhattwick
Copy link
Author

Yes - I was thinking of standalone filters. For synths I agree that something normalized makes sense as it will probably track VCO frequency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants