Emute-Lab-Instruments / uSEQ

20 stars 0 forks source link

add phase shift function #75

Closed chriskiefer closed 1 month ago

chriskiefer commented 5 months ago

(defun phase (ph shift) (% (+ ph shift) 1.0))

monkey-w1n5t0n commented 4 months ago

Although they work slightly differently, I've added an offset function that offsets an entire expression in time, so we can achieve similar results with it.

For example:

(define my-phasor bar)
(a1 my-phasor)
(a2 (offset (/ barDur 2) my-phasor))

makes the two outputs have a 50% phase difference.

A good name for the function you specified could be phasor-offset (or offset-phasor? It probably makes sense to pick a convention at some point and stick with it).

chriskiefer commented 1 month ago

this is called 'shift'