strudel icon indicating copy to clipboard operation
strudel copied to clipboard

musical ties

Open felixroos opened this issue 3 years ago • 7 comments

It would be great if the mini notation somehow supported ties like this:

"[c3 e3] t"

"t" is just a placeholder here for a symbol that we haven't yet chosen. This would then have the output as:

sequence(['c3', pure('e3').legato(3)], silence)

without that, writing syncopations is really clumsy:

[c3 [email protected]]@2

This works, but it's hard to read and you have to pack 2 "bars" into one package, at least if you want to do that inside a larger context. Here is a more real world example:

https://tinyurl.id/hTySd

I am pretty sure this feature cannot be implemented with patterns, as we have 2 (or more) seperate events that depend on each other. So the "e3" in the example has to "know" that the "t" is coming after it to have the proper duration. But this is impossible because the "e3" could probably be scheduled before the t.

TLDR to make this work, the tie notation needs to be converted to the clumsy notation before constructing the pattern. For me, it would be the most logical to just use "_", but this would be a deviation from how it works in tidal for some cases. Maybe "=".. ?

felixroos avatar Apr 12 '22 19:04 felixroos

I'm not sure about the implementation, but would the "+" character be a reasonable choice? Carries the connotation of adding something, and also looks like a "t" for "tie". The main conflict might be confusion with its use in a numeric context, but other than being a potential part of a scientific notation representation of a number, I don't think "+" is otherwise used in the mininotation grammar (at least in strudel).

bpow avatar Aug 06 '22 17:08 bpow

Maybe + and - will be used in the future for late and early? It could also be used for add at some point, like "[0 1 2] + <1 2>" or similar. So I would be careful allocating the plus.. I think _ would be a good choice, because it is quite common for music DSLs to use that symbol for ties, and also because _ is redundant in tidal, having the same function as @:

c3 _ = c3 @ = c3@2

Still, if we have decided a symbol, the actual implementation might be tricky, if not impossible without dirty tricks. But it would be immensely useful for reading and writing longer rhythms with syncopation

felixroos avatar Aug 06 '22 21:08 felixroos

It would be possible to implement within the mini-notation parser, because that has access to the sequence structure before turning it into a pattern. It would indeed be problematic as a strudel function though.

I think the answer to this kind of issue is to extract/formalise the workings of the mini-notation into DSL for patterns-as-sequences, that sits well with the current patterns-as-signals. I'm working on this..

yaxu avatar Aug 06 '22 22:08 yaxu

If/when there's a 'cyclewise mode' vs a 'beatwise mode', then it would make sense for [a b c] _ to work like [a b c]_2 in the former and a_1%3 b_1%3 c_4%3 in the latter.

yaxu avatar Aug 07 '22 08:08 yaxu

being able to unnest a pattern could be a step in the right direction to solve this: https://strudel.tidalcycles.org/?v5Dalvj2JIxH

felixroos avatar Feb 19 '23 20:02 felixroos

ties can also be solved like this: https://github.com/tidalcycles/strudel/pull/193#issuecomment-1821326556

felixroos avatar Nov 21 '23 17:11 felixroos