Auto Add song title, artist, & author in UNSYNCEDLYRICS?


#1

Hello everyone :slight_smile:

I want to try to add extra info to the UNSYNCEDLYRICS section.

This is what the lyrics looks like:

"XXX||There's a place for us,
Somewhere a place for us.
Peace and quiet and open air
Wait for us Somewhere....."

I want to add the song title, artist at the beginning/top and then author at the bottom 3 spaces at the end of the song like this:

"There's A Place For Us
by Matt Monro

There's a place for us,
Somewhere a place for us.
Peace and quiet and open air
Wait for us Somewhere.

MUSIC from Joe"

Can I do this using Actions or Convert?

Thank you in advance for your help and advice :slight_smile:


#2

Name of action group: _Script Test#TEST

Action type: Format value
Field: UNSYNCEDLYRICS
Formatstring: $regexp($trim(%unsyncedlyrics%),^(...||)\s*(.+)\s*$,$1[TITLE - ARTIST:\t\t%title% - %artist%\n\n\n]$2[\n\n\n\nAUTHOR:\t\t%author%])

This will do three things.

  1. Trim trailing and leading whitespace from the original UNSYNCEDLYRICS field to clean it up.
  2. Append the artist - title to the start with 2 linefeeds only if them two fields exist.
  3. Append the author to the end with 3 linefeeds if only that field exists.

Start would be like: Notice the leading and trailing whitespaces marked *
I've omitted the xxx|| for clarity

*
*
*
LINE1


LINE 2

LINE 3
*
*

Result: with white pace cleaned up and the text formatted with tabbed title - artist and aurtor

TITLE - ARTIST:        mytitlegoeshere - artistnamegoeshere


LINE1


LINE 2

LINE 3



AUTHOR:        aurthornamegoeshere

Let me know if you want to retain the tabs otherwise just remove the \t from the code.

I personally would spilt the artist on line 1 and title on line two. Like

ARTIST:        artistnamegoeshere
TITLE:         mytitlegoeshere


LINE1


LINE 2

LINE 3



AUTHOR:        aurthornamegoeshere

Using:
$regexp($trim(%unsyncedlyrics%),^(...||)\s*(.+)\s*$,$1[ARTIST:\t\t%artist%\n][TITLE:\t\t%title%\n\n\n]$2[\n\n\n\nAUTHOR:\t\t%author%])


#3

hi stevehero,

I've tried using your code and modifying it without any luck :frowning: I keep getting scripting errors.

I've used this script:
$regexp($trim(%unsyncedlyrics%),^(...||)\s*(.+)\s*$,$1[TITLE - ARTIST:%title% - %artist%\n\n\n]$2[\n\n\n\nAUTHOR:%author%])

I get this:
XXX||ARTIST: Matt Monroe
TITLE: There's A Place For Us

*there is no "author" at the end of the song. I'm trying to add at the end of the lyrics "MUSIC from Joe" as the author. Maybe and error in the script?

I would prefer "ARTIST:" & "TITLE:" not be visible within the field.

I want it to look like this:
"There's A Place For Us"
by Matt Monroe

(adding the word "by" in the script of the artist name)

and at the end of the of the song lyrics with x3 enter/return spaces:
"MUSIC from Joe"

I would appreciate more of your input and advice on how to get this done this way :slight_smile:
Thank you in advance :slight_smile:

QUOTE (stevehero @ Jul 29 2017, 09:19) <{POST_SNAPBACK}>
Name of action group: _Script Test#TEST

Action type: Format value
Field: UNSYNCEDLYRICS
Formatstring: $regexp($trim(%unsyncedlyrics%),^(...||)\s*(.+)\s*$,$1[TITLE - ARTIST:\t\t%title% - %artist%\n\n\n]$2[\n\n\n\nAUTHOR:\t\t%author%])

This will do three things.

  1. Trim trailing and leading whitespace from the original UNSYNCEDLYRICS field to clean it up.
  2. Append the artist - title to the start with 2 linefeeds only if them two fields exist.
  3. Append the author to the end with 3 linefeeds if only that field exists.

Start would be like: Notice the leading and trailing whitespaces marked *
I've omitted the xxx|| for clarity

*
*
*
LINE1


LINE 2

LINE 3
*
*

Result: with white pace cleaned up and the text formatted with tabbed title - artist and aurtor

TITLE - ARTIST:        mytitlegoeshere - artistnamegoeshere


LINE1


LINE 2

LINE 3



AUTHOR:        aurthornamegoeshere

Let me know if you want to retain the tabs otherwise just remove the \t from the code.

I personally would spilt the artist on line 1 and title on line two. Like

ARTIST:        artistnamegoeshere
TITLE:         mytitlegoeshere


LINE1


LINE 2

LINE 3



AUTHOR:        aurthornamegoeshere

Using:
$regexp($trim(%unsyncedlyrics%),^(...||)\s*(.+)\s*$,$1[ARTIST:\t\t%artist%\n][TITLE:\t\t%title%\n\n\n]$2[\n\n\n\nAUTHOR:\t\t%author%])


#4

Test:

$regexp($trim(%unsyncedlyrics%),^(...\|\|)*\s*(.+)\s*$,$1[ARTIST: %artist%\n][TITLE: %title%\n\n\n]$2\n\n\n\n$if(%author%,%author%,"MUSIC from Joe"))

Will only work if Lyrics exist.

Will write %author% at end. If no %author% then it'll write:

"MUSIC from Joe"

#5

hi stevehero,

Been awhile.... :smiley:
I've been playing with the script that you made, thank you for that by the way, and this is what I'm happy with:

$regexp($trim(%unsyncedlyrics%),^(...||)\s(.+)\s*$,$1[%title%\n][%artist%\n\n\n]$2\n\n\n\n$if(%author%,%author%,"MUSIC from Joe"))

The question I have is... is there away to center, justify, put in the middle, "title, artist, and MUSIC from Joe"