Multitrack ClassΒΆ

Pypianoroll provides the pypianoroll.Multitrack class for handling multitrack piano rolls.

class pypianoroll.Multitrack(resolution=None, tempo=None, downbeat=None, name=None, tracks=None)[source]

A container for multitrack piano rolls.

This is the core class of Pypianoroll.

resolution

Time steps per quarter note.

Type

int

tempo

Tempo (in qpm) at each time step. The length is the total number of time steps.

Type

ndarray, dtype={int, float}, shape=(?, 1), optional

downbeat

A boolean array that indicates whether the time step contains a downbeat (i.e., the first time step of a bar). The length is the total number of time steps.

Type

ndarray, dtype=bool, shape=(?, 1), optional

name

Multitrack name.

Type

str, optional

tracks

Music tracks.

Type

list of pypianoroll.Track objects, optional