【发布时间】:2023-02-03 00:18:32
【问题描述】:
我正在评估 Reaper 的自动音乐制作。 “自动”就像“无需人工交互”。根据我在研究中了解到的情况,这似乎是可能的。
目前我被困住了。我工作的一个重要部分是导入 MIDI 文件。根据 API,执行此操作的一种方法是函数 BR_SetTakeSourceFromFile。当我调用它时,出现此错误:
attempt to call a nil value (field 'BR_SetTakeSourceFromFile')
这告诉我该方法未定义。我写了一个简单的测试来验证:
reaper.ShowConsoleMsg("Reaper version: " .. reaper.GetAppVersion() .. "\n")
if reaper.BR_SetTakeSourceFromFile == nil then
reaper.ShowConsoleMsg("Method BR_SetTakeSourceFromFile does not exist.\n")
else
reaper.ShowConsoleMsg("Method BR_SetTakeSourceFromFile exists.\n")
end
if reaper.BR_SetTakeSourceFromFile2 == nil then
reaper.ShowConsoleMsg("Method BR_SetTakeSourceFromFile2 does not exist.\n")
else
reaper.ShowConsoleMsg("Method BR_SetTakeSourceFromFile2 exists.\n")
end
if reaper.ShowConsoleMsg == nil then
reaper.ShowConsoleMsg("Method ShowConsoleMsg does not exist.\n")
else
reaper.ShowConsoleMsg("Method ShowConsoleMsg exists.\n")
end
Reaper 控制台中的输出是:
Reaper version: 6.73/macOS-arm64
Method BR_SetTakeSourceFromFile does not exist.
Method BR_SetTakeSourceFromFile2 does not exist.
Method ShowConsoleMsg exists.
我确定我在这里错过了一些东西。任何帮助,将不胜感激。
我调用了方法 BR_SetTakeSourceFromFile 并希望它按照文档中的说明工作。
【问题讨论】: