aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrowe67 <[email protected]>2023-11-19 10:29:28 +1030
committerDavid Rowe <[email protected]>2023-11-19 10:29:28 +1030
commitdef80d4bf628e55afc31ccd8b9648c0308323b80 (patch)
tree754448a1f32bcdebe91fda937ac1cd36307e1f74
parentce5e8ba7169c079de023c4ce6e5be2c705ea0132 (diff)
building up sinusoid figure
-rw-r--r--doc/codec2.pdfbin120193 -> 120512 bytes
-rw-r--r--doc/codec2.tex35
2 files changed, 18 insertions, 17 deletions
diff --git a/doc/codec2.pdf b/doc/codec2.pdf
index 77877b1..8aa38ce 100644
--- a/doc/codec2.pdf
+++ b/doc/codec2.pdf
Binary files differ
diff --git a/doc/codec2.tex b/doc/codec2.tex
index 07b77ed..5719601 100644
--- a/doc/codec2.tex
+++ b/doc/codec2.tex
@@ -2,7 +2,7 @@
\usepackage{amsmath}
\usepackage{hyperref}
\usepackage{tikz}
-\usetikzlibrary{calc}
+\usetikzlibrary{calc,arrows}
\usepackage{float}
\usepackage{xstring}
@@ -75,34 +75,35 @@ A sinewave will cause a spike or spectral line on a spectrum plot, so we can see
\caption{The Sinusoidal speech model. If we sum a series of sine waves, we can generate speech.}
\label{fig:sinusoidal_model}
\begin{center}
-\begin{tikzpicture}
+\begin{tikzpicture}[>=triangle 45,x=1.0cm,y=1.0cm]
-\newcommand{\DrawSine}[4]{% x, y, x_scale, y_scale
-\begin{tikzpicture}
-%\draw plot [smooth] coordinates {(#1,#2) (0.5,0.707) (1,1) (1.5,0.707) (2,0) (2.5,-0.707) (3,-1) (3.5,-0.707) (4,0)};
+% draws little sine wave squiggle
+\newcommand{\drawSine}[4]{% x, y, x_scale, y_scale
\draw plot [smooth] coordinates {(#1-2*#3, #2 ) (#1-1.5*#3,#2+0.707*#4)
(#1-1*#3, #2+1*#4) (#1-0.5*#3,#2+0.707*#4)
(#1 ,#2+0) (#1+0.5*#3,#2-0.707*#4)
(#1+1*#3,#2-1*#4) (#1+1.5*#3,#2-0.707*#4)
- (#1+2*#3,#2+0)};
-\end{tikzpicture}
+ (#1+2*#3,#2+0)}
}
-%%\draw plot [smooth] coordinates {(0,0) (0.5,0.707) (1,1) (1.5,0.707) (2,0) (2.5,-0.707) (3,-1) (3.5,-0.707) (4,0)};
-
-\DrawSine {0}{1}{0.5}{0.5}
-
-\draw (0,2) circle (0.5);
-\draw (0,0.5) circle (0.5);
-\draw (0,-1.5) circle (0.5);
+% three sine wave sources
+\draw (0, 2.0) circle (0.5); \drawSine{0}{ 2.0}{0.2}{0.2};
+\draw (0, 0.5) circle (0.5); \drawSine{0}{ 0.5}{0.2}{0.2};
+\draw (0,-1.5) circle (0.5); \drawSine{0}{-1.5}{0.2}{0.2};
-\draw (1,2) -- (2,2);
-\draw (2.5,0.75) -- (2.5,1.5);
+% summer
\draw (2.5,2) circle (0.5);
\draw (2.25,2) -- (2.75,2);
\draw (2.5,1.75) -- (2.5,2.25);
-\draw (3,2) -- (4,2);
+
+% connecting lines
+\draw [->] (0.5,2) -- (2,2);
+\draw [->] (0.45,0.7) -- (2.05,1.8);
+\draw [->] (0.3,-1.1) -- (2.2,1.6);
+
+% output
+\draw [->] (3,2) -- (4,2);
\end{tikzpicture}