usdb_syncer
usdb_syncer copied to clipboard
Add basic cleanup tasks for songs
The tool could perform some basic cleanup/fixes on the songs, e.g.
- [x] replace decimal commas by decimal points in #BPM, #GAP, #PREVIEWSTART, #START
- [x] delete leading line break (after header, before first note)
- [x] delete trailing line break (after last line, before
E
) - [x] round #GAP to nearest integer (to nearest 10 ms)
- [x] shift first note to beat 0 (and adjust #GAP accordingly)
- [x] increase low BPM values (all all timings) to be in a sensible range (200 <= BPM < 400)
- [ ] decrease (insanely) high BPM values (and all timings) to be in a sensible range (e.g. BPM <= 600?)
- [x] fix line break timings (similar to USDX Editor ->
T
) - [x] fix touching notes (shorten earlier note by 1 if duration > 1)
- [x] normalize pitch values (sometimes they are in the 60s --> lowest pitch in [0, 11])
- [x] correct spaces (after each word instead of in front of each word)
- [x] fix empty notes (
~
?) - [x] replace accents misused as apostrophes (accents ` and ´ -> ')
- [x] convert relative to absolute timestamps
- [x] round #BPM to 2 decimal digits
- [x] replace upright apostrophe ' by typographer’s apostrophe ’ (optional?)
- [x] capitalize the beginning of each line (similar to USDX Editor ->
C
, optional?) - [x] fix overlapping notes (shorten earlier note by overlap + 1 if resulting length >= 1)
- [ ] fix zero-length notes (how?)
- [ ] ensure medley start and end beats are on note start and end respectively If we look for the next note end going backwards, this would also fix a gap introduced by the touching notes fix.
- [ ] fix quotes (single 'text', double "text" etc. to “text” or »text« or «text» etc. depending on language)
Advanced cleanup:
- [x] add uploader as #CREATOR (if empty) (add editors, separated by commas?)
- [x] translate language names from other than English to English (see https://github.com/UltraStar-Deluxe/UltraStar-Manager/blob/d0f7e879d856f487ae0abed9d484c615f13ae1ee/src/plugins/preparatory/QUPreparatoryTask.cpp#L314)
- [ ] Find suitable medley section automatically (if not present)
- [ ] Set preview tag (if not set, to medley start if available, otherwise to time of first beat)
- [ ] determine/verify #LANGUAGE (cld2 https://pypi.org/project/pycld2/, cld3 https://pypi.org/project/gcld3/)
- [ ] determine/verify #GENRE (e.g. https://www.chosic.com/music-genre-finder/?track=1z3ugFmUKoCzGsI6jdY4Ci or https://www.soundmaximum.com/music-genre-finder/)
- [ ] determine/verify #YEAR (e.g. swisscharts.com or last.fm lookup of artist/title)