Page 1 of 3

Auto Set Equalizer to Current Song's Genre v3.1

Posted: Sun Feb 08, 2009 9:43 pm
by SatinKnights
What it does:
This script automatically changes the equalizer settings based on the song's Genre, and possibly more specifically by a Quality classification setting.

Why build this?:
Because Metallica, Jazz, and Audio Books should be played with different equalizer settings, and I am too lazy to manually make those changes each time.

Controlled by:
On/Off switch in the Play Menu (Auto Change Equalizer)

Requirements:
1. MediaMonkey 3.1.0.1221 or better for the SDB.Player.LoadEqualizerPreset() and SDB.Player.isEqualizer functions. The script will disable itself if run by older versions of MediaMonkey.
2. Create and save a "Default.sde" equalizer setting for the settings that any song should default to if there are no more specific matches found. The easiest way to do this is open the equalizer panel, click reset, and click the save preset, using Default.sde as the filename.

Routine:
1. Do nothing if previous song had the same Genre
2. If the first Quality tag has a matching equalizer setting name, change the equalizer to this preset.
3. If the first Genre tag has a matching equalizer setting name, change the equalizer to this preset.
4. If neither match, load the Default.sde equalizer preset.

Long Description:
This script automatically adjusts the equalizer to presets depending on the genre of the song. For those needing even finer control and detail, the genre choice can be overridden by having an equalizer preset that has the same name as a "Quality" classification.

Example Setup: Create your genre specific equalizer settings with the same names as your genres. For example: Rock.sde, Jazz.sde, Dance.sde, Reggae.sde, Audio Book.sde, etc. Now, you add overrides. Also create "extra bass.sde" with a boosted bass, "hissy.sde" with the high range dampened, "voice only.sde" with the high and low ranges dampened. Now, an audio book recording made at 32 kbps should be tagged with Genre=Audio Book, Quality=hissy. The "hissy" will take precedence and be the preset loaded at the start of the track. The use of the quality to override the genre allows one to keep the genre listings tidy. Likewise, Janet Jackson's "Black Cat" could be tagged with Dance but then be adjusted with "extra bass" in the quality field.

Priority: first quality value, first genre, default.sde, no change. Quality and Genre fields that contain multiple values seperated by semicolons use the first value. Without the required Default.sde equalizer setting mentioned above, the script could stay on Rock settings when switching to a Blues track if Blues.sde did not exist. Therefore, the script will nag on MediaMonkey startup in a Default.sde does not exist.

Tidbits:
For those who wish to, Quality can be disabled as a selector by commenting out lines 163-182.
If the Equalizer is disabled, and the user turns on the Auto Equalizer via the menu, the Equalizer is enabled.

History:
Sept 2006 DiddeLeeDoo wrote a script to do this for MM2. But, at the time, the equalizer load preset function was not available to scripters. So, he used WScript to do keyboard stuffing of the proper keystrokes to make setting changes. This had the drawback of requiring the MM main window to be open at all times. If it was in mini/micro mode, or minimized, the keystrokes were ineffective, and could be passed to a different application.
Thread: http://www.mediamonkey.com/forum/viewto ... =2&t=11302

Oct 2008 Modementia updated DiddeLeeDoo's script to work with MM3.

Jan 2009 I asked jiri if he could make the load equalizer preset function available to scripters. It was available in the next build the following day. Awesome!!! :D

Feb 2009 Here is my script, built upon the work of others. Now, the presets are changed automatically in background. This script now works in full/mini/micro/minimized modes. Once the different presets are created, this script is an "activate and forget it" script. The equalizer settings panel is no longer opened, so there is no visible indications that the script is running, as it should be.

June 2009 It was pointed out that the settings did not persist across MM restarts. :oops: Fixed. Also set the menu setting as active at installation.

