# beat\_tracking

> beat\_tracking(y: npt.ArrayLike, sr:int, write\_to\_wav: bool = True, hop\_length: int = 512)

{% hint style="info" %}
Function description
{% endhint %}

To show beat of the input signal with time axis and modify the .wav with beat click sounds

{% hint style="info" %}
Parameter
{% endhint %}

y: input signal&#x20;

sr: sampling rate (22050 Hz by default)&#x20;

write\_to\_wav: to add beat click sounds (not to store by default)&#x20;

hop\_length: hop size between frames

{% hint style="info" %}
Return
{% endhint %}

None

{% hint style="info" %}
Example
{% endhint %}

```python
from audioviz import *
import librosa
import numpy as np
from audioviz import BeatAnalysis

y, sr = librosa.load('Mozart_Turkish_March.wav', duration = 45)
BeatAnalysis.beat_tracking(y = y, sr = sr)
```

<figure><img src="https://3500702469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh9wXRXdIQoYFVdZ0YFUo%2Fuploads%2FSSQUOp4pluojLQWYLTaH%2Fimage.png?alt=media&#x26;token=3207aef4-3834-417b-a318-6285c2e8abc3" alt=""><figcaption></figcaption></figure>
