iTunes のイコライザ設定

明けましておめでとうございます。

どうも iTunes のイコライザには、どんなジャンルでもいい感じになるという Perfect という設定と、それを超える Eargasm Explosion というのがあるらしい。手でポチポチ設定するのもいいけど、せっかくこういう仕事しているんだからそれっぽいやり方をしよう。

for Windows (PowerShell)

itunes_eqpreset.ps1
1
$ITunes = New-Object -ComObject iTunes.Application
2
3
$Preset = $ITunes.EQPresets.ItemByName("Perfect")
4
if (-not $Preset) {
5
  $Preset = $ITunes.CreateEQPreset("Perfect")
6
  $Preset.Band1 = 3
7
  $Preset.Band2 = 6
8
  $Preset.Band3 = 9
9
  $Preset.Band4 = 7
10
  $Preset.Band5 = 6
11
  $Preset.Band6 = 5
12
  $Preset.Band7 = 7
13
  $Preset.Band8 = 9
14
  $Preset.Band9 = 11
15
  $Preset.Band10 = 8
16
}
17
18
$Preset = $ITunes.EQPresets.ItemByName("Eargasm Explosion")
19
if (-not $Preset) {
20
  $Preset = $ITunes.CreateEQPreset("Eargasm Explosion")
21
  $Preset.Band1 = 3
22
  $Preset.Band2 = 6
23
  $Preset.Band3 = 9
24
  $Preset.Band4 = 7
25
  $Preset.Band5 = 6
26
  $Preset.Band6 = 5
27
  $Preset.Band7 = 7
28
  $Preset.Band8 = 4
29
  $Preset.Band9 = 11
30
  $Preset.Band10 = 8
31
}

ちなみに VBScript でもいい

for macOS (AppleScript)

itunes_eqpreset.applescript
1
tell application "iTunes"
2
  set found_perfect to false
3
  set found_eargasm to false
4
5
  repeat with preset in EQ presets
6
    if name of preset is "Perfect" then
7
      set found_perfect to true
8
    else if name of preset is "Eargasm Explosion" then
9
      set found_eargasm to true
10
    end if
11
  end repeat
12
13
  if not found_perfect then
14
    set preset to make new EQ preset
15
    set name of preset to "Perfect"
16
    set band 1 of preset to 3
17
    set band 2 of preset to 6
18
    set band 3 of preset to 9
19
    set band 4 of preset to 7
20
    set band 5 of preset to 6
21
    set band 6 of preset to 5
22
    set band 7 of preset to 7
23
    set band 8 of preset to 9
24
    set band 9 of preset to 11
25
    set band 10 of preset to 8
26
  end if
27
28
  if not found_eargasm then
29
    set preset to make new EQ preset
30
    set name of preset to "Eargasm Explosion"
31
    set band 1 of preset to 3
32
    set band 2 of preset to 6
33
    set band 3 of preset to 9
34
    set band 4 of preset to 7
35
    set band 5 of preset to 6
36
    set band 6 of preset to 5
37
    set band 7 of preset to 7
38
    set band 8 of preset to 4
39
    set band 9 of preset to 11
40
    set band 10 of preset to 8
41
  end if
42
end tell

はじめて書いた