v2.1.2 I/O fixes
Thanks to @Kapitan11 who spotted bugs when decodings tokens given as ids / integers (#59), this update brings a few fixes that solve them alongside tests ensuring that the input / output (i/o) formats of the tokenizers are well handled in every cases.
The documentation has also been updated on this subject, that was unclear until now.
Changes
- 394dc4d Fix in
MuMIDI
andOctuple
token encodings that performed the preprocessing steps twice; - 394dc4d code of single track tests improved and now covering tempos for most tokenizations;
- 394dc4d
MuMIDI
can now decode tempo tokens; - 394dc4d
_in_as_seq
decorator now used solely for thetokens_to_midi()
method, and removed fromtokens_to_track()
which explicitly expects aTokSequence
object as argument (089fa74); - 089fa74
_in_as_seq
decorator now handling all token ids input formats as it should; - 9fe7639 Fix in
TSD
decoding with multiple input sequences when not inone_token_stream
mode; - 9fe7639 Adding i/o input ids tests;
- 8c2349b
unique_track
property renamed toone_token_stream
as it is more explicit and accurate; - 8c2349b new
convert_sequence_to_tokseq
method, which can convert any input sequence holding ids (integer), tokens (string) or events (Event) data into aTokSequence
or list ofTokSequence
s objects, with the appropriate format depending on the tokenizer. This method is used by the_in_as_seq
decorator; - 8c2349b new
io_format
tokenizer property, returning the tokenizer's io format as a tuple of strings. Their significations are: I for instrument (for non one_token_stream tokenizers), T for token, C for sub-token class (for multi-voc tokenizers) - Minor code lint improvements;
Compatibility
- All good 🙌