NadaAfterwards / yume-bgm-tools

Set of Python tools for use in Yume Wiki
Do What The F*ck You Want To Public License
1 stars 0 forks source link

Midi files produce weird results #1

Open NadaAfterwards opened 1 month ago

NadaAfterwards commented 1 month ago

midi.zip Output results in song being high-pitched and out of tune. Might have something to do with the AudioSegment object requiring unique handling for MIDI files.

NadaAfterwards commented 1 month ago

Correction: It's unlikely the issue is with AudioSegment as it has no special handling for MIDI files. It's more likely the problem is with the conversion to OGG since MIDI files are not audio recordings.

Adding MIDI conversions support would create too many dependencies for a rare use case (MIDIs are not used as much as WAV or MP3). Best solutions are:

It's not 100% known if Yume Wiki uses MIDI as the advanced search is broken. The only known MIDI song (YN's save theme) was converted to OGG. Nevertheless it appears MediaWiki has support for MIDI playback. In any case if MIDI support is kept, it will be seen more as a novelty and not intended for the tool(s) end goal. So long as no BGM in this format is found in Yume Wiki.

NadaAfterwards commented 1 month ago

Add exception to skip conversion, notifying the user when this happens.

Unfortunately, FFmpeg has no MIDI support so this causes tracebacks.

MIDI support will be discontinued in the next release. In the future once this project is complete I might look into re-implementing it but as I said, it will add more dependencies.