EleutherAI / EleutherAI/aria-utils
Truncated note in basic.mid
- Dominant language
- Python
- Stars
- 7
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
In `basic.mid`, the final piano note is a 1000ms note event, with a unclosed pedal event - however when we tokenize this comes out as.
```json
[
"piano",
36,
120
],
[
"onset",
4000
],
[
"dur",
1560
]
```
I think the issue might be [here](https://github.com/EleutherAI/aria-utils/blob/main/ariautils/midi.py#L275-L278)
```python
final_tick = self.note_msgs[-1]["data"]["end"]
```
I guess it's snapping to the final drum note? and it should be 2000ms if it snaps to the final strings note. Here's a possible solution, but I think it could be quite expensive at scale.
```python
final_tick = max([note["data"]["end"] for note in self.note_msgs])
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.