Would it be possible to enhance Cabbage macros so that they behave more in line with Csound macros? Here are a few illustrations of some quirks I have encountered.
Cabbage seems to insist on the inclusion of a space at the beginning of the macro text. The following snippet creates the keyboard widget but ignores the bounds identifier.
#define MacroName #bounds( 5,160,240,80)#
keyboard $MacroName
If a space is added, as in the following, all works fine.
#define MacroName # bounds( 5,160,240,80)#
keyboard $MacroName
It doesn’t seem possible to include the widget name in the macro code. The following won’t create the keyboard widget.
#define MacroName # keyboard bounds( 5,160,240,80) #
$MacroName
Ultimately I would be like to be able to replace a channel name (or part of a channel name) with a macro but this doesn’t seem possible yet (with or without a space) as in the following snippet. The channel “ctrl” can’t be read in Csound:
#define MacroName #ctrl#
rslider bounds( 5, 5, 70, 70), channel("$MacroName")
In the future it would be great to be able to use macros with arguments… but I’m prepared to wait for that