Skip to content

A simple MIDI Tokenizer incorporating 'beat' tokens

Notifications You must be signed in to change notification settings

suzuqn/MIDITokenizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

MIDI Tokenizer

A simple MIDI Tokenizer in the style of Score Transformer

Usage

from midi_to_tokens import midi_to_tokens

tokens = midi_to_tokens('path/to/midi', steps_per_beat=12).tokens

To tokenize measures 1 through 4 only,

tokens = midi_to_tokens('path/to/midi', steps_per_beat=12).measures(1, 4)

Supported tokens

  • bar : measure/downbeat
  • beat : beat
  • pos : position
  • note : note pitch
  • len : note length/duration

About

A simple MIDI Tokenizer incorporating 'beat' tokens

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages