sfplay~ Mac vs. PC issue
I’ve created a random file player that utilizes sfplay`preload cues. The files I’m culling from are stored in subfolders of the main patch, simulating the hierarchy found in most video games. This patch works without any issues on my PC. However, it does not work on my Mac.
I know that this can be done using umenus as well as drop folders. In addition, I know that I can simply save the files directly in the main folder that the patcher lives in. However, I am using this patch to teach my students the importance of file management and saving files in subfolders.
Anyone have any ideas why the Mac doesn’t like this patch but the PC does? It is a MacBook Pro running Leopard. Any ideas that might resolve the situation?
Thanks in advance,
----------begin_max5_patcher---------- 772.3ocwYtsiaBCDF95rR66fE81zr3SDn8p9BzWfpUUNAmrthXh.xdTce1KX GSHaN.aCCQZUr7Av+yGyXOi12t8lQdyReVl6g9F5WnQidqbjQlwpFYjafQdq DOOOQjaVn2rMEEoZuwamSuYkRmHKLShaLZ5lhCFVEadEoy9yWCqeC1EV7xZo UHdyD5kdn6cyuVTL+Akd4uyjyKrKA6ym3OFg49UMj5eQ2adl+d6MUskMi6rY sRlmKVJqUUg7Yyl4MOQJxNt4RbitHUWnEqLFf2OxThDutSB1oIQCJTsE4pWM yfIkF7YnC0PGBwzPmZPU3EQGs7oRodHbxkIHeDFQPzV7H5Lh3GAQjVbVFe51 +SDZcvHbqeVTTO3gcJFtISiX8kCF4HzCeZ5ozE0v5R.ENx5qEBYjHGxnv.be GFRX1ykBsngLgewggmDMqyjIohXDGM4tL0hE4z6VjtIaxShGgDZ7n9FZTpAZ Tee6A7jd3vqVoFaG0JdHSJAGag.gMxzgDazFX6oTvg1TnfF0b5NlQGBnQ1As TM7dZAPAMr0SiwfDZLPYCs2S7xdK3fbhOETzz6WF5RUeHPCAzr068q7b4Z1i nQ9ZrX96sfg8sU+iYq6x35z42PmZzMq9WHJyXw5DwKuCYRxryTFVtZot5kcI IJ6n0VN0nfB2CkKdzsge4mUaVsUW5YU5RT9GwOJn747si38cuCXs804knzGT WuQTUS7gu.4kIJN2sytr5PMDVrLuPoEEpxx92spJf0bUOnhik58bkVohWmVV hQt6pinJea2MHrc8NmKS2kcHnxlDZJtgh2Fs1rGXlzTXMI9dlDePLo.XMIxd lDYHLIFPwKXLCz3ELPxlCaXNEFYS7Ak1A.Q69wCl0IwwqtF5SwzsTb51pS40 8FZYO7LkzIsEc0zFtMs8wyGFPsQZUazql1nsosfqC2vc4a5m+vbJ0dsJwUtu qWuI5VCRHWmyD6hz9zepcDzV..NLvcYSid1+uMGsG1l141LCL85EiMDDi8HU mb6MkM+Cf3VLJA -----------end_max5_patcher-----------
Paths are relative to the directory from which the Max application is run, usually
/Applications/Max5 on OS X. It should works that way on Windows too, though there may be different behaviours.
You have to use
thispatcher or scripting to obtain patch-relative paths.
Here is a standard solution. Note that as it depends on
thispatcher you have copy-paste it into your top-level patch (and reopen it to activate the
loadmess). You may encapsulate all objects except the
thispatcher into a subpatch though.
----------begin_max5_patcher---------- 510.3ocyVE0aaBCD9Y3Wgkq5arTNCDBqO0+.SZOOUM4DbS7DXPXmrzU0+6Ce .YIUMThZBKuXGe2guu669rcdw0gNuXqPSIek7ChiyKtNNnIqAm10Nzb91EYb MFFMWn07kBpWiO057h0lLgA8BsVaLYdtTzr0TJ4wVWkbyhUR0xeVIVXZ7FEL w2ivB7sSA.XmfYS728MxTL0Ey+0WR5R7SEJihmiIf9PkjmsGjjpNDw1Kbs7O X3.ahu05qtt1AuAV4JwuqQPWVLhsH7okUhRgJknElK.o3GYmhCaV79bR7IxI v4iSdiZXGoj+7cUhLtQtQbWcws5BvLnLIIpOwBDd0oVLj4D86yFriwFy4pkT uAwJ.fSAA8oW.1+OAywNDsgbYjIPHpPh76kPfqNBIqfmZObc1okYIVlX5L6X yuOFqDb0QJ5xJox7D4V8s5KfTIlgjRuRE102MJqjZrlDUm38Je3cJM5iDjcl 1qV4bc.p0rluoCj27MKLOnHIz6sC27c6X8SuMVHOtGmhXjlIUu8O2fah09gD stXc0htT1J9I+qRSEZiTU+bVgZuXfChYkLMUft6phbYZYQsfsEBG.PuSFQ.L .HwFWHYSGL.HAiKj9vF2H24BGBlF4V2.5bmJMAgylDUusA3StSY6V7Iw5PZo wiJ6EO.Dk7IPT8hWc+6X.9gx -----------end_max5_patcher-----------
Thanks for your post Hans. I was trying very hard to avoid scripting. I’ve experimented with patches similar to the one you posted. The thispatcher solution is a good one. I’ve toyed with this in the past. It does work, but takes a bit of explaining for a student with extremely limited Max experience.
I am far more perplexed as to why the original patch works on a PC, but not on the Mac. I understand about the folders being relative to the Max application itself. I also know that I can change the Max’s search preferences to search user defined locations. However according to Max’s documentation, the file search should also include the patch that is currently being loaded. With that said, the ./folder argument that I have placed in the message boxes should cause Max to search in the subfolders of the main patch being loaded. I’d be interested in knowing why this isn’t happening.
I’d guess it works like this:
Max does not perform recursive (i.e. subdirectory sensitive) search when an object is created. This is good, because recursive search may be very time-consuming. However, when you add paths in the File Preferences dialogue, there is the possibility of having every child path of the selected path included as well, by checking the Subfolders box. This means that the short list in File Preferences usually translates to a much longer which is the search path.
When a patcher is loaded, Max automatically adds the directory of the file from which it is loaded (which we can obtain by
thispatcher as above), to the seach path. However, it makes no attempt to combine directories already therein with the directory of the loading patcher.
. is a standard sign used in shells, which expands to the current directory (or cd). The cd is, by definition is the directory from which the currently executing program was invoked, i.e. directory that contains the Max application. Probably your Windows system have some different notion of cd than OS X which follow UNIX standards.
Does this make sense?
This makes perfect sense. It definitely explains the discrepancy between the functionality of the two operating systems.
Forums > MaxMSP