Mac终端在Lua中的多命令单行

时间:2020-05-19 02:57:54

标签: macos lua

我在Lua脚本的一行上有一个带有3个命令的Win Command提示符,并且需要与Mac等效的命令:

([[cmd.exe /C " cd ]] .. script_path .. [[sonic/win32/ & set VAMP_PATH=]] .. script_path .. [[sonic/win32/vamp; ]].. script_path .. [[ & "sonic-annotator.exe" -d vamp:nnls-chroma:chordino:simplechord -w csv "]].. filename ..[["]],0)

一行“&”中有3个命令。 Mac是soonic / mac64 / sonic-annotator

  1. 它打开命令提示符并将目录更改为/ sonic / win32 / &
  2. 然后将sonic-annotator的Vamp插件路径设置为/ sonic / win32 / vamp &
  3. 然后将效果应用到源wav文件“文件名”,该文件创建带有导入到Reaper DAW中的和弦或速度信息的csv文件。

这是为Win / Lin / Mac设置VAMP文件夹的信息

You need to set the VAMP_PATH environment variable so as to point to the directory with the plugins in it. How you do this depends on the platform.

Linux and macOS using bash in a terminal window:

$ export VAMP_PATH=/path/to/plugin/directory
$ sonic-annotator -l

(or whatever sonic-annotator options you want)

Windows using Command Prompt:

> set VAMP_PATH=/path/to/plugin/directory
> sonic-annotator -l

Windows using PowerShell:

> $env:VAMP_PATH = "/path/to/plugin/directory"
> & sonic-annotator -l

Note that in all cases, setting the path to "." will make Sonic Annotator read plugins from the current working directory at the time you run it. If you have plugins + sonic-annotator binary in the same directory, you can cd to that directory and run (in bash) the one-liner

$ VAMP_PATH=. ./sonic-annotator -l

0 个答案:

没有答案