jit.matrix read jxf in standalone
I can find the appropriate files and how many there are in the folder, but if I read the jxf into a jit_matrix object by passing its filename I get a "jit.matrix can’t find file …" error. It works in the patcher, but if I create a standalone .mxf or .exe I get no response. I’ve tried different pathtypes and styles and running as administrator, but there is something wonky about how jit.matrix reads external files because I CAN manually select the very same jxf file I want via the file selector that comes with the read() function but not passing it as a string or message! Nor does jit.matrix a JXF when I run the patcher from a Runtime window.
I even tried it with Java. Create everything within an mxj but jit.matrix will not read my string-based filenames in a standalone. So annoying. I can’t really buy another copy of Max just because I can’t get this to run on its own!
What is the difference between pathnames in jit.matrix in the runtime vs the patcher?
Aleatory, try this solution – works with my projects, should be universal (if you just copied the code to the new patch you have to save your patch to make this solution available):
-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 880.3oc0X1saaBCEG+5jmBK5kKCgs4yUoIsWfIsq2plLAuD2QLQXmtrV028g ODRIoP9BBS4lz5iOfOmeb33+lWFOxJNaMWYg9D56nQidY7nQfIigQaFOxZAa 8zTlBbyZZ1hEbo1ZR4bZ9Zco8TwuQ5LzLtFomyQKY54111U9IR.uxhe7ijJa +JSpkrEbXlujKXoUyTbwSmKjy9YNeptL5vQTamIHepMgD33gmfvdNFKDWaGz CU2x7YwF+MyTZQtZgPlx0PziqsxJwyvJiIa8MdUbbJutiEWc1Jc0k6XL953w lelbh7Rx+SQR+NbsLWH0nDllY.UCTxiDcQbhD4anB0Iz1aBJzEPjSMDcN.4p k94GN0C6RpSBvlT226voty4j5Ubpzj9uK4kKokE5g9iJZTbi3.eQ3fFAEBEu e3U9VRuUHzJMhYxY8JQlwzbDoInf8tr1H9g0pQbOBUHmCUHsViLomqS9.B2H RburWabB.JPoFjPIP4R+fjVKTJZ90qD4ysPDZmHhi6sKQdN0NkKa.JtQNcAJ 3.e.JQ2ju4vzYhlXRXTmXhaDzMw+vLg1KEJoBktm20QgTMBEutnTCW.BSgBs G23Y3JTRyXIvtYMzUw6xjmfcATPAcI9N2j6GqNntMO+tTv35G.51B9OKYcAW oXy3uWxdKYM0oKkC99aOPCETifCutazzu8NlKTPtwyaDM3tflHXiW+nArAxl oUrmpl3tuZlZm7DYcu4m69l4WtLozxEg01p0t+G4E9gTE2c1xklJODKVs4eq 7NUH4SyVI00yrcj+D0kCN3AmfDGPfQ3anpx7FfUct332At3t4j03g+3kvJAO 126S1.Aqw9trRksJeZ0sZalidKhS3JsPxzhLYcu710q4hjDtrdRsPjrLqPw5 lvvMr7vTAkBkIaG81BITr3TdR68jO4TvbvODtyoPOFQlOWwwgp464LPQDnb6 nLBD8NnQzQYzdOautQTzIDQvgkFJFs2Z0FinCWk8dqUaQj6.FQtmbczYz.if gC0R7IkGwMX6nqVGri2u.ed4vlnl5.+orkLL3ZjB6Ebs8XX3Zv.pvOdDQwCX DgOolvdCWD4cRaTQuzVdkxSJzc8DOWs4lBASgnsGyxMC8m.CExxgftGqb9Sh J+C.Kr7BsW5BgWqxKklsNz2ZrYcdc7+.honEFC -----------end_max5_patcher-----------
but I’m not having trouble finding the pathname. I know the filepath jit.matrix attempts to read is the one I want because the error jit_matrix throws during the read() function prints it out. There’s something strange about passing a filename to jit_matrix.read(String)
Plus the [;max getapppath ] solution limits me to files within the application folder. I’d prefer to reach files elsewhere on the computer, but even if I put my jxf files in the same folder as the application, jit_matrix gives me the same error. Unless there’s some weirdness about symbol to string conversion or concatenating a string to find subfolders causes the path to be illegitimate.
See attached .zip for more tips ;-) Works as standalone and as a "patch", you may choose the filename (and the pathname), works from js too…
I think you forgot the zip file.
But I figured it out anyway!
I used the [;max paths ] message to check what paths were available to my standalone. Lo and behold the attributes @usesearchpath and @searchformissingfiles in the [standalone] object were not really performing as well I as I thought. The .exe was only searching the folders Max generated for it and ignored all my requests to use mine in the Builder includes and dropping it into the folder manually. So I set a search path using [filepath] in the patcher to manually add my top directory to the search paths (after that it was able to search further subfolders). Then jit.matrix was able to read all my JXF files no problem!
I guess it makes it safer that Max doesn’t have access to files even if you tell it exactly where they are, but that was not expected. I’m gonna try this with matrices inside Java too.
Forums > Jitter