I've added 2 variables:
$SongPath -- the absolute path name of the song (from the command line)
$FilePath -- abs path of the current file being processed (could be a lib/include file)
These can be handy if you want to have test code in a library file. So, in the lib file:
bunch of settings
defgroove SOMETHING
if eq $SongPath $FilePath
do test code
endif
To add to an existing mma just do the following:
1. to the top macro.py in the list of includes:
from os import path
2. Around line 112 add:
elif s == 'FILEPATH':
if gbl.inpath.fname == 1:
return "STDIN"
else:
return path.abspath(gbl.inpath.fname)
elif s == 'SONGPATH':
if gbl.infile == 1:
return "STDIN"
else:
return path.abspath(gbl.infile)
thanks sciurius for this. I think that a new mma-19.x is closer than I thought
At least a devel version