Skip to contents

This function reshapes a piano roll matrix into a specified interval length. It pads with zero or crops the piano roll matrix to fit the desired length.

Usage

reshape_piano_roll(piano_roll_matrix, ticks_per_interval)

Arguments

piano_roll_matrix

A matrix to be reshaped. The matrix rows represent the pitch (from 0 to 127) and the columns represents the time (ticks).

ticks_per_interval

A number that specifies number of ticks per interval.

Value

A reshaped matrix with num_intervals rows and (ticks_per_interval*128) columns. Rows represent the time interval and columns represents the pitch.

Examples

if (FALSE) {
}