tidalcycles / strudel

Web-based environment for live coding algorithmic patterns, incorporating a faithful port of TidalCycles to JavaScript
https://strudel.cc/
GNU Affero General Public License v3.0
641 stars 111 forks source link

stepJoin sometimes wonky #1066

Closed yaxu closed 5 months ago

yaxu commented 5 months ago

This is fine: https://strudel.cc/?4b4EPwnyPDlw

This is all over the place with doubled up events: https://strudel.cc/?gCSgSa3UXGHf

yaxu commented 5 months ago
mini("x").s_expand(mini("1 1 1 1 1")).drawLine()
|xxxxx|xxxxx|xxxxx|xxxxx|xxxxx|xxxxx|xxxxx|xxxxx|xxxxx|xxxxx

mini("x").s_expand(mini("1 1 1 1 1 1")).drawLine()
|xx.xxx|xx.xxx|xx.xxx|xx.xxx|xx.xxx|xx.xxx|xx.xxx|xx.xxx|xx.xxx
|xx.xx.|xx.xx.|xx.xx.|xx.xx.|xx.xx.|xx.xx.|xx.xx.|xx.xx.|xx.xx.

mini("x").s_sub(mini("0")).drawLine()
|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x

mini("x").s_sub(mini("0 0 0 0 0 0")).drawLine()
|xx.xxx|xx.xxx|xx.xxx|xx.xxx|xx.xxx|xx.xxx|xx.xxx|xx.xxx|xx.xxx
|xx.xx.|xx.xx.|xx.xx.|xx.xx.|xx.xx.|xx.xx.|xx.xx.|xx.xx.|xx.xx.
yaxu commented 5 months ago

It happens when tactus of rightmost pattern is 6 or 12

mini("x").s_sub(mini("0 0 0 0 0 0 0 0 0 0 0 0")).drawLine()
|xx.xxxxxxxxx|xx.xxxxxxxxx|xx.xxxxxxxxx|xx.xxxxxxxxx|xx.xxxxxxxxx
|xx...x..x...|xx...x..x...|xx...x..x...|xx...x..x...|xx...x..x...
|xx..........|xx..........|xx..........|xx..........|xx..........
|xx..........|xx..........|xx..........|xx..........|xx..........

edit actually quite a few others..

yaxu commented 5 months ago

It's OK in tidal

tidal> drawLine $ s_expand "1 2 3 4 5 6" "a"

[3 cycles]
|aa-a--a---a----a-----|aa-a--a---a----a-----|aa-a--a---a----a-----

vs

mini("x").s_expand(mini("1 2 3 4 5 6")).drawLine()
|x-x-----------.x-----x-------------------x-----|x-x-----------.x-----x-------------------x-----
|x-x-----------.x-----x-------------------......|x-x-----------.x-----x-------------------......
yaxu commented 5 months ago

Minimal broken pattern: fastcat(pure('a'),pure('a'),pure('a'),pure('a'),pure('a'),pure('a'),).stepJoin()