Next  |  Prev  |  Up  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Infix Notation Rewriting

For readability and convenience, infix notation such as x * y is recognized and translated to Block-Diagram Normal Form (BDNF) as x,y:*, i.e., the parallel signals x and y are fed to the two-input multiplier *. Similarly, the notation f(x) is rewritten to x:f if f is a primitive function. (More generally, f(x) is first rewritten as possible using pattern-matching2.23) and definition-expansion2.7)). Postfix operators such as ' are handled similarly. More formally, we can write

$\displaystyle \begin{tabular}{rcrcl}
\texttt{x * y} & $\to$\ & \texttt{x,y} &\!\texttt{:}\!& \texttt{*} \\
\texttt{x / y} & $\to$\ & \texttt{x,y} &\!\texttt{:}\!& \texttt{/} \\
\texttt{x \^{} y} & $\to$\ & \texttt{x,y} &\!\texttt{:}\!& \texttt{\^} \\
\texttt{pow(x,y)} & $\to$\ & \texttt{x,y} &\!\texttt{:}\!& \texttt{\^} \\
\texttt{x @ y} & $\to$\ & \texttt{x,y} &\!\texttt{:}\!& \texttt{@} \\
\texttt{x'} & $\to$\ & \texttt{ x} &\!\texttt{:}\!& \texttt{mem} \\
\texttt{f(x)} & $\to$\ & \texttt{ x} &\!\texttt{:}\!& \texttt{f} \\
\texttt{f(x,y)} & $\to$\ & \texttt{x,y} &\!\texttt{:}\!& \texttt{f}\\
\texttt{f(x,y,z)} & $\to$\ & \texttt{x,y,z} &\!\texttt{:}\!& \texttt{f}
\end{tabular}$

and so on.


Next  |  Prev  |  Up  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Download aspf.pdf
[Comment on this page via email]

``Audio Signal Processing in Faust'', by Julius O. Smith III
Copyright © 2024-05-01 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA