# Random integer oscillator

**URL:** <https://uzu.lurk.org/t/random-integer-oscillator/4644>\
**Category:** TidalCycles\
**Tags:** innards\
**Created:** [3 April 2023 00:04 UTC](https://uzu.lurk.org/t/random-integer-oscillator/4644 "2023-04-03T00:04:51Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![ikobe](https://uzu.lurk.org/user_avatar/uzu.lurk.org/ikobe/32/1953_2.png) [@ikobe](https://uzu.lurk.org/u/ikobe)\
**Post date:** [3 April 2023 15:22 UTC](https://uzu.lurk.org/t/random-integer-oscillator/4644/5 "2023-04-03T15:22:57Z")

</div>

Thank you for your helpful replies! I've found the solution for converting `RealFrac` patterns into `Integer` ones in an older thread (cf. [Rounding Float patterns - #3 by yaxu](https://club.tidalcycles.org/t/rounding-float-patterns/2250/3)):

```haskell
d1
  $ spin (round <$> perlin*100)
  $ note "b5" # "superpiano"
  + up "-7 -5 0 2 3 -5 -7 2 0 -5 3 2".

```

The `round` function was exactly what I was looking for, although I'm unsure how the operator `<$>` functions. Time to finally dig into how Tidal is implemented, I suppose:)

---

_[View the full topic](https://uzu.lurk.org/t/random-integer-oscillator/4644)._
