E02 ヘッドホンでスピーカーの音を再現

室長:ヘッドホンでスピーカーの音を再現するにどうすれば良いか簡単に説明してくれ。

助手:はい。左右のスピーカーから左右の耳までのインパルスレスポンスを部屋の残響込みで測定してヘッドホンで再生すれば良いはずです。ダミーヘッドまたは自分の頭で測定すれば良さそうです。右スピーカーから右耳までの特性rr、右スピーカーから左耳までの特性rl、左スピーカーから左耳までの特性ll、左スピーカーから右耳までの特性lrの4つを測定します。次にBruteFIRで再生すれば良いはずです。Brutefirの設定はこんな感じになります。


coeff "ll" {
  format: "TEXT";     # file format
  filename: "ll";
  attenuation: 3.0;   # attenuation in dB
  blocks: -1;         # how long in blocks
  skip: 0;            # how many bytes to skip
  shared_mem: false;  # allocate in shared memory
};

coeff "lr" {
  format: "TEXT";     # file format
  filename: "lr";
  attenuation: 3.0;   # attenuation in dB
  blocks: -1;         # how long in blocks
  skip: 0;            # how many bytes to skip
  shared_mem: false;  # allocate in shared memory
};

coeff "rr" {
  format: "TEXT";     # file format
  filename: "rr";
  attenuation: 3.0;   # attenuation in dB
  blocks: -1;         # how long in blocks
  skip: 0;            # how many bytes to skip
  shared_mem: false;  # allocate in shared memory
};

coeff "rl" {
  format: "TEXT";     # file format
  filename: "rl";
  attenuation: 3.0;   # attenuation in dB
  blocks: -1;         # how long in blocks
  skip: 0;            # how many bytes to skip
  shared_mem: false;  # allocate in shared memory
};

input "lin","rin" {
  device: "file" { path: "/dev/stdin"; };
  sample: "S16_LE";   # sample format
  channels: 2/0,1;    # number of open channels / which to use
  delay: 0,0;         # delay in samples for each channel
  maxdelay: -1;       # max delay for variable delays
  subdelay: 0,0;      # subsample delay in 1/100th sample for each channel
  mute: false,false;  # mute active on startup for each channel
};

output "l","r" {
  device: "alsa" { device: "hw:0,0"; };
  sample: "S24_4LE";
  channels: 2/0,1;
  delay: 0,0;         # delay in samples for each channel
  maxdelay: -1;       # max delay for variable delays
  subdelay: 0,0;      # subsample delay in 1/100th sample for each channel
  mute: false,false;
  dither: true;
};

filter "ll" {
  from_inputs: "lin";
  to_outputs: "l";
  coeff: "ll";
  process: -1;        # process index to run in (-1 means auto)
  delay: 0;           # predelay, in blocks
  crossfade: false;   # crossfade when coefficient is changed
};

filter "lr" {
  from_inputs: "lin";
  to_outputs: "r";
  coeff: "lr";
  process: -1;        # process index to run in (-1 means auto)
  delay: 0;           # predelay, in blocks
  crossfade: false;   # crossfade when coefficient is changed
};

filter "rr" {
  from_inputs: "rin";
  to_outputs: "r";
  coeff: "rr";
  process: -1;        # process index to run in (-1 means auto)
  delay: 0;           # predelay, in blocks
  crossfade: false;   # crossfade when coefficient is changed
};

filter "rl" {
  from_inputs: "rin";
  to_outputs: "l";
  coeff: "rl";
  process: -1;        # process index to run in (-1 means auto)
  delay: 0;           # predelay, in blocks
  crossfade: false;   # crossfade when coefficient is changed
};

室長:正解じゃ!この方法で左右だけでなく後方のスピーカーを測定すればバーチャルサラウンドヘッドホンを自分で作ることもできるぞ。ただし後方のスピーカーを測定する場合には耳介の中で測定して後方と前方の特性の差をきちんと再現する必要があるので少し面倒だ。

では次回は簡単なデモを示そう。

2013年3月6日

次ページへ

目次へ