Script: Lyrics to Instrumental

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Teknojnky
Posts: 5533
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Script: Lyrics to Instrumental

Post by Teknojnky » Tue Apr 01, 2008 10:46 pm

save to instrumentals.vbs in the mediamonkey\scripts\auto folder

Code: Select all

'
' 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)

enjoy

spacefish
Posts: 1427
Joined: Mon Jan 14, 2008 7:21 am
Location: Denmark

Post by spacefish » Wed Apr 02, 2008 4:57 am

OMG, Thank you! :D

Code: Select all

LyricString = "[instrumental]" 'default lyric string'
And that's perfect! Mine are all already noted that way, MusicBrainz nut that I am. :lol:
Image
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

nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Post by nynaevelan » Wed Apr 02, 2008 5:04 am

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??

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files

Teknojnky
Posts: 5533
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Post by Teknojnky » Wed Apr 02, 2008 8:45 am

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.

spacefish
Posts: 1427
Joined: Mon Jan 14, 2008 7:21 am
Location: Denmark

Post by spacefish » Wed Apr 02, 2008 8:56 am

Works great! :)
Image
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

nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Post by nynaevelan » Wed Apr 02, 2008 9:03 am

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!!

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files

nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Post by nynaevelan » Wed Apr 02, 2008 4:26 pm

This is nice, if you should want to work on it more, could you add some speed?

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files

Teknojnky
Posts: 5533
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Post by Teknojnky » Wed Apr 02, 2008 4:33 pm

I don't know.

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.

nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Post by nynaevelan » Wed Apr 02, 2008 4:41 pm

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. :P

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files

MM_Girl
Posts: 17
Joined: Mon May 29, 2006 1:53 pm
Location: Fort Worth, Texas

Post by MM_Girl » Wed Apr 02, 2008 5:21 pm

Teknojnky, you ROCK. Thank you !!

Works like a charm.
in support of all things music

MediaMonkeyGold v3.0.3.1140
---
Desktop: P2.8 2GHz 2G running WinXP_SP2 | Laptop: Intel Core Duo T7500 2.2GHz 2G running WinXP_SP2
iPods: 80G Vid, 8G iPhone, 6G Mini, 2G Nano, 1G Shuffle

---
I <3: MM3!!, Custom Scripts, Magic Nodes, TaggingInconsistencies, Lyricator
---
Installed: RadioDJ, TitleCase, AdvancedDuplicateFind&Fix, AdvancedRename, AutoIncTrackN, SwapArtistTitle, Bookmarker, Previewer
---
Currently Testing: AdvancedReportModify, GenreFinder, AlbumArtTagger, MonkeyRok, BatchArtFinder


Image

Seeker
Posts: 264
Joined: Tue Jul 10, 2007 3:17 pm

Post by Seeker » Thu May 22, 2008 2:57 pm

cool - thanks!

Post Reply