Skip to content

⏳ bpm

bpm

The bpm module provides a way to set the tempo of the current session. The tempo is a global setting that affects all loops and samples, it is measured in beats per minute (BPM) and can be adjusted in real-time.

Cookbook

Set the tempo

bpm.set(120)

Get the current tempo

tempo = bpm.get()

Get the current beat

beat = bpm.beat()

Reference

Functions:

Name Description
beat

Get the current beat.

get

Get the BPM. This function can only be called from the global

set

Set the BPM. This function can only be called from the global

beat()

Get the current beat.

Returns:

Type Description
float

The current beat.

get()

Get the BPM. This function can only be called from the global scope.

Returns:

Type Description
float

The current BPM.

Raises:

Type Description
InLoopException

If called from inside a loop.

set(bpm)

Set the BPM. This function can only be called from the global scope.

Parameters:

Name Type Description Default
bpm float

The new BPM.

required

Returns:

Type Description
float

The new BPM.

Raises:

Type Description
InLoopException

If called from inside a loop.