Match Equalizer Settings and Songs Genre
Feature On/Off switch in the Play Menu (Auto Equalizer)
Routine
1. Do nothing if previous song had the same Genre
2. If Matching Equalizer Setting to Songs Genre found, use it.
Please note:
1. Can be annoying if changing Genre's while working on computer.
2. Does not work when MediaMonkey is minimized to Tray Only
This is what you can call a 'work-around' script.
Changelog:
1.01 - 1.10: A little improvement on the Player Pause Handling
1.10 - 1.20: Added a Menu Switch in the Play Menu, called Auto Equalizer
1.20 - 2.00: Rewrite and made the Equalizer window open at all times.
Thanks to Roving Cowboy for continue testing this consept!
Goes to \Program Files\MediaMonkey\Scripts\Auto\AutoEQ.vbs
Code: Select all
'----------------------------------------------------------------------
'\Program Files\MediaMonkey\Scripts\Auto\AutoEQ.vbs
'
' Version: 2.0
' 13 September 2006
' By DiddeLeeDoo
'----------------------------------------------------------------------
Sub OnStartup
Set Mnu=SDB.UI.AddMenuItem(SDB.UI.Menu_Play,4,2)
Mnu.Caption="Auto " & SDB.Localize("Equalizer")
Mnu.UseScript=Script.ScriptPath
Mnu.Checked=SDB.IniFile.BoolValue("EQ_Check","EQ_Auto")
Mnu.OnClickFunc="MenuSwitch"
SDB.Objects("EQ_Check_Mnu")=Mnu
If Mnu.Checked Then Script.RegisterEvent SDB, "OnPlay", "EQ_Check"
End Sub
Function MenuSwitch(Mnu)
If SDB.Objects("EQ_Check_Mnu").Checked Then
SDB.Objects("EQ_Check_Mnu").Checked=False
SDB.IniFile.BoolValue("EQ_Check","EQ_Auto")=False
Else
SDB.Objects("EQ_Check_Mnu").Checked=True
SDB.IniFile.BoolValue("EQ_Check","EQ_Auto")=True
Script.RegisterEvent SDB, "OnPlay", "EQ_Check"
End If
End Function
Sub EQ_Check
If SDB.Objects("EQ_Check_Mnu").Checked Then
If SDB.Tools.FileSystem.FileExists(SDB.ApplicationPath & "Equalizer\"&_
SDB.Player.CurrentSong.Genre&".sde") And Not _
SDB.IniFile.StringValue("EQ_Check","EQ_LastSong")=_
SDB.Player.CurrentSong.Genre Then
Set oShell=CreateObject("Wscript.Shell")
If oShell.AppActivate("Equalizer",True)=False Then
oShell.AppActivate "MediaMonkey",True
oShell.SendKeys "(^%e)",True
End If
If Not SDB.Player.isPaused Then SDB.Player.Pause
oShell.SendKeys "(%l)",True
oShell.SendKeys "("& SDB.Player.CurrentSong.Genre &")",True
oShell.SendKeys "(%o)",True
If SDB.Player.isPaused Then SDB.Player.Pause
SDB.IniFile.StringValue("EQ_Check","EQ_LastSong")=_
SDB.Player.CurrentSong.Genre
Set oShell=Nothing
End If
Else
Script.UnRegisterEvents SDB
End If
End Sub