<!-- WARNING!! Don't just cut and paste this into your skin/remote, it won't work!  Make sure you read the comments, they will tell you how to implamennt it
6/11: now handles 37 genres, in 3 formats: all capps, all lowercase, first letter capital-->

:sonique.players.default.RegisterCallback("SongStarted","autoEQ();", this);<!--this must be added to the main OnInit of your skin-->

<script name="autoEQ">
	if(auto){<!--var to enable/disable autoeq needs to be set elsewhere-->
		<!-- MrSmiles121's default eq presets... plus a few of my own :)-->
		$presets={{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
			  {0.18049,0.12195,0.01121,0.06341,0,0.12195,0.17073,0.17073,0.07317,0.02439,0,0,0,0,0,0.00488,0.0439,0.10244,0.16098,0.21951},
			  {0.05366,0.14146,0.07317,0.02439,0.12195,-0.00488,-0.0439,0.13171,0.1121,0.20976,0.12195,0.1121,0.07317,-0.0439,-0.0439,-0.0439,0.08293,0.15122,0.22927,0.22927},
			  {0.14146,0.14146,0.09268,0.07317,0.13171,0.17073,0.18049,0.13171,0.05366,-0.01463,-0.03415,-0.0439,-0.0439,-0.0439,-0.0439,0.03415,0.10244,0.15122,0.17073,0.18049},
			  {0.21951,0.19024,0.15122,0.1121,0.08293,0.0439,0.00488,0.00488,0.00488,0.00488,0.00488,0.00488,0.00488,0.00488,0.0439,0.07317,0.1121,0.14146,0.18049,0.21951},
			  {.15,.2,.25,.3,.25,.2,.15,.15,.1,.1,.05,.1,.1,.15,.2,.25,.3,.25,.2,.15},
			  {-.1,0,.1,.1,.1,.05,0,.05,.1,.1,.1,.15,.2,.25,.25,.2,.1,-.05,-.2,-.05},
			  {-.05,-.025,0,.25,.1,.1,.1,.025,-.05,-.05,-.05,-.025,0,0,0,.05,.1,.15,.2,.25},
			  {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
		};
		if (:sonique.InterfacePrefsGetStringArray("autoeqpresets", :sonique.players.default.GetInfo()["info"]["url"]));{}
		else if (:sonique.players.default.GetInfo()["info"].IsValidIndex("genre")){
			$genre=:sonique.players.default.GetInfo()["info"]["genre"];
			if($genre=="Classical" or $genre=="classical" or $genre=="Big Band" or $genre=="big band"or $genre=="CLASSICAL" or $genre=="BIG BAND"){
				$s=1;
			}
			if($genre=="Jazz" or $genre=="jazz" or $genre=="Blues" or $genre=="blues"  or $genre=="folk" or $genre=="Folk" or $genre=="Country"  or $genre=="country"or $genre=="JAZZ" or $genre=="BLUES" or $genre=="FOLK" or $genre=="COUNTRY"){
				$s=2;
			}
			if($genre=="Rock" or $genre=="rock" or $genre=="Reggae" or $genre=="reggae" or $genre=="punk" or $genre=="alternative" or $genre=="Punk" or $genre=="Alternative" or $genre=="soft rock" or $genre=="Soft Rock" or $genre=="oldies" or $genre=="classic rock" or $genre=="Oldies" or $genre=="Classic Rock" or $genre=="Hard Rock" or $genre=="rock & roll" or $genre=="Rock & Roll" or $genre=="hard rock"  or $genre=="ROCK" or $genre=="REGGAE" or $genre=="PUNK" or $genre=="ALTERNATIVE" or $genre=="SOFT ROCK" or $genre=="OLDIES" or $genre=="CLASSIC ROCK" or $genre=="HARD ROCK" or $genre=="ROCK & ROLL"){
				$s=3;
			}
			if($genre=="Dance" or $genre=="dance" or $genre=="Techno" or $genre=="techno" or $genre=="Rave" or $genre=="rave" or $genre=="trance" or $genre=="Trance" or $genre=="house" or $genre=="House" or $genre=="drum and bass" or $genre=="DRUM and BASS" or $genre=="Drum And Bass" or $genre=="Drum and Bass" or $genre=="club" or $genre=="Club" or $genre=="party" or $genre=="Party" or $genre=="DANCE" or $genre=="TECHNO" or $genre=="CLUB" or $genre=="PARTY" or $genre=="RAVE" or $genre=="TRANCE" or $genre=="HOUSE" or $genre=="DRUM AND BASS"){
				$s=4;
			}
			if($genre=="Pop" or $genre=="pop" or $genre=="latin" or $genre=="Latin" or $genre=="ska" or $genre=="Ska" or $genre=="soft" or $genre=="Soft" or $genre=="Swing" or $genre=="swing" or $genre=="New Age" or $genre=="new age" or $genre=="Anime" or $genre=="anime" or $genre=="POP" or $genre=="LATIN" or $genre=="SKA" or $genre=="SOFT" or $genre=="SWING" or $genre=="NEW AGE" or $genre=="ANIME"){
				$s=5;
			}
			if($genre=="grunge" or $genre=="Grunge" or $genre=="Metal" or $genre=="metal" or $genre=="Progressive Rock" or $genre=="Progressive rock" or $genre=="progressive rock" or $genre=="hair metal" or $genre=="Hair metal" or $genre=="Hair Metal" or $genre=="GRUNGE" or $genre=="METAL" or $genre=="PROGRESSIVE ROCK" or $genre=="HAIR METAL"){
				$s=6;
			}
			if($genre=="rap" or $genre=="Rap" or $genre=="RAP"){
				$s=7;
			}
			if($genre=="comedy" or $genre=="Comedy" or $genre=="Talk" or $genre=="talk" or $genre=="COMEDY" or $genre=="TALK"){
				$s=8;
			}
			for ($i in 0 to 19) {
				:sonique.players.default.equalizer.SetBandGain($i, $presets[$s][$i]);
			}
		}
		else {
			for ($i in 0 to 19) {
				:sonique.players.default.equalizer.SetBandGain($i, $presets[$s][$i]);
			}
		}
		:sonique.players.default.SendFilterMessage("equalizerReloadSettings");
	}
</script>