packages feed

zwirn-0.2.3.1: docs/reference/time.md

**Functions manipulating time**

**fast** `:: Number -> a -> a`

*fast* speeds up patterns by a given amount. For example, `fast 2 x` will make `x` twice as fast.
If the amount is less than one, it will slow down instead. Negative amounts will reverse time additionaly.

equivalences:
`fast n x == x*n`
`fast (1 |/ n) x == slow n x`
`fast -1 x == rev x`

examples:
```
1 $: fast [2 4] kick
```
```
1 $: [kick (fast 2 snare) ~ hat]
```
```
1 $: fast <2 -2> [kick snare ~ hat]
```

**slow** `:: Number -> a -> a`

*slow* slows down patterns by a given amount. For example, `slow 2 x` will make `x` twice as slow.
If the amount is less than one, it will speed up instead. Negative amounts will reverse time additionaly.

equivalences:
`slow n x == x/n`
`slow (1 |/ n) x == fast n x`
`slow -1 x == rev x`

examples:
```
1 $: slow 1.5 [kick snare hat]
```

**shift** `:: Number -> a -> a`

*shift* shifts patterns by a given amount. Positive amounts shift to the left, making events occur *later*
Negative amounts shift to the right, making events occur *sooner*.

equivalences:
`shift n x == x+n`

examples:
```
1 $: [kick snare kick+0.5 snare]
```


**ply** `:: Number -> a -> a`

*ply* speeds up the inner structure of patterns by a given amount, resulting in repetitions of events.

examples:
```
1 $: ply 2 [kick snare ~ hat]
```

**bump** `:: Number -> a -> a`

*bump* shifts the inner structure of patterns by a given amount.

examples:
```
1 $: [(bump 0.25 [kick snare]), hat*4]
```

**rev** `:: a -> a`

*rev* reverses a pattern.

equivalences:
`rev x == slow -1 x`
`rev x == fast -1 x`

examples:
```
1 $: <rev id> [kick snare ~ hat]
```

**revBy** `:: Number -> a -> a`

*revBy* reverses a certain part of a pattern.

examples:
```
1 $: revBy <0 0.25 0.5 0.75> 
  $ [kick [hat hat] snare clap]
```