(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 4.0, MathReader 4.0, or any compatible application. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. ***********************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 93743, 2973]*) (*NotebookOutlinePosition[ 95277, 3025]*) (* CellTagsIndexPosition[ 95116, 3016]*) (*WindowFrame->Normal*) Notebook[{ Cell[TextData[StyleBox["ShowTime", FontFamily->"Comic Sans MS", FontSlant->"Italic"]], "Title"], Cell["\<\ Created by Andrew Watson, James Hu, Cesar Ramirez and Denis \ Pelli.\ \>", "Author", TextAlignment->Right], Cell["Last modified:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(Date[]\)], "Input"], Cell[BoxData[ \({2000, 2, 2, 13, 0, 45}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["Introduction", "Section"], Cell["\<\ ShowTime is a software system that creates and displays QuickTime \ movies in a calibrated fashion, suitable for vision research. ShowTime \ provides rudimentary controls for timing, contrast and color, as well as for \ accompanying warning tones. It also provides a means for specifying the \ calibration of the display.\ \>", "Text"], Cell[TextData[{ "ShowTime for ", StyleBox["Mathematica", FontSlant->"Italic"], " currently consists of two files: a ", StyleBox["Mathematica", FontSlant->"Italic"], " notebook called ShowTime.nb and a binary application called showtime. The \ functions defined in ShowTime.nb make use of the MathLink program showtime. \ Currently we offer a version of this program that runs under MacOS. We are \ happy to share the source code for these functions, and invite improvements \ or versions for other platforms.A version of ShowTime for MatLab is also \ available." }], "Text"], Cell["\<\ To explore the functionality of ShowTime, take a look at the \ tutorial below.\ \>", "Text"], Cell["\<\ More generally, ShowTime is an infrastructure for psychophysical \ displays that is built upon the QuickTime media system. See \ http://vision.arc.nasa.gov/showtime/\ \>", "Text"], Cell["\<\ Contact the authors at: \"Andrew B. Watson\" \"Cesar V. Ramirez\" James Hu Denis Pelli \ \>", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Requirements", "Section"], Cell[TextData[{ "This software works best with ", StyleBox["Mathematica", FontSlant->"Italic"], " 4.0 and QuickTime 4.0 or above on a PowerPC. It may work with previous \ versions and older hardware. Typically, the user would have a second monitor \ connected, though the software can be used with a single monitor (see ", "ScreenNumber", " option below)." }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Tutorial", "Section"], Cell[TextData[{ "ShowTime for ", StyleBox["Mathematica", FontSlant->"Italic"], " consists of two types of functions, high level and low level. The \ high-level functions allow simple but flexible access to most of the \ functionality of Showtime. The low level functions allow more extensive \ control over creation and display of QuickTime movies. We suggest the new \ user first try the high-level functions, proceeding to the low-level \ functions only when and if necessary for additional control.The high-level \ functions are of course composed of calls to the low-level functions, and may \ thus also be used as a tutorial example of how to use the low-level \ functions." }], "Text"], Cell["\<\ The Showtime functions may also be divided into those for \ displaying movies, those for creating video movies, and those for creating \ music movies. We begin with display.\ \>", "Text"], Cell[CellGroupData[{ Cell["How To Use This Tutorial", "Subsection"], Cell["\<\ This tutorial assumes you have some familiarity with Mathematica. \ Read the text, and when you encounter an evaluation cell, evaluate it if the \ text so suggests. To function properly, the cells must be evaluated in order \ of appearance. To move rapidly through just the evaluation cells, type \ Shift-Enter repeatedly. Underlined phrases in blue are hyperlinks, which \ will transport you to other sections of the notebook, or to external urls \ (with the aid of your web browser).\ \>", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Installation", "Subsection"], Cell["\<\ To run this tutorial, you must have or create a folder containing \ the following files. \ \>", "Text", CellMargins->{{55, Inherited}, {Inherited, Inherited}}], Cell["\<\ gabor.mov gaborImage.mov menaceshort.mov right.mov showtime ShowTime.m ShowTime.nb warning.mov wrong.mov\ \>", "Commentary", CellMargins->{{89, Inherited}, {Inherited, Inherited}}], Cell[TextData[{ "If you download ShowTime from the internet (", ButtonBox["http://vision.arc.nasa.gov/showtime/", ButtonData:>{ URL[ "http://vision.arc.nasa.gov/showtime/"], None}, ButtonStyle->"Hyperlink"], "), it will create a folder on your desktop called ShowTimeFolder, which \ will contain these files. Regardless of where the folder is placed, the \ following incomprehensible command should work to set the current directory." }], "Text", CellMargins->{{55, Inherited}, {Inherited, Inherited}}], Cell[BoxData[ \(SetDirectory[ StringJoin[\(\((ToString[#] <> "\<:\>")\) &\)\ /@ \ Rest[\(("\"\ /. \ \((Developer`NotebookInformation[ SelectedNotebook[]])\))\)[\([1]\)]]]]\)], "Input"], Cell["\<\ Otherwise, manually set the Directory to the correct folder. Here \ is our example.\ \>", "Text"], Cell[BoxData[ \(SetDirectory["\<:showtime:ShowTimeFolder\>"]\)], "Input"], Cell["\<\ Next, we read in the package (.m file) corresponding to this \ notebook\ \>", "Text"], Cell[BoxData[ \(<< \ ShowTime.m\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["The ShowTime Palette", "Subsection"], Cell["\<\ In Mathematica, \"palettes\" are windows with buttons that execute \ useful functions. We have created a simple ShowTime palette that the user \ might find useful, especially while learning or debugging. To activate this \ palette, evaluate the following:\ \>", "Text"], Cell[BoxData[ \(<< ShowTimePalettes.m\)], "Input"], Cell[TextData[{ "As the above function evaluates, a small window with eight buttons should \ pop up somewhere on your screen. These buttons can be used at any time as \ shortcuts to typing in corresponding commands. One button deserves special \ mention: QTReset. Use this when errors have put ", "ShowTime", " in a ", ButtonBox["problematic", ButtonData:>"troubleshooting", ButtonStyle->"Hyperlink"], " state." }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Showing movies", "Subsection"], Cell[CellGroupData[{ Cell["A basic display", "Subsubsection"], Cell["\<\ The following expression sets some options for the tutorial. It \ asks which screen you would like to use. If you are working on a computer \ with only one screen, answer 0. If you have two screens, it may be useful to \ put the displays on the second \"extra\" screen, which is number 1. By \ default, it will place the display window in the upper left of the selected \ screen. Make sure other windows don't obscure it.\ \>", "Text"], Cell[BoxData[ \(\(SetOptions[QT, ScreenNumber \[Rule] Input["\"], WindowSize \[Rule] {256, 256}, WindowPosition \[Rule] {0, 0}];\)\)], "Input"], Cell["\<\ We open ShowTime. A gray rectangle should appear on the selected \ screen. You may need to move other windows to make it visible as ShowTime \ windows always appear beneath other open application windows.\ \>", "Text"], Cell[BoxData[ \(\(QTOpen[];\)\)], "Input"], Cell["\<\ We show a movie of a Gabor function whose contrast varies in a \ Gaussian fashion over time. By default, it appears in the center of the \ window. The argument is simply the filename of a QuickTime movie.\ \>", "Text"], Cell[BoxData[ \(\(QTShow["\"];\)\)], "Input"], Cell["We close ShowTime.", "Text"], Cell[BoxData[ \(\(QTClose[];\)\)], "Input"], Cell["\<\ These three command are the essentials of ShowTime. In the \ following sections we will show further examples the illustrate the various \ options.\ \>", "Text"], Cell[TextData[{ "If you have the ShowTime palette open, you could have performed the \ preceeding example by clicking QTOpen, Gabor, and then QTClose. ", StyleBox["Why not try it now?", FontSlant->"Italic"] }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Setting the window size and position.", "Subsubsection"], Cell["\<\ We open ShowTime again. By default, ShowTime will use the entire \ screen (WindowSize->FullScreen). This time we specify a window size in pixels \ of the form {height,width}.\ \>", "Text"], Cell[BoxData[ \(QTOpen[WindowSize \[Rule] {256, 512}]\)], "Input"], Cell["\<\ Notice that QTOpen returns a list of current options, as do the \ functions QTShow and QTClose. The purpose of these options should become \ clearer as the tutorial proceeds.\ \>", "Text"], Cell["\<\ By default it is positioned in the upper left corner. We can \ select another position.\ \>", "Text"], Cell[BoxData[ \(\(QTOpen[WindowSize \[Rule] {256, 256}, WindowPosition \[Rule] {256, 0}];\)\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Setting the window color", "Subsubsection"], Cell["\<\ To set the color of the area within the window, use the option \ Background to indicate a list of three 16 bit numbers specifying {R,G,B}. The \ new window will now be red.\ \>", "Text"], Cell[BoxData[ \(\(QTOpen[Background \[Rule] {65535, 0, 0}];\)\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Select Screen", "Subsubsection"], Cell[TextData[{ "If you have more than one screen, you may select the screen on which you \ wish the movie to be displayed. Screens are numbered from 0. The following \ command indicates you wish the displays to occur on the third screen. The \ default is ScreenNumber ->0, which is the console. ", StyleBox["Skip this command if you wish to remain on the console, or if you \ have only one screen!", FontColor->RGBColor[1, 0, 0]] }], "Text"], Cell[BoxData[ \(\(QTOpen[ScreenNumber \[Rule] 1];\)\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Specify a sound track", "Subsubsection"], Cell["\<\ To add an accompanying sound, we use the Sound option to specify a \ QuickTime movie that contains a sound track.\ \>", "Text"], Cell[BoxData[ \(QTShow["\", Sound \[Rule] "\"]\)], "Input"], Cell[TextData[{ "In a later section, we describe how to create simple ", ButtonBox["musical", ButtonData:>"music", ButtonStyle->"Hyperlink"], " sounds and synthetic ", ButtonBox["speech", ButtonData:>"speech", ButtonStyle->"Hyperlink"], "." }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Specify a delay between sound and movie", "Subsubsection"], Cell["\<\ Often one would like a warning tone to precede a visual stimulus by \ a specific time interval. This can be done with the Offset option which takes \ a value in seconds\ \>", "Text"], Cell[BoxData[ \(QTShow["\", Sound \[Rule] "\", Offset \[Rule] 1]\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Play a sound by itself", "Subsubsection"], Cell["\<\ You can also play just a sound track by itself. This might be used \ for feedback,\ \>", "Text"], Cell[BoxData[ \(QTShow["\"]\)], "Input"], Cell["or for amusement,", "Text"], Cell[BoxData[ \(QTShow["\"]\)], "Input"], Cell[TextData[{ "In a later section, we describe how to make movies that contain ", ButtonBox["music", ButtonData:>"music", ButtonStyle->"Hyperlink"], " or synthetic ", ButtonBox["speech", ButtonData:>"speech", ButtonStyle->"Hyperlink"], "." }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Clear the window after the movie plays", "Subsubsection"], Cell["\<\ The option Clear specifies the color with which to fill the movie \ region. The color is a 16 bit RGB triple.\ \>", "Text"], Cell[BoxData[ \(QTShow["\", Clear \[Rule] {65280, 0, 25000}]\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Change the frame rate of the movie display.", "Subsubsection"], Cell["\<\ The option FrameRate is used to change the frame rate of the \ display. If you use QuickTime Player to examine the frame rate of \"gabor.mov\ \" you will see it has a frame rate of 30 Hz. By default (FrameRate->Normal), \ this is the rate at which it will be displayed. This means, for example, that \ if the display screen is refreshed at 60 Hz, each movie frame will be \ refreshed twice. To have each frame displayed once, use the option \ FrameRate->Screen.\ \>", "Text"], Cell[BoxData[ \(QTShow["\", FrameRate \[Rule] ScreenRate, Sound \[Rule] "\"]\)], "Input"], Cell[BoxData[ \(QTShow["\", FrameRate \[Rule] NormalRate, Sound \[Rule] "\"]\)], "Input"], Cell[BoxData[ \(QTShow["\", Sound \[Rule] "\"]\)], "Input"], Cell["\<\ To playback at a frame rate of 12.7 Hz,, use FrameRate->12.7. We \ include the warning sound in this example to show that both tracks will be \ played back at the specified frame rate.\ \>", "Text"], Cell[BoxData[ \(QTShow["\", FrameRate \[Rule] 12.7, Sound \[Rule] "\"]\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Change the color look-up-table (CLUT)", "Subsubsection"], Cell[TextData[{ ButtonBox["Color look-up-tables", ButtonData:>"cluts", ButtonStyle->"Hyperlink"], " specify the mapping from image pixel values to actual colors on the \ screen. We first create a clut which inverts colors." }], "Text"], Cell[BoxData[ \(\(clut\ = \ Table[255 - c, {c, 0, 255}, {3}];\)\)], "Input"], Cell["\<\ Our convention is to have cluts with dimensions {256,3} (assuming 8 \ bit color).\ \>", "Text"], Cell[BoxData[ \(Dimensions[clut]\)], "Input"], Cell[TextData[StyleBox["Beware: if you are using the console \ (ScreenNumber->0) to display this demo, the clut of the entire screen will be \ affected. You can restore the default clut as shown below (or by closing and \ re-opening ShowTime).", FontColor->RGBColor[1, 0, 0]]], "Text"], Cell[BoxData[ \(QTShow["\", CLUT \[Rule] clut]\)], "Input"], Cell["This command will restore the previous CLUT.", "Text"], Cell[BoxData[ \(QTShow["\", CLUT \[Rule] \ Table[c, {c, 0, 255}, {3}]]\)], "Input"], Cell[TextData[{ "A more extensive discussion of color maps is given in a section ", ButtonBox["below", ButtonData:>"cluts", ButtonStyle->"Hyperlink"], "." }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Display a single frame for a fixed duration", "Subsubsection"], Cell["\<\ Here we use a single-frame movie, and specify a framerate of 1 Hz, \ to achieve a 1 second exposure. We use clear to terminate the exposure.\ \>", \ "Text"], Cell[BoxData[ \(QTShow["\", FrameRate \[Rule] 1. , Clear \[Rule] 256 {128, 128, 128}]\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Change the magnication of a stimulus", "Subsubsection"], Cell["\<\ You can magnify or minify a movie with the Scale option. Currently \ scale must be a real number.\ \>", "Text"], Cell[BoxData[ \(QTShow["\", Scale \[Rule] 2. ]\)], "Input"], Cell[BoxData[ \(QTShow["\", Scale \[Rule] .25]\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Take a break!", "Subsubsection"], Cell[BoxData[ \(QTShow["\", FrameRate \[Rule] 10]\)], "Input"], Cell[BoxData[ \(\(QTClose[];\)\)], "Input"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Making Movies", "Subsection"], Cell[TextData[{ "This Notebook contains functions that enable the user to write arrays of \ numbers to QuickTime movie files. The general idea is that the user creates, \ in ", StyleBox["Mathematica", FontSlant->"Italic"], ", a multidimensional array (tensor) of numbers, which represent grayscale \ or rgb component values of one or several frames of a movie. Using the \ function QTWrite, the array is written to a QuickTime file. When writing the \ file, the user may specify the frame-rate of the movie. Several arrays can be \ written, as separate video tracks, to a single movie, with settings that \ determine how the movies will be combined." }], "Text"], Cell["\<\ In this tutorial, we show several examples of writing grayscale, \ color, and multiple-track movies.\ \>", "Text"], Cell["\<\ Users who want information on the lower level functions from which \ QTWrite is constructed should look at the section Low Level Functions \ below.\ \>", "Text"], Cell["First, we look at the usage message for QuickTimeWrite.", "Text"], Cell[BoxData[ \(\(?QTWrite\)\)], "Input"], Cell["\<\ Next we open ShowTime. This is not necessary for making movies, but \ we want to display each one after we create it.\ \>", "Text"], Cell[BoxData[ \(\(QTOpen[];\)\)], "Input"], Cell[CellGroupData[{ Cell["A single frame grayscale movie", "Subsubsection"], Cell["\<\ Our first creation is a movie with a single grayscale frame, \ consisting of four pixels with different graylevels. Each graylevel must lie \ between 0 and 255, since this is an eight-bit graylevel image.\ \>", "Text"], Cell[BoxData[ \(movie\ = \ {{{0, 80}, {200, 255}}}\)], "Input"], Cell[TextData[{ "If you ever need to check a movie's appearance within ", StyleBox["Mathematica", FontSlant->"Italic"], ", you can use ShowMovie, which renders the movie as a series of graphics." }], "Text"], Cell[BoxData[ \(\(ShowMovie[movie];\)\)], "Input"], Cell["Now we write the array to a QuickTime file.", "Text"], Cell[BoxData[ \(\(QTWrite["\", movie];\)\)], "Input"], Cell[TextData[{ "After writing the movie, take a look at it with QTShow or QuickTime \ Player. ", StyleBox["QTWrite sometimes takes a moment to finish saving the file, so \ make sure it is done before you try to display it.", FontColor->RGBColor[1, 0, 0]] }], "Text"], Cell[BoxData[ \(QTShow["\", Scale \[Rule] 64]\)], "Input"], Cell["\<\ Notice that grayscale is reversed in the QuickTime movie. This is a \ \"feature\" of QuickTime. Don't blame us.\ \>", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["A Grayscale Ramp", "Subsubsection"], Cell["\<\ This single frame is a ramp which increases in intensity from left \ to right.\ \>", "Text"], Cell[BoxData[{ \(\(frames\ = \ 1;\)\), "\[IndentingNewLine]", \(\(rows\ = \ 16;\)\), "\[IndentingNewLine]", \(\(columns\ = 64;\)\ \), "\[IndentingNewLine]", \(\(bits\ = \ 8;\)\), "\[IndentingNewLine]", \(\(movie\ = \ {Table[ Range[0, 2^bits - 1, \((\ 2^bits)\)/columns], {rows}]};\)\)}], "Input"], Cell[BoxData[ \(\(ShowMovie[movie];\)\)], "Input"], Cell[BoxData[ \(QTWrite["\", movie]\)], "Input"], Cell[BoxData[ \(QTShow["\"]\)], "Input"], Cell["\<\ Notice that the display is superimposed on our previous \ example,this is because we never cleared the window.\ \>", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["A multiple frame grayscale movie", "Subsubsection"], Cell["\<\ To make things very simple we use the IdentityMatrix function which \ will yield a diagonal line, which we scroll using the RotateRight function.\ \ \>", "Text"], Cell[BoxData[{ \(\(frames\ = \ 32;\)\), "\n", \(\(rows\ = \ 32;\)\), "\n", \(\(movie\ = \ 255\ Table[ RotateRight[IdentityMatrix[rows], f], {f, frames}];\)\)}], "Input"], Cell["\<\ We test it with ShowMovie. If you select the resulting graphic \ cells and type Command-y,the frames will be animated.\ \>", "Text"], Cell[BoxData[ \(\(ShowMovie[movie];\)\)], "Input"], Cell[BoxData[ \(Dimensions[movie]\)], "Input"], Cell["\<\ This time we use the Verbose option, which gives various diagnostic \ messages, and which may be useful during program development and \ testing.\ \>", "Text"], Cell[BoxData[ \(\(QTWrite["\", movie, Verbose \[Rule] True];\)\)], "Input"], Cell[BoxData[ \(QTShow["\", Scale \[Rule] 4. ]\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["A single frame color movie", "Subsubsection"], Cell["\<\ We use transformation rules to turn the ones and zeros into \ particular color triples.\ \>", "Text"], Cell[BoxData[{ \(\(rows\ = \ 32;\)\), "\[IndentingNewLine]", \(\(movie\ = \ 255 {IdentityMatrix[rows]\ /. \ {0 \[Rule] {0, 1, 0}, 1 \[Rule] {1, 0, 1}}};\)\)}], "Input"], Cell["\<\ We verify that the array has the appropriate dimensions \ ({frames,rows,columns,colors})..\ \>", "Text"], Cell[BoxData[ \(Dimensions[movie]\)], "Input"], Cell["\<\ We use the ShowMovie command to display the movie within the \ notebook as a sequence of images (in this case, one).\ \>", "Text"], Cell[BoxData[ \(\(ShowMovie[movie];\)\)], "Input"], Cell["\<\ Now we write the array to a QuickTime movie file called \ \"test.mov\". After it is written, you should locate it in the finder, double \ click on it, and verify that is correct.\ \>", "Text"], Cell[BoxData[ \(QTWrite["\", movie]\)], "Input"], Cell[BoxData[ \(QTShow["\", Scale \[Rule] 4. ]\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["A moving color bar", "Subsubsection"], Cell["\<\ We create a multidimensional array, corresponding to the several \ frames of a color movie. It is a moving red diagonal line on an aqua \ background.\ \>", "Text"], Cell[BoxData[{ \(\(frames = 32;\)\), "\[IndentingNewLine]", \(\(rows\ = \ 32;\)\), "\[IndentingNewLine]", \(\(frame0\ = \ IdentityMatrix[rows]\ /. \ {0 \[Rule] {0, 255, 255}, 1 \[Rule] {255, 0, 0}};\)\), "\[IndentingNewLine]", \(\(movie\ = \ Table[RotateRight[frame0, f], {f, frames}];\)\)}], "Input"], Cell["We verify the dimensions.", "Text"], Cell[BoxData[ \(Dimensions[movie]\)], "Input"], Cell[BoxData[ \(QTWrite["\", movie]\)], "Input"], Cell[BoxData[ \(QTShow["\", Scale \[Rule] 4]\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Setting the frame rate", "Subsubsection"], Cell["\<\ The default time scale of the movie is 60 Hz. Here we experiment \ with a slower speed. Note that this does not alter the number of frames in \ the movie, but rather the times at which the frames are presented.\ \>", \ "Text"], Cell[BoxData[ \(QTWrite["\", movie, FrameRate \[Rule] 5]\)], "Input"], Cell["The line should now move very slowly.", "Text"], Cell[BoxData[ \(QTShow["\", Scale \[Rule] 4]\)], "Input"], Cell["\<\ Of course, we can make it move at the display frame rate with the \ appropriate option.\ \>", "Text"], Cell[BoxData[ \(QTShow["\", FrameRate \[Rule] ScreenRate]\)], "Input"], Cell["\<\ Notice that there are two ways of controlling movie speed being \ utilized here. One is the creation of the movie at a particular rate, and \ the other is playback of a movie at a particular rate.\ \>", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["A Color Ramp", "Subsubsection"], Cell["\<\ This is a ramp which increases in intensity from left to right, an \ which changes color from red to green over the duration of the movie.\ \>", \ "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(\(frames\ = \ 8;\)\), "\[IndentingNewLine]", \(\(rows\ = \ 16;\)\), "\[IndentingNewLine]", \(\(bits\ = \ 8;\)\), "\[IndentingNewLine]", \(\(image0\ = \ Table[Range[0, 2^bits - 1, 4\ 2^\((bits - 8)\)], {rows}];\)\), "\[IndentingNewLine]", \(\(colors0\ = \ \({1 - #, #, 0} &\)\ /@ \ \((\((Range[frames] - 1)\)/ frames)\);\)\), "\n", \(\(movie\ = \ Transpose[ Map[image0*# &\ , colors0, {2}], {1, 4, 2, 3}];\)\), "\[IndentingNewLine]", \(\(Print["\", Dimensions[movie]];\)\)}], "Input"], Cell[BoxData[ InterpretationBox[\("Movie dimensions: "\[InvisibleSpace]{8, 16, 64, 3}\), SequenceForm[ "Movie dimensions: ", {8, 16, 64, 3}], Editable->False]], "Print"] }, Open ]], Cell[BoxData[ \(\(ShowMovie[movie];\)\)], "Input"], Cell[BoxData[ \(QTWrite["\", movie, FrameRate \[Rule] 10]\)], "Input"], Cell[BoxData[ \(QTShow["\", Scale \[Rule] 2]\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Making fixation points", "Subsubsection"], Cell["\<\ Our first fixation point will be as simple as possible: a single \ black pixel.It is a single frame, with a frame rate of 1 Hz, so the duration \ is 1 second. \ \>", "Text"], Cell[BoxData[ \(\(fix1\ = {\ {{{0, 0, 0}}}};\)\)], "Input"], Cell[BoxData[ \(QTWrite["\", fix1, FrameRate \[Rule] 1]\)], "Input"], Cell["We re-open the window, to begin with a clear screen.", "Text"], Cell[BoxData[ \(\(QTOpen[Background \[Rule] 2^16 - 1 {1, 1, 1}];\)\)], "Input"], Cell[BoxData[ \(QTShow["\"]\)], "Input"], Cell["\<\ Now we create a slightly larger fixation movie, consisting of a 3x3 \ cross on a white background. Just for fun, we make it red.\ \>", "Text"], Cell[BoxData[ \(\(fix2\ = \ 255\ {\ {{{1, 1, 1}, {1, 0, 0}, {1, 1, 1}}\[IndentingNewLine], {{1, 0, 0}, {1, 0, 0}, {1, 0, 0}}\[IndentingNewLine], {{1, 1, 1}, {1, 0, 0}, {1, 1, 1}}}};\)\)], "Input"], Cell[BoxData[ \(QTWrite["\", fix2, FrameRate \[Rule] 1]\)], "Input"], Cell[BoxData[ \(QTShow["\"]\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Adding two color tracks", "Subsubsection"], Cell["\<\ QTWrite will allow you to write several arrays to separate tracks \ of a single QuickTime movie. Here we create two arrays representing diagonal \ lines of different colors and orientations.\ \>", "Text"], Cell[BoxData[{ \(\(frames\ = \ 8;\)\), "\[IndentingNewLine]", \(\(movie1\ = \ Transpose[ Table[\(RotateRight[IdentityMatrix[16], f]*# &\)\ /@ \ {255, 0, 0}, {f, frames}], {1, 4, 2, 3}];\)\), "\[IndentingNewLine]", \(\(movie2\ = \ Transpose[ Table[\(RotateRight[Reverse[IdentityMatrix[16]], f]*# &\)\ /@ \ {0, 255, 0}, {f, frames}], {1, 4, 2, 3}];\)\)}], "Input"], Cell["This verifies the appearance of their average.", "Text"], Cell[BoxData[ \(\(ShowMovie[\((movie1\ + \ movie2)\)/2];\)\)], "Input"], Cell["By default, this will average the two movies.", "Text"], Cell[BoxData[ \(QTWrite["\", {movie1, movie2}, MultiTrack \[Rule] True]\)], "Input"], Cell[BoxData[ \(QTShow["\", Scale \[Rule] 8, FrameRate \[Rule] 10]\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Adding three color tracks", "Subsubsection"], Cell["\<\ Here the three tracks have different colors and move at different \ speeds.\ \>", "Text"], Cell[BoxData[{ \(\(frames\ = \ 16;\)\), "\[IndentingNewLine]", \(\(movie1\ = \ Transpose[ Table[\(RotateRight[IdentityMatrix[16], 3 f]*# &\)\ /@ \ {255, 0, 0}, {f, frames}], {1, 4, 2, 3}];\)\), "\[IndentingNewLine]", \(\(movie2\ = \ Transpose[ Table[\(RotateRight[Reverse[IdentityMatrix[16]], 2 f]*# &\)\ /@ \ {0, 255, 0}, {f, frames}], {1, 4, 2, 3}];\)\), "\[IndentingNewLine]", \(\(movie3\ = \ Transpose[ Table[\(RotateRight[Reverse[IdentityMatrix[16]], f]*# &\)\ /@ \ {0, 0, 255}, {f, frames}], {1, 4, 2, 3}];\)\)}], "Input"], Cell["By default, this will average the three movies.", "Text"], Cell[BoxData[ \(QTWrite["\", {movie1, movie2, movie3}, MultiTrack \[Rule] True]\)], "Input"], Cell[BoxData[ \(QTShow["\", Scale \[Rule] 8, FrameRate \[Rule] 10]\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Adding two grayscale tracks", "Subsubsection"], Cell["First we make a grating that moves downward.", "Text"], Cell[BoxData[{ \(\(rows = 64;\)\), "\[IndentingNewLine]", \(\(frames = 16;\)\), "\[IndentingNewLine]", \(\(frequency\ = \ 8;\)\), "\[IndentingNewLine]", \(\(grating\ = Round[128\ + \ 127\ Table[ Cos[2\ Pi\ y\ frequency/rows]\ , {y, rows}, {rows}]];\)\), "\[IndentingNewLine]", \(\(movie1\ = \ Table[RotateRight[grating, y], {y, frames}];\)\)}], "Input"], Cell["You can verify it's appearance.", "Text"], Cell[BoxData[ \(\(ShowMovie[movie1];\)\)], "Input"], Cell["Then we make a noise image that moves rightward.", "Text"], Cell[BoxData[{ \(\(noise\ = \ Table[Random[ Integer, {0, 255}], {rows}, {rows}];\)\), "\[IndentingNewLine]", \(\(movie2\ \ = \ Table[Transpose\ @\ RotateRight[noise, y], {y, frames}];\)\)}], "Input"], Cell[BoxData[ \(\(ShowMovie[movie2];\)\)], "Input"], Cell["\<\ By default, this will average the two movies, along with a mean \ gray.\ \>", "Text"], Cell[BoxData[ \(QTWrite["\", {movie1, movie2}, MultiTrack \[Rule] True]\)], "Input"], Cell[BoxData[ \(QTShow["\", Scale \[Rule] 2, Clear \[Rule] 256\ 128\ {1, 1, 1}]\)], "Input"], Cell["\<\ Which way did it move? Hey! We're doing psychophysics \ already!\ \>", "Text"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Making Music", "Subsection", CellTags->"music"], Cell["\<\ Although ShowTime is mainly about visual stimulation, it is often \ useful to be able to produce audible cues in vision experiments. For this \ purpose we provide the QTMusic function, which creates a QuickTime movie \ consisting of a series of MIDI codes. The subject of MIDI is beyond our \ scope, but we provide some codes in another section of this document.\ \>", \ "Text"], Cell["\<\ As a simple example, we define an instrument. We use the MIDI code \ 1 for an \"Acoustic Grand Piano\", with polyphony 3.\ \>", "Text"], Cell[BoxData[ \(\(instrument1\ = \ {1, 3};\)\)], "Input"], Cell["\<\ We then define a set of two notes, separated by rests, progressing \ up from middle C.\ \>", "Text"], Cell[BoxData[ \(\(notes\ = \ {{1, 60, 100, 240}, {0, 0, 0, 240}, {1, 61, 100, 240}, {0, 0, 0, 240}};\)\)], "Input"], Cell["Before the file is written, the composition is played.", "Text"], Cell[BoxData[ \(QTMusic["\", notes, {instrument1}]\)], "Input"], Cell["\<\ Here is a more elaborate composition of ten notes, in which the \ pitch , duration, and instrument are chosen randomly.\ \>", "Text"], Cell[BoxData[{ \(\(n = \ 10;\)\), "\[IndentingNewLine]", \(QTMusic["\", \[IndentingNewLine]notes\ = \ \(Flatten[#, 1] &\)@\ \[IndentingNewLine]Table[{{k, Random[Integer, {30, 127}], 70, Random[Integer, {100, 600}]}, {0, 0, 0, 340}}, {k, n}], instr\ = \ Table[{Random[Integer, {1, 127}], 3}, {k, n}]]\)}], "Input"], Cell["\<\ This movie can later be combined with visual stimuli at run-time by \ using the Sound option of QTShow.\ \>", "Text"], Cell[BoxData[ \(QTShow["\", \ Sound -> "\"]\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Making Speech", "Subsection", CellTags->"speech"], Cell["\<\ It is easy to make QuickTime movies that contain synthetic speech, \ which might be useful for instructions to the observer, or feedback. Here is \ an example:\ \>", "Text"], Cell[BoxData[ \(QTShow["\"]\)], "Input"], Cell["\<\ To make such movies, we use the shareware program QuickSpeech, \ which is available at www.webnation.com/webtools/.\ \>", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["When ShowTime Freezes Over (Troubleshooting)", "Subsection", CellTags->"troubleshooting"], Cell["\<\ On occasion, ShowTime will freeze. The usual way to escape this \ state is 1) switch to showtime in the application menu, 2) type \"Command-Q\" 3) go back to the frozen notebook 4) type \"Command-,\" 5) click on \"Abort command being evaluated\" 6) in the small button window, click on QTReset.\ \>", "Text", TextAlignment->Left], Cell["\<\ Another possible problem is displays that look like garbage (very \ skewed). This may be the result of buggy display card drivers. Update them.\ \ \>", "Text"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["High Level Functions", "Section"], Cell[CellGroupData[{ Cell["Disable Typo Warnings", "Subsubsection"], Cell[BoxData[ \(Off[General::"\"]\)], "Input", InitializationCell->True], Cell[BoxData[ \(Off[General::"\"]\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QT", "Subsubsection"], Cell[BoxData[ \(\(QT::usage = "\";\)\)], \ "Input", InitializationCell->True], Cell[BoxData[ \(\(Options[QT]\ = \ {FrameRate \[Rule] NormalRate, ScreenNumber \[Rule] 1, \ WindowPosition \[Rule] {0, 0}, WindowSize \[Rule] {256, 256}, CLUT \[Rule] Automatic, Background \[Rule] 256\ {128, 128, 128}\[IndentingNewLine], Sound \[Rule] None, WindowPointer \[Rule] None, QTLink \[Rule] None, WindowRect \[Rule] None, Application \[Rule] "\", Clear \[Rule] False, Scale \[Rule] Automatic};\)\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTOpen", "Subsubsection"], Cell[BoxData[ \(Clear[QTOpen]\)], "Input"], Cell[BoxData[ \(\(QTOpen::usage = "\";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTOpen[opts___Rule]\ := \ Module[{scr, bkg, pos, siz, rect, link, app, wptr}, \[IndentingNewLine]{scr, bkg, pos, size, link, app}\ = \ \({ScreenNumber, Background, WindowPosition, WindowSize, QTLink, Application} /. \ {opts}\)\ /. \ Options[QT]; \[IndentingNewLine]If[ Head[link]\ == \ LinkObject, \[IndentingNewLine]\((Print["\"]; \[IndentingNewLine]\ QTClose[]; Pause[1])\)]; \[IndentingNewLine]rect\ = \ If[size\ === \ FullScreen, \[IndentingNewLine]{}, Reverse[pos]~Join~ Reverse[pos + size]]; \[IndentingNewLine]SetOptions[QT, QTLink \[Rule] Install[app], \[IndentingNewLine]\ WindowPointer \[Rule] \((wptr = \(QTWindowOpen\ [scr, {}, rect]\)[\([1]\)])\), \[IndentingNewLine]WindowRect \ \[Rule] rect]; \[IndentingNewLine]QTWindowFill[wptr, \ bkg]; \[IndentingNewLine]If[ rect \[Equal] {}, \[IndentingNewLine]SetOptions[QT, WindowRect \[Rule] AbsoluteRect[\(QTScreenRectGet[scr]\)[\([1]\)]]], Options[QT]]\[IndentingNewLine]]\)], "Input", InitializationCell->True], Cell[BoxData[ \(AbsoluteRect[rect_]\ := \ {0, 0, rect[\([3]\)] - rect[\([1]\)], rect[\([4]\)] - rect[\([2]\)]}\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTClose", "Subsubsection"], Cell[BoxData[ \(QTClose::usage\ = \ "\"\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTClose[\ ]\ := \ Module[{wptr, lnk}, \[IndentingNewLine]\t{wptr, lnk}\ = \ {WindowPointer, QTLink}\ /. \ Options[QT]; \[IndentingNewLine]\t QTWindowClose[wptr]; \[IndentingNewLine]\t Uninstall[lnk]; \[IndentingNewLine]\t SetOptions[QT, QTLink \[Rule] None, \ WindowPointer \[Rule] None]\[IndentingNewLine]]\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTShow", "Subsubsection"], Cell[BoxData[ \(Clear[QTShow]\)], "Input"], Cell[BoxData[ \(\(QTShow::usage = "\Normal, frame rate at which to display movie, other options are \ FrameRate->Screen for the native rate of the display, and \ FrameRate\[Rule], Scale->Automatic, magnify or minify the movie by a constant factor, \ Offset->0, an offset in seconds before the start of the movie, Verbose->False \ supress diagnostic printout.\>";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(\(Options[QTShow]\ = \ {Offset \[Rule] 0, Verbose \[Rule] False};\)\)], "Input"], Cell[BoxData[ \(QTShow[filename_, opts___Rule]\ := \ Module[\[IndentingNewLine]\t{msg, mptr, sound, clut, wptr, clr, rate, size, scale, offset, verbose}, \[IndentingNewLine]\[IndentingNewLine]\t{sound, clut, wptr, clr, rate, size, scale, offset, verbose}\ = \[IndentingNewLine]\t\(\({Sound, CLUT, WindowPointer, Clear, FrameRate, WindowSize, Scale, Offset, Verbose}\ /. \[IndentingNewLine]\t\ {opts}\)\ /. \ Options[QT]\)\ /. \ Options[QTShow]; \[IndentingNewLine]PrintDiagnostic\ = \ If[verbose, Print, Null &]; \[IndentingNewLine]\t\(({mptr, msg} = QTMovieGetFromFile[filename])\) // PrintDiagnostic; \ \[IndentingNewLine]\[IndentingNewLine]PrintDiagnostic["\", \ offset, "\< sec.\>"]; \[IndentingNewLine]\((tscale\ = \ QTMovieTimescaleGet[mptr])\) // PrintDiagnostic; \[IndentingNewLine]tscale\ = \ tscale[\([1]\)]; \[IndentingNewLine]QTMovieTrackOffsetSet[mptr, \ 1, \ Round[offset\ tscale]] // PrintDiagnostic; \[IndentingNewLine]\[IndentingNewLine]\t If[\(! \((sound\ === None)\)\), \[IndentingNewLine]\t\ {mptr2, msg} = QTMovieGetFromFile[sound]; \[IndentingNewLine]\t QTMovieAdd[mptr, mptr2]]; \[IndentingNewLine]\t If[\(! \((clut\ === Automatic)\)\), \[IndentingNewLine]\t\ QTWindowClutSet[wptr, Flatten[Transpose[clut]]] // PrintDiagnostic]; \[IndentingNewLine]\t If[\(! \((scale\ \ === \ Automatic)\)\), \[IndentingNewLine]\t QTMovieScale[mptr, \ scale] // PrintDiagnostic]; \[IndentingNewLine]\t QTMovieRate[mptr, \ rate] // PrintDiagnostic; \[IndentingNewLine]\t QTMovieWindowSet[mptr, wptr] // PrintDiagnostic; \[IndentingNewLine]\t QTMovieLoadIntoRAM[mptr] // PrintDiagnostic; \[IndentingNewLine]\t QTMovieShow[mptr] // PrintDiagnostic; \[IndentingNewLine]\t If[ListQ[clr], \[IndentingNewLine]\t QTMovieRectFill[mptr, \ clr, {}] // PrintDiagnostic\ ]; \[IndentingNewLine]\t QTMovieDispose[mptr] // PrintDiagnostic; \[IndentingNewLine]\t If[\(! \((sound\ === None)\)\), QTMovieDispose[mptr2] // PrintDiagnostic];\[IndentingNewLine]\t\[IndentingNewLine]]\)], \ "Input", InitializationCell->True], Cell[BoxData[ \(QTShow["\"\[IndentingNewLine], Clear \[Rule] 256 {128, 0, 128}\[IndentingNewLine], Scale \[Rule] 0.5\[IndentingNewLine], Sound \[Rule] "\"\[IndentingNewLine], CLUT \[Rule] Table[Random[Integer, {0, 255}], {3\ }, {256}]\[IndentingNewLine], FrameRate \[Rule] 15\[IndentingNewLine], Verbose \[Rule] True]\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["QTTest", "Subsubsection"], Cell[BoxData[ \(QTTest[filename_, opts___] := \((QTOpen[WindowSize \[Rule] {256, 256}, opts]; QTShow[filename, opts]; QTClose[];)\)\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTWrite", "Subsubsection"], Cell[BoxData[ \(Clear[QTWrite]\)], "Input"], Cell[BoxData[ \(\(\(QTWrite::usage\ = \ "\Automatic, MultiTrack->False, \ BlendWeights\[Rule]Automatic}. Offset is the interval from the start of the \ movie to the start of the track, in seconds. If there are several tracks, set \ MultiTrack->True. In that case, the graphics mode for each track is set to \ Blend, and the blending weights default to values that yield the average of \ the several tracks. Blending weights are unsigned integers between 0 and \ 2^16-1. A longer discussion of graphics mode is provided below.\>"\ ;\)\(\n\)\ \)\)], "Input", InitializationCell->True], Cell[BoxData[ \(\(Options[QTWrite]\ = \ {BitsPerPixel \[Rule] 8, FrameRate \[Rule] 60, Information \[Rule] "\<\>", Offset \[Rule] 0. , PreLoad \[Rule] True, \ GraphicsMode -> Automatic, \ MultiTrack -> False, BlendWeights \[Rule] Automatic, Verbose \[Rule] False};\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTWrite[filename_, movie_, opts___Rule]\ := \ Module[{kFix1 = \ 1, kDitherCopy = 64, \ kBlend = 32, tracks, frames, rows, columns, info, offset, rate, bits, link, \ gmode, \ multitrack, \ tmovie, bweights, verbose, NullFunction, preload, linkTemporary = False}, \[IndentingNewLine]{info, offset, rate, bits, preload, \ gmode, \ multitrack, bweights, verbose}\ = \ \({Information, Offset, FrameRate, BitsPerPixel, PreLoad, GraphicsMode, MultiTrack, BlendWeights, Verbose}\ /. \ {opts}\)\ /. \ Options[QTWrite]; \[IndentingNewLine]PrintDiagnostic\ = \ If[verbose, Print, Null &]; \[IndentingNewLine]preload\ = \ If[preload, 1, 0]; \[IndentingNewLine]PrintDiagnostic["\<{info,offset,rate,bits,\ preload, gmode, multitrack,bweights,verbose} = \>", {info, offset, rate, bits, preload, \ gmode, \ multitrack, bweights, verbose}\ \ ]; \[IndentingNewLine]tracks\ = \ If[multitrack, Length[movie], 1]; \[IndentingNewLine]PrintDiagnostic["\", tracks]; \[IndentingNewLine]If[ bweights\ === \ Automatic, \[IndentingNewLine]bweights\ = \({#, #, #} &\)\ /@ \ Round[\((2^16 - 1)\)/ Range[tracks]]]; \ \[IndentingNewLine]PrintDiagnostic["\", bweights]; \[IndentingNewLine]\[IndentingNewLine]gmode = If[gmode === Automatic\ && \ multitrack === False, kDitherCopy, kBlend]; \[IndentingNewLine]PrintDiagnostic["\", gmode]; \[IndentingNewLine]PrintDiagnostic["\<{offset,rate,gmode} = \ \>", {offset, rate, gmode}]; \[IndentingNewLine]{offset, rate, gmode}\ = \ \(If[\(! ListQ[#]\), \ Table[#, {tracks}], #] &\)\ /@ \ {offset, rate, gmode}; \[IndentingNewLine]PrintDiagnostic["\<{offset,rate,\ gmode} = \>", {offset, rate, gmode}]; \[IndentingNewLine]\[IndentingNewLine]color\ = \ If[TensorRank[\ If[multitrack, movie[\([1]\)], movie]] \[Equal] 4, 1, 0]; \[IndentingNewLine]PrintDiagnostic["\", color]; \[IndentingNewLine]tmovie\ = \ Round[ If[multitrack, movie, {movie}]]; \[IndentingNewLine]\ {frames, rows, columns}\ = \ \(Dimensions[ tmovie]\)[\([{2, 3, 4}]\)]; \ \[IndentingNewLine]PrintDiagnostic["\<{frames,rows,columns} = \>", {frames, rows, columns}]; \[IndentingNewLine]\[IndentingNewLine]pixelSize\ \ = \ bits\ \((1 + \ 2\ color)\); \[IndentingNewLine]PrintDiagnostic["\", pixelSize]; \[IndentingNewLine]\[IndentingNewLine]link\ = \ QTLink\ /. \ Options[QT]; \[IndentingNewLine]If[\ link\ === \ None, \ link\ = Install["\"]; linkTemporary = True]; \[IndentingNewLine]RetVal = QTMovieCreate[filename, \ 0]; \[IndentingNewLine]MoviePtr\ = \ RetVal[\([1]\)]; \[IndentingNewLine]PrintDiagnostic[ RetVal[\([2]\)]]; \[IndentingNewLine]\[IndentingNewLine]Table[\ \[IndentingNewLine]\(\((PrintDiagnostic["\", {track, rate[\([track]\)], offset[\([track]\)]}]; PrintDiagnostic[\(QTVideoTrackCreate[MoviePtr, rows, \ columns, \ rate[\([track]\)], preload\ ]\)[\([2]\)]]; \ \[IndentingNewLine]PrintDiagnostic[\(QTVideoMediaCreate[ MoviePtr]\)[\([2]\)]]; \t\[IndentingNewLine]\ PrintDiagnostic[{MoviePtr, color, \ pixelSize, rows, columns, \ frames}]; \[IndentingNewLine]\ PrintDiagnostic[\(QTVideoMediaSamplesAdd[MoviePtr, Flatten[tmovie[\([track]\)]], color, \ pixelSize, rows, columns, \ frames, 1]\)[\([2]\)]]; \[IndentingNewLine]PrintDiagnostic[ QTVideoMediaGraphicsModeSet[MoviePtr, gmode[\([track]\)], \ bweights[\([track]\)]]]; \ \[IndentingNewLine]PrintDiagnostic[\(QTVideoMediaSave[ MoviePtr]\)[\([2]\)]]; \ \[IndentingNewLine]PrintDiagnostic[\(QTVideoTrackSamplesSet[ MoviePtr, \[IndentingNewLine]\ Round[offset[\([track]\)]/rate[\([track]\)]], 0, \ frames, \ 1. ]\)[\([2]\)]]; \ \[IndentingNewLine]PrintDiagnostic[\(QTVideoTrackSave[ MoviePtr]\)[\([2]\)]])\);\)\n\t, {track, tracks}]; \[IndentingNewLine]PrintDiagnostic[\(QTMovieUserDataAdd[ MoviePtr, info, \ "\<@inf\>"]\)[\([2]\)]]; \[IndentingNewLine]QTMovieSave[ MoviePtr]; \[IndentingNewLine]If[linkTemporary, Uninstall[link]];]\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTWriteExample", "Subsubsection"], Cell["\<\ This is a very simple example program. It is provided mainly as a \ programming example, minus the more elaborate diagnstics and multi-track \ capability of QTWrite.\ \>", "Text"], Cell[BoxData[ \(QTWriteExample[filename_, movie_]\ := \ Module[{frames, rows, columns, rate = 60, bits = 8, link, preload = 1}, \[IndentingNewLine]color\ = \ If[TensorRank[\ movie] \[Equal] 4, 1, 0]; \[IndentingNewLine]\ {frames, rows, columns}\ = \ \(Dimensions[ movie]\)[\([{1, 2, 3}]\)]; \[IndentingNewLine]pixelSize\ = \ bits\ \((1 + \ 2\ color)\); \[IndentingNewLine]link\ = \ Install["\"]; \[IndentingNewLine]MoviePtr\ = \ \ \(QTMovieCreate[filename, \ 0]\)[\([1]\)]; \[IndentingNewLine]QTVideoTrackCreate[MoviePtr, rows, \ columns, \ rate, preload\ ]; \[IndentingNewLine]QTVideoMediaCreate[ MoviePtr]; \[IndentingNewLine]QTVideoMediaSamplesAdd[MoviePtr, Flatten[movie], color, \ pixelSize, rows, columns, \ frames, 1]; \[IndentingNewLine]QTVideoMediaSave[ MoviePtr]; \[IndentingNewLine]QTVideoTrackSamplesSet[MoviePtr, 0, 0, \ frames, \ 1]; \[IndentingNewLine]QTVideoTrackSave[ MoviePtr]; \[IndentingNewLine]QTMovieSave[ MoviePtr]; \[IndentingNewLine]Uninstall[ link];\[IndentingNewLine]]\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["QTReset", "Subsubsection"], Cell[BoxData[ \(\(QTReset::usage = "\";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTReset[]\ := \ \((\ Uninstall\ /@ \ Cases[\ Links[], LinkObject["\", ___]]; \[IndentingNewLine]SetOptions[ QT, WindowPointer \[Rule] None, QTLink \[Rule] None, WindowRect \[Rule] None])\)\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["ShowMovie", "Subsubsection"], Cell[TextData[{ "This is a utility for displaying a movie (color or bw) in a ", StyleBox["Mathematica", FontSlant->"Italic"], " notebook as a series of images. These can be selected as a group and \ animated with the menu item \"Cell->Animate Selected Graphics\". The function \ assumes that the pixel values range from 0 to 255." }], "Text"], Cell[BoxData[ \(ShowMovie[ movie_]\ := \(Show[ Graphics[RasterArray[#], AspectRatio \[Rule] Automatic]] &\)\ /@ \ Map[If[TensorRank[movie] \[Equal] 3, GrayLevel, RGBColor @@ # &], Reverse\ /@ \((movie/255. )\), {3}]\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTMusic", "Subsubsection"], Cell[BoxData[ \(\(QTMusic::usage\ = \ \ "\";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(Clear[QTMusic]\)], "Input"], Cell[BoxData[ \(\(Options[QTMusic]\ = \ {TimeScale \[Rule] 600, \ PreLoad \[Rule] 1, PlayRate \[Rule] 1, Offset \[Rule] 0, \ Information \[Rule] "\<\>", Play \[Rule] True, Verbose \[Rule] False};\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTMusic[filename_, notes_List, instruments_List, \ opts___Rule]\ := \ Module[{iStartInMedia = 0, iDurationInMedia = \(-1\), link, info, offset, timescale, playrate, preload, verbose, play, MoviePtr, save, linkTemporary = False}, \[IndentingNewLine]{info, offset, timescale, playrate, preload, verbose, play, save}\ = \ \({Information, Offset, TimeScale, PlayRate, PreLoad, Verbose, Play, Save}\ /. \ {opts}\)\ /. \ Options[QTMusic]; \[IndentingNewLine]PrintDiagnostic\ = \ If[verbose, Print[#[\([2]\)]] &, Null &]; \[IndentingNewLine]link\ = \ QTLink\ /. \ Options[QT]; \[IndentingNewLine]PrintDiagnostic["\", link]; \[IndentingNewLine]If[\ link\ === \ None, \ PrintDiagnostic["\"]; link\ = Install["\"]; linkTemporary = True]; \[IndentingNewLine]\((RetVal = QTMovieCreate[filename, \ 0])\) // PrintDiagnostic; \[IndentingNewLine]MoviePtr\ = \ RetVal[\([1]\)]; \ \[IndentingNewLine]\[IndentingNewLine]QTMusicTrackCreate[MoviePtr, timescale, preload\ ] // PrintDiagnostic; \[IndentingNewLine]QTMusicMediaCreate[MoviePtr] // PrintDiagnostic; \t\[IndentingNewLine]QTMusicMediaSamplesAdd[ MoviePtr, notes, instruments] // PrintDiagnostic; \[IndentingNewLine]QTMusicMediaSave[MoviePtr] // PrintDiagnostic; \[IndentingNewLine]QTMusicTrackSamplesSet[ MoviePtr, \[IndentingNewLine]\ Round[offset/timescale], iStartInMedia, \ iDurationInMedia, \ playrate + 0. ] // PrintDiagnostic; \[IndentingNewLine]QTMusicTrackSave[MoviePtr] // PrintDiagnostic; \[IndentingNewLine]QTMovieUserDataAdd[MoviePtr, info, \ "\<@inf\>"] // PrintDiagnostic; \[IndentingNewLine]If[ play, QTMovieShow[MoviePtr]]; \[IndentingNewLine]QTMovieSave[ MoviePtr] // PrintDiagnostic; \[IndentingNewLine]If[ linkTemporary, Uninstall[link]];]\)], "Input", InitializationCell->True] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Low Level Functions", "Section"], Cell[CellGroupData[{ Cell["Showing movies", "Subsection"], Cell[CellGroupData[{ Cell["QTMovieAdd", "Subsubsection"], Cell[BoxData[ \(\(QTMovieAdd::usage\ = \ "\";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTMovieAdd := qtMovieAdd\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTMovieDispose", "Subsubsection"], Cell[BoxData[ \(\(QTMovieDispose::usage\ = \ "\";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTMovieDispose := qtMovieDispose\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTMovieFrameDisplay", "Subsubsection"], Cell[BoxData[ \(QTMovieFrameDisplay\ := \ qtMovieFrameDisplay\)], "Input", InitializationCell->True], Cell[BoxData[ \(\(QTMovieFrameDisplay::usage\ = \ \ "\";\)\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTMovieGetFromFile", "Subsubsection"], Cell[BoxData[ \(\(QTMovieGetFromFile::usage\ = \ \ "\";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTMovieGetFromFile := qtMovieGetFromFile\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTMovieLoadIntoRAM", "Subsubsection"], Cell[BoxData[ \(\(QTMovieLoadIntoRAM::usage\ = \ "\";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTMovieLoadIntoRAM := qtMovieLoadIntoRAM\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTMovieRate", "Subsubsection"], Cell[BoxData[ \(\(QTMovieRate::usage = \ "\";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTMovieRate[MoviePointer_, \ NormalRate] := \ Null\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTMovieRate[MoviePointer_, \ ScreenRate] := \ qtMovieRate[MoviePointer, 0.0, "\"]\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTMovieRate[MoviePointer_, \ rate_] := \ \ qtMovieRate[MoviePointer, rate\ + \ 0.0, "\<\>"]\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTMovieRectFill", "Subsubsection"], Cell[BoxData[ \(\(QTMovieRectFill::usage\ = \ "\";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTMovieRectFill := qtMovieRectFill\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTMovieScale", "Subsubsection"], Cell[BoxData[ \(\(QTMovieScale::usage = "\";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(\(\(QTMovieScale[MoviePointer_, \ Magnification_]\)\(\ \)\(:=\)\(qtMovieScale[MoviePointer, \ Magnification + 0.0]\)\(\ \)\)\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTMovieShow", "Subsubsection"], Cell[BoxData[ \(\(QTMovieShow::usage = \ "\";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTMovieShow := qtMovieShow\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTMovieWindowSet", "Subsubsection"], Cell[BoxData[ \(\(QTMovieWindowSet::usage = "\";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTMovieWindowSet := qtMovieWindowSet\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTScreenRectGet", "Subsubsection"], Cell[BoxData[ \(QTScreenRectGet := \ qtScreenRectGet\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTScreenRectGet::usage = "\"\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTVideoTrackRectGet", "Subsubsection"], Cell[BoxData[ \(QTVideoTrackRectGet\ := \ qtVideoTrackRectGet\)], "Input", InitializationCell->True], Cell[BoxData[ \(\(QTVideoTrackRectGet::usage = \ "\";\)\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTWindowClose", "Subsubsection"], Cell[BoxData[ \(\(QTWindowClose::usage\ = \ "\";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTWindowClose := qtWindowClose\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTWindowClutSet", "Subsubsection"], Cell[BoxData[ \(\(QTWindowClutSet::usage = "\";\)\)], "Input",\ InitializationCell->True], Cell[BoxData[ \(QTWindowClutSet := qtWindowClutSet\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTWindowClutGet", "Subsubsection"], Cell[BoxData[ \(\(QTWindowClutGet::usage = "\";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTWindowClutGet := qtWindowClutGet\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTWindowFill", "Subsubsection"], Cell[BoxData[ \(QTWindowFill := qtWindowFill\)], "Input", InitializationCell->True], Cell[BoxData[ \(\(QTWindowFill::usage\ = \ "\";\ \)\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTWindowOpen", "Subsubsection"], Cell[BoxData[ \(\(QTWindowOpen::usage\ = "\";\)\ \)], "Input", InitializationCell->True], Cell[BoxData[ \(QTWindowOpen := \ qtWindowOpen\)], "Input", InitializationCell->True] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Making movies", "Subsection"], Cell[CellGroupData[{ Cell["Overview", "Subsubsection"], Cell[TextData[{ " The following is a basic outline of the library's use:\n \n", StyleBox[" Corresponding Function Calls\n", FontWeight->"Bold"], " 1\tQTMovieCreate\t\t \t-to create movie file.\n 2\tQTVideoTrackCreate\t\ \t-to create movie video track.\n 3\tQTVideoMediaCreate\t\t-to create \ movie video media.\n 4\tQTVideoMediaSamplesAdd\t\t-to add video media \ samples (frame(s) data).\n or QTVideoMediaSamplesAddGray\t 8-bit color or \ 8-bit grayscale.\n 5\tQTVideoMediaSave\t\t-to save movie video track.\n \ 6\tQTVideoTrackSamplesSet\t\t-to specify how media samples (frame(s) data)\n \ \t\t\t\t\t should be arranged in the video track.\n 7\t\ QTVideoTrackOffsetSet\t\t-OPTIONALLY specify an offset in the video track.\n \ 8\tQTVideoTrackSave\t\t-to save movie video track.\n 9\tQTMovieUserDataAdd\t\ \t-OPTIONALLY add user data annotations to movie.\n 10\t", "QT", "MovieSave\t\t\t-to save movie file.\n \n \n* Please note that \ multiple tracks may be added to a movie by repeating steps 2-9 and multiple \ media samples may be added to a single media (storage container) by repeating \ step 4.\n** Only one media may be created per track." }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["QTMovieCreate", "Subsubsection"], Cell[BoxData[ \(\(QTMovieCreate::usage\ = \ "\";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTMovieCreate := qtMovieCreate\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTVideoTrackCreate", "Subsubsection"], Cell[BoxData[ \(\(QTVideoTrackCreate::usage\ = \ \ "\";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTVideoTrackCreate := qtVideoTrackCreate\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTVideoMediaCreate", "Subsubsection"], Cell[BoxData[ \(\(QTVideoMediaCreate::usage\ = \ \ "\";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTVideoMediaCreate := qtVideoMediaCreate\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTVideoMediaGraphicsModeSet", "Subsubsection"], Cell[BoxData[ \(\(QTVideoMediaGraphicsModeSet::usage\ = \ \ "\";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTVideoMediaGraphicsModeSet := qtVideoMediaGraphicsModeSet\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTVideoMediaSamplesAdd", "Subsubsection"], Cell[BoxData[ \(\(QTVideoMediaSamplesAdd::usage\ = \ \ "\";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTVideoMediaSamplesAdd := qtVideoMediaSamplesAdd\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTVideoMediaSave", "Subsubsection"], Cell[BoxData[ \(\(QTVideoMediaSave::usage = "\";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTVideoMediaSave := qtVideoMediaSave\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTVideoTrackSamplesSet", "Subsubsection"], Cell[BoxData[ \(\(QTVideoTrackSamplesSet::usage = \ "\";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTVideoTrackSamplesSet := qtVideoTrackSamplesSet\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTVideoTrackSave", "Subsubsection"], Cell[BoxData[ \(\(QTVideoTrackSave::usage = \ "\";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTVideoTrackSave := qtVideoTrackSave\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTMovieUserDataAdd", "Subsubsection"], Cell[BoxData[ \(\(QTMovieUserDataAdd::usage = "\";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTMovieUserDataAdd := qtMovieUserDataAdd\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTMovieSave", "Subsubsection"], Cell[BoxData[ \(\(QTMovieSave::usage = "\";\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTMovieSave := qtMovieSave\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTMovieTrackOffsetSet", "Subsubsection"], Cell[BoxData[ \(QTMovieTrackOffsetSet\ := \ qtMovieTrackOffsetSet\)], "Input", InitializationCell->True], Cell[BoxData[ \(\(QTMovieTrackOffsetSet::usage\ = \ \ "\";\)\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTMovieTrackOffsetGet", "Subsubsection"], Cell[BoxData[ \(QTMovieTrackOffsetGet := qtMovieTrackOffsetGet\)], "Input", InitializationCell->True], Cell[BoxData[ \(\(QTMovieTrackOffsetGet::usage\ = \ \ "\";\)\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTMovieTimescaleGet", "Subsubsection"], Cell[BoxData[ \(QTMovieTimescaleGet\ := \ qtMovieTimescaleGet\)], "Input", InitializationCell->True], Cell[BoxData[ \(\(QTMovieTimescaleGet::usage\ = "\";\)\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTMovieTimescaleSet", "Subsubsection"], Cell[BoxData[ \(QTMovieTimescaleSet\ := \ qtMovieTimescaleSet\)], "Input", InitializationCell->True], Cell[BoxData[ \(\(QTMovieTimescaleSet::usage\ = \ \ "\";\)\)], \ "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTVideoTrackOffsetSet", "Subsubsection"], Cell[BoxData[ \(\(\(QTVideoTrackOffsetSet::usage\)\(\ \)\(=\)\(\ \ \)\("\"\)\(\ \)\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTVideoTrackOffsetSet\ := \ qtVideoTrackOffsetSet\)], "Input", InitializationCell->True] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Miscellany", "Subsection"], Cell[BoxData[ \(qtMovieTimescaleGet[MoviePtr]\)], "Input"], Cell[BoxData[ \(QTMovieTimescaleGet\ := \ qtMovieTimescaleGet\)], "Input"], Cell[BoxData[ \(qtMovieTimescaleSet[MoviePtr, Timescale]\)], "Input"], Cell[BoxData[ \(QTMovieTimescaleSet\ := \ qtMovieTimescaleSet\)], "Input"], Cell[BoxData[ \(qtMovieTrackOffsetGet[MoviePtr, TrackNumber]\)], "Input"], Cell[BoxData[ \(QTMovieTrackOffsetGet\ := \ qtMovieTrackOffsetGet\)], "Input"], Cell[BoxData[ \(qtMovieTrackOffsetSet[MoviePtr, TrackNumber, Offset]\)], "Input"], Cell[BoxData[ \(QTMovieTrackOffsetSet\ := \ qtMovieTrackOffsetSet\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Sound", "Subsection"], Cell["\<\ These functions enable creation of Music tracks or movies. They are \ used by the high level function QTMusic. Look at that function for an example \ of how to use these functions to create a music movie.\ \>", "Text"], Cell[CellGroupData[{ Cell["QTMusicTrackCreate", "Subsubsection"], Cell[BoxData[ \(QTMusicTrackCreate::usage\ = \ \ "\"\)], "Input", InitializationCell->True], Cell[BoxData[ \(\(QTMusicTrackCreate\ := \ qtMusicTrackCreate;\)\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTMusicMediaCreate", "Subsubsection"], Cell[BoxData[ \(QTMusicMediaCreate\ := \ qtMusicMediaCreate\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTMusicMediaCreate::usage = "\"\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTMusicMediaSamplesAdd", "Subsubsection"], Cell[BoxData[ \(QTMusicMediaSamplesAdd[moviePointer_, \ notes_, \ instruments_]\ := \ qtMusicMediaSamplesAdd[moviePointer, Flatten[notes], \ Flatten[instruments]]\)], "Input", InitializationCell->True], Cell[BoxData[ \(QTMusicMediaSamplesAdd::usage\ = \ \ "\"\)], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTMusicMediaSave", "Subsubsection"], Cell[BoxData[ \(QTMusicMediaSave := \ qtMusicMediaSave\)], "Input", InitializationCell->True], Cell[BoxData[ \(\(QTMusicMediaSave::usage\ = \ "\";\)\)], "Input",\ InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTMusicTrackSamplesSet", "Subsubsection"], Cell[BoxData[ \(QTMusicTrackSamplesSet\ := \ qtMusicTrackSamplesSet\)], "Input", InitializationCell->True], Cell[BoxData[ \(\(QTMusicTrackSamplesSet::usage\ = \ \ "\";\)\)], "Input",\ InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["QTMusicTrackSave", "Subsubsection"], Cell[BoxData[ \(QTMusicTrackSave\ := \ qtMusicTrackSave\)], "Input", InitializationCell->True], Cell[BoxData[ \(\(QTMusicTrackSave::usage\ = \ "\";\)\)], "Input", InitializationCell->True] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Enable Typo Warnings", "Subsection"], Cell[BoxData[ \(On[General::"\"]\)], "Input", InitializationCell->True], Cell[BoxData[ \(On[General::"\"]\)], "Input", InitializationCell->True] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["MIDI Codes", "Section"], Cell["\<\ These are some tables of MIDI code values that can be used with \ QTMusic.\ \>", "Text"], Cell[CellGroupData[{ Cell["Table 1General MIDI Instrument Numbers", "Subsubsection"], Cell["\<\ 1 Acoustic Grand Piano 33 Wood Bass 2 Bright Acoustic Piano 34 Electric Bass Fingered 3 Electric Grand Piano 35 Electric Bass Picked 4 Honky-tonk Piano 36 Fretless Bass 5 Rhodes Piano 37 Slap Bass 1 6 Chorused Piano 38 Slap Bass 2 7 Harpsichord 39 Synth Bass 1 8 40 Synth Bass 2 9 Celesta 41Violin 10 Glockenspiel 42 Viola 11 Music Box 43 Cello 12 Vibraphone 44 Contrabass 13 Marimba 45 Tremolo Strings 14 Xylophone 46 Pizzicato Strings 15 Tubular bells 47 Orchestral Harp 16 Dulcimer 48 Timpani 17 Draw Organ 49 Acoustic String Ensemble 1 18 Percussive Organ 50 Acoustic String Ensemble 2 19 Rock Organ 51 Synth Strings 1 20 Church Organ 52 Synth Strings 2 21 Reed Organ 53 Aah Choir 22 Accordion 54 Ooh Choir 23 Harmonica 55 Synvox 24 Tango Accordion 56 Orchestra Hit 25 Acoustic Nylon Guitar 57 Trumpet 26 Acoustic Steel Guitar 58 Trombone 27 Electric Jazz Guitar 59 Tuba 28 Electric clean Guitar 60 Muted Trumpet 29 Electric Guitar muted 61 French Horn 30 Overdriven Guitar 62 Brass Section 31 Distortion Guitar 63 Synth Brass 1 32 Guitar Harmonics 64 Synth Brass 2 65 Soprano Sax 97 Ice Rain 66 Alto Sax 98 Soundtracks 67 Tenor Sax 99 Crystal 68 Baritone Sax 100 Atmosphere 69 Oboe 101 Bright 70 English Horn 102 Goblin 71 Bassoon 103 Echoes 72 Clarinet 104 Space 73 Piccolo 105 Sitar 74 Flute 106 Banjo 75 Recorder 107 Shamisen 76 Pan Flute 108 Koto 77 Bottle blow 109 Kalimba 78 Shakuhachi 110 Bagpipe 79 Whistle 111 Fiddle 80 Ocarina 112 Shanai 81 Square Lead 113 Tinkle bell 82 Saw Lead 114 Agogo 83 Calliope 115 Steel Drums 84 Chiffer 116 Woodblock 85 Synth Lead 5 117 Taiko Drum 86 Synth Lead 6 118 Melodic Tom 87 Synth Lead 7 119 Synth Tom 88 Synth Lead 8 120 Reverse Cymbal 89 Synth Pad 1 121 Guitar Fret Noise 90 Synth Pad 2 122 Breath Noise 91 Synth Pad 3 123 Seashore 92 Synth Pad 4 124 Bird Tweet 93 Synth Pad 5 125 Telephone Ring 94 Synth Pad 6 126 Helicopter 95 Synth Pad 7 127 Applause 96 Synth Pad 8 128 Gunshot\ \>", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Table 2General MIDI Drum Kit Numbers \ \>", "Subsubsection"], Cell["\<\ 35 Acoustic Bass Drum 51 Ride Cymbal 1 36 Bass Drum 1 52 Chinese Cymbal 37 Side Stick 53 Ride Bell 38 Acoustic Snare 54 Tambourine 39 Hand Clap 55 Splash Cymbal 40 Electric Snare 56 Cowbell 41 Lo Floor Tom 57 Crash Cymbal 2 42 Closed Hi Hat 58 Vibraslap 43 Hi Floor Tom 59 Ride Cymbal 2 44 Pedal Hi Hat 60 Hi Bongo 45 Lo Tom Tom 61 Low Bongo 46 Open Hi Hat 62 Mute Hi Conga 47 Low -Mid Tom Tom 63 Open Hi Conga 48 Hi Mid Tom Tom 64 Low Conga 49 Crash Cymbal 1 65 Hi Timbale 50 Hi Tom Tom 66 Lo Timbale\ \>", "Text"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Known problems or limitations", "Section"], Cell["\<\ Grayscale is reversed (0=white, 255=black) in grayscale \ movies.\ \>", "Text"], Cell["\<\ Currently requires about ? bytes of memory per number transferred. \ The memory must be allocated to the qtwrite application using the standard \ MacOS Finder Get Info->Memory dialog. We hope to reduce this memory \ requirement in the near future.\ \>", "Text"], Cell["Offset appears not to work for a single track movie.", "Text"], Cell["\<\ If the filename is currently in use by another application (eg \ QuickTime Player) then the file will not be written, and no error message \ will be given.\ \>", "Text"], Cell["\<\ If QTOpen follows immediately after QTClose, you may get an error: \ \"LinkOpen::linke: MathLink error: cannot launch the program again from the \ same file\". A work-around is to put a one second pause between the two \ functions.\ \>", "Text"], Cell["\<\ If QTShow is called before QTWrite is finished, you may get an \ error.\ \>", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Notes on CLUTs", "Section", CellTags->"cluts"], Cell["\<\ In the current version of ShowTime, each pixel in the movie \ {r,g,b}, with values in the range 0-255, is mapped to color \ {clut[[r+1,1]],clut[[g+1,2]],clut[[b+1,3]]} (also in the range 0-255) before \ delivery to the display. The dimensions of the clut are thus {256,3}. The \ default is a table consisting of the integers 0-255, repeated three times \ (clut=Transpose[Table[Range[0,255],{3}]]). This is an identity \ transformation.\ \>", "Text"], Cell["\<\ Color look-up-tables (cluts) can be used within ShowTime to \ \"linearize\" the display, as well as to manipulate the contrast or color of \ an otherwise fixed movie. For example, asuming that the display has a \"gamma \ function\" with an exponent of 2.2, we create a clut to linearize the display \ and present the stimulus at 75% contrast. \ \>", "Text"], Cell["\<\ clut0 = Round[255 (((128 + 0.75 (Range[0,255]-128))/255)^(1/2.2))];\ \ \>", "Input"], Cell["ListPlot[clut0,PlotRange->{{0,255},{0,255}},Frame->True];", "Input"], Cell["clut = Transpose[{clut0,clut0,clut0}];", "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(\(QTShow["\", CLUT -> clut\ ];\)\)], "Input"], Cell[BoxData[ InterpretationBox[\("movieRect = "\[InvisibleSpace]{0, 0, 256, 256}\), SequenceForm[ "movieRect = ", {0, 0, 256, 256}], Editable->False]], "Print"] }, Open ]], Cell["\<\ In actual use, a more accurate model of the display gamma function \ may be required, but that is beyond the scope of this tutorial. Likewise, \ cluts may be designed for use with the ISR video attenuator. Contact the \ author for more details (abwatson@mail.arc.nasa.gov) or see \ http://vision.arc.nasa.gov/modelfest/calibration/.\ \>", "Text"], Cell["\<\ Another use of cluts is to modulate stimuli in various color \ directions. In this table, blue is always 128, while red and green move in \ opposite directions, to yield red-green modulation.\ \>", "Text"], Cell["clut = Table[{255-c,c,128}, {c,0,255}];", "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(Dimensions[clut]\)], "Input"], Cell[BoxData[ \({256, 3}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(QTShow["\", CLUT -> clut\ ];\)\)], "Input"], Cell[BoxData[ InterpretationBox[\("movieRect = "\[InvisibleSpace]{0, 0, 256, 256}\), SequenceForm[ "movieRect = ", {0, 0, 256, 256}], Editable->False]], "Print"] }, Open ]], Cell["\<\ You should have seen a red/green modulated Gabor. This illustrates \ how the clut can be used to determine the direction in color space in which \ the stimulus modulations occur.\ \>", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Notes on Graphics Modes", "Section"], Cell["\<\ When combining several tracks, the user may set the GraphicsMode \ option. By default, this is Blend. This setting associates a weight with each \ track and yields a weighted linear combination of the tracks. The weights \ work as follows. If there is one track t1 and its weight w1, the result is \ r1 = w1 t1 + (1-w1) t0. The t0 is defined to be 50% gray ({128,128,128} for 8 \ bit pixels). If there are two tracks, the result is r2 = w2 t2 + (1-w2) r1, \ and so on.\ \>", "Text"], Cell["\<\ This function mimics QuickTimes method of blending a source and a \ destination movie.\ \>", "Text"], Cell[BoxData[ \(blend[destination_, source_, weights_]\ := \ Round[\[IndentingNewLine]Map[\ \((weights/65535)\)*# &, source, {3}]\[IndentingNewLine] + \[IndentingNewLine]Map[\ \((1 - weights/65535)\)*# &, destination, {3}]\[IndentingNewLine]\ ]\)], "Input"], Cell["\<\ This function combines an arbitrary number of movies and their \ associated weights, and then displays the result.\ \>", "Text"], Cell[BoxData[ \(showblend[movies_, weights_]\ := \ Module[{}, \[IndentingNewLine]movie0\ = \ 0\ movies[\([1]\)] + 128; \[IndentingNewLine]ShowMovie[ tmp = Fold[blend[#1, Sequence @@ #2] &\[IndentingNewLine], movie0\[IndentingNewLine], Transpose[{movies, weights}]]]]\)], "Input"], Cell["\<\ Now we create a pair of single frame movies, each 2x2 pixels, one \ with the bottom two pixels white and the top two black, and the other movie \ the same but rotated 90 degrees. This allows us to see all combinations of \ white and black pixels in the combined movie.\ \>", "Text"], Cell[BoxData[{ \(\(w\ = \ \ Table[255, {2}, {2}, {3}];\)\), "\[IndentingNewLine]", \(\(movie1\ = \ {{{1, 0}, {1, 0}} w};\)\), "\[IndentingNewLine]", \(\(movie2\ = \ {{{0, 0}, {1, 1}} w};\)\)}], "Input"], Cell["\<\ Here we simulate the blended combination, for a particular pair of \ weights.\ \>", "Text"], Cell[BoxData[ \(\(showblend[{movie1, movie2}, Round[\((2^16 - 1)\) {{1, 1, 1}, {1, 1, 1}}]];\)\)], "Input"], Cell["\<\ To see that QuickTime yields the same result, we write out the same \ movies and weights. This can then be looked at with QuickTime Player. The \ movie is only 2 pixels tall, so you will need to drag the corner of the \ viewer to magnify the image.\ \>", "Text"], Cell[BoxData[ \(QTWrite["\", {movie1, movie2}, MultiTrack \[Rule] True\[IndentingNewLine], BlendWeights \[Rule] Round[{\((2^16 - 1)\) {1, 1, 1}, \((2^15)\) {1, 1, 1}}]]\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Not Ready for Prime Time", "Section"], Cell[CellGroupData[{ Cell["color ramp, 3 frames, 16 bits", "Subsubsection"], Cell[BoxData[{ \(\(bits\ = \ 16;\)\), "\[IndentingNewLine]", \(\(image\ = \ Table[Range[0, 2^bits - 1, 4\ 2^\((bits - 8)\)], {16}];\)\), "\n", \(\(ShowImage[image];\)\), "\[IndentingNewLine]", \(\(movie\ = \ Transpose[ Map[image*# &\ , {\ {1, 0, 0}, {0, 1, 0}, {0, 0, 1}}, {2}], {1, 4, 2, 3}];\)\), "\[IndentingNewLine]", \(\(Print["\", Dimensions[movie]];\)\), "\[IndentingNewLine]", \(QTWrite["\" <> ToString[bits] <> "\<.mov\>", movie\[IndentingNewLine], BitsPerPixel \[Rule] bits\[IndentingNewLine], FrameRate \[Rule] 1]\)}], "Input"], Cell[BoxData[ \(\(ShowImage\ /@ \ \((\ movie/255. )\);\)\)], "Input"], Cell[BoxData[ \(QTWrite["\" <> ToString[bits] <> "\<.mov\>", movie\[IndentingNewLine], BitsPerPixel \[Rule] bits\[IndentingNewLine], FrameRate \[Rule] 2]\)], "Input"], Cell[BoxData[{ \(\(bits\ = \ 16;\)\), "\[IndentingNewLine]", \(\(image\ = \ Table[Range[0, 2^bits - 1, 2^\((bits - 8)\)], {16}];\)\), "\n", \(\(ShowImage[image];\)\), "\[IndentingNewLine]", \(\(movie\ = \ Transpose[{\(image*# &\)\ /@ \ {1, 0, 0}}, {1, 4, 2, 3}];\)\), "\[IndentingNewLine]", \(\(Print["\", Dimensions[movie]];\)\), "\[IndentingNewLine]", \(QTWrite["\" <> ToString[bits] <> "\<.mov\>", movie\[IndentingNewLine], BitsPerPixel \[Rule] bits]\)}], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["moving bar 16 bits", "Subsubsection"], Cell[BoxData[{ \(\(bits\ = \ 16;\)\), "\[IndentingNewLine]", \(\(movie\ = \ Transpose[ Table[\(RotateRight[IdentityMatrix[16], f]*# &\)\ /@ \ {2^bits - 1, 0, 0}, {f, 16}], {1, 4, 2, 3}];\)\)}], "Input"], Cell[BoxData[ \(ShowMovie[\ movie/256. ]\)], "Input"], Cell[BoxData[ \(QTWrite["\", movie, BitsPerPixel \[Rule] 16]\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["A 16 bit Color Ramp (not working...)", "Subsubsection"], Cell["\<\ This single frame is a ramp which increases in intensity from left \ to right.\ \>", "Text"], Cell[BoxData[{ \(\(frames\ = \ 1;\)\), "\[IndentingNewLine]", \(\(rows\ = \ 16;\)\), "\[IndentingNewLine]", \(\(bits\ = \ 16;\)\), "\[IndentingNewLine]", \(\(movie\ = \ {Table[\({1, 1, 1} # &\)\ /@ \ Range[0, 2^bits - 1, 4\ 2^\((bits - 8)\)], {rows}]};\)\)}], "Input"], Cell[BoxData[ \(Dimensions[movie]\)], "Input"], Cell[BoxData[ \(\(ShowMovie[movie/256];\)\)], "Input"], Cell[BoxData[ \(QTWrite["\", movie, BitsPerPixel \[Rule] 16, Verbose \[Rule] True]\)], "Input"], Cell[BoxData[ \(QTShow["\"]\)], "Input"], Cell[BoxData[ \(QTReset[]\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["A 16 bit Grayscale Ramp (not working...)", "Subsubsection"], Cell["\<\ This single frame is a ramp which increases in intensity from left \ to right.\ \>", "Text"], Cell[BoxData[{ \(\(frames\ = \ 1;\)\), "\[IndentingNewLine]", \(\(rows\ = \ 16;\)\), "\[IndentingNewLine]", \(\(bits\ = \ 16;\)\), "\[IndentingNewLine]", \(\(movie\ = \ {Table[ Range[0, 2^bits - 1, 4\ 2^\((bits - 8)\)], {rows}]};\)\)}], "Input"], Cell[BoxData[ \(\(ShowMovie[movie/256];\)\)], "Input"], Cell[BoxData[ \(QTWrite["\", movie, BitsPerPixel \[Rule] 16]\)], "Input"], Cell[BoxData[ \(QTShow["\"]\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["A movie for testing rendering speed", "Subsubsection"], Cell["\<\ This is a crude method of testing for dropped frames. The function \ creates a movie of a specified size ({rows,columns} which consists of four \ quadrants wich in succession go from white to black over the course of five \ frames. If the final result is black, then at least we know that the lat \ frame was displayed.\ \>", "Text"], Cell[BoxData[ \(PixelReplicate[movie_, factors_]\ := \[IndentingNewLine]Fold[\[IndentingNewLine]Replace[#1, \ \ x_ \[Rule] Sequence\ @@ \ Table[x, {#2[\([1]\)]}], {#2[\([2]\)]}] &\ , movie, Transpose[{factors, {\(-2\), \(-1\)}}]]\)], "Input"], Cell[BoxData[ \(RenderTestMovie[size_, color_: True]\ := \ Module[{tst}, \[IndentingNewLine]tst\ = \ {{{255, 255}, {255, 255}}, {{255, 255}, {255, 0}}, {{255, 0}, {0, 255}}, {{255, 0}, {0, 0}}, {{0, 0}, {0, 0}}}; \[IndentingNewLine]factors\ = \ Round[size/2. ]; \[IndentingNewLine]Print["\", 2\ factors]; \[IndentingNewLine]tst\ = \ PixelReplicate[tst, factors]; \[IndentingNewLine]If[ color, \ \ Replace[tst, \ x_ \[Rule] Table[x, {3}], {\(-1\)}], tst\ ]\[IndentingNewLine]]\)], "Input"], Cell[BoxData[ \(\(tst\ = \ RenderTestMovie[{256, 256}, True];\)\)], "Input"], Cell[BoxData[ \(\(tst\ = \ RenderTestMovie[{256, 256}, True];\)\)], "Input"], Cell[BoxData[ \(Dimensions[tst]\)], "Input"], Cell[BoxData[ \(QTWrite["\", tst]\)], "Input"], Cell[BoxData[ \(QTShow["\", FrameRate \[Rule] ScreenRate, scale \[Rule] .5]\)], "Input"], Cell[BoxData[ \(QTShow["\", Scale \[Rule] 2, FrameRate \[Rule] 10]\)], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Questions, Problems, Suggestions", "Section"], Cell[BoxData[ \(16 bit\ grayscale\)], "Input"], Cell[BoxData[ \(16\ bit\ color\)], "Input"], Cell[BoxData[ \(why\ is\ grayscale\ \(\(inverted\)\(?\)\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(\(?qtMovieTrackOffsetGet\)\)], "Input"], Cell[BoxData[ \("qtMovieTrackOffsetGet[MoviePtr_Integer, iTrackNumber_Integer] : Gets \ the time offset of the track specified by iTrackNumber in the track's \ timescale. Returns {Null, {ErrorNumber, ErrorMessage}}."\)], "Print"] }, Closed]], Cell[CellGroupData[{ Cell[BoxData[ \(\(?QTMovieTrackOffsetGet\)\)], "Input"], Cell[BoxData[ \(Information::"notfound" \(\(:\)\(\ \)\) "Symbol \!\(\"QTMovieTrackOffsetGet\"\) not found."\)], "Message"] }, Closed]] }, Closed]] }, FrontEndVersion->"4.0 for Macintosh", ScreenRectangle->{{0, 1600}, {0, 1004}}, AutoGeneratedPackage->Automatic, WindowToolbars->"EditBar", InitializationCellEvaluation->False, WindowSize->{781, 942}, WindowMargins->{{Automatic, 38}, {Automatic, 1}}, PrintingCopies->1, PrintingPageRange->{1, Automatic}, Magnification->1.5, StyleDefinitions -> "Demo.nb", MacintoshSystemPageSetup->"\<\ 0@00D04P0B0000002fP8X?n4ohP;i0THD005:0?l0040D04P0B0000002fP8X000 0000I0000000000000000BL?00400@/Fne0000000000000B0002I0000aP00000 8W800@0100<00P0000400000oS`10000\>" ] (*********************************************************************** Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. ***********************************************************************) (*CellTagsOutline CellTagsIndex->{ "music"->{ Cell[31229, 1078, 55, 1, 58, "Subsection", CellTags->"music"]}, "speech"->{ Cell[33087, 1136, 57, 1, 58, "Subsection", CellTags->"speech"]}, "troubleshooting"->{ Cell[33568, 1156, 97, 1, 58, "Subsection", CellTags->"troubleshooting"]}, "cluts"->{ Cell[81883, 2604, 54, 1, 109, "Section", CellTags->"cluts"]} } *) (*CellTagsIndex CellTagsIndex->{ {"music", 94736, 3000}, {"speech", 94824, 3003}, {"troubleshooting", 94922, 3006}, {"cluts", 95019, 3009} } *) (*NotebookFileOutline Notebook[{ Cell[1717, 49, 99, 2, 63, "Title"], Cell[1819, 53, 118, 4, 83, "Author"], Cell[1940, 59, 30, 0, 40, "Text"], Cell[CellGroupData[{ Cell[1995, 63, 39, 1, 45, "Input"], Cell[2037, 66, 57, 1, 66, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[2131, 72, 31, 0, 109, "Section"], Cell[2165, 74, 345, 6, 94, "Text"], Cell[2513, 82, 592, 13, 132, "Text"], Cell[3108, 97, 102, 3, 40, "Text"], Cell[3213, 102, 189, 4, 58, "Text"], Cell[3405, 108, 213, 6, 160, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[3655, 119, 31, 0, 109, "Section"], Cell[3689, 121, 382, 9, 96, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[4108, 135, 27, 0, 109, "Section"], Cell[4138, 137, 701, 13, 168, "Text"], Cell[4842, 152, 198, 4, 76, "Text"], Cell[CellGroupData[{ Cell[5065, 160, 46, 0, 58, "Subsection"], Cell[5114, 162, 510, 8, 130, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[5661, 175, 34, 0, 58, "Subsection"], Cell[5698, 177, 171, 4, 40, "Text"], Cell[5872, 183, 192, 11, 186, "Commentary"], Cell[6067, 196, 524, 10, 94, "Text"], Cell[6594, 208, 240, 4, 160, "Input"], Cell[6837, 214, 107, 3, 40, "Text"], Cell[6947, 219, 77, 1, 45, "Input"], Cell[7027, 222, 95, 3, 40, "Text"], Cell[7125, 227, 48, 1, 45, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[7210, 233, 42, 0, 58, "Subsection"], Cell[7255, 235, 279, 5, 76, "Text"], Cell[7537, 242, 54, 1, 45, "Input"], Cell[7594, 245, 441, 11, 94, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[8072, 261, 36, 0, 58, "Subsection"], Cell[CellGroupData[{ Cell[8133, 265, 40, 0, 52, "Subsubsection"], Cell[8176, 267, 445, 7, 130, "Text"], Cell[8624, 276, 240, 5, 137, "Input"], Cell[8867, 283, 228, 4, 76, "Text"], Cell[9098, 289, 46, 1, 45, "Input"], Cell[9147, 292, 228, 4, 76, "Text"], Cell[9378, 298, 61, 1, 45, "Input"], Cell[9442, 301, 34, 0, 40, "Text"], Cell[9479, 303, 47, 1, 45, "Input"], Cell[9529, 306, 171, 4, 58, "Text"], Cell[9703, 312, 227, 5, 60, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[9967, 322, 62, 0, 52, "Subsubsection"], Cell[10032, 324, 198, 4, 76, "Text"], Cell[10233, 330, 70, 1, 45, "Input"], Cell[10306, 333, 199, 4, 76, "Text"], Cell[10508, 339, 112, 3, 40, "Text"], Cell[10623, 344, 117, 2, 68, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[10777, 351, 49, 0, 52, "Subsubsection"], Cell[10829, 353, 196, 4, 76, "Text"], Cell[11028, 359, 78, 1, 45, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[11143, 365, 38, 0, 52, "Subsubsection"], Cell[11184, 367, 450, 8, 112, "Text"], Cell[11637, 377, 68, 1, 45, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[11742, 383, 46, 0, 52, "Subsubsection"], Cell[11791, 385, 137, 3, 58, "Text"], Cell[11931, 390, 89, 1, 45, "Input"], Cell[12023, 393, 278, 10, 58, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[12338, 408, 64, 0, 52, "Subsubsection"], Cell[12405, 410, 192, 4, 58, "Text"], Cell[12600, 416, 114, 2, 68, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[12751, 423, 47, 0, 52, "Subsubsection"], Cell[12801, 425, 106, 3, 40, "Text"], Cell[12910, 430, 56, 1, 45, "Input"], Cell[12969, 433, 33, 0, 40, "Text"], Cell[13005, 435, 56, 1, 45, "Input"], Cell[13064, 438, 279, 10, 58, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[13380, 453, 63, 0, 52, "Subsubsection"], Cell[13446, 455, 133, 3, 58, "Text"], Cell[13582, 460, 89, 1, 45, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[13708, 466, 68, 0, 52, "Subsubsection"], Cell[13779, 468, 485, 8, 130, "Text"], Cell[14267, 478, 126, 2, 68, "Input"], Cell[14396, 482, 126, 2, 68, "Input"], Cell[14525, 486, 89, 1, 45, "Input"], Cell[14617, 489, 208, 4, 76, "Text"], Cell[14828, 495, 120, 2, 68, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[14985, 502, 62, 0, 52, "Subsubsection"], Cell[15050, 504, 247, 6, 58, "Text"], Cell[15300, 512, 81, 1, 45, "Input"], Cell[15384, 515, 105, 3, 40, "Text"], Cell[15492, 520, 49, 1, 45, "Input"], Cell[15544, 523, 287, 4, 76, "Text"], Cell[15834, 529, 75, 1, 45, "Input"], Cell[15912, 532, 60, 0, 40, "Text"], Cell[15975, 534, 106, 2, 45, "Input"], Cell[16084, 538, 180, 6, 40, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[16301, 549, 68, 0, 52, "Subsubsection"], Cell[16372, 551, 166, 4, 58, "Text"], Cell[16541, 557, 126, 2, 68, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[16704, 564, 61, 0, 52, "Subsubsection"], Cell[16768, 566, 122, 3, 58, "Text"], Cell[16893, 571, 75, 1, 45, "Input"], Cell[16971, 574, 76, 1, 45, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[17084, 580, 38, 0, 52, "Subsubsection"], Cell[17125, 582, 84, 1, 45, "Input"], Cell[17212, 585, 47, 1, 45, "Input"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[17308, 592, 35, 0, 58, "Subsection"], Cell[17346, 594, 672, 12, 150, "Text"], Cell[18021, 608, 124, 3, 58, "Text"], Cell[18148, 613, 171, 4, 58, "Text"], Cell[18322, 619, 71, 0, 40, "Text"], Cell[18396, 621, 45, 1, 45, "Input"], Cell[18444, 624, 141, 3, 58, "Text"], Cell[18588, 629, 46, 1, 45, "Input"], Cell[CellGroupData[{ Cell[18659, 634, 55, 0, 52, "Subsubsection"], Cell[18717, 636, 228, 4, 76, "Text"], Cell[18948, 642, 68, 1, 45, "Input"], Cell[19019, 645, 217, 5, 60, "Text"], Cell[19239, 652, 54, 1, 45, "Input"], Cell[19296, 655, 59, 0, 40, "Text"], Cell[19358, 657, 68, 1, 45, "Input"], Cell[19429, 660, 275, 6, 76, "Text"], Cell[19707, 668, 73, 1, 45, "Input"], Cell[19783, 671, 135, 3, 58, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[19955, 679, 41, 0, 52, "Subsubsection"], Cell[19999, 681, 102, 3, 40, "Text"], Cell[20104, 686, 352, 7, 183, "Input"], Cell[20459, 695, 54, 1, 45, "Input"], Cell[20516, 698, 63, 1, 45, "Input"], Cell[20582, 701, 55, 1, 45, "Input"], Cell[20640, 704, 134, 3, 58, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[20811, 712, 57, 0, 52, "Subsubsection"], Cell[20871, 714, 171, 4, 58, "Text"], Cell[21045, 720, 207, 5, 137, "Input"], Cell[21255, 727, 142, 3, 58, "Text"], Cell[21400, 732, 54, 1, 45, "Input"], Cell[21457, 735, 50, 1, 45, "Input"], Cell[21510, 738, 169, 4, 58, "Text"], Cell[21682, 744, 90, 1, 45, "Input"], Cell[21775, 747, 74, 1, 45, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[21886, 753, 51, 0, 52, "Subsubsection"], Cell[21940, 755, 112, 3, 40, "Text"], Cell[22055, 760, 206, 4, 114, "Input"], Cell[22264, 766, 114, 3, 58, "Text"], Cell[22381, 771, 50, 1, 45, "Input"], Cell[22434, 774, 140, 3, 58, "Text"], Cell[22577, 779, 54, 1, 45, "Input"], Cell[22634, 782, 202, 4, 76, "Text"], Cell[22839, 788, 63, 1, 45, "Input"], Cell[22905, 791, 74, 1, 45, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[23016, 797, 44, 0, 52, "Subsubsection"], Cell[23063, 799, 173, 4, 58, "Text"], Cell[23239, 805, 346, 6, 137, "Input"], Cell[23588, 813, 41, 0, 40, "Text"], Cell[23632, 815, 50, 1, 45, "Input"], Cell[23685, 818, 63, 1, 45, "Input"], Cell[23751, 821, 72, 1, 45, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[23860, 827, 47, 0, 52, "Subsubsection"], Cell[23910, 829, 236, 5, 76, "Text"], Cell[24149, 836, 84, 1, 45, "Input"], Cell[24236, 839, 53, 0, 40, "Text"], Cell[24292, 841, 72, 1, 45, "Input"], Cell[24367, 844, 111, 3, 58, "Text"], Cell[24481, 849, 85, 1, 45, "Input"], Cell[24569, 852, 221, 4, 76, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[24827, 861, 37, 0, 52, "Subsubsection"], Cell[24867, 863, 164, 4, 58, "Text"], Cell[CellGroupData[{ Cell[25056, 871, 630, 13, 252, "Input"], Cell[25689, 886, 192, 4, 32, "Print"] }, Open ]], Cell[25896, 893, 54, 1, 45, "Input"], Cell[25953, 896, 85, 1, 45, "Input"], Cell[26041, 899, 72, 1, 45, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[26150, 905, 47, 0, 52, "Subsubsection"], Cell[26200, 907, 183, 4, 58, "Text"], Cell[26386, 913, 64, 1, 45, "Input"], Cell[26453, 916, 83, 1, 45, "Input"], Cell[26539, 919, 68, 0, 40, "Text"], Cell[26610, 921, 83, 1, 45, "Input"], Cell[26696, 924, 55, 1, 45, "Input"], Cell[26754, 927, 152, 3, 58, "Text"], Cell[26909, 932, 248, 4, 91, "Input"], Cell[27160, 938, 83, 1, 45, "Input"], Cell[27246, 941, 55, 1, 45, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[27338, 947, 48, 0, 52, "Subsubsection"], Cell[27389, 949, 214, 4, 76, "Text"], Cell[27606, 955, 470, 10, 252, "Input"], Cell[28079, 967, 62, 0, 40, "Text"], Cell[28144, 969, 76, 1, 45, "Input"], Cell[28223, 972, 61, 0, 40, "Text"], Cell[28287, 974, 106, 2, 68, "Input"], Cell[28396, 978, 101, 2, 45, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[28534, 985, 50, 0, 52, "Subsubsection"], Cell[28587, 987, 99, 3, 40, "Text"], Cell[28689, 992, 698, 15, 367, "Input"], Cell[29390, 1009, 63, 0, 40, "Text"], Cell[29456, 1011, 114, 2, 68, "Input"], Cell[29573, 1015, 101, 2, 45, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[29711, 1022, 52, 0, 52, "Subsubsection"], Cell[29766, 1024, 60, 0, 40, "Text"], Cell[29829, 1026, 447, 10, 206, "Input"], Cell[30279, 1038, 47, 0, 40, "Text"], Cell[30329, 1040, 55, 1, 45, "Input"], Cell[30387, 1043, 64, 0, 40, "Text"], Cell[30454, 1045, 253, 6, 114, "Input"], Cell[30710, 1053, 55, 1, 45, "Input"], Cell[30768, 1056, 95, 3, 40, "Text"], Cell[30866, 1061, 106, 2, 68, "Input"], Cell[30975, 1065, 114, 2, 45, "Input"], Cell[31092, 1069, 88, 3, 40, "Text"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[31229, 1078, 55, 1, 58, "Subsection", CellTags->"music"], Cell[31287, 1081, 388, 7, 112, "Text"], Cell[31678, 1090, 145, 3, 58, "Text"], Cell[31826, 1095, 62, 1, 45, "Input"], Cell[31891, 1098, 110, 3, 40, "Text"], Cell[32004, 1103, 133, 2, 68, "Input"], Cell[32140, 1107, 70, 0, 40, "Text"], Cell[32213, 1109, 79, 1, 45, "Input"], Cell[32295, 1112, 143, 3, 58, "Text"], Cell[32441, 1117, 392, 6, 183, "Input"], Cell[32836, 1125, 127, 3, 58, "Text"], Cell[32966, 1130, 84, 1, 45, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[33087, 1136, 57, 1, 58, "Subsection", CellTags->"speech"], Cell[33147, 1139, 183, 4, 58, "Text"], Cell[33333, 1145, 56, 1, 45, "Input"], Cell[33392, 1148, 139, 3, 58, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[33568, 1156, 97, 1, 58, "Subsection", CellTags->"troubleshooting"], Cell[33668, 1159, 342, 10, 220, "Text"], Cell[34013, 1171, 169, 4, 58, "Text"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[34231, 1181, 39, 0, 109, "Section"], Cell[CellGroupData[{ Cell[34295, 1185, 46, 0, 52, "Subsubsection"], Cell[34344, 1187, 87, 2, 45, "Input", InitializationCell->True], Cell[34434, 1191, 86, 2, 45, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[34557, 1198, 27, 0, 52, "Subsubsection"], Cell[34587, 1200, 505, 8, 275, "Input", InitializationCell->True], Cell[35095, 1210, 539, 9, 183, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[35671, 1224, 31, 0, 52, "Subsubsection"], Cell[35705, 1226, 46, 1, 45, "Input"], Cell[35754, 1229, 377, 6, 206, "Input", InitializationCell->True], Cell[36134, 1237, 1282, 23, 528, "Input", InitializationCell->True], Cell[37419, 1262, 165, 3, 68, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[37621, 1270, 32, 0, 52, "Subsubsection"], Cell[37656, 1272, 166, 3, 91, "Input", InitializationCell->True], Cell[37825, 1277, 450, 10, 206, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[38312, 1292, 31, 0, 52, "Subsubsection"], Cell[38346, 1294, 46, 1, 45, "Input"], Cell[38395, 1297, 798, 15, 413, "Input", InitializationCell->True], Cell[39196, 1314, 112, 2, 45, "Input"], Cell[39311, 1318, 2501, 44, 942, "Input", InitializationCell->True], Cell[41815, 1364, 411, 8, 183, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[42263, 1377, 31, 0, 52, "Subsubsection"], Cell[42297, 1379, 194, 4, 91, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[42528, 1388, 32, 0, 52, "Subsubsection"], Cell[42563, 1390, 47, 1, 45, "Input"], Cell[42613, 1393, 1254, 18, 666, "Input", InitializationCell->True], Cell[43870, 1413, 356, 6, 137, "Input", InitializationCell->True], Cell[44229, 1421, 4949, 83, 1977, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[49215, 1509, 39, 0, 52, "Subsubsection"], Cell[49257, 1511, 189, 4, 76, "Text"], Cell[49449, 1517, 1240, 21, 482, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[50726, 1543, 32, 0, 52, "Subsubsection"], Cell[50761, 1545, 152, 3, 91, "Input", InitializationCell->True], Cell[50916, 1550, 316, 7, 137, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[51269, 1562, 34, 0, 52, "Subsubsection"], Cell[51306, 1564, 352, 7, 96, "Text"], Cell[51661, 1573, 318, 7, 137, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[52016, 1585, 32, 0, 52, "Subsubsection"], Cell[52051, 1587, 1109, 16, 551, "Input", InitializationCell->True], Cell[53163, 1605, 47, 1, 45, "Input"], Cell[53213, 1608, 265, 4, 114, "Input", InitializationCell->True], Cell[53481, 1614, 2177, 35, 850, "Input", InitializationCell->True] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[55707, 1655, 38, 0, 109, "Section"], Cell[CellGroupData[{ Cell[55770, 1659, 36, 0, 58, "Subsection"], Cell[CellGroupData[{ Cell[55831, 1663, 35, 0, 52, "Subsubsection"], Cell[55869, 1665, 225, 4, 114, "Input", InitializationCell->True], Cell[56097, 1671, 85, 2, 45, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[56219, 1678, 39, 0, 52, "Subsubsection"], Cell[56261, 1680, 161, 3, 91, "Input", InitializationCell->True], Cell[56425, 1685, 93, 2, 45, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[56555, 1692, 44, 0, 52, "Subsubsection"], Cell[56602, 1694, 107, 2, 45, "Input", InitializationCell->True], Cell[56712, 1698, 816, 12, 436, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[57565, 1715, 43, 0, 52, "Subsubsection"], Cell[57611, 1717, 219, 4, 114, "Input", InitializationCell->True], Cell[57833, 1723, 101, 2, 45, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[57971, 1730, 43, 0, 52, "Subsubsection"], Cell[58017, 1732, 193, 3, 91, "Input", InitializationCell->True], Cell[58213, 1737, 101, 2, 45, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[58351, 1744, 36, 0, 52, "Subsubsection"], Cell[58390, 1746, 473, 7, 252, "Input", InitializationCell->True], Cell[58866, 1755, 111, 2, 45, "Input", InitializationCell->True], Cell[58980, 1759, 162, 3, 68, "Input", InitializationCell->True], Cell[59145, 1764, 162, 3, 68, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[59344, 1772, 40, 0, 52, "Subsubsection"], Cell[59387, 1774, 381, 6, 206, "Input", InitializationCell->True], Cell[59771, 1782, 95, 2, 45, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[59903, 1789, 37, 0, 52, "Subsubsection"], Cell[59943, 1791, 170, 3, 91, "Input", InitializationCell->True], Cell[60116, 1796, 203, 4, 68, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[60356, 1805, 36, 0, 52, "Subsubsection"], Cell[60395, 1807, 195, 3, 114, "Input", InitializationCell->True], Cell[60593, 1812, 87, 2, 45, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[60717, 1819, 41, 0, 52, "Subsubsection"], Cell[60761, 1821, 312, 5, 183, "Input", InitializationCell->True], Cell[61076, 1828, 97, 2, 45, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[61210, 1835, 40, 0, 52, "Subsubsection"], Cell[61253, 1837, 97, 2, 45, "Input", InitializationCell->True], Cell[61353, 1841, 246, 4, 137, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[61636, 1850, 44, 0, 52, "Subsubsection"], Cell[61683, 1852, 107, 2, 45, "Input", InitializationCell->True], Cell[61793, 1856, 470, 9, 252, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[62300, 1870, 38, 0, 52, "Subsubsection"], Cell[62341, 1872, 191, 3, 91, "Input", InitializationCell->True], Cell[62535, 1877, 91, 2, 45, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[62663, 1884, 40, 0, 52, "Subsubsection"], Cell[62706, 1886, 270, 5, 160, "Input", InitializationCell->True], Cell[62979, 1893, 95, 2, 45, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[63111, 1900, 40, 0, 52, "Subsubsection"], Cell[63154, 1902, 144, 3, 68, "Input", InitializationCell->True], Cell[63301, 1907, 95, 2, 45, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[63433, 1914, 37, 0, 52, "Subsubsection"], Cell[63473, 1916, 89, 2, 45, "Input", InitializationCell->True], Cell[63565, 1920, 292, 5, 160, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[63894, 1930, 37, 0, 52, "Subsubsection"], Cell[63934, 1932, 360, 6, 206, "Input", InitializationCell->True], Cell[64297, 1940, 91, 2, 45, "Input", InitializationCell->True] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[64437, 1948, 35, 0, 58, "Subsection"], Cell[CellGroupData[{ Cell[64497, 1952, 33, 0, 52, "Subsubsection"], Cell[64533, 1954, 1220, 19, 691, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[65790, 1978, 38, 0, 52, "Subsubsection"], Cell[65831, 1980, 189, 3, 91, "Input", InitializationCell->True], Cell[66023, 1985, 91, 2, 45, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[66151, 1992, 43, 0, 52, "Subsubsection"], Cell[66197, 1994, 332, 6, 183, "Input", InitializationCell->True], Cell[66532, 2002, 101, 2, 45, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[66670, 2009, 43, 0, 52, "Subsubsection"], Cell[66716, 2011, 139, 3, 68, "Input", InitializationCell->True], Cell[66858, 2016, 101, 2, 45, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[66996, 2023, 52, 0, 52, "Subsubsection"], Cell[67051, 2025, 352, 6, 183, "Input", InitializationCell->True], Cell[67406, 2033, 119, 2, 68, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[67562, 2040, 47, 0, 52, "Subsubsection"], Cell[67612, 2042, 561, 9, 321, "Input", InitializationCell->True], Cell[68176, 2053, 109, 2, 45, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[68322, 2060, 41, 0, 52, "Subsubsection"], Cell[68366, 2062, 156, 3, 91, "Input", InitializationCell->True], Cell[68525, 2067, 97, 2, 45, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[68659, 2074, 47, 0, 52, "Subsubsection"], Cell[68709, 2076, 239, 5, 114, "Input", InitializationCell->True], Cell[68951, 2083, 109, 2, 45, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[69097, 2090, 41, 0, 52, "Subsubsection"], Cell[69141, 2092, 131, 3, 68, "Input", InitializationCell->True], Cell[69275, 2097, 97, 2, 45, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[69409, 2104, 43, 0, 52, "Subsubsection"], Cell[69455, 2106, 181, 3, 91, "Input", InitializationCell->True], Cell[69639, 2111, 101, 2, 45, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[69777, 2118, 36, 0, 52, "Subsubsection"], Cell[69816, 2120, 119, 2, 45, "Input", InitializationCell->True], Cell[69938, 2124, 87, 2, 45, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[70062, 2131, 46, 0, 52, "Subsubsection"], Cell[70111, 2133, 111, 2, 45, "Input", InitializationCell->True], Cell[70225, 2137, 377, 6, 183, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[70639, 2148, 46, 0, 52, "Subsubsection"], Cell[70688, 2150, 107, 2, 45, "Input", InitializationCell->True], Cell[70798, 2154, 291, 5, 137, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[71126, 2164, 44, 0, 52, "Subsubsection"], Cell[71173, 2166, 107, 2, 45, "Input", InitializationCell->True], Cell[71283, 2170, 218, 4, 114, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[71538, 2179, 44, 0, 52, "Subsubsection"], Cell[71585, 2181, 107, 2, 45, "Input", InitializationCell->True], Cell[71695, 2185, 243, 5, 137, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[71975, 2195, 46, 0, 52, "Subsubsection"], Cell[72024, 2197, 384, 6, 183, "Input", InitializationCell->True], Cell[72411, 2205, 111, 2, 45, "Input", InitializationCell->True] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[72571, 2213, 32, 0, 58, "Subsection"], Cell[72606, 2215, 62, 1, 45, "Input"], Cell[72671, 2218, 79, 1, 45, "Input"], Cell[72753, 2221, 73, 1, 45, "Input"], Cell[72829, 2224, 79, 1, 45, "Input"], Cell[72911, 2227, 77, 1, 45, "Input"], Cell[72991, 2230, 83, 1, 45, "Input"], Cell[73077, 2233, 85, 1, 68, "Input"], Cell[73165, 2236, 83, 1, 45, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[73285, 2242, 27, 0, 58, "Subsection"], Cell[73315, 2244, 228, 4, 76, "Text"], Cell[CellGroupData[{ Cell[73568, 2252, 43, 0, 52, "Subsubsection"], Cell[73614, 2254, 419, 7, 206, "Input", InitializationCell->True], Cell[74036, 2263, 110, 2, 45, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[74183, 2270, 43, 0, 52, "Subsubsection"], Cell[74229, 2272, 105, 2, 45, "Input", InitializationCell->True], Cell[74337, 2276, 261, 4, 137, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[74635, 2285, 47, 0, 52, "Subsubsection"], Cell[74685, 2287, 224, 4, 114, "Input", InitializationCell->True], Cell[74912, 2293, 858, 13, 436, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[75807, 2311, 41, 0, 52, "Subsubsection"], Cell[75851, 2313, 99, 2, 45, "Input", InitializationCell->True], Cell[75953, 2317, 279, 5, 137, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[76269, 2327, 47, 0, 52, "Subsubsection"], Cell[76319, 2329, 113, 2, 45, "Input", InitializationCell->True], Cell[76435, 2333, 622, 10, 344, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[77094, 2348, 41, 0, 52, "Subsubsection"], Cell[77138, 2350, 101, 2, 45, "Input", InitializationCell->True], Cell[77242, 2354, 266, 4, 137, "Input", InitializationCell->True] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[77557, 2364, 42, 0, 58, "Subsection"], Cell[77602, 2366, 86, 2, 45, "Input", InitializationCell->True], Cell[77691, 2370, 85, 2, 45, "Input", InitializationCell->True] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[77825, 2378, 29, 0, 109, "Section"], Cell[77857, 2380, 98, 3, 40, "Text"], Cell[CellGroupData[{ Cell[77980, 2387, 63, 0, 52, "Subsubsection"], Cell[78046, 2389, 2036, 129, 3850, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[80119, 2523, 70, 3, 74, "Subsubsection"], Cell[80192, 2528, 582, 33, 970, "Text"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[80823, 2567, 48, 0, 109, "Section"], Cell[80874, 2569, 89, 3, 40, "Text"], Cell[80966, 2574, 271, 5, 94, "Text"], Cell[81240, 2581, 68, 0, 40, "Text"], Cell[81311, 2583, 179, 4, 58, "Text"], Cell[81493, 2589, 255, 5, 76, "Text"], Cell[81751, 2596, 95, 3, 40, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[81883, 2604, 54, 1, 109, "Section", CellTags->"cluts"], Cell[81940, 2607, 460, 8, 112, "Text"], Cell[82403, 2617, 367, 6, 94, "Text"], Cell[82773, 2625, 94, 3, 64, "Input"], Cell[82870, 2630, 74, 0, 64, "Input"], Cell[82947, 2632, 55, 0, 44, "Input"], Cell[CellGroupData[{ Cell[83027, 2636, 77, 1, 45, "Input"], Cell[83107, 2639, 177, 3, 32, "Print"] }, Open ]], Cell[83299, 2645, 356, 6, 112, "Text"], Cell[83658, 2653, 215, 4, 76, "Text"], Cell[83876, 2659, 56, 0, 44, "Input"], Cell[CellGroupData[{ Cell[83957, 2663, 49, 1, 45, "Input"], Cell[84009, 2666, 42, 1, 66, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[84088, 2672, 77, 1, 45, "Input"], Cell[84168, 2675, 177, 3, 32, "Print"] }, Open ]], Cell[84360, 2681, 202, 4, 76, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[84599, 2690, 42, 0, 109, "Section"], Cell[84644, 2692, 493, 8, 130, "Text"], Cell[85140, 2702, 110, 3, 58, "Text"], Cell[85253, 2707, 316, 5, 160, "Input"], Cell[85572, 2714, 138, 3, 58, "Text"], Cell[85713, 2719, 343, 6, 160, "Input"], Cell[86059, 2727, 292, 5, 94, "Text"], Cell[86354, 2734, 219, 3, 91, "Input"], Cell[86576, 2739, 101, 3, 40, "Text"], Cell[86680, 2744, 120, 2, 68, "Input"], Cell[86803, 2748, 272, 5, 76, "Text"], Cell[87078, 2755, 219, 4, 91, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[87334, 2764, 43, 0, 109, "Section"], Cell[CellGroupData[{ Cell[87402, 2768, 54, 0, 52, "Subsubsection"], Cell[87459, 2770, 662, 13, 275, "Input"], Cell[88124, 2785, 74, 1, 45, "Input"], Cell[88201, 2788, 191, 3, 91, "Input"], Cell[88395, 2793, 575, 11, 229, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[89007, 2809, 43, 0, 38, "Subsubsection"], Cell[89053, 2811, 252, 5, 137, "Input"], Cell[89308, 2818, 57, 1, 45, "Input"], Cell[89368, 2821, 90, 1, 45, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[89495, 2827, 61, 0, 38, "Subsubsection"], Cell[89559, 2829, 102, 3, 40, "Text"], Cell[89664, 2834, 324, 6, 160, "Input"], Cell[89991, 2842, 50, 1, 45, "Input"], Cell[90044, 2845, 58, 1, 45, "Input"], Cell[90105, 2848, 117, 2, 68, "Input"], Cell[90225, 2852, 55, 1, 45, "Input"], Cell[90283, 2855, 42, 1, 45, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[90362, 2861, 65, 0, 38, "Subsubsection"], Cell[90430, 2863, 102, 3, 40, "Text"], Cell[90535, 2868, 295, 6, 118, "Input"], Cell[90833, 2876, 58, 1, 46, "Input"], Cell[90894, 2879, 88, 1, 46, "Input"], Cell[90985, 2882, 55, 1, 46, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[91077, 2888, 60, 0, 38, "Subsubsection"], Cell[91140, 2890, 343, 6, 94, "Text"], Cell[91486, 2898, 266, 4, 137, "Input"], Cell[91755, 2904, 626, 10, 275, "Input"], Cell[92384, 2916, 81, 1, 45, "Input"], Cell[92468, 2919, 81, 1, 45, "Input"], Cell[92552, 2922, 48, 1, 45, "Input"], Cell[92603, 2925, 61, 1, 45, "Input"], Cell[92667, 2928, 111, 2, 45, "Input"], Cell[92781, 2932, 101, 2, 45, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[92931, 2940, 51, 0, 60, "Section"], Cell[92985, 2942, 51, 1, 46, "Input"], Cell[93039, 2945, 47, 1, 46, "Input"], Cell[93089, 2948, 74, 1, 46, "Input"], Cell[CellGroupData[{ Cell[93188, 2953, 59, 1, 46, "Input"], Cell[93250, 2956, 233, 3, 55, "Print"] }, Closed]], Cell[CellGroupData[{ Cell[93520, 2964, 59, 1, 46, "Input"], Cell[93582, 2967, 133, 2, 33, "Message"] }, Closed]] }, Closed]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)