2020-02-29 00:25:51 +01:00
ardour {
[ " type " ] = " dsp " ,
2020-09-30 21:59:20 +02:00
name = " ACE Gain Ratio " ,
2020-02-29 00:25:51 +01:00
category = " Amplifier " ,
license = " MIT " ,
2020-09-30 21:59:20 +02:00
author = " Ardour Community " ,
2020-02-29 00:25:51 +01:00
description = [[Multichannel amplifier with gain coefficient ratio (not dezippered). Beware this plugin allows for significant gain ratios, it's intended to academic purposes.]]
}
function dsp_ioconfig ( )
return
{
-- -1, -1 = any number of channels as long as input and output count matches
{ audio_in = - 1 , audio_out = - 1 } ,
}
end
function dsp_params ( )
return
{
{ [ " type " ] = " input " , name = " Gain Coefficient numerator " , min = 0 , max = 1048576 , default = 1 , unit = " " , logarithmic = true } ,
{ [ " type " ] = " input " , name = " Gain coefficient denominator " , min = 1 , max = 1048576 , default = 1 , unit = " " , logarithmic = true } ,
}
end
local sr = 48000
local cur_gain = 0.0
function dsp_init ( rate )
sr = rate
end
function dsp_configure ( ins , outs )
n_out = outs
n_audio = outs : n_audio ( )
end
function dsp_runmap ( bufs , in_map , out_map , n_samples , offset )
local ctrl = CtrlPorts : array ( )
local gain = ctrl [ 1 ] / ctrl [ 2 ]
ARDOUR.DSP . process_map ( bufs , n_out , in_map , out_map , n_samples , offset )
for c = 1 , n_audio do
fix typos in share/scripts directory
Found via `codespell -q 3 -S "*.pdf,*.po,./.git,*.tosc,./waf,./share/patchfiles,./libs,./msvc_extra_headers,./share/web_surfaces,*.patch" -L acount,addin,ane,ba,buss,busses,caf,capela,devine,disconnectin,discreet,doubleclick,envolution,filetest,fo,ghandi,homs,hsi,layed,maschine,mis,nd,ontop,pass-thru,removeable,retrn,ro,scrollin,sectionin,seh,siz,sord,sur,te,trough,ue,wth`
2025-01-07 20:31:55 +00:00
local ob = out_map : get ( ARDOUR.DataType ( " audio " ) , c - 1 ) ; -- get id of mapped output buffer for given channel
2020-02-29 00:25:51 +01:00
if ( ob ~= ARDOUR.ChanMapping . Invalid ) then
bufs : get_audio ( ob ) : apply_gain ( gain , n_samples ) ;
end
end
end