Auto Set Equalizer to Current Songs Genre v2.0 [Script]

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

DiddeLeeDoo
Posts: 1017
Joined: Wed Mar 01, 2006 1:09 am
Location: In a jungle down under
Contact:

Auto Set Equalizer to Current Songs Genre v2.0 [Script]

Post by DiddeLeeDoo » Wed Jul 26, 2006 10:46 pm

What it does:
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
Last edited by DiddeLeeDoo on Wed Sep 13, 2006 10:55 am, edited 8 times in total.
Image

junglemonkey

Post by junglemonkey » Thu Jul 27, 2006 6:40 pm

wow i thought you forgot about this? 8)

will check it out i think i still got all the genera settings ?


:o 8)

DiddeLeeDoo
Posts: 1017
Joined: Wed Mar 01, 2006 1:09 am
Location: In a jungle down under
Contact:

Post by DiddeLeeDoo » Wed Sep 13, 2006 3:29 am

Just did a rewrite of this one.

Works on having the Equalizer window open. Seems to be smoother that way. Thank you Roving Cowboy for testing this one!
Image

rovingcowboy
Posts: 14153
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy » Thu Sep 14, 2006 6:44 pm

I'll post this here for everyone in case they wonder.

I have been using this script non stop for 2 days now. and
the bugs are out of it.

it now handles the eq presets even on the fast changing 5 second long sound effects i have and not just when it plays one soundeffect but when it plays lots of them in a row.

i also use djamp as an virtual announcer and it will kick the player to new random song one half a second after media monkey already picked a song.

this script even handles those extra fast kicks now.

there is just one thing and or two things?

like diddeleedoo said don't use the mouse or keyboard when the script is working ( changing to new preset )

it will cause all kinds of stuff to happen, like change the selected node?
and switch songs. and if your using note pad or any text editor it will add the url to the presets in to your text file.

so it is best to either not use the computer when playing songs with this script running. you can turn it off by the play menu. and if your doing lots of editing i suggest that.

if your chaning or adjusting the Eq to save a new preset you best get it done and saved before the end of the song or it will be changed on you and all the other stuff happens. too like move your mouse close monkey.

it is all only done when using the mouse or key board and that is because this script makes the keyboard strikes for changing the presets so you don't have to hit the keys for each song.

that is the only reason it is messed up when it runs and your using the mouse or keyboard.

so don't be alarmed about using this script i am running it on my win98 and it works.

8) :lol: :D
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy 5 Android 5) 6. Proscan tablet Android 4.3 ) 7. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.

Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex » Mon Sep 18, 2006 3:13 pm

Good one DiddeLeeDoo!
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts

DiddeLeeDoo
Posts: 1017
Joined: Wed Mar 01, 2006 1:09 am
Location: In a jungle down under
Contact:

Post by DiddeLeeDoo » Mon Sep 18, 2006 6:21 pm

Thank you for leaving some comments guys... Makes it all more fun :)

Somebody mentioned that they sometimes do special EQ settings for certain songs too, or if you want, Artists, Albums or whatever.

This script could be taken further by something like.....

If Song ID EQ settings exists, use it.
If Album Name EQ settings exist, use it
If Artist Name EQ settings exist, use it
If Genre EQ settings exist, use it.

That would take a lot of maintanance though, in form of having a LOT of equalizer settings. Might be worth while waiting to see what comes in MediaMonkey v3.0, to see if Equalizer settings can be set from the 'inside' instead of from the 'outside' like now.
Image

junglemonkey

Post by junglemonkey » Wed Sep 20, 2006 7:12 am

I found it easier to just add 2 or 3 special EQ sets per genre and call them as in this example.
  • genere

    rock

    fixed rock

    fixed rock 1

    fixed rock 2

that allows me to rename the songs genere to one of the fixed ones.
which is set to where the song needs it. say a song has all the bass missing like an old 8 track tape that was left in the sun.
well one of the fixed sets would be adding all bass possible to make it sound good and just a little midrange and trible. with hardly no high hat.

that would re adjust the song back to sounding fairly good, i would then use the duplex sound card for what it is good at and start the wav editor up and record a new wav file while playing the song with the eq on.

making it a good sounding file. then i would do lots of editing on the song file to try and get it even better. when i had a copy i liked i would then convert it from wav and replace the messed up copy with the new one..

? :roll: why did i say i WOULD do that? i should have said I DO do that.

roving cowboy / keith hall.


8)

DiddeLeeDoo
Posts: 1017
Joined: Wed Mar 01, 2006 1:09 am
Location: In a jungle down under
Contact:

