Tidal
Tidal copied to clipboard
Pattern-local cps
It would be lovely to have per-pattern cps.
E.g. so these could be beat aligned:
d1 $ sound "bd bd cp"
# localcps 1
d2 $ sound "bd bd bd cp"
# localcps (4/3)
This is already possible with slow, the difference is where the cps changes, the pattern continues in a stateful way.
Some design thoughts:
- The localcps could be expressed as a multiplier of the 'global' cps.
- There would need to be a way to reset the localcps and cycle offset to the global one. E.g. setting it to
-1, or simply not specifying it. - To avoid unexpected phase shifts, it would generally be best to set it at the start of a cycle, e.g. like:
d2 $ stack [localcps(4/3), sound "~ bd bd cp"]
- It might even be better as a function that adds a localcps pattern to another one (like
overlay):
d2 $ localcps (4/3) $ sound "~ bd bd cp"
cpswould need to be rational. Tricky when the link clock is floating point :/
Tricky when the link clock is floating point :/
You could find the next rational for that float