Installation:
3.1.0.1 http://mediamonkey.coloredpixels.com/MM ... 1.0.1.mmip
3.0.0.9 Broken. It didn't keep active state between restarts.
One file of AutoChangeEqualizer.vbs is installed in the {app}\Scripts\Auto\ directory. If old versions of DiddleLeeDoo's or Modementia's script are found as AutoEQ.vbs, the install asks if it can delete them to avoid conflicts.

Re: Auto Set Equalizer to Current Song's Genre v3.0

Posted: Mon Feb 09, 2009 9:26 am
by justin_f
Awesome. I'm definitely going to play with this one when I get home.

Justin

Re: Auto Set Equalizer to Current Song's Genre v3.0

Posted: Mon Feb 09, 2009 9:35 am
by rovingcowboy
yepper you are another one trying very very hard to get me to move up to 3.1 from 3.0.3

and you knew that by the way i tested diddeleedo's old script. man you hit the script i want. you and peke must be ganging up on me. :D

okay i got this script. but i'm going to wait on the mm 3.1 stable release, you looking to tackle diddeleedoo's auto rate script for mm 2.5.5 and make it in to mm 3. he had a updated version but it is not working well with mm 3.
i got my custom one i use from him i really like it and that is a major factor for me not to move up from mm 2, to mm 3 on my jukebox computer.

Re: Auto Set Equalizer to Current Song's Genre v3.0

Posted: Mon Feb 09, 2009 10:16 am
by SatinKnights
rovingcowboy wrote:yepper you are another one trying very very hard to get me to move up to 3.1 from 3.0.3

and you knew that by the way i tested diddeleedo's old script. man you hit the script i want. you and peke must be ganging up on me. :D
Well, new functionality requires running the new code. I am overwhelmingly happy that Jiri was able to add the new function in so fast when I asked for it. I had wanted it for a year now, but had not got around to bothering the devs because I figured then had enough bug stomping to do.
rovingcowboy wrote:okay i got this script. but i'm going to wait on the mm 3.1 stable release,
You could try testing the new version by installing it into a different directory. I did that for a while, running 2.5 and 3.0 in parallel.
rovingcowboy wrote: you looking to tackle diddeleedoo's auto rate script for mm 2.5.5 and make it in to mm 3. he had a updated version but it is not working well with mm 3. i got my custom one i use from him i really like it and that is a major factor for me not to move up from mm 2, to mm 3 on my jukebox computer.
I hadn't planned on it, since I don't use that script. I have a tendency to "not right now" a song and skip to the next, but still love it and would not want to have the rating drop. If you want me to take a look at updating your old custom script, I can try. PM it to me. I will warn you that I have only been programming in VBScript for about two weeks. It is an ugly, sloppy language, but I am competent in it by now. After the first dozen languages, it is only a matter of learning the syntax.

Re: Auto Set Equalizer to Current Song's Genre v3.0

Posted: Mon Feb 09, 2009 5:03 pm
by Eyal
Yep! I want this script. Finally this function seems to work well.
Like RC, I will need to upgrade to 3.1, thing I am reticent because it's still in beta.

Tanks SatinKnights, DiddeLeeDoo, Modementia and Jiri.

Eyal

Re: Auto Set Equalizer to Current Song's Genre v3.0

Posted: Tue Feb 10, 2009 3:01 am
by rovingcowboy
SatinKnights wrote:
rovingcowboy wrote:okay i got this script. but i'm going to wait on the mm 3.1 stable release,
You could try testing the new version by installing it into a different directory. I did that for a while, running 2.5 and 3.0 in parallel.
well you see there that would cause me grief. cause i would have 3 versions of monkey running if i tested it in a different folder directory.

got to keep mm 2.5.5 my sister won't change to the new one,
and i got to keep the mm 3 database straight so i'd have to have 3 folders for it.

but will change to the new one on the release of the stable version. i have no hankerherin' to do any more beta testing. on any programs. :)

Re: Auto Set Equalizer to Current Song's Genre v3.0

Posted: Tue Feb 10, 2009 4:44 am
by trixmoto
Looks like an excellent script, well done! :)

Re: Auto Set Equalizer to Current Song's Genre v3.0

Posted: Sat Jun 20, 2009 10:13 am
by Guest
Any way to get this to really be an Auto Script? I would like to have it start when I start mediamonkey I don't want to have to click the link every time to start this, it says auto so it should be auto not manual start.

Re: Auto Set Equalizer to Current Song's Genre v3.0

Posted: Sat Jun 20, 2009 10:58 am
by rovingcowboy
i think that would be great to have too.
8)

Re: Auto Set Equalizer to Current Song's Genre v3.0

Posted: Sat Jun 20, 2009 2:52 pm
by SatinKnights
Guest wrote:Any way to get this to really be an Auto Script? I would like to have it start when I start mediamonkey I don't want to have to click the link every time to start this, it says auto so it should be auto not manual start.
Oops! :oops: It was there, but there was a typo in the OnStartup check to see if the menu item was checked as active. So, I have fixed it and generated a new package. While I was at it, I set the default menu choice at installation as active.

New Version: http://mediamonkey.coloredpixels.com/MM ... 1.0.1.mmip or you can retrieve it through the Tools->Extensions->Find Updates.

-SatinKnights

Re: Auto Set Equalizer to Current Song's Genre v3.1

Posted: Sat Jun 20, 2009 4:36 pm
by rovingcowboy
thanks a bunch of banana's awaits you at the check out limb. :D :lol:

i also was getting tired of clicking that play menu link. :-?

Re: Auto Set Equalizer to Current Song's Genre v3.1

Posted: Wed Dec 30, 2009 4:07 am
by rovingcowboy
not sure but i think this has stopped working again?

i moved it to the new jukebox system i got that was not ever online and has xp pro sp3 on it. but i might be missing some update which makes this work i don't know. but it has stopped on my jukebox.

i have just go the new version again incase i had installed the older one. so i'll need to check this one in the mmip.

i'll report back and let you know if it works or not..

:-?

EDITED BACK IN FOR THE REPORT I PROMISED.

STUPID here forgot to add the needed equalizer presets that are said to be added its been so long since i set it up i forgot about them.

but its working now. :oops:

Re: Auto Set Equalizer to Current Song's Genre v3.1

Posted: Fri Apr 23, 2010 4:16 pm
by engineer
I liked so much this addon

But the Paranoia condition that exclude improper character ... i changed it

old condition

Code: Select all

            If InStr(FirstQuality, "\") or InStr(FirstQuality, "/") Then
                FirstGenre = "default"
                If Debug Then Call out("Paranoia: The quality contains a " &_
                         " \ or / so we revert to the default.sde file.")
            End If
the new one

Code: Select all

            If InStr(FirstQuality, "\") or InStr(FirstQuality, "/") Then
                  If InStr(FirstQuality, "\") Then FirstQuality = Replace(FirstQuality, "\", "_")
                  If InStr(FirstQuality, "/") Then FirstQuality = Replace(FirstQuality, "/", "_")
'*                FirstGenre = "default"
                If Debug Then Call out("Paranoia: The quality contains a " &_
                         " \ or / so we revert to the default.sde file.")
            End If
The same at the paranoia genre condition

so if your genre is pop/rock it will choose the pop_rock.sde file

Re: Auto Set Equalizer to Current Song's Genre v3.1

Posted: Sat Apr 24, 2010 2:16 am
by rovingcowboy
not sure what this change does? as the one you changed, worked as in just adding the name of the preset sde in to the tag for quality will change the preset to that sde with out having to change the genere setting for the song..

so i don't understand what your change is for. but then i'm not a programmer so it might be something to do with an error i did not know about.

so please explain in language of an second grade child so i can understand what the improvement is for. thank you :D

Re: Auto Set Equalizer to Current Song's Genre v3.1

Posted: Fri Oct 29, 2010 9:46 am
by its2cold
Thanks! :)