musicaiz.tokenizers.REMITokenizerArguments

class musicaiz.tokenizers.REMITokenizerArguments(prev_tokens: str = '', sub_beat: str = 'SIXTEENTH', num_programs: Optional[List[int]] = None, velocity: bool = False, quantize: bool = True)[source]

This is the REMI arguments class. The default parameters are selected by following the original REMI representation.

prev_tokens: str

if we want to add tokens after the PIECE_START token and before the 1st TRACK_START token (for conditioning…).

sub_beat: str

the note length in VALID_TIME_UNITS that one bar is divided in. Note that this refers to the subdivisions of a 4/4 bar, so if we have different time signatures, the ratio of sub_beat / bar.denominator will be maintained to prevent wrong subdivisions when using bars with different denominators.

velocity: bool

if we want to add the velocity token. Velocities ranges between 1 and 128 (ints).

quantize: bool

if we want to quantize the symbolic music data for tokenizing.

__init__(prev_tokens: str = '', sub_beat: str = 'SIXTEENTH', num_programs: Optional[List[int]] = None, velocity: bool = False, quantize: bool = True) None

Methods

__init__([prev_tokens, sub_beat, ...])

save(args, out_dir[, file])

Saves the configs as a json file.

Attributes

num_programs

prev_tokens

quantize

sub_beat

velocity