コード例 #1
0
                      1] + ' and ' + os.path.split(svg_path)[1])

    if RenderModes.PNG in ENABLED_MODES:
        png_path0 = os.path.join(SONG_DIR_OUT, song_title + '.png')
        filenum, png_path = mysong.write_png(png_path0)

        if png_path != '':
            print('--------------------------------------------------')
            print('Your song in PNG is located in:', SONG_DIR_OUT)
            print('Your song has been split into ' + str(filenum + 1) + ' files '
                                                                        'between ' + os.path.split(png_path0)[
                      1] + ' and ' + os.path.split(png_path)[1])

    if RenderModes.MIDI in ENABLED_MODES:
        midi_path = os.path.join(SONG_DIR_OUT, song_title + '.mid')
        midi_path = mysong.write_midi(midi_path)
        if midi_path != '':
            print('--------------------------------------------------')
            print('Your song in MIDI is located at:', midi_path)

    if RenderModes.SKYASCII in ENABLED_MODES and song_notation not in [InputModes.SKY, InputModes.SKYKEYBOARD]:
        sky_ascii_path = os.path.join(SONG_DIR_OUT, song_title + '_sky.txt')
        res = mysong.write_ascii(sky_ascii_path, RenderModes.SKYASCII)
        if sky_ascii_path != '':
            print('--------------------------------------------------')
            print('Your song in TXT converted to Sky notation is located at:', sky_ascii_path)

    if RenderModes.ENGLISHASCII in ENABLED_MODES and song_notation not in [InputModes.ENGLISH,
                                                                           InputModes.ENGLISHCHORDS]:
        english_ascii_path = os.path.join(SONG_DIR_OUT, song_title + '_english.txt')
        english_ascii_path = mysong.write_ascii(english_ascii_path, RenderModes.ENGLISHASCII)