patch relative filepath
I’ve googled around and here too, but couldn’t find a solution to make a patch loading samples to play in some sfplay~ objects with a PATCH relative filepath…
I used to make it pretty easily in PD, I can’t believe it’s so complicated in max/msp…
I have to put it into another computer.
Send the word
to [thispatcher] and get the relative path from the right outlet. The patch must be saved as a file to get a path.
The example below works only for regular Max patches, for applications you need a different method.
----------begin_max5_patcher---------- 430.3ocwTsrSCCCD7bxWgk60RUbHokBm3G.IDGQUH2jkFWRrqhce.U8em30I sMPJTj.wEKsiWu6LiW6s9dzopMflRtl7HwyaqumGBYA7pi8nE7MI4bMlFMQU T.RCsuaOCrwf3OvWADSlPSVvMIYDihLCLDggrVU9hPNaPyQxERHQsThmKrF7 YkznEuAVLVzffZX4xBgLGLXuYG.UKMMnMohsspOOUBIFmhhhqJD4x.6Ji4BF OHfLo9HhTj5poyuXD8HhH4EHQn2VJ34T6F678sK8OSWp.zZ9Lf1k5XcqtvNU WilcPlWW.NoQo6UwIENKFUd3XmALpakG+mp78yGUrL6+0NtxM.DNH9zlQzuq YHg0UU8Sdg8YBRSn7mXIcO+GdRKo+4Mk3dXLLBCNwyC1W3K06nq9.nty8ty1 6VpjPuwtz6d6JHScHjIGYpXeweG9vGRXQr3scZsZYYRSKqu7HGXeJnMBI2HT xixg0JmLQZJHO9WjTglOMGPkGz4M94xFamXeCahaky4yFmUwWrXETpqKIRjp wu4pRa3v9XnP5BwJRKgUhl7i7sUam+6.vJoYb. -----------end_max5_patcher-----------
will this work if the patch is opened on another computer with the max runtime ?
thank you anyway !
I saved the patch, put it in another folder, opened with Max runtime, worked. So yes, must be the same on another computer as long as there is Max installed.
I took a slightly different approach to this problem. I create an abstraction with pretty much the same code (path to thispatcher) but I give it an inlet and outlet and then throw it in the root folder of a particular environment. E.g, the code below is stored in a file called CurrentRigRoot in a folder that contains all the patchers and related files used for a particular live rig.
----------begin_max5_patcher---------- 514.3ocuUsraaCCD7rzWwBlqpF5YrS6o1OfhVziEAEzRqkXgDog3pV2Fj+8R RIEaGq3WHMWVBMK4xYlkj5AeO1R0FTyf2CeG77dv2yyAYA7F91i0v2jWy0to wxUMMnjXA84HbC4v+RGAJIBpU.UgZDDR.44UvJUcA1Z.4DzhqaM4jj1NInUT 1imq5pKfkHzowhYi0tVHQSFoaCRF.Wyo7Jgr7GsXN0S7n4ymEF.yirwnrP6P 5hYgv8CqQT3nnZ4OeWxXwWojjj2ftLerUvq2MiV7WWlnXSw5gkcMBYMRNaHZ KnpiFQCsfO56aCAmoe1ub1QTWXpUPwI24FxFiSotL1EP1AzwFpsFeSIKgBQK 6JDxxNhTxiHjDmNtsW.giwmjQO0n+rF6mNaIWVxlRkoWfJitBk3p4IERT1Kz ONPHSJh3IEQ3zhXhV0mLtCPJnDIPaZaWYWqA0ZdIdv0YirqNhEj0aAg2ZGF7 iEWtGj95baL9Uq0KweaH1AtAUIzNW.aOsoLOwcN+tSeBmE7BFSzh+mOSMZWZ 9uFYxMe1xk8jIv9fMbyWsQTVzi.2uiq5nt6Y5m8KDWQr36a0ZUWa93VNpSH5 IGn.0jPxIg4cjsSx7nFr0DqDEEnb26JMhh0JgjF3vdLL3hoT7d61zLJ8MkQo mAiheaoT74vIWy8Z4j4iG8+GIV7.IB -----------end_max5_patcher-----------
I can then work with a new patcher, before even saving it, and have access to stuff I need, relative to the location where CurrentRigRoot is saved.
----------begin_max5_patcher---------- 364.3ocqSsrZCCCD7r8WgPmSiejWjbqzbnTZoPtVBEYaYmsXKEjjacZH+60d scdz5PRgbQKZ1cYlY0ps1Vz.YAWSIyHuQrr1ZaYgPU.VM2snYrhvTlFKilw0 ZVBm1qNmgWXP74J3S9fYNZUnyKrhmg.ESsYjy7Ge503XHju.RbZ6JED7PYt. a0uAbMyDtBDIuq3glZIMZbe2dDuoSvvD2pv.+9tjkM8HyMobiYyZdcCT59TP DpKYvG2441RbrTXDrLrZ58JfkdbFM7MlwqjhFXQdFHJoPerRKAqIFQ8p.2Ya Wcz6JmhA4FiTPOuyGfVdH5X+8mm22ALQRmdeLsKm3cybhf+UIM+Yc3gbkhKL kO5KjRyEMpm6vpvzgW1oc5R+ayC7kGKH4396u90fVqB+zYkVlqBakdiRIGbW DWa.Ay.kKCGpoZek3sunUPTDGy2J5LHZsDDlFMPV14C20JowWgjNU1+OEUdY m8O.gd.BLC -----------end_max5_patcher-----------
I have a few of these abstractions, suitably named, deployed in important places – for example, there’s one called CurrentPatchRoot that is stored in a folder where all my .fxp files are to be saved and then I can easily access that from anywhere as well.