# How to sequence random patterns?

**URL:** <https://uzu.lurk.org/t/how-to-sequence-random-patterns/5923>\
**Category:** TidalCycles\
**Tags:** questions\
**Created:** [15 September 2025 20:35 UTC](https://uzu.lurk.org/t/how-to-sequence-random-patterns/5923 "2025-09-15T20:35:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![seriousmusician](https://uzu.lurk.org/user_avatar/uzu.lurk.org/seriousmusician/32/3264_2.png) [@seriousmusician](https://uzu.lurk.org/u/seriousmusician)\
**Post date:** [15 September 2025 20:35 UTC](https://uzu.lurk.org/t/how-to-sequence-random-patterns/5923/1 "2025-09-15T20:35:27Z")

</div>

SeqPLoop does not regenerate random values on the “loop”. Ur does, but Ur doesn’t seem ideal for sequencing events in the same way as SeqPLoop.

```haskell
let
notes = n (segment 12 $ irand 12) # s "supervibe"
notesUrShort = ur 1 "notes" [
  ("notes", notes)
  ] []
notesUrLong = ur 10 "notes" [
  ("notes", notes)
  ] []
in do
  d1 $ "cp"
  d2 $ seqPLoop [ -- Same notes every cycle.
    (0, 1, notes)
    ]
  d2 $ seqPLoop [ -- Same notes every cycle.
    (42, 43, notes)
    ]
  d2 $ notesUrShort -- Different notes.
  d2 $ seqPLoop [ -- Same notes every cycle.
    (0, 1, notesUrShort)
    ]
  d2 $ seqPLoop [ -- Same notes every cycle.
    (42, 43, notesUrShort)
    ]
  d2 $ seqPLoop [ -- Same notes every cycle.
    (0, 1, notesUrLong)
    ]
  d2 $ seqPLoop [ -- Same notes every cycle.
    (42, 43, notesUrLong)
    ]
  d2 $ seqPLoop [ -- Same notes every cycle.
    (0, 1, (<~) (segment 999 $ irand 999) notes)
    ]

```

---

<div class="post-metadata">

**Author:** ![seriousmusician](https://uzu.lurk.org/user_avatar/uzu.lurk.org/seriousmusician/32/3264_2.png) [@seriousmusician](https://uzu.lurk.org/u/seriousmusician)\
**Post date:** [14 October 2025 19:57 UTC](https://uzu.lurk.org/t/how-to-sequence-random-patterns/5923/2 "2025-10-14T19:57:27Z")

</div>

Here is one workaround:

```haskell
let
notes = n (segment 12 $ irand 12) # s "supervibe"
seqPLoopFunc randSeed = seqPLoop [
  (0, 1, (<~) randSeed notes),
  (1, 2, (<~) (randSeed + 1) notes) -- Different notes per cycle
  ]
in do
  setCycle 0
  d1 $ "cp"
  d2 $ seqPLoopFunc (irand 999)
  d2 $ seqPLoopFunc (fast 1.1 $ irand 999) -- Different notes per loop

```
