miller-book/node66.html

223 lines
7.0 KiB
HTML

<!DOCTYPE html>
<!--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>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<TITLE>Voice tags</TITLE>
<META NAME="description" CONTENT="Voice tags">
<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="node67.html">
<LINK REL="previous" HREF="node65.html">
<LINK REL="up" HREF="node58.html">
<LINK REL="next" HREF="node67.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A ID="tex2html1529"
HREF="node67.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="next.png"></A>
<A ID="tex2html1523"
HREF="node58.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="up.png"></A>
<A ID="tex2html1517"
HREF="node65.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="prev.png"></A>
<A ID="tex2html1525"
HREF="node4.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="contents.png"></A>
<A ID="tex2html1527"
HREF="node201.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
SRC="index.png"></A>
<BR>
<B> Next:</B> <A ID="tex2html1530"
HREF="node67.html">Encapsulation in Pd</A>
<B> Up:</B> <A ID="tex2html1524"
HREF="node58.html">Automation and voice management</A>
<B> Previous:</B> <A ID="tex2html1518"
HREF="node65.html">Voice allocation</A>
&nbsp; <B> <A ID="tex2html1526"
HREF="node4.html">Contents</A></B>
&nbsp; <B> <A ID="tex2html1528"
HREF="node201.html">Index</A></B>
<BR>
<BR>
<!--End of Navigation Panel-->
<H1><A ID="SECTION00860000000000000000"></A>
<A ID="sect4.tags"></A>
<BR>
Voice tags
</H1>
<P>
Suppose now that we're using a voice bank to play notes, as in the example
above, but suppose the notes <IMG
WIDTH="11" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
SRC="img4.png"
ALT="$a$">, <IMG
WIDTH="10" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img21.png"
ALT="$b$">, <IMG
WIDTH="10" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
SRC="img293.png"
ALT="$c$">, and <IMG
WIDTH="11" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img28.png"
ALT="$d$"> all have the same
pitch, and furthermore that all their other parameters are identical. How
can we design a control stream so that, when any one note is turned off,
we know which one it is?
<P>
This question doesn't come up if the control source is a clavier keyboard
because it's impossible to play more than one simultaneous note on a single key.
But it could easily arise algorithmically, or simply as a result of merging
two keyboard streams together. Moreover, turning notes off is only the
simplest example of a more general problem, which is how, once having set
a task off in a voice bank, we can get back to the same voice to guide
its evolution as a function of real-time inputs or any other unpredictable
factor.
<P>
To deal with situations like this we can add one or more
<A ID="4693"></A><I>tags</I> to the message starting a note (or, in general, a task).
A tag is any collection of data with which we can later identify the task,
which we can then use to search for the voice that is allocated for it.
<P>
Taking again the example of Figure <A HREF="node65.html#fig04.10">4.10</A>, here is one way we might
write those four tasks as a control stream:
<P>
<PRE>
start-time end-time pitch ...
1 3 60 ...
2 8 62
4 6 64
5 8 65
</PRE>
<P>
In this representation we have no need of tags because each message (each line
of text) contains all the information we need in order to specify the entire
task. (Here we have assumed that the tasks <IMG
WIDTH="11" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
SRC="img4.png"
ALT="$a$">, ..., <IMG
WIDTH="11" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img28.png"
ALT="$d$"> are in
fact musical notes with pitches 60, 62, 64, and 65.)
In effect we're representing each task as a single event in a control stream
(Section <A HREF="node43.html#sect3.controlstreams">3.3</A>).
<P>
On the other hand, if we suppose now that we do not know in advance the length
of each note, a better representation would be this one:
<P>
<PRE>
time tag action parameters
1 a start 60 ...
2 b start 62 ...
3 a end
4 c start 64 ...
5 d start 65 ...
6 c end
8 b end
8 d end
</PRE>
<P>
Here each note has been split into two separate events to start and end it.
The labels <IMG
WIDTH="11" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
SRC="img4.png"
ALT="$a$">, ..., <IMG
WIDTH="11" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img28.png"
ALT="$d$"> are used as tags;
we know which start goes with which end since their tags are the same. Note
that the tag is not necessarily related at all to the voice that will be used
to play each note.
<P>
The MIDI standard does not supply tags; in normal use, the pitch of a note
serves also as its tag (so tags are constantly being re-used.) If two
notes having the same pitch must be addressed separately (to slide their
pitches in different directions for example), the MIDI channel may be used (in
addition to the note) as a tag.
<P>
In real-time music software it is often necessary to pass back and forth
between the event-per-task representation and the tagged one above,
since the first representation is better suited to storage and graphical
editing, while the second is often better suited to real-time
operations.
<P>
<HR>
<!--Navigation Panel-->
<A ID="tex2html1529"
HREF="node67.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="next.png"></A>
<A ID="tex2html1523"
HREF="node58.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="up.png"></A>
<A ID="tex2html1517"
HREF="node65.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="prev.png"></A>
<A ID="tex2html1525"
HREF="node4.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="contents.png"></A>
<A ID="tex2html1527"
HREF="node201.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
SRC="index.png"></A>
<BR>
<B> Next:</B> <A ID="tex2html1530"
HREF="node67.html">Encapsulation in Pd</A>
<B> Up:</B> <A ID="tex2html1524"
HREF="node58.html">Automation and voice management</A>
<B> Previous:</B> <A ID="tex2html1518"
HREF="node65.html">Voice allocation</A>
&nbsp; <B> <A ID="tex2html1526"
HREF="node4.html">Contents</A></B>
&nbsp; <B> <A ID="tex2html1528"
HREF="node201.html">Index</A></B>
<!--End of Navigation Panel-->
<ADDRESS>
Miller Puckette
2006-12-30
</ADDRESS>
</BODY>
</HTML>