magenta / note-seq

A serializable note sequence representation and utilities.
Apache License 2.0
217 stars 57 forks source link

Integer overflow error in PianorollEncoderDecoder after conversion from NoteSequence #35

Closed kivimae closed 2 years ago

kivimae commented 3 years ago

Currently, when converting a NoteSequence to a PianoRollSequencel, the converter only outputs note pitch's as np.int64, which seems to be inconsistent with most generation methods for both, which store this as an int. In particular though, this causes problems when using the PianorollEncoderDecoder's classes events_to_label and class_index_to_event methods as they have overflow errors for pitches above 84. A minor edit to the output fixes this of _from_quantized_sequence fixes this.

google-cla[bot] commented 3 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

kivimae commented 3 years ago

@googlebot I signed it!