# `TuningFork.Tick`
[🔗](https://github.com/jaman/tuning_fork/blob/v0.1.11/tuning_fork/lib/tuning_fork/tick.ex#L1)

Counters that step once each time a loop comes round.

    part(bpm: 120, synth: Kit.voice("bd", 0.3))
    |> play(Ring.at(~w(c2 e2 g2 a2)a, tick()), 1)

# `look`

```elixir
@spec look(term()) :: non_neg_integer()
```

The counter's value, without stepping it.

    iex> TuningFork.Tick.reset()
    iex> TuningFork.Tick.tick(:look_here)
    iex> TuningFork.Tick.look(:look_here)
    1

# `reset`

```elixir
@spec reset(term()) :: :ok
```

Put a counter back to zero. With no name, every counter.

# `set`

```elixir
@spec set(term(), non_neg_integer()) :: :ok
```

Put a counter at `count`. With no name, the loop's own.

# `tick`

```elixir
@spec tick(term()) :: non_neg_integer()
```

Step the counter on and give the value it was at.

    iex> TuningFork.Tick.reset()
    iex> {TuningFork.Tick.tick(:walk), TuningFork.Tick.tick(:walk)}
    {0, 1}

---

*Consult [api-reference.md](api-reference.md) for complete listing*
