No idea why, but here’s what I did to crash Synth V as it is:
- Save this code as a lua file called “pitch devia.lua” into Synth V and attempt to run Synth V, or scan for scripts
function getClientInfo()
return {
name = "Pitch break demonstration",
author = "Fyrebreak",
category = "Tests",
versionNumber = 1,
minEditorVersion = 0
}
end
function main()
local selectedNotes = SV:getMainEditor():getSelection():getSelectedNotes()
if #selectedNotes == 0 then
return
end
local setValue = 3
local setTime = 0.3
local modValue = setValue*100
local modTime = SV:seconds2Blick(setTime, )
local group = selectedNotes[1]:getParent()
local param = group:getParameter("pitchDelta")
local def = param:getDefinition()
local default = def.defaultValue
for i=1,#selectedNotes do
local startPos = selectedNotes[i]:getOnset()
local endPos = selectedNotes[i]:getEnd()
local startValue = param:get(startPos)
local postValue = param:get(endPos+1)
param:add(startPos, startValue)
param:add(startPos+1, modValue)
param:add(startPos+ modTime, modValue)
param:add(startPos+ modTime+1, startValue)
param:add(endPos, postValue)
end
SV:finish()
end
And that’s about it.
If synthv could throw me some sort of exception, that would be helpful in figuring out why the program is even allergic to scanning this file. But it just crashes without any sort of warning whatsoever.
I did just learn Lua a few weeks ago, so I might have made some basic errors but I’m still not sure. Maybe I’ll throw it into Copilot to see if it can roast me.