2022-04-12 22:02:59 -03:00
|
|
|
<!DOCTYPE html>
|
2022-04-12 21:54:18 -03:00
|
|
|
|
|
|
|
<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
|
|
|
|
original version by: Nikos Drakos, CBLU, University of Leeds
|
|
|
|
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
|
|
|
|
* with significant contributions from:
|
|
|
|
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
|
|
|
|
<HTML>
|
|
|
|
<HEAD>
|
2022-04-12 22:02:59 -03:00
|
|
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
|
|
|
|
|
2022-04-12 21:54:18 -03:00
|
|
|
<TITLE>Operations on control streams</TITLE>
|
|
|
|
<META NAME="description" CONTENT="Operations on control streams">
|
|
|
|
<META NAME="keywords" CONTENT="book">
|
|
|
|
<META NAME="resource-type" CONTENT="document">
|
|
|
|
<META NAME="distribution" CONTENT="global">
|
|
|
|
|
|
|
|
<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
|
|
|
|
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
|
|
|
|
|
|
|
|
<LINK REL="STYLESHEET" HREF="book.css">
|
|
|
|
|
|
|
|
<LINK REL="next" HREF="node49.html">
|
|
|
|
<LINK REL="previous" HREF="node47.html">
|
|
|
|
<LINK REL="up" HREF="node40.html">
|
|
|
|
<LINK REL="next" HREF="node49.html">
|
|
|
|
</HEAD>
|
|
|
|
|
|
|
|
<BODY >
|
|
|
|
<!--Navigation Panel-->
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="tex2html1259"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node49.html">
|
|
|
|
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
|
2022-04-12 22:02:59 -03:00
|
|
|
SRC="next.png"></A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="tex2html1253"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node40.html">
|
|
|
|
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
|
2022-04-12 22:02:59 -03:00
|
|
|
SRC="up.png"></A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="tex2html1247"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node47.html">
|
|
|
|
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
|
2022-04-12 22:02:59 -03:00
|
|
|
SRC="prev.png"></A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="tex2html1255"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node4.html">
|
|
|
|
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
|
2022-04-12 22:02:59 -03:00
|
|
|
SRC="contents.png"></A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="tex2html1257"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node201.html">
|
|
|
|
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
|
2022-04-12 22:02:59 -03:00
|
|
|
SRC="index.png"></A>
|
2022-04-12 21:54:18 -03:00
|
|
|
<BR>
|
2022-04-12 23:32:40 -03:00
|
|
|
<B> Next:</B> <A ID="tex2html1260"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node49.html">Control operations in Pd</A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<B> Up:</B> <A ID="tex2html1254"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node40.html">Audio and control computations</A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<B> Previous:</B> <A ID="tex2html1248"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node47.html">Audio signals as control</A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<B> <A ID="tex2html1256"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node4.html">Contents</A></B>
|
2022-04-12 23:32:40 -03:00
|
|
|
<B> <A ID="tex2html1258"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node201.html">Index</A></B>
|
|
|
|
<BR>
|
|
|
|
<BR>
|
|
|
|
<!--End of Navigation Panel-->
|
|
|
|
|
2022-04-12 23:32:40 -03:00
|
|
|
<H1><A ID="SECTION00780000000000000000">
|
2022-04-12 21:54:18 -03:00
|
|
|
Operations on control streams</A>
|
|
|
|
</H1>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
So far we've discussed how to convert between control streams and audio
|
|
|
|
streams. In addition to this possibility, there are four types of
|
|
|
|
operations
|
|
|
|
you can perform on control streams to get other control streams. These control
|
|
|
|
stream operations have no corresponding operations on audio signals. Their
|
|
|
|
existence explains in large part why it is useful to introduce a whole
|
|
|
|
control structure in parallel with that of audio signals.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
The first type consists of
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="3671"></A>
|
2022-04-12 21:54:18 -03:00
|
|
|
<I>delay</I>
|
|
|
|
operations, which offset the time values associated with a control stream.
|
|
|
|
In real-time systems the delays can't be negative in value. A control stream
|
|
|
|
may be delayed by a constant amount, or alternatively, you can delay each event
|
|
|
|
separately by different amounts.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
Two different types of delay are used in practice:
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="3673"></A>
|
2022-04-12 21:54:18 -03:00
|
|
|
<I>simple</I> and
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="3675"></A>
|
2022-04-12 21:54:18 -03:00
|
|
|
<I>compound</I>. Examples of each are shown in Figure <A HREF="#fig03.10">3.10</A>. A simple
|
|
|
|
delay acting on a control stream schedules each event, as it comes in,
|
|
|
|
for a time in the future. However, if another event arrives at the input
|
|
|
|
before the first event is output, the first event is forgotten in favor of the
|
|
|
|
second. In a compound delay, each event at the input produces an output, even
|
|
|
|
if other inputs arrive before the output appears.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
2022-04-12 23:32:40 -03:00
|
|
|
<DIV ALIGN="CENTER"><A ID="fig03.10"></A><A ID="3680"></A>
|
2022-04-12 21:54:18 -03:00
|
|
|
<TABLE>
|
|
|
|
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 3.10:</STRONG>
|
|
|
|
Delay as an operation on a control stream: (a) block
|
|
|
|
diagram; (b) effect of a simple delay on a control stream; (c) effect
|
|
|
|
of a compound delay.</CAPTION>
|
|
|
|
<TR><TD><IMG
|
|
|
|
WIDTH="338" HEIGHT="384" BORDER="0"
|
|
|
|
SRC="img335.png"
|
|
|
|
ALT="\begin{figure}\psfig{file=figs/fig03.10.ps}\end{figure}"></TD></TR>
|
|
|
|
</TABLE>
|
|
|
|
</DIV>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
A second operation on control steams is
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="3683"></A><I>merging</I>:
|
2022-04-12 21:54:18 -03:00
|
|
|
taking two control streams and combining
|
|
|
|
all the events into a new one. Figure <A HREF="#fig03.11">3.11</A> (part a) shows how this
|
|
|
|
and the remaining operations are represented in block diagrams.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
Part (b) of the figure shows the effect of merging two streams. Streams may
|
|
|
|
contain more than one event at the same time. If two streams to be merged
|
|
|
|
contain events at the same time, the merged stream contains them both, in a
|
|
|
|
well-defined order.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
A third type of operation on control streams is
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="3686"></A><I>pruning</I>.
|
2022-04-12 21:54:18 -03:00
|
|
|
Pruning a control stream means looking at the associated data and letting only
|
|
|
|
certain elements through. Part (c) shows an example, in
|
|
|
|
which events (which each have an associated number) are passed through only if
|
|
|
|
the number is positive.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
2022-04-12 23:32:40 -03:00
|
|
|
<DIV ALIGN="CENTER"><A ID="fig03.11"></A><A ID="3690"></A>
|
2022-04-12 21:54:18 -03:00
|
|
|
<TABLE>
|
|
|
|
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 3.11:</STRONG>
|
|
|
|
Operations on control streams (besides delay): (a) block diagrams;
|
|
|
|
(b) merging; (c) pruning; (d) resynchronizing.</CAPTION>
|
|
|
|
<TR><TD><IMG
|
|
|
|
WIDTH="344" HEIGHT="533" BORDER="0"
|
|
|
|
SRC="img336.png"
|
|
|
|
ALT="\begin{figure}\psfig{file=figs/fig03.11.ps}\end{figure}"></TD></TR>
|
|
|
|
</TABLE>
|
|
|
|
</DIV>
|
|
|
|
|
|
|
|
<P>
|
2022-04-12 23:32:40 -03:00
|
|
|
Finally, there is the concept of <A ID="3693"></A>
|
2022-04-12 21:54:18 -03:00
|
|
|
<I>resynchronizing</I> one control stream to another, as shown in part (d).
|
|
|
|
Here one control stream (the source) contributes values which are
|
|
|
|
put onto the time sequence of a second one (the sync). The value given the
|
|
|
|
output is always the most recent one from the source stream. Note that any
|
|
|
|
event from the source may appear more than once (as suggested in the figure),
|
|
|
|
or, on the other hand, it might not appear at all.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
Again, we have to consider what happens when the two streams each contain an
|
|
|
|
event at the same time. Should the sync even be considered as happening before
|
|
|
|
the source (so that the output gets the value of the previous source event)?
|
|
|
|
Or should the source event be considered as being first so that its value goes
|
|
|
|
to the output at the same time? How this should be disambiguated is a design
|
|
|
|
question, to which various software environments take various approaches. (In
|
|
|
|
Pd it is controlled explicitly by the user.)
|
|
|
|
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
|
|
<!--Navigation Panel-->
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="tex2html1259"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node49.html">
|
|
|
|
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
|
2022-04-12 22:02:59 -03:00
|
|
|
SRC="next.png"></A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="tex2html1253"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node40.html">
|
|
|
|
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
|
2022-04-12 22:02:59 -03:00
|
|
|
SRC="up.png"></A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="tex2html1247"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node47.html">
|
|
|
|
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
|
2022-04-12 22:02:59 -03:00
|
|
|
SRC="prev.png"></A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="tex2html1255"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node4.html">
|
|
|
|
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
|
2022-04-12 22:02:59 -03:00
|
|
|
SRC="contents.png"></A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="tex2html1257"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node201.html">
|
|
|
|
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
|
2022-04-12 22:02:59 -03:00
|
|
|
SRC="index.png"></A>
|
2022-04-12 21:54:18 -03:00
|
|
|
<BR>
|
2022-04-12 23:32:40 -03:00
|
|
|
<B> Next:</B> <A ID="tex2html1260"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node49.html">Control operations in Pd</A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<B> Up:</B> <A ID="tex2html1254"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node40.html">Audio and control computations</A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<B> Previous:</B> <A ID="tex2html1248"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node47.html">Audio signals as control</A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<B> <A ID="tex2html1256"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node4.html">Contents</A></B>
|
2022-04-12 23:32:40 -03:00
|
|
|
<B> <A ID="tex2html1258"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node201.html">Index</A></B>
|
|
|
|
<!--End of Navigation Panel-->
|
|
|
|
<ADDRESS>
|
|
|
|
Miller Puckette
|
|
|
|
2006-12-30
|
|
|
|
</ADDRESS>
|
|
|
|
</BODY>
|
|
|
|
</HTML>
|