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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding filter envelopes and filter order selection #692

Merged
merged 40 commits into from Sep 16, 2023

Conversation

Bubobubobubobubo
Copy link
Contributor

This commit is proposing the addition of linear or exponential filter envelopes:

  • lpf(5000).to(500).over(0.2)

It also makes it possible to select the filter order (12db/Oct or 24db/Oct):

  • lpf(5000).order("<12 24>")

The definitive API and parameter names are not fixed but this is working and it sounds great 馃槃

@Bubobubobubobubo Bubobubobubobubo changed the title Adding Filter Envelopes and Filter Order selection Adding filter envelopes and filter order selection Sep 4, 2023
@felixroos
Copy link
Collaborator

great, filter envelopes were really missing so far. Maybe go the full way and just add adsr to the filter? The naming system could be similar to how it works with f and q suffixes:

  • lpattack / lpa , lpdecay / lpd , lps / lpsustain , lprelease / lpr
  • bpattack / bpa , bpdecay / bpd , bps / bpsustain , bprelease / bpr
  • hpattack / hpa , hpdecay / hpd , hps / hpsustain , hprelease / hpr

there could also be lpadsr / bpadsr / hpadsr ? also not sure if release is really needed in the filter

Order being a number kind of suggests it supports arbitrary numbers, which might be confusing, not sure what a good alternative is. Maybe default to 24dB entirely? or add separate controls like lp2 (because it's a 2nd order low pass filter)

@Bubobubobubobubo
Copy link
Contributor Author

This is now working with the described API. Order is also taking 12db or 24db only as argument, defaulting to 12db. There is an additional argument to specify the depth of modulation.

@felixroos
Copy link
Collaborator

this is starting to look good

still unsure about the naming:

  • should fenv be controllable separately for each filter? then there would be lpenv hpenv bpenv
  • rename fenv to something more expressive? it's also easy to confuse with fmenv
  • order sounds too generic + it's weird that there is only one value that changes something and you have to always type '24db'. maybe replace order with ftype (or lptype / hptype / bptype) where other filter types might be added in the future?
  • other filter env controls need doc comments too to appear in the reference & autocomplete. might be a bit repretitive to also add them to the fx docs page

@Bubobubobubobubo
Copy link
Contributor Author

Your suggestions are now implemented. Examples are covering all new keywords (mostly duplicate of lowpass examples changing filter type). Tests have been re-generated, etc..

@felixroos felixroos merged commit 872e10f into tidalcycles:main Sep 16, 2023
1 check passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants