Skip to content

Instantly share code, notes, and snippets.

@dacci
Created November 30, 2019 02:13
Show Gist options
  • Save dacci/4c3efb5532eecf61ac2d851c9a1d1c34 to your computer and use it in GitHub Desktop.
Save dacci/4c3efb5532eecf61ac2d851c9a1d1c34 to your computer and use it in GitHub Desktop.
Scripts to create equalizer presets "Perfect" and "Eargasm Explosion" in iTunes.
$ITunes = New-Object -ComObject iTunes.Application
$Preset = $ITunes.EQPresets.ItemByName("Perfect")
if (-not $Preset) {
$Preset = $ITunes.CreateEQPreset("Perfect")
$Preset.Band1 = 3
$Preset.Band2 = 6
$Preset.Band3 = 9
$Preset.Band4 = 7
$Preset.Band5 = 6
$Preset.Band6 = 5
$Preset.Band7 = 7
$Preset.Band8 = 9
$Preset.Band9 = 11
$Preset.Band10 = 8
}
$Preset = $ITunes.EQPresets.ItemByName("Eargasm Explosion")
if (-not $Preset) {
$Preset = $ITunes.CreateEQPreset("Eargasm Explosion")
$Preset.Band1 = 3
$Preset.Band2 = 6
$Preset.Band3 = 9
$Preset.Band4 = 7
$Preset.Band5 = 6
$Preset.Band6 = 5
$Preset.Band7 = 7
$Preset.Band8 = 4
$Preset.Band9 = 11
$Preset.Band10 = 8
}
tell application "Music"
set found_perfect to false
set found_eargasm to false
repeat with preset in EQ presets
if name of preset is "Perfect" then
set found_perfect to true
else if name of preset is "Eargasm Explosion" then
set found_eargasm to true
end if
end repeat
if not found_perfect then
set preset to make new EQ preset
set name of preset to "Perfect"
set band 1 of preset to 3
set band 2 of preset to 6
set band 3 of preset to 9
set band 4 of preset to 7
set band 5 of preset to 6
set band 6 of preset to 5
set band 7 of preset to 7
set band 8 of preset to 9
set band 9 of preset to 11
set band 10 of preset to 8
end if
if not found_eargasm then
set preset to make new EQ preset
set name of preset to "Eargasm Explosion"
set band 1 of preset to 3
set band 2 of preset to 6
set band 3 of preset to 9
set band 4 of preset to 7
set band 5 of preset to 6
set band 6 of preset to 5
set band 7 of preset to 7
set band 8 of preset to 4
set band 9 of preset to 11
set band 10 of preset to 8
end if
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment