1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 2<html lang="en"> 3<head> 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 5 <title>CORTEX media toolkit: Documentation</title> 6</head> 7<body bgcolor="#103050" text=white link=white vlink=white alink=yellow> 8 9<table cellspacing=0 cellpadding=0 width=630><tr><td width=80> </td><td width=490><big><big> 10<b>CORTEX</b> documentation index</big></big><small><br> </small> 11</td><td width=60> </td></tr> 12<tr><td align=right><small>release</small> </td> 13<td><b>2.1.2</b></td></tr> 14<tr><td align=right><small>maintained by</small> </td> 15<td><b><a 16 href="mailto:em@be.com">Eric Moon</a></b></td></tr> 17<tr><td align=right><small>last updated</small> </td> 18<td><b>13 June, 2000</td></tr> 19 20<tr><td></td><td><small>For current project info, visit <a 21 href="http://cortex.sourceforge.net">http://cortex.sourceforge.net</a></small><br><br> 22<a href="INSTALLATION.html">Installation</a><br> 23<a href="RELEASE%20NOTES.html">Release Notes</a><br> 24<a href="license.html">Source & Binary License</a><br> 25 </td></tr> 26 27<tr><td></td><td colspan=2><img src="images/pix-white.gif" width=550 height=1><br> 28 </td></tr> 29 30<!-- section 1 header 31 'overview' ************* --> 32<tr valign=top><td align=right><b>1) </b></td><td> 33<b><a name="1">Overview & General Usage</a><br> 34</td><td align=right> 35<small><small> 36 <font color="#e0c0a0">[</font>up<font color="#e0c0a0">]</font> 37 <font color="#e0c0a0">[</font><a href="#2">down</a><font color="#e0c0a0">]</font> 38</td></tr> 39<!-- section 1 body 40 'overview' ************* --> 41<tr valign=top><td><font color="#e0c0a0"><small><small>routing<br>window<br>intro</td><td> 42<p>Revision 2.1.0 of <b>Cortex</b> introduced a kick-ass new routing window design courtesy 43of Christopher Lenz (<a href="mailto:cmlenz@gmx.de">cmlenz@gmx.de<a>.) 44The routing view now has two distinct 45viewing modes: "Icon View" and "Mini Icon View", selectable from the context menu that 46appears when you click the right mouse button in an empty area of the window. 47</p> 48<p>"Icon View" is the default; it's similar to the old look & feel (though a lot nicer 49to look at) -- nodes are displayed as rectangular tiles with inputs and outputs 50arranged vertically on the left and right sides, respectively. Nodes are assigned icons 51based on the type of node, or the owning application if any. 52</p><p> 53"Mini Icon View" is a more compact display: connection points are layed out horizontally, 54with inputs on the top and outputs on the bottom.) 55</p> 56<p>In either view, nodes can be freely dragged around. You can select multiple nodes by 57<shift>-clicking or by dragging a selection rectangle around them. Try right-clicking 58a node or connection to see the specific commands available for it. 59Node positions in both views will be remembered the next time <b>Cortex</b> is run. 60If you find the gray background dull, try dragging in an image file or a color from one 61of the many color-chooser apps out there (I like <a href="http://www.bebits.com/app/918/">kColor</a>.) 62</p> 63</td></tr> 64 65<tr valign=top><td><font color="#e0c0a0"><small><small>making<br>connections</td><td> 66<p>New connections can be made by dragging between two connection points (it doesn't 67matter if you drag from an input or an output.) The wire will snap to connection points 68as the mouse nears them (this doesn't guarantee that such a connection is possible.) 69</p> 70<p>To disconnect two nodes, click on a wire and press the <b><delete></b> 71key, or right-click it and select "Disconnect." 72</p> 73<p> 74<b>Restrictions:</b> Cortex locks the connection between the system mixer and the 75audio output. The Media Server doesn't look kindly upon apps that break that 76connection. Connections from file-producer nodes (more about those below) are also locked, 77due to a bug in the Media Kit. 78</p></td></tr> 79<tr valign=top><td><font color="#e0c0a0"><small><small>dormant<br>nodes</td><td> 80<p> 81Now for a look at the second window: labeled "Media Add-Ons", it displays all the 82media nodes available in add-ons (these are also known as "Dormant Nodes.") Additional 83information on a given node can be had by right-clicking and selecting "Get Info." 84</p> 85<p>To create, or <b>instantiate</b>, a new copy of a given dormant node, drag it 86to a spot in the routing window. If <b>Cortex</b> was able to successfully 87create a new instance of the node, a corresponding panel will appear in the routing 88window. 89</p><p><i><b>Danger!</b> Cortex currently allows you to instantiate any dormant node 90you want. Some add-on nodes, such as sound-card inputs and outputs, can't be 91created more than once, and instantiating a new copy will break the existing one. 92If this happens, the "Restart Media Services" in the Media preferences panel should 93return the system to a usable state.</i></p> 94 95<p><b>File-producers:</b> to create a node capable of playing a given media file (audio 96or video), drag it the file into the routing window. Note that if you create a video-producer 97in this fashion, it can't be hooked straight up to a raw video output, since it 98produces <i>compressed</i> video. You can use the "Decoder Node" add-on to produce 99raw video that can be directly displayed in the Video Window (and hopefully a 100video output as well -- but I don't have one to test with, so no guarantees!) Note 101as well that <b>the Video Window must be started manually</b> before it'll display anything. 102</p> 103 104<p>To delete a node, click on it (to select the node), then press the 105<b><delete></b> key, or right-click the nodeand select "Release."</p> 106 107</p> 108</td></tr> 109 110<tr valign=top><td><font color="#e0c0a0"><small><small>saving<br>node-sets</td><td> 111<p> 112<b>new cool thing:</b> you can save an XML-based description of the currently selected set 113of nodes via the "Save Nodes" option in the 'File' menu. Nodes that you've instantiated 114in <b>Cortex</b> are fully described, so that they are recreated when you load the node-set. 115Nodes owned by outside applications are described to the point that connections to/from them 116may be reestablished if they still exist but <b>Cortex</b> will make no attempt to 117recreate outside nodes if it can't find them. 118</p> 119</td></tr> 120<tr valign=top><td><font color="#e0c0a0"><small><small>the<br>transport<br>window</td><td> 121<p>The transport controls (start/stop) are located in a separate floating window (if it's 122not visible, select "Transport" from the "Window" menu.) 123When one or more nodes are connected, <b>Cortex</b> binds them together into a group, 124allowing you to control the nodes in unison. If you want, you can disable this behavior by 125right-clicking any node in a group and picking "Lock Group" under the "Advanced" submenu. 126Nodes connected to or from any node in the group will thereafter remain in their own groups. 127</p> 128 129<p> 130The upper-left quadrant of the transport window lists information on the currently selected 131group, if any. Selecting a node in the routing window causes its group -- if it has one -- to 132be selected in the inspector. You can click on the group name to edit it; there's not much 133reason to do so yet (groups aren't saved with node-sets yet.) The bottom of this 134status display may be used to show error information in a future release. 135</p> 136<p> 137In the upper-right are the transport controls: pretty self-explanatory except for the "Preroll" 138button. This tells all the nodes in the group to get ready to play -- a properly implemented 139media node should be able to do as much pre-processing as it needs to start instantly. 140</p> 141<p> 142The rest of the transport window is devoted to settings. The "Roll from" and "to" values allow 143you to set a range over which the group will play. If the "to" setting is less than or equal 144to the "from" setting, the group will play unhindered until you stop it. If you do specify a 145valid range, playback will stop when the "to" position is reached, unless one or more nodes 146in the group have "cycle" enabled, in which case those nodes will repeatedly play the selected 147region. The loop isn't guaranteed to be perfectly accurate, especially at short loop lengths, 148but cycle mode is useful for stress-testing a node's "seek" abilities, or for keeping a 149file-player node running. The "Roll to/from" controls are live while cycling nodes are running, 150although Cortex gives up trying to cycle a node if the loop length is too small (less than one 151millisecond.) The cycle setting for each node is located in the node context menu obtained by 152right-clicking on a node panel. 153</p> 154<p> 155The "Run Mode" control lets you tell the nodes how to cope when they fall behind 156(or, if "Offline", to ignore the concept of real time altogether.) This setting 157may be overridden on a node-by-node basis via the "Run Mode" options in the node context menu. 158</p> 159<p> 160The "Time Source" control lets you set the time-source for all nodes in the group. A time 161source is a node that regularly publishes timestamps used by other nodes to synchronize their 162output. The default time source used for new nodes is the "DAC Time Source" (provided you have 163an audio output device of some sort.) If you instantiate nodes that can act as time sources, 164they'll be added to this menu. 165</p> 166</td></tr> 167 168<tr valign=top><td><font color="#e0c0a0"><small><small>parameters</td><td> 169<p> 170Chris has been hard at work expanding parameter (control panel) support. To open the 171new control-panel window for a node that has parameters, double-click the node or select 172"Tweak Parameters" from its context menu. If a node supports its own control-panel window, 173it can be displayed from the <b>Cortex</b> parameter window or by selecting 174"Start Control Panel" from the "Advanced" context submenu. 175</p> 176</td></tr> 177 178<tr valign=top><td><font color="#e0c0a0"><small><small>sample<br>nodes</td><td> 179<p><b>Cortex</b> comes with several sample add-on nodes. Two of them, <b>LoggingConsumer</b> 180and <b>ToneProducer</b>, are based on sample code from the Be Developer Newsletter. I've 181made a few changes to them to implement add-on support, and to make them a bit more flexible. 182Since they are very useful testbed nodes, future <b>Cortex</b> releases will likely include 183further improved versions of them.</p> 184<p>Also included is a sample audio filter, <b>Flanger</b>. It is somewhat limited: only 185floating-point audio is supported (the same is true of <b>ToneProducer</b>.) It does include 186a control panel. Try instantiating <b>ToneProducer</b> and <b>Flanger</b>, connecting 187them together, then connecting <b>Flanger</b>'s output to the system mixer. This is a 188simple example of the Media Kit's flexibility. (For truly warped sounds, try connecting a 189few <b>Flanger</b>s in a row!) 190</p> 191<p>To help ease format-conflict pains, <b>AudioAdapter</b> converts 192from one raw audio format to another on the fly. In most cases you can simply connect 193nodes to either side of it. If you get a "Bad media format" error, you may need to help 194<b>AudioAdapter</b> decide the format: in the Parameters section of the node inspector, 195you can pick format requirements. (Note that currently you HAVE to fully specify the output 196format to get it to connect to the system mixer.) 197</p> 198</td></tr> 199 200<tr><td></td><td colspan=2><img src="images/pix-white.gif" width=550 height=1><br> 201 </td></tr> 202 203<!-- section 2 header 204 'bugs' ************* --> 205<tr valign=top><td align=right><b>2) </b></td><td> 206<b><a name="2">Known Bugs (& Missing Features)</a><br> 207</td><td align=right> 208<small><small> 209 <font color="#e0c0a0">[</font><a href="#1">up</a><font color="#e0c0a0">]</font> 210 <font color="#e0c0a0">[</font><a href="#3">down</a><font color="#e0c0a0">]</font> 211</td></tr> 212<!-- section 2 body 213 'bugs' ************* --> 214<tr valign=top><td></td><td><p> 215<b>back-end (NodeManager)</b><ul> 216 <li>misbehaved nodes not handled well (the UI can lock up as it waits for NodeManager to 217 time out on a failed operation.) 218 <li>groups aren't split correctly. for example, if two producers are connected to a 219 mixer, then the mixer is deleted, the producers will remain in the same group. 220 221</ul> 222<b>application/routing window</b><ul> 223 <li>node-sets loaded by drag & drop should be placed at the drop point. 224 <li>grouping information isn't saved with node-sets. 225 <li>the workspace doesn't autoscroll as nodes are dragged.<br><br> 226</ul> 227<b>AudioAdapter</b><ul> 228 <li>format negotiation needs some work (can't connect output to 229the system mixer without help from the user.) 230 <li>needs a LOT of buffers (>16) if input is connected to a 231system audio-player node that's being cycled (looped). probably a bug 232with the file-player node, but I need to do some more research...<br><br> 233</ul> 234<b>ToneProducer</b><ul> 235 <li>only floating-point output supported.<br><br> 236</ul> 237<b>LoggingConsumer</b><ul> 238 <li>takes after the Be System Mixer in not sending late notices 239</ul> 240<b>Flanger</b><ul> 241 <li>weird noise (aliasing?) given high-pitched tones as input. 242 <li>only floating-point output supported.<br><br> 243</ul> 244</p> 245</td></tr> 246 247<tr><td></td><td colspan=2><img src="images/pix-white.gif" width=550 height=1 hspace=0><br> 248 </td></tr> 249 250<!-- section 3 header 251 'developers' ************* --> 252<tr valign=top><td align=right><b>3) </b></td><td> 253<b><a name="3">Notes for Developers</a><br> 254</td><td align=right> 255<small><small> 256 <font color="#e0c0a0">[</font><a href="#2">up</a><font color="#e0c0a0">]</font> 257 <font color="#e0c0a0">[</font>down<font color="#e0c0a0">]</font> 258</td></tr> 259<!-- section 3 body 260 'developers' ************* --> 261<tr valign=top><td></td><td><p> 262Come check out the <a href="http://sourceforge.net/project/?group_id=2848">SourceForge 263Project Page</a>! 264</p> 265<p><b>Comments/questions?</b><br> 266Let me know: <a href="mailto:em@be.com">em@be.com</a><br> 267 268</td></tr> 269 270 271<!-- 272<tr valign=top><td align=right><b>n) </b></td><td><b>Change Log</b></td></tr> 273--> 274</table> 275 276<!-- copyright notice --> 277<br><br><br> 278<img src="images/pix-white.gif" width=630 height=1><br clear=all> 279<table cellpadding=0 cellspacing=0 width=630><tr> 280<td align=right> 281<small><small>Copyright © 1999-2000, Eric Moon. All rights reserved.</td></tr></table> 282<!-- end copyright notice --> 283 284</body> 285</html> 286