def w2Midi(name, BytesIo):
    """
    Writes the output of `get_music` inside a '.midi' file on disk.

    Parameters
    ----------
    name : str
        name of file
    BytesIo : get_music output variable
        varible of music generated with `get_music`
    """
    muz_file = open(str(name) + '.midi', 'w')
    muz_file.write(BytesIo.getvalue())
    muz_file.close()
