'
' MediaMonkey Script
'
' NAME: Lyrics to Instrumentals
'
' AUTHOR: TeknoJnky
' DATE : April 1 2008
'
' INSTALL: Copy Script to Instrumentals.vbs in the Mediamonkey\Scripts\Auto folder.
' This script takes the selected songs and sets the lyrics to the set string
Option Explicit
Dim LyricString
LyricString = "[instrumental]" 'default lyric string'
Sub OnStartup
Dim MenuItem
Set MenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Scripts, 0, -1)
MenuItem.Caption = "Lyrics to Instrumental"
MenuItem.Hint = "Changes Lyrics field to " & LyricString
MenuItem.UseScript = Script.ScriptPath
MenuItem.OnClickFunc = "FixLyrics"
End Sub
Sub FixLyrics(MenuItem)
Dim List,Song,Status,Counter
Set List = SDB.CurrentSongList
Dim Input
Input = InputBox("Enter Lyric String: ","Lyrics to Instrumental",LyricString)
If Input <> "" Then
LyricString = Input
Set Status = SDB.Progress
Status.Text = "Initialising script..."
Status.MaxValue = list.Count
For Counter=0 To list.Count-1
Status.Text = "Updating file "&(Counter+1)&" of "&list.Count&"..."
Status.Value = Counter
Set Song = List.Item(Counter)
Song.Lyrics = LyricString
Song.UpdateDB
SDB.ProcessMessages
Song.WriteTags
SDB.ProcessMessages
If Status.Terminate Then Exit For
Next
Status.Text = "Script Finished..."
Status.Value = Status.MaxValue
Set Status = Nothing
End If
End Sub
this is just a quick mod of one of my other quick hacks (fix composer)
And that's perfect! Mine are all already noted that way, MusicBrainz nut that I am.
MM Gold 3.0.3.1183 : Vista HP SP1 (x86) : Zen Stone (2GB) Zekton: An original MM3 skin by Eyal. Scripts in Use: Add/Remove PlayStat | Auto Album DJ | AutoRateAccurate | Backup
Case & Leading Zero Fixer | Classification & Genre Changer | Clean Scripts.ini | Clear
Field | Custom Report | Discogs Auto-Tag Web Search | Forget Crossfade | Invert
Selection/Select None | Last 100... | Lyricator | Lyrics to Instrumental | MonkeyRok
MusicBrainz Tagger | My Custom Nodes | Now Playing Art Node | Play History & Stats
Right Click for Reports | Right Click for Scripts | Right Click for Web | Stop After Current
WebNodes
Since this is going in the auto folder can you give a little more insight in how it works? When I select a group of tracks will it automatically let me edit the lyrics of the tracks??
This script will take whatever you type in the input box, and set the lyrics tags of each of the selected files to whatever you input.
It will not clear the lyrics tag if you leave it blank (it just exits), if you want to clean the lyrics of particular files, use the 'clear fields' script (I don't have a link).
In other words, since you can't update the lyrics for multiple files via the MM properties dialog, with this script you can.
It is good, for example, to set a bunch of selected files lyrics to "[instrumental]" or whatever your preference is.
MM Gold 3.0.3.1183 : Vista HP SP1 (x86) : Zen Stone (2GB) Zekton: An original MM3 skin by Eyal. Scripts in Use: Add/Remove PlayStat | Auto Album DJ | AutoRateAccurate | Backup
Case & Leading Zero Fixer | Classification & Genre Changer | Clean Scripts.ini | Clear
Field | Custom Report | Discogs Auto-Tag Web Search | Forget Crossfade | Invert
Selection/Select None | Last 100... | Lyricator | Lyrics to Instrumental | MonkeyRok
MusicBrainz Tagger | My Custom Nodes | Now Playing Art Node | Play History & Stats
Right Click for Reports | Right Click for Scripts | Right Click for Web | Stop After Current
WebNodes
Teknojnky wrote:This script will take whatever you type in the input box, and set the lyrics tags of each of the selected files to whatever you input.
It will not clear the lyrics tag if you leave it blank (it just exits), if you want to clean the lyrics of particular files, use the 'clear fields' script (I don't have a link).
In other words, since you can't update the lyrics for multiple files via the MM properties dialog, with this script you can.
It is good, for example, to set a bunch of selected files lyrics to "[instrumental]" or whatever your preference is.
Thank you for the explanation, now I can go to work!!
There are 2 ways it could be done, the current way which updates each track as it goes, and the other way to add each file to a temp song list then update the songlist all at once.
There are pro's and con's to either method.
The current way can handle updating many files without freezing up MM, but it appears sluggish since it constantly updates the db and writes tags.
When using the songlist and UpdateAll method, it goes very fast during the processing, but then will freeze up a great deal while it processes the updateall.
You can see this in some scripts, which process very fast, then seem to get stuck during the update. Since the updateall method blocks the whole UI thread, it makes MM appear unresponsive.
Using smaller sets of files makes it less noticable tho.
I understand the explanation and if I had to choose I would rather use the method that doesn't freeze MM, but the biggest group I've used so far is 27 tracks and that takes a while. I think I will just have to adopt the method that I use for other time-intensive jobs, start it and go away for a few hours.
Thanks anyway for this script, it is a time-saver.