Hello
AZ Lua MFX is a wonderful tool, I use it to humanize my violon kontakt track : add vibrato, crescendos, automaticaly : it works great !
But : it seems to have a realtime process priorisation process : indeed when I use it, even with only one plugin activated : I have lot of pop, crashs, on the main sound output.
Just for the info : If I use a web browser in another windows during playback, it's a pop crash feast festival. ( not the case if I disable the Lua Plugin )
This sound problem does not appears during export.
I have windows 7, Last Cakewalk Sonar (not the Bandlab version ), 8 cores AMD CPU, 16go ram. The cpu is not overloaded at all during my playback/
Have you any advices ?
Here is my code : when I find a "long" note, I add a vibrato curve, and a volume curve.
--[[ http://www.azslow.com/index.php?topic=286.0 ]]--
local channel = 3
--[[ Copy Paste Below ]]--
local timeTriggerVibrato = 1500
local floor = math.floor
math.randomseed(1234)
local lastVolume = 100
local launched = 0
function OnInput(pqIn, pqOut)
local time = 0 ;
local firsttime = 0 ;
for i = 1, #pqIn do
e = pqIn
pqOut.add(e)
time = e.Time
if ( firsttime == 0 ) then
firsttime = time
end
if e.Type == Note and e.Chan == channel and ( e.Duration > timeTriggerVibrato ) then
RegisterVibrato( e.Time,e.Duration,pqOut)
elseif e.Type == Note and e.Chan == channel then
CancelVibrato( e.Time,e.Duration,pqOut)
end
end
if ( launched == 1 ) then
launched = 0
local ec = MfxEvent.new( Control )
ec.Time = firsttime
ec.Chan = channel
ec.Num = 1
ec.Val = 100
pqOut.add(ec)
end
end
function OnStart( )
launched = 1
end
OnEvents = function ( From, To, pqIn, pqOut)
OnInput(pqIn, pqOut)
end
function CancelVibrato(timeStart,duration,pqOut)
local ec = MfxEvent.new( Control )
ec.Time = timeStart+1
ec.Chan = channel
ec.Num = 21
ec.Val = 60
pqOut.add(ec)
local k = 0
local volume = lastVolume
while ( volume <= 100 ) do
k = k + 30
volume = volume + 5
ec = MfxEvent.new( Control )
ec.Time = timeStart + k
ec.Chan = channel
ec.Num = 11
ec.Val = volume
pqOut.add(ec)
end
lastVolume = 100
end
function RegisterVibrato(timeStart,duration,pqOut)
local k = 0
-- discretisation de la montee du vibrato
local nbsteps = 20
local endNote = timeStart + duration
local kDureeDeplacementVibrato = 0.75 + 0.25*2*(math.random()-0.5)
local dureeDeplacementVibrato = floor(kDureeDeplacementVibrato*duration)
local endMonteeVibrato = floor(timeStart+dureeDeplacementVibrato )
local startCompVolume = floor(timeStart+0.67*dureeDeplacementVibrato )
local endCompVolume = floor(timeStart+dureeDeplacementVibrato )
-- taille abcisse cellule step
local stepVibrato = floor(dureeDeplacementVibrato /nbsteps)
local i = timeStart
-- etape ou on commence
local startBaisse = floor(nbsteps/8)
-- palier ordonnee dajout de vibrato
local StepMoreVibrato = 40/nbsteps
local StepVolume = floor(0.6*StepMoreVibrato)
while ( i <= endMonteeVibrato ) do
i = i + stepVibrato
k = k + 1
if( k > startBaisse ) then
local ec = MfxEvent.new( Control )
ec.Time = i
ec.Chan = channel
ec.Num = 21
ec.Val = floor(60+ k*StepMoreVibrato)
pqOut.add(ec)
if( i >= startCompVolume and i <= endCompVolume ) then
ec = MfxEvent.new( Control )
ec.Time = i
ec.Chan = channel
ec.Num = 11
lastVolume = floor( 100 - k*StepVolume )
ec.Val = lastVolume
pqOut.add(ec)
end
end
end
end