May 25, 2011 - 18:53
julien

HOWTO: Find the folder path of something


A big number of people ask me about advices around Ableton Live, Max for Live & Max5.
So, I decided to publish HOW TOs about technology on this blog.
It will probably make it more alive and attractive too.

I hope you’ll like that.
I begin with a particular basic feature but an important one: how to find the absolute path of something and work with folder path a bit.
This feature is available in Max5 so, it is available in Max for Live too.
This can be VERY useful to dynamically use & process path ; for instance, you want to automatically load samples or video, or any type of files without taking care of an hardcoded path.

The path folder
Here is a basic patch/device to find the absolute path of the Max for Live device (the .amxd file). It can be used directly in Max too.

You can grab it by copy-pasting this compressed version of the patch:

----------begin_max5_patcher----------
502.3ocsUEriaBCD8LQJ+CVdulhvl.Ko8T6GPk54pUUN3YCdEXGgcxl1U8eu3g.IYSZxF1rWFadOy327Xr4kwiBnyMa.Kk7YxOIAAuzfDfXdjfNf.ZkXSdovhKjpgmMyehNYKmC13PbGYovUPrfqm6Qi1oEU.x+0Zknj7MSormWIQllz8ozdP8pJktDb3tw1OUV0evTwhBi5va1y7BkdwupgbWagbeCKgm5iYXjkEFQdXu7aV451.dGbKl62Kg1r3ybAcBg5KHxC3p963Q9wlgIua6pzHjyE5ECwrRtwlE5RoWzqX+WuBKj2gIkapp.s6XWZ8Zhq.Z6rdt.pA7QIrVkCjGUk.QYIklbgCjCwIY2NmLluqiiylcIyLZvlUEXshEvPJ23SWt7SVt7vYSix3wmolSvpLJMLINMYFaBINNBglMjtnOhiYtBkEENTeFC6TdE+ZZM3W9PVByGuGi7ngbij+1H5tWyJV2wb228bGTqD5W7g69gOBZYKxQNba5nkJ8Q+G.Skm3U9t0rpNuam25TD1NcIAqSoENkQu2hhObQEJoDP9diqRIWZTZ2VcjlElz3W3opXdR2CmqG4Mq3z2phitFEmE6EYF9ElMsa9MQvIGpkSK3zqUvrTuH4SQA2O+l4vWTv7gI3oI6Dre9IZpGOpY3e.gth9QB
-----------end_max5_patcher-----------

We can take benefits of it and learn about the loadbang object and some others.
It is a very nice & important object which has a particular property: it fires a “bang” message outside its only one output as soon as the patch is loaded.
It can be used:
- to initialize variables,
- to trigger things immediatly when the patch is launched (loaded, I mean)
Here, this precious object send a bang to another object we are discovering: the trigger object
I can describe this one quickly here as:
you send something in the only one input, it fires a particular number of data from its outputs.
It can involve more than one output.
Here, I send a bang (the loadbang takes care of it for me) in the input, and the trigger sends the messageset at first (the first message is ALWAYS sent at the most right placed output) and after this message, it sends the message path .

Each wire/cable are VERY useful in a graphical programming environement because we can track where a message is sent very easily!
Here, the message set is sent to a grey area and pretty object named message
This message object is useful to quickly display the result of a message flow ; I know it can be a bit confused because we talk about message object & message type of data flow.
Let’s resume: here, I send the data set to the left input of the message object.
The result of this action is: the data string in the message object is erased.
The message path is sent to the object thispatcher, a particular object representing some configuration setting of the current patch 
When the message path is sent to this object, this last one renders the current absolute path of the place where the patch is located, from the right output.

This works very fine in two case:
- inside a Max5 patch
- inside a Max for Live device

This DOESN’T work in standalone patch mode.
Two words about that:
- if you own your own license of Max5, you can edit patch & create standalone executable program (including a free runtime.
- if you don’t own Max5, you can only execute the standalone executable version and cannot edit it.

In the second case, this method doesn’t work , and you cannot find the absolute path where the standalone patch (understand the executable one)

How to find the absolute path even in the standalone executable Max5 case ?
You can use this other system that works fine.
It is directly inspired by a patch open-source I found from ??? I forget that, I’m sorry, btw it isn’t all from my brain.
This system can be copy-paste from this compressed code:

----------begin_max5_patcher---------
2638.3oc6c07jiZiE+bOUM+OP4bb6sKj.jfjJGxgspMG1TYS18zjTtv1pcyt XvEf6YljZ+eeQefMxfDBaL1ztmoJ6FP.589o2WRO87e9wO7vrEoegjOy5as9 j0CO7mkm4A14nm4gpS7vrMgeYYbXNqgyRHeNcw+Y1ihqUP9RA67as1FV7xuV r64m2ewnUrKU19+pWv9yltqHlTT70sD9ad1rGKu8xadl0uW0lmSSJxi9CVK. 1OYWc9xls7knj0yyHKK32NDTdYKjK8y.e5mfxOO7nR1sIJo7Ex59f5ufjvMr WvreHKJLdVsaf2EY2AT5USxD7lJlS4SJJl7JIKOJMo9a3gY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------

Related posts:

  1. Targeting a parameter on a smart way



Leave a comment

Who am I ?

I'm a digital artist & a technology developer.
You can read more about me here.
You are on my official & unique blog.
Feel free to subscribe.

My twitter feed