ethman / slakh-utils

Utilities for interfacing with Slakh2100
MIT License
55 stars 14 forks source link

Unrealistic pitch range in midi file #4

Closed TaegyunKwon closed 4 years ago

TaegyunKwon commented 4 years ago

Hi, I'm trying to train a transcriber using slakh, but I found that there are some pitch which relies on too low or too high range( {pitch}<21 or {pitch}>108). For example, in track01170, there is a note with pitch = 0 I guess they would be ignored when you synthesize them, but I'm not sure about exact standard (i.e. different instrument could ignore different pitch range). Can I get more details about it?

ethman commented 4 years ago

Hey! So these MIDI files are from the Lakh MIDI Dataset, which is a huge dataset of MIDI files scraped from the web. That means, while we did add a few heuristic rules to make sure we generally got good files, there will ultimately files that slip through the cracks (like this one). Technically, a pitch value of 0 is legal in the MIDI standard (note values range from 0-127, but the piano only spans 21-108).

Regardless, no synthesizer that we used supports notes that low, so it would not be synthesized. Interestingly, if pitch 0 were synthesized, it would be below the range of human hearing:

>> import pretty_midi as pm >> pm.note_number_to_hz(0) 8.175798915643707