# Using period(.dot) between two Control Function

**URL:** <https://uzu.lurk.org/t/using-period-dot-between-two-control-function/3174>\
**Category:** TidalCycles\
**Tags:** questions\
**Created:** [23 May 2021 02:06 UTC](https://uzu.lurk.org/t/using-period-dot-between-two-control-function/3174 "2021-05-23T02:06:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![eyd](https://uzu.lurk.org/letter_avatar_proxy/v4/letter/e/c67d28/32.png) [@eyd](https://uzu.lurk.org/u/eyd)\
**Post date:** [23 May 2021 02:06 UTC](https://uzu.lurk.org/t/using-period-dot-between-two-control-function/3174/1 "2021-05-23T02:06:53Z")

</div>

I'm studying by looking at the codes of Kindohm.  
I saw in the tutorial that period(.dot?) shortcuts are used for grouping,  
but I don't know exactly how it works when it's located between two Control Functions as shown in the code below.

```
let spike p = ((# delaytime (range 0.001 0.3 $ slow 7.1 sine)) . (# delayfeedback (range 0.7 0.99 $ slow 6.71 sine))) $ p

```

I'm curious about the role of the **dot** between 'delaytime' and 'delayfeedback'.

Thank you!

---

<div class="post-metadata">

**Author:** ![mrreason](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mrreason/32/3203_2.png) [@mrreason](https://uzu.lurk.org/u/mrreason)\
**Post date:** [23 May 2021 07:51 UTC](https://uzu.lurk.org/t/using-period-dot-between-two-control-function/3174/2 "2021-05-23T07:51:52Z")

</div>

Hey @eyd ! The dot (.) is the haskell operator for function composition which comes from math. When you are interested in a more in depth explanation with examples you might want to check this out: [What is the dot operator in Haskell? | by Saeed Zarinfam | Medium](https://zarinfam.medium.com/what-is-the-dot-operator-in-haskell-74b92a4d94e9)

---

<div class="post-metadata">

**Author:** ![eyd](https://uzu.lurk.org/letter_avatar_proxy/v4/letter/e/c67d28/32.png) [@eyd](https://uzu.lurk.org/u/eyd)\
**Post date:** [23 May 2021 07:55 UTC](https://uzu.lurk.org/t/using-period-dot-between-two-control-function/3174/3 "2021-05-23T07:55:22Z")

</div>

Thank you. I'll check it out! 😄

---

<div class="post-metadata">

**Author:** ![mbutz](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mbutz/32/1085_2.png) [@mbutz](https://uzu.lurk.org/u/mbutz)\
**Post date:** [23 May 2021 14:26 UTC](https://uzu.lurk.org/t/using-period-dot-between-two-control-function/3174/4 "2021-05-23T14:26:26Z")

</div>

I also find [this comparison between dot and dollar operator](https://stackoverflow.com/questions/940382/what-is-the-difference-between-dot-and-dollar-sign) revealing.

(In my experience you can find some good explanations on Stackoverflow because mostly one problem will be explained from different perspective in one answer.)

---

<div class="post-metadata">

**Author:** ![yaxu](https://uzu.lurk.org/user_avatar/uzu.lurk.org/yaxu/32/2_2.png) [@yaxu](https://uzu.lurk.org/u/yaxu)\
**Post date:** [23 May 2021 21:32 UTC](https://uzu.lurk.org/t/using-period-dot-between-two-control-function/3174/5 "2021-05-23T21:32:26Z")

</div>

I think that `spike` function is a bit simpler if rearranged so the `.` isn't needed:

```haskell
let spike pat = pat # delaytime (range 0.001 0.3 $ slow 7.1 sine) # delayfeedback (range 0.7 0.99 $ slow 6.71 sine)

```

But yep, as you imply in your question, the `.` in the mini notation (for grouping or marking out metrical 'feet') is unrelated to its use outside the mini notation.

The above links are great for in-depth understanding of its general use in Haskell.

In Tidal though, it's almost always used for one thing. Lets take `jux` for example, it takes a function and a pattern as inputs, like `jux (hurry 2) (sound "bd sn")`. What if you wanted to chop it up as well? Then you can use `.` to combine functions together, e.g. `jux (hurry 2 . chop 64) (sound "bd sn")`, and add a reverse as well like `jux (rev . hurry 2 . chop 64) (sound "bd sn")`.

So `.` is used to join together two functions together. It only works if the output of the second function can be fed into the input of the first function. In Tidal it's mainly used for joining together Tidal functions which simply take a pattern as input and return a pattern as output, like `fast 2`, `rev`, `scramble`, `(# squiz 1.1)`, etc.
