1 /** 2 * @fileOverview Max MSP Documentation copied from official Max / MSP documentation to JsDoc by <a href="http://www.tim-schenk.de/">Tim Schenk</a> 3 * @author cycling74 4 * @version 1.0.0 5 */ 6 7 /** 8 * @class 9 * 10 * The jit.matrix object is a named matrix which may be used for data storage and retrieval, 11 * resampling, and matrix type and planecount conversion operations. 12 * 13 * @description 14 * The jit.matrix object is a named matrix which may be used for data storage and retrieval, 15 * resampling, and matrix type and planecount conversion operations. 16 * 17 * @augments JitterObject 18 * 19 * @property {Object} dimstride 20 * The byte stride per dimension. 21 * 22 * @property {Object} dstdimstart 23 * The destination dimension start position. (default = all 0) 24 * 25 * @property {Number} adapt 26 * Matrix adaptation flag. (default = 0 if matrix arguments are present, otherwise 1) 27 * When the flag is set, the jit.matrix object will adapt to the incoming matrix planecount, type, and dimensions. 28 * 29 * @property {Number} interp 30 * Matrix interpolation flag. (default = 0) When the flag is set, the input matrix will be 31 * interpolated when copied to the internal matrix. 32 * 33 * @property {Number} size 34 * Total byte size of matrix. 35 * 36 * @property {Object} dstdimend 37 * The destination dimension end position. (default = all dim values minus 1) 38 * 39 * @property {string} type 40 * The matrix data type. (default = char) 41 * <ul> 42 * <li>char: Char data (0-255)</li> 43 * <li>long: Long data</li> 44 * <li>float32: 32-bit floating-point data</li> 45 * <li>float64: 64-bit floating-point data</li> 46 * </ul> 47 * 48 * @property {Object} planemap 49 * Maps input places to output planes. (default = 0 1 2 3 ...) 50 * 51 * @property {Number} usesrcdim 52 * Srcdim use flag. (default = 0) When the flag is set, the source dimension's attributes are 53 * used when copying an input matrix to an internal matrix. 54 * 55 * @property {string} name 56 * The name of the matrix. (default = UID) 57 * 58 * @property {Object} dim 59 * The dimensions of matrix data. (default = 1 1) 60 * 61 * @property {Object} srcdimstart 62 * The source dimension start position. (default = all 0) 63 * 64 * @property {Number} usedstdim 65 * Destdim use flag. (default = 0) When the flag is set, the destination dimension's attributes 66 * are used when copying an input matrix to an internal matrix. 67 * 68 * @property {Object} srcdimend 69 * The source dimension end position. (default = all dim values minus 1) 70 * 71 * @property {Number} planecount 72 * The number of planes in matrix data. (default = 4) 73 * 74 * 75 **/ 76 var JitterMatrix = Class.create(JitterObject, 77 /** @lends JitterMatrix.prototype */ 78 { 79 80 /** 81 * Outputs the currently stored matrix. 82 * @type void 83 */ 84 bang:function(){}, 85 86 /** 87 *Sets all matrix values to zero. 88 * @type void 89 */ 90 clear:function(){}, 91 92 /** 93 * Export the current frame as an image file with the name specified by the first argument. 94 * The optional second argument sets the file type (default = png). Available file types are 95 * png, bmp, jpeg, macpaint, photoshop, pict, qtimage, sgi, tga and tiff. An optional use-dialog 96 * argument of 1 will open a file dialog to allow you to enter the image file settings. 97 * 98 * @param {String} filename 99 * @param {String} file-type 100 * @param {Integer} use-dialog 101 * 102 * @type void 103 */ 104 exportimage:function(filename, file_type, use_dialog){}, 105 106 /** 107 * Exports a matrix as a QuickTime movie. The exportmovie message takes an optional argument to specify 108 * a file name. If no filename is specified, a file dialog will open to let you choose a file. 109 * <br /><br /> 110 * The default FPS is 30. frames per second 111 * <br /><br /> 112 * The default codec is raw. Supported codecs are raw, cinepak, graphics, animation, video, 113 * componentvideo, jpeg, mjpega, mjpegb, sgi, planarrgb, macpaint, gif, photocd, qdgx, avrjpeg, 114 * opendmljpeg, bmp, winraw, vector, qd, h261, h263, dvntsc, dvpal, dvprontsc, dvpropal, flc, 115 * targa, png, tiff, componentvideosigned, componentvideounsigned, cmyk, microsoft, sorenson, 116 * indeo4, argb64, rgb48, alphagrey32, grey16, mpegyuv420, yuv420, and sorensonyuv9. 117 * <br /><br /> 118 * The default quality is max. Supported quality settings are lossless, max, min, low, normal, and high. 119 * <br /><br /> 120 * Note that minimum quality is, in many cases, the codec's default quality. 121 * Use "low" quality for consistent results. 122 * <br /><br /> 123 * The default timescale is 600 units per second. 124 * 125 * @param {String} filename 126 * @param {Float} FPS 127 * @param {String} codec 128 * @param {String} quality 129 * @param {Integer} timescale 130 * 131 * @type void 132 */ 133 exportmovie:function(filename, FPS, codec, quality, timescale){}, 134 135 /** 136 * Evaluates expression to fill the matrix. If a plane argument is provided, the expression is 137 * applied to a single plane. Otherwise, it is applied to allphanes in the matrix. See jit.expr 138 * for more information on expressions. Unlike the jit.expr object, there is no support for 139 * providing multiple expressions to fill multiple planes at once with different expressions. 140 * Call this method multiple times once for each plane you wish to fill. 141 * 142 * @param {Integer} plane 143 * @param {String} expression 144 * 145 * @type void 146 */ 147 exprfill:function(plane, expression){}, 148 149 /** 150 * The word fillplane, followed by an integer that specifies a plane number and a value, will 151 * fill the specified plane with the single value. 152 * 153 * @param {Integer} plane 154 * @param {Integer} value 155 * 156 * @type void 157 */ 158 fillplane:function(plane, value){}, 159 160 /** 161 * Sets all cells to the value specified by value(s) and output the data. Value is specified as a 162 * list whose length is equal to the number of dimensions (dimcount). 163 * 164 * @param {Float Array} values 165 * 166 * @type void 167 */ 168 float:function(values){}, 169 170 /** 171 * Sends the value(s) in the cell specified by position out the right outlet of the object as a list 172 * in the form cell cell-position0... cell-positionN val plane0-value... planeN-value. 173 * 174 * @param {Integer Array} position 175 * 176 * @type void 177 */ 178 getcell:function(position){}, 179 180 /** 181 * Imports a QuickTime movie into the matrix. If no filename is specified, a file dialog will open to 182 * let you choose a file. The time-offset argument may be used to set a time offset for the QuickTime 183 * movie being imported (the default is 0). 184 * 185 * @param {String} filename 186 * @param {Integer} time_offset 187 * 188 * @type void 189 */ 190 importmovie:function(filename, time_offset){}, 191 192 /** 193 * Sets all cells to the value specified by value(s) and output the data. Position is specified of a 194 * list whose length is equal to the number of dimensions (dimcount). 195 * 196 * @param {Integer Array} values 197 * 198 * @type void 199 */ 200 int:function(values){}, 201 202 /** 203 * Copies the texture specified by texture-name to the matrix. 204 * 205 * @param {String} texture_name 206 * 207 * @type void 208 */ 209 jit_gl_texture:function(texture_name){}, 210 211 /** 212 * Sets all cells to the value specified by value(s) and output the data. Position is specified of a 213 * list whose length is equal to the number of dimensions (dimcount). 214 * 215 * @param {Array} values 216 * 217 * @type void 218 */ 219 list:function(values){}, 220 221 /** 222 * The word op, followed by the name of a jit.op object operator and a set of values, is equivalent 223 * to including a jit.op object with the specified operator set as an attribute and this jit.matrix 224 * object specified as the output matrix. The additional value arguments may either be a matrix name 225 * or a constant. If only one value argument is provided, this matrix is considered both the output 226 * and the left operand. For example, "op + foo bar" is equivalent to the operation 227 * thismatrix = foo + bar, and "op * 0.5" is equivalent to the operation thismatrix = thismatrix * 0.5. 228 * 229 * @type void 230 */ 231 op:function(){}, 232 233 /** 234 * Reads Jitter binary data files (.jxf) into a matrix set. If no filename is specified, a file dialog 235 * will open to let you choose a file. 236 * 237 * @param {String} filename 238 * 239 * @type void 240 */ 241 read:function(filename){}, 242 243 /** 244 * Sets all cells to the value specified by value(s). Position is specified of a list whose length 245 * is equal to the number of dimensions (dimcount). 246 * 247 * @param {Array} values 248 * 249 * @type void 250 */ 251 setall:function(values){}, 252 253 /** 254 * Sets the cell specified by position to the value specified by value. Position is specified of a 255 * list whose length is equal to the number of dimensions (dimcount). The optional arguments plane 256 * plane-number can be used to specify a plane. If a plane is specified, value should be a single 257 * number, otherwise it should be a list of numbers of size planecount - 1. 258 * 259 * @param {Array} position 260 * @param {Integer} plane 261 * @param {Integer} plane-number 262 * @param {mixed} val 263 * @param {Array} values 264 * 265 * @type void 266 */ 267 setcell:function(position, plane, plane_number, val, values){}, 268 269 /** 270 * The word setcell1d, followed by a number specifying an x coordinate and a list of values, is 271 * similar to the setcell message but without the need to use a "val" token to separate the 272 * coordinates from the value since the dimension count (1) is fixed. 273 * 274 * @type void 275 */ 276 setcell1d:function(){}, 277 278 /** 279 * The word setcell2d, followed by a pair of numbers specifying x and y coordinates and a 280 * list of values, is similar to the setcell message but without the need to use a "val" 281 * token to separate the coordinates from the value since the dimension count (2) is fixed. 282 * 283 * @type void 284 */ 285 setcell2d:function(){}, 286 287 /** 288 * The word setcell3d, followed by three numbers specifying x, y, and z coordinates and a 289 * list of values, is similar to the setcell message but without the need to use a "val" 290 * token to separate the coordinates from the value since the dimension count (3) is fixed. 291 * 292 * @type void 293 */ 294 setcell3d:function(){}, 295 296 /** 297 * The word setplane1d, followed by a number specifying an x coordinate, a number specifying 298 * a plane, and a value, is similar to the setcell message but without the need to use a 299 * "val" token to separate the coordinates from the value since the dimension count (1) is 300 * fixed, or use the "plane" token to specify which plane to set. 301 * 302 * @type void 303 */ 304 setplane1d:function(){}, 305 306 /** 307 * The word setplane2d, followed by a pair of numbers specifying x and y coordinates, a 308 * number specifying a plane, and a value, is similar to the setcell message but without 309 * the need to use a "val" token to separate the coordinates from the value since the dimension 310 * count (2) is fixed, or use the "plane" token to specify which plane to set. 311 * 312 * @type void 313 */ 314 setplane2d:function(){}, 315 316 /** 317 * The word setplane3d, followed by three numbers specifying x, y, and z coordinates, a number 318 * specifying a plane, and a value, is similar to the setcell message but without the need 319 * to use a "val" token to separate the coordinates from the value since the dimension count (1) 320 * is fixed, or use the "plane" token to specify which plane to set. 321 * 322 * @type void 323 */ 324 setplane3d:function(){}, 325 326 /** 327 * Sets all cells to the value specified by value(s). Position is specified of a list whose 328 * length is equal to the number of dimensions (dimcount) and outputs the data. 329 * 330 * @param {Array} values 331 * 332 * @type void 333 */ 334 val:function(){}, 335 336 /** 337 * Writes matrix set as a Jitter binary data file (.jxf). If no filename is specified, 338 * a file dialog will open to let you choose a file. 339 * 340 * @param {String} filename 341 * 342 * @type void 343 */ 344 write:function(){} 345 346 } 347 ); 348 349 350