Transition between patterns
What are transitions?
Transitions are functions you can use to switch musically between patterns. Start with a pattern on d1
:
You can then perform a crossfade transition to a new pattern using xfade
:
Note that the argument we give to xfade
is 1
, which means to apply the transition to the pattern that is running on d1
.
You can use transitions on any d
pattern in Tidal:
You can also apply a transition to any arbitrary pattern name:
Most of the transitions also have an "In"
variant, where you can specify the number of cycles that the transition takes to complete:
The following sections will present you all the transition functions that can you can use to switch musically from a pattern to another. Each function will be presented following the same model:
- Type signature: how the function is declared on the Haskell side.
- Description: verbal description of the function.
- Examples: a small list of examples that you can copy/paste in your editor.
Anticipate
anticipate
Queue up a pattern to be triggered (or dropped) in after 8
cycles. The argument supplied to anticipate
is the ID of the new pattern that is created.
Stop the newly created pattern using its id: d1 silence
anticipateIn
Start playing a pattern after a specified number of cycles and assign it an ID.
The first argument is the ID of the newly created pattern, and the second argument is the number of cycles after which the pattern will begin playing.
Clutch
Clutch
clutch
degrades the current pattern while undegrading the next. The argument provided to clutch
is the ID of the pattern that clutch
creates or the pattern that clutch
is replacing.
This is like xfade
but not by gain of samples but by randomly removing events from the current pattern and slowly adding back in missing events from the next one.
clutch
takes two cycles for the transition, essentially this is clutchIn 2
.
clutchIn
In
variant of the function above.
histpan
This will pan
the last four patterns on the d1
channel from left to right, the most recent on the left:
Interpolate
interpolate
Morph control values between patterns in four cycles. The argument supplied to interpolate
is the ID of the new pattern that is created.
Stop the newly created pattern using its id:
interpolateIn
Morph control values between patterns in a given number of cycles. The first argument supplied to interpolate
is the ID of the new pattern that is created and the second is the number of cycles.
Stop the newly created pattern using its id:
Jump
jump
jump
is essentially the no transition-transition. It jumps directly into the given pattern. The variants jumpIn
, jumpIn'
and jumpMod
provide more useful capabilities.
Say you have:
Then both of the following lines will have the same effect when evaluated:
jumpIn
jumpIn
takes the identifier of the ControlPattern
track and an integer cycleCount
. It will jump unaligned into the given pattern after cycleCount
cycles have completed.
Say you have this:
Then the subdivision on the hi-hat will increase 2
cycles after evaluation of the next line:
The transition will not align with the beat on cycle boundary.
jumpIn’
jumpIn'
takes the identifier of the ControlPattern
track and an integer cycleCount
. It will jump at cycle boundary into the given pattern after cycleCount
cycles have completed.
Example: Say you have this:
Then the subdivision on the hi-hat will increase 2 cycles after evaluation of the next line:
The transition will align with the beat on cycle boundary.
jumpMod
jumpMod
takes the identifier of the ControlPattern
track and an integer cycleMod
. It will jump at cycle boundary into the given pattern when currentCycle mod cycleMod == 0
.
Example: Say you have this:
Then the subdivision on the hi-hat will increase in one of the next 2 cycles after evaluation of the next line:
The transition will align with one of the next 2 bd onsets.
Wait
wait
Wait functions are used to pause a running pattern for a given number of cycles.
Here wait 2 4
pauses pattern “2” for “4” cycles then starts the new pattern.
This is useful if you want to have one pattern on pause for a certain number of cycles while you make a change.
waitT
waitT
allows you to specify any of the transition functions: xfadeIn, clutchIn, anticipate
etc.
Note the arguments and you need to include any argument for the specified transition:
waitT <patternID> (Sound.Tidal.Transition.<transitionName> <transitionArg>) <cycles>
Wash
wash
wash
is a function used to define a couple of the other transitions, anticipate
and jump
. It’s not really useful on its own, unless you wanted to make your own version of anticipate
. It looks like it needs some work to make it more user friendly.
washIn
Fade
xfade
Start with a pattern on d1:
You can then perform a crossfade transition to a new pattern using xfade:
Note that the argument we give to xfade
is 1
, which means to apply the transition to the pattern that is running on d1
.
You can use transitions on any d
pattern in Tidal:
You can also apply a transition to any arbitrary pattern name:
xfadeIn
Same thing as xfade
, but you can specify the number of cycles that the transition takes to complete: