The only way to reliably produce .nbs audio files for Minecraft would be to use Minecraft Note Block Studio that can process MIDI songs (.mid, .midi) and convert them to .nbs file useable in the game. This seems like to be the only way to achieve mid to nbs conversion.
Updated: September 16, 2019
Follow us!