うなり（トレモロ, tremolo)

2003/2/15 Takuichi Hirano

三角関数の公式

加法定理

[加法定理]
(T1) sin(α + β) = 
        sin α cos β + cos α sin β
(T2) sin(α - β) = 
        sin α cos β - cos α sin β
(T3) cos(α + β) = 
        cos α cos β - sin α sin β
(T4) cos(α - β) = 
        cos α cos β + sin α sin β

積→和公式

TrigReduce[Sin[a]*Cos[b]]

TrigReduce[Cos[a]*Sin[b]]

TrigReduce[Cos[a]*Cos[b]]

TrigReduce[Sin[a]*Sin[b]]

加法定理の和を計算すれば導くことができる。

[積→和公式]
(T5) sin a cos b = (1/2) {sin(a + b) + 
              sin(a - b)}
(T6) cos a sin b = (1/2) {sin(a + b) - 
              sin(a - b)}
(T7) cos a cos b = (1/2) {cos(a + b) + 
              cos(a - b)}
(T8) sin a sin b = -(1/2) {cos(a + b) - 
              cos(a - b)}

和→積公式

積→和公式で a + b -> A,  a - b -> B とおくと a -> ((A + B)/2),  
      b -> ((A - B)/2) となる。こうして積→和公式を逆読みすれば和→積公式が得られる。

[和→積公式]
(T9) sin A + sin B = 
        2 sin ((A + B)/2) cos (( A - B)/2)
(T10) sin A - sin B = 
        2 cos ((A + B)/2) sin (( A - B)/2)
(T11) cos A + cos B = 
        2 cos ((A + B)/2) cos (( A - B)/2)
(T12) cos A - 
          cos B = -2 sin ((A + B)/2) sin (( A - B)/2)

積

f1 = 20;
ω1 = 2*π*f1;
f2 = 1;
ω2 = 2*π*f2;
wave1[t_] := Sin[ω1*t];
wave2[t_] := Sin[ω2*t];
wave[t_] := 
        wave1[t]*wave2[t];

\(\(Plot[
        wave1[t], {t, 0, 
          1}, 
PlotStyle -> {{AbsoluteThickness[2], 
              RGBColor[1, 0, 0]}}, 
PlotPoints -> 
          50, 
Ticks -> 
          None, 
Frame -> 
          True, 
FrameTicks -> 
          None, 
FrameLabel -> {"Time", "Amplitude", "", ""}];\)
\)
\(\(Plot[
        wave2[t], {t, 0, 
          1}, 
PlotStyle -> {{AbsoluteThickness[2], 
              RGBColor[1, 0, 0]}}, 
PlotPoints -> 
          30, 
Ticks -> 
          None, 
Frame -> 
          True, 
FrameTicks -> 
          None, 
FrameLabel -> {"Time", "Amplitude", "", ""}];\)
\)
Plot[{wave[t], Abs[Sin[ω2*t]], -Abs[Sin[ω2*t]]}, {t, 
        0, 1}, 
PlotStyle -> {{AbsoluteThickness[2], 
            RGBColor[1, 0, 0]}, 
{AbsoluteThickness[2], 
            Dashing[{0.03, 0.03}]}, 
{AbsoluteThickness[2], 
            Dashing[{0.03, 0.03}]}}, 
PlotPoints -> 
        30, 
Ticks -> 
        None, 
Frame -> 
        True, 
FrameTicks -> 
        None, 
FrameLabel -> {"Time", "Amplitude\
", "", ""}]

Play[
      wave[t], {t, 0, 2}, 
SampleRate -> 
        44100, 
SampleDepth -> 
        16, 
PlayRange -> {-2, 2}]

和

うなり周波数の計算

f1 = 21;
f2 = 1;
Print["■\:3046\:306a\:308a\:5468\:6ce2\:6570->\
\:ff12\:5468\:6ce2\:6570\:306e\:548c \:ff08\:7a4d->\:548c)"];
Print["f1-f2=", f1 - f2];
Print["f1+f2=", f1 + f2];
Print["■\:ff12\:5468\:6ce2\:6570\:306e\:548c->\
\:3046\:306a\:308a\:5468\:6ce2\:6570 \:ff08\:548c->\:7a4d)"];
Print["(f1-f2)/2=", (f1 - f2)/
          2];
Print["(f1+f2)/2=", (f1 + f2)/2];

f1 = 20;
ω1 = 2*π*f1;
f2 = 22;
ω2 = 2*π*f2;
wave1[t_] := Sin[ω1*t];
wave2[t_] := Sin[ω2*t];
wave[t_] := 
        wave1[t] + wave2[t];

\(\(Plot[
        wave1[t], {t, 0, 
          1}, 
PlotStyle -> {{AbsoluteThickness[2], 
              RGBColor[1, 0, 0]}}, 
PlotPoints -> 
          50, 
Ticks -> 
          None, 
Frame -> 
          True, 
FrameTicks -> 
          None, 
FrameLabel -> {"Time", "Amplitude", "", ""}];\)
\)
\(\(Plot[
        wave2[t], {t, 0, 
          1}, 
PlotStyle -> {{AbsoluteThickness[2], 
              RGBColor[1, 0, 0]}}, 
PlotPoints -> 
          30, 
Ticks -> 
          None, 
Frame -> 
          True, 
FrameTicks -> 
          None, 
FrameLabel -> {"Time", "Amplitude", "", ""}];\)
\)
Plot[
      wave[t], {t, 0, 
        1}, 
PlotStyle -> {{AbsoluteThickness[2], 
            RGBColor[1, 0, 0]}, 
{AbsoluteThickness[2], 
            Dashing[{0.03, 0.03}]}}, 
PlotPoints -> 
        30, 
Ticks -> 
        None, 
Frame -> 
        True, 
FrameTicks -> 
        None, 
FrameLabel -> {"Time", "Amplitude\
", "", ""}]

Play[
      wave[t], {t, 0, 2}, 
SampleRate -> 
        44100, 
SampleDepth -> 
        16, 
PlayRange -> {-2, 2}]