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

encloseEvent & query windowing functions #1093

Draft
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

geikha
Copy link
Contributor

@geikha geikha commented Jul 19, 2024

This PR is a work in progress, it hasn't been tested with the new tactus functionallity

Related: tidalcycles/strudel#1142

With this PR I try to introduce a "new" way of time altering functions to Tidal. A method which I'll be calling windowing. This method is actually done in some ways by other functions, but this PR simplifies the process and introduces new functions. The idea is that for every query with a given state arc, Tidal queries an expanded window (for example, the whole cycleArc surrounding the query, or by some lookahead), processes the events found and then windows it back down to the original arc via the use of the new encloseEvent function. This function takes an Arc and an Event, and returns Just the Event as if it was queried from the given Arc, or Nothing (if it shouldn't be there in the first place). This makes it easy to implement functions which alter times of events between a single cycleArc.

UI functions added:

  • quant k: quantizes the times of events to steps of (1/k) cycles. Inputting 0 will bypass the effect.
  • fill m: fills gaps between events, essentially a proper legato (name being debated @ Real legato strudel#1142)
  • alterT f: takes a Time modifying function to alter the cyclePos of the events
  • alterF f: sames as above but uses a Double function

The alter functions have some buggy edge cases I'm trying to explore (events at the exact end of the cycle, negative results, etc).

fill sorts events just in case, but i have no idea if this actually necessary on tidal (it is on strudel, i was replicating jader's work with the events on this one)

I've noted there's an old TODO fill function on the Pattern package, I think it should be easier to implement with the new functions... I'll take a look.


TODO:

  • Decide on a name for the proposed fill
  • How should encloseEvent actually handle analog events?
  • Test while using tactus functions

@geikha
Copy link
Contributor Author

geikha commented Jul 19, 2024

Would fix #761

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.

1 participant