Cabbage Logo
Back to Cabbage Site

New reserved macros for folder expansion

I’ve added some reserved macros that can be used to choose cross platform standard locations when working with file based widgets. For example, if your install places samples in a directory call MySamples in a user Music folder on Mac, Windows, or Linux, you can get your combobox to load that folder by doing the following:

combobox bounds(100, 6, 86, 27), populate("*", “#USER_MUSIC_DIRECTORY/MySamples”)

Note these macros are only available in the Cabbage section. If you need to access these paths in the Csound orchestra, you the equivalent reserved channel.


Currently support macros:


`#USER_HOME_DIRECTORY` - retrieves the full path of the user’s home directory.

#USER_DESKTOP_DIRECTORY - retrieves the full path of the user’s Desktop directory.

#USER_MUSIC_DIRECTORY - retrieves the full path of the user’s Desktop directory.

#USER_APPLICATION_DATA_DIRECTORY - retrieves the full path of the user’s application directory. C:/Users/username/AppData on Windows, ~/Library on MacOS

#USER_DOCUMENTS_DIRECTORY - retrieves the full path of the user’s application directory