Beispiel #1
0
    else:
        note_shift = 0

    # print('Your key is: '+song_key)
    # print('Your key in English is: '+myparser.english_note_name(song_key))
    english_song_key = myparser.english_note_name(song_key)

    # Parses song line by line
    mysong = Song(english_song_key)  # The song key must be in English format
    for song_line in song_lines:
        instrument_line = myparser.parse_line(song_line, song_key,
                                              note_shift)  # The song key must be in the original format
        mysong.add_line(instrument_line)

    print('============================================================')
    error_ratio = mysong.get_num_broken() / max(1, mysong.get_num_instruments())
    if error_ratio == 0:
        print('Song successfully read with no errors!')
    elif error_ratio < 0.05:
        print('Song successfully read with few errors!')
    else:
        print('**WARNING**: Your song contains many errors. Please check the following:'
              '\n- All your notes are within octaves 4 and 6. If not, try again with an octave shift.'
              '\n- Your song is free of typos. Please check this website for full instructions: '
              'https://sky.bloomexperiment.com/t/summary-of-input-modes/403')
    print('\nPlease fill song info or press ENTER to skip:')

    song_title = input('Song title (also used for the file name): ')
    if song_title == '':
        song_title = 'untitled'
    original_artists = input('Original artist(s): ')