-
Notifications
You must be signed in to change notification settings - Fork 65
OpenSavePanelSupport
From the patch, send the message [openpanel(
or [savepanel(
to the plugin via the object [send camomile]
. The plugin will show a dialog window and once a file has been selected, it will send back a message containing the path of the file selected that can be received via respectively the objects [receive openpanel]
and [receive savepanel]
. In the message, you can use an optional argument to use a default path, for example [openpanel ~/Desktop/(
. Here is an example: patch.
A small patching trick can be used to route the path received depending on which graphical object is clicked. These can be useful if the openpanel or savepanel functionalities must be used for several purposes, for example to load several sound files. Here is an example: patch.
Important: Loading or saving a file from or to your hard drive is time expensive and the operation can generate crackles and glitches and even crashes because audio doesn't wait! To avoid such problem, you should use the flag -s in the message sent to camomile to suspend the processing when the plugin send back the results: [openpanel -s(
or [savepanel -s(
. Here is an example: patch.