用户工具

站点工具


information:tutorial:job_plugin_lua

这是本文档旧的修订版!


V3尾音PIT LUA脚本 源代码

myfile.foo

function manifest()\\ 
myManifest = {\\ 
name          = "Weiyin",\\ 
comment       = "Weiyin PIT",\\ 
author        = "SolPie",\\ 
pluginID      = "{D82068B8-9A30-4912-B619-284B50B42D60}",\\ 
pluginVersion = "1.0.0.1",\\ 
apiVersion    = "3.0.0.1"\\ 
}\\ 
\\ 
return myManifest\\ 
end


\\ 
--\\ 
-- VOCALOID3 Job 插件的main入口\\ 
--\\ 
function main(processParam, envParam)\\ 
-- 実行時に渡された処理条件パラメータを取得します.\\ 
local beginPosTick = processParam.beginPosTick -- 选区开始时间的(开始的TICK)。\\ 
local endPosTick   = processParam.endPosTick -- 选区结束时间的(结束Tick).\\ 
local songPosTick  = processParam.songPosTick -- 当前歌曲的位置时。


-- 実行時に渡された実行環境パラメータを取得します.\\ 
local scriptDir  = envParam.scriptDir -- 目录路径,Lua脚本的位置(在末尾分隔符“%%\%%”内)。\\ 
local scriptName = envParam.scriptName -- Lua脚本文件名。\\ 
local tempDir    = envParam.tempDir  -- 临时目录路径的Lua插件是可用的(在末尾分隔符“%%\%%”内)。


--xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx下面是重点xxxxxxxxxxxxxxxxxxxxx\\ 
local control = {}\\ 
local controlList = {}\\ 
local len=32 --尾音长度\\ 
local num = 0 --值\\ 
local step = 8191/(len/2)--步进值\\ 
VSUpdateControlAt("PBS", endPosTick-len , 6)--设置PBS参数\\ 
VSUpdateControlAt("PBS", endPosTick , 2)\\ 
for posTick=endPosTick-len,endPosTick-len/2 do\\ 
VSUpdateControlAt("PIT", posTick , num) \\ 
num = num + step\\ 
end\\ 
VSUpdateControlAt("PIT", endPosTick , 0) \\ 
\\ 
end\\ 


information/tutorial/job_plugin_lua.1326709206.txt.gz · 最后更改: 2025/07/31 16:31 (外部编辑)