Post by DiddeLeeDoo » Wed Sep 20, 2006 7:28 am

That makes a lot of sense!
Often easy to get lost in the 'jungle' of options.
Image

junglemonkey

Post by junglemonkey » Wed Sep 27, 2006 12:19 am

you other uses of this script

tell me if your having trouble with monkey and the eq.dll.

this is not related to the script as far as diddeleedoo knows.

but he said it is something with monkey. so i am only posting this here
because you that use this script are more likely the ones that will beable to help.

heres the trouble.

using this script all day and all night seems to bring up an alert for no reason at all just about in 48 hours to a week depending on something to make the time limits?

but the alert says monkey caused an error in the EQ.dll
that is on my win98 computer.

it did not do this with this script with the 2.5.4.971 beta version of monkey.

but this new release version is doing it.

so something changed between the two versions.

what i am asking for is to see if any of you that use this script are using it on winXp and can let it run all the time to see if it does have the same error as my win98.

again this is not the script it is monkey or something went bad in the win98. but the alert says monkey caused the error. the script is only needed to use the eq.dll a lot to see if heavy use is what the trouble is or if there is something on the win98 that causes it. or if monkey really is the cause. if monkey is the cause then you will get the alert on xp like i do on 98.
if 98 is the cause then you wont get the alert on xp.

junglemonkey

Post by junglemonkey » Wed Sep 27, 2006 10:20 pm

I need to make an update on the error of the time limit.

it is now accuring daily. if not hourly.
:-?

paulmt
Posts: 1170
Joined: Tue Jul 18, 2006 6:06 pm

Post by paulmt » Wed Sep 27, 2006 11:24 pm

I don't use the script but I did a search of my WinXP system and couldn't find "eq.dll"
This may suggest that it is a Win98 library file??

The MM dll is (I think) equalize.dll

rovingcowboy
Posts: 14153
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy » Thu Sep 28, 2006 4:33 am

i just shortened the word to eq for faster reading. :)

but i guess i should have spelled it out completly as it is the
equalize.dll that is listed in the alert. sorry about that :(

thanks for the kick up side the head :lol:




for some reason on Oct.2.nd 2006 i just had monkey crash. it is back
to weekly time limit but it did not say anything about the
eq...dll

so it just confirmed as i believed and diddeleedoo said it is not
this script that is causing the error. it is media monkey its self.
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy 5 Android 5) 6. Proscan tablet Android 4.3 ) 7. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.

rovingcowboy
Posts: 14153
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy » Fri Dec 15, 2006 5:00 pm

i thought to come back and post an update to this error i found and some others found.

i now know that getting this equllizer dll error can be done by two things.

if media monkey toss's an " invalid floating point operation " error.

it can crash monkey or let monkey run but cause the eq dll error.

9 times out of 10 for me it crashed monkey.


the second thing that causes the eq dll error all the time is.

an option setting that might be used by you.

it is the direct sound plugin and the sound device that you told it to use.

for some reason the direct sound plug in does not like this eq script.?

or it is the device that it is told to use that causes the error.

don't use the direct sound plugin change to the wav plug in.

and don't tell them to use the microsoft sound mapper.

that is what makes the eq dll error when using this script.

you should have your options set like.

output plug in = wav output dll.

sound device option in the wav output dll should = "Your Sound Card "

i said your sound card beause i don't know what you have
so you have to look to see what you have if you don't
already know.

but that is how it should be set up.

if there is any thing else found to cause this error with using this script
please post here and let us know.

but this is all i found so far and both are not the script or monkey. but just something in windows that causes them.

8)
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy 5 Android 5) 6. Proscan tablet Android 4.3 ) 7. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.

votrexflame
Posts: 16
Joined: Wed Nov 22, 2006 12:54 pm

Is it possible to use (Winamp) Enhancer presets?

Post by votrexflame » Sat Dec 16, 2006 11:12 am

I don't use a defaul equalizer, but Enhancer. I wonder if it's possible to make it switch the preset for different songs (according to genre, for example)?

DiddeLeeDoo
Posts: 1017
Joined: Wed Mar 01, 2006 1:09 am
Location: In a jungle down under
Contact:

Post by DiddeLeeDoo » Mon Dec 18, 2006 4:48 am

As I do not really use the Equalizer at all, it's a bit out of my 'can do something' area.

This script simply do the shortcut keys that's needed to change EQ settings for each song.

If it's possible to do it with shortcuts, this script should be able to do it.

From what I understand, Roving Cowboy have had success with this script, however, for very short and rapid song changes, like when doing small sound clips, can push your luck. However, on 'normal songs' it seems to do things right.
Image

Post Reply