Author Topic: Truncation of long titles to be usable for Radiotext  (Read 58 times)

andrew01

  • Newbie
  • *
  • Posts: 5
Truncation of long titles to be usable for Radiotext
« on: Yesterday at 05:57:09 pm »
Is it possible for a toggleable option to be added into Magic RDS 4 to truncate titles that exceed 64 characters? I have seen in action such script made with the help of AI at a station here (it was included within the main purpose of adding tags for RT+ for the metadata source so it can be compatible for Stereo Tool's RDS). It's nice seeing long titles like: Afrika Bambaataa Presents: Khayan & The New World Power - Feel The Vibe (Vibe Mix) be reduced to Afrika Bambaataa Presents: Khayan - Feel The Vibe

Jan

  • Hero Member
  • *****
  • Posts: 1287
Re: Truncation of long titles to be usable for Radiotext
« Reply #1 on: Yesterday at 06:10:11 pm »
Using the built-in text replacement (regular expression), you can easily shorten the text as desired. Additionally, if you drop the prefix "Afrika Bambaataa presents" from the text, or place the show name in another text in a loop, you can fit an even longer song title in there. Do you want to give an example here?

andrew01

  • Newbie
  • *
  • Posts: 5
Re: Truncation of long titles to be usable for Radiotext
« Reply #2 on: Yesterday at 07:04:32 pm »
Indeed there is that function, but it would have been a tiny bit nicer if something default (such as modifying "and" to "&", or "feat." to "," etc.) was all added through a single button. Also, I don't think it would be beneficial adding the artist name like "Afrika Bambaata" to be put in that text replacement tool, since for example I have the song "Afrika Bambaataa; The Soulsonic Force - Planet Rock", and wouldn't that remove the artist even though the text is <64 characters?

Jan

  • Hero Member
  • *****
  • Posts: 1287
Re: Truncation of long titles to be usable for Radiotext
« Reply #3 on: Yesterday at 07:32:45 pm »
I'm not sure if one preset can cover all cases, or if there is a universal setting that will suit everyone. With a regular expression, everyone can customize it without having to add additional controls to the GUI. We'll leave it at that for now.

Jan

  • Hero Member
  • *****
  • Posts: 1287
Re: Truncation of long titles to be usable for Radiotext
« Reply #4 on: Yesterday at 07:52:58 pm »
There's really no need to be afraid of using regular expressions even though their writings sometimes look scary.

Go to External Text Sources - Text Replacing and add these two lines:

Code: [Select]
Change
%REGEXP%\s&\s.*?\s-\s
To
 -

Change
%REGEXP%\sfeat\.\s.*?\s-\s
To
 -


Please note the SPACE, DASH, SPACE in the To field.


Result:

Khayan & The New World Power - Feel The Vibe
shows as Khayan - Feel The Vibe

D.O.N.S. feat. Technotronic - Pump Up The Jam
shows as D.O.N.S. - Pump Up The Jam


You mentioned AI, which is a good helper if you want to create another regular expression to find the desired part of the text.

andrew01

  • Newbie
  • *
  • Posts: 5
Re: Truncation of long titles to be usable for Radiotext
« Reply #5 on: Yesterday at 08:12:33 pm »
Never knew you could do this, I thought it can only do the basics, not cut the titles too. Ty and cheers for the script!  8)

Works like a charm! I will adapt it further with AI's help to my needs (cutting info from titles too)  ;)

btw.. is there anything to make it as a condition NOT to truncate unless the text is 64 characters long? That would be perfect :)