Difference between revisions of "jumpMod"

From TidalCycles userbase
Jump to: navigation, search
(First text.)
(Typo in code.)
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
[[Category:Transitions]]
 
[[Category:Transitions]]
  
<code>jumpMod</code> takes the identifier of the "pattern swimlane" and an integer ''cycleCount''. It will jump '''at cycle boundary''' into the given pattern after ''cycleCount'' cycles have completed.
+
<code>jumpMod</code> takes the identifier of the "pattern swimlane" and an integer ''cycleCount''. It will jump '''at cycle boundary''' into the given pattern after ''cycleCount'' cycles have completed '''and''' if <code>cycle mod == 0</code>.
  
 
'''Example:''' Say you have this:
 
'''Example:''' Say you have this:
Line 10: Line 10:
 
Then the subdivision on the hi-hat will increase 2 cycles after evaluation of the next line:
 
Then the subdivision on the hi-hat will increase 2 cycles after evaluation of the next line:
 
<source>
 
<source>
jumpIn 1 2 $ sound "hh*8" --`1` because `d1`
+
jumpMod 1 2 $ sound "hh*8" --`1` because `d1`
 
</source>
 
</source>
The transition will line up with the beat on cycle boundary.
+
The transition will line up with a beat on cycle boundary but not necessarily the next <code>bd</code> you hear.
  
'''See also:''' [[jump]], [[jumpIn]]
+
'''See also:''' [[jump]], [[jumpIn]], [[jumpIn']]

Revision as of 22:44, 11 July 2019


jumpMod takes the identifier of the "pattern swimlane" and an integer cycleCount. It will jump at cycle boundary into the given pattern after cycleCount cycles have completed and if cycle mod == 0.

Example: Say you have this:

d1 $ sound "hh*4"
d2 $ sound "bd" --have a beat on the 1 for orientation

Then the subdivision on the hi-hat will increase 2 cycles after evaluation of the next line:

jumpMod 1 2 $ sound "hh*8" --`1` because `d1`

The transition will line up with a beat on cycle boundary but not necessarily the next bd you hear.

See also: jump, jumpIn, jumpIn'