2D tokenization that replaces bar and position tokens with a single token called
same_or_not token. By using the cumulativeness of music, we can think notes
(including monophonic ones) and rests as they are in a stack. All we need to
pay attention to is whether they share the same time or not, their exact
position can easily be calculated by cumulative duration.
Symbols means:
ago up 0.5 interval.bgo down 0.5 interval.cnote player.dnote separator.
NOTE: Right now implementation uses TokSequence.bytes to store the string abcd
representation. To modify this feature,, one must subclass TokSequence and add
another representation similar to ids, bytes, toks etc.
Uses miditok as backend, therefore you may use them just like official miditok
tokenizations.
You may refer to recipes.py for tokenizing.
Run the following:
python -m unittest test/test_tokenizations.py This will create output files under output/test
Run the following:
python -m build .