-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
Fix legato and duration #111
Comments
Isn‘t this problem of loosing data also related to all other methods that use withHapTime? Iirc the problem was there is no way of knowing if an event part ever had an onset or not. But maybe there was another problem I don’t remember anymore. Generally, I like the possibility of controlling the hap length directly, because we then don’t need to react to that param for every output separately |
It's not a problem with others that I know of, because where We can still solve this once for everything though, as a simple pre-processing step that changes the duration of events before calling the callback. The only problem is that superdirt will do this a second time if it sees the |
What are the consequences of not reducing withQueryTime by the same factor withHapTime is expanded? Can you think of an example problem this might cause? The thing with the pre processing step sounds like a good idea |
The consequence with e.g. fast/slow would be doubling up or missing events. The consequence in this case is events appearing or not depending on where you query: A part from 0 > 2: slowcat(1,silence).legato(2).queryArc(0,1) Disappeared: slowcat(1,silence).legato(2).queryArc(1,2) This will result in glitches and inconsistent results, especially when it comes to combining it with other patterns. We can't solve this by manipulating query time because we don't know how much to expand the query by. |
The |
I've fixed duration in 961a80d, but this breaks the 'jemblung' tune, as it has a pattern of the form Perhaps it would be best to change all examples to use explicit parameter names for patterns, to make things clearer for beginners. |
Hm the tune sounds fine now I've merged from main. The test still fails, needs looking closely at the parts and wholes of the mismatching events to work out why.. Am I right that 'expected' is what we generate and 'received' is from the snapshot? If so, I think these should be swapped for clarity. |
are already running the tests with vitest ? it does |
For reference: https://strudel.tidalcycles.org?iw5ossp4Sti1 the only effect duration has here is that the bass is short, it hasn't even an effect on the kick (although it might affect the event structure) |
I see thanks, well maybe it's not important to understand the exact difference in haps, as long as it sounds the same! |
just hit an actual bug related using legato. For some reason, it does not create a scheduling error when the |
Legato causes missed events here: s("bd*8").legato(0.5).rev() I think we do need to turn legato into a normal param and deal with it in the scheduler |
Aside from the representation difference
Is |
yep clip(1) is what legato(1) does in tidal i think.. but clip takes just a flag atm, but it would make sense to make it behave as legato does. I think the migration of legato will be much easier when #288 is fixed first, because it allows using legato with plain values (also color and velocity) |
the |
implemented in #598 |
hello from the future, #965 should get rid of this mess once and for all :) legato is now just a synonym of clip + duration is also just a control that sets the duration in cycles. The hap.duration getter returns the duration in cycles based on value.duration and value.clip. |
The current
legato
implementation manipulates haps in a way that can lose data.A fix would be to copy tidal's behaviour - store legato in a normal value key and then deal with it in the scheduler.
The text was updated successfully, but these errors were encountered: