# plot\_onset\_strength

> plot\_onset\_strength(y: npt.ArrayLike, sr:int, standard: bool = True, custom\_mel: bool = False, cqt: bool = False)

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

To plot the onset strength of the input signal with time-axis

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

y: input signal&#x20;

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

standard: using STFT to calculate&#x20;

custom\_mel: using Mel-scale to calculate&#x20;

cqt: using CQT to calculate

{% 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.plot_onset_strength(y = y, sr = sr, standard = True, custom_mel = True, cqt = True)
```

<figure><img src="https://3500702469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh9wXRXdIQoYFVdZ0YFUo%2Fuploads%2FSrBSAd3f8Wg5Ts2vER7M%2Fimage.png?alt=media&#x26;token=f0e83621-857d-40b4-936e-1bf70eb75f12" alt=""><figcaption></figcaption></figure>
