Вверх ↑
Ответов: 632
Рейтинг: 4
#1: 2022-08-01 20:00:55 ЛС | профиль | цитата
Здравствуйте, не подскажите как сделать программу для нормализации громкости в динамике?
В интернете видел готовое решение, программу Sound Lock. Только программа работает хорошо когда, звучит какой-то голос, а с музыкой (рекламой) не справляется.
Попробовал сам собрать программу.

Add(BASS_RecordStart,5066922,301,231)
{
Freq=44100
Mode=1
Name="mainrec"
}
Add(BASS_Version,10183901,175,231)
{
link(onCheckOk,12302345:doInit,[])
}
Add(MainForm,16358250,42,217)
{
Width=275
Height=152
Caption="BASS record inputs demo"
BorderStyle=4
Position=1
Point(Handle)
link(onCreate,4252681:doInit,[])
}
Add(BASS_Init,4252681,119,231)
{
Device=1
link(onInit,10183901:doCheck,[])
link(Handle,16358250:Handle,[(139,219)(93,219)(93,261)(48,261)])
}
Add(BASS_RecordCenter,12302345,231,231)
{
Device=1
link(onInit,5066922:doStart,[])
}
Add(BASS_ChannelVisibleSpectrum,5631139,280,364)
{
SoundStream="mainrec"
Width=1
Mode=1
LineFallOff=1
DrawPeak=1
link(WindowsHandle,6401345:Var3,[(286,352)(249,352)(249,401)])
}
Add(Timer,5820169,63,399)
{
Interval=10
link(onTimer,11837972:doEvent1,[])
}
Add(Img_GetPoint,2253453,217,490)
{
link(onGetPixel,4851072:doOperation,[])
link(Bitmap,6401345:Var2,[(223,482)(220,482)])
link(X,2523184:Var,[])
link(Y,12760261:Var,[])
}
Add(GetDataEx,6401345,214,396)
{
Angle=3
link(Data,327343:Bitmap,[(217,359)])
}
Add(Hub,11837972,140,399)
{
OutCount=4
link(onEvent1,2457954:In,[])
link(onEvent2,327343:doRefresh,[(182,412)(182,342)])
link(onEvent3,10413253:In,[])
link(onEvent4,14492990:doFor,[(166,426)(166,461)(58,461)(58,496)])
}
Add(For,13349540,161,490)
{
End=98
link(onEvent,2253453:doGetPixel,[])
link(onStop,4778261:doData,[(206,503)(206,706)])
}
Add(Math,4851072,378,490)
{
Point(doClear)
link(onResult,11903586:doOperation,[])
link(Op1,4851072:Result,[(384,478)(372,478)(372,534)(384,534)])
}
Add(For,14492990,63,490)
{
End=260
Step=2
IncludeEnd=1
link(onEvent,13349540:doFor,[])
link(onStop,4328187:In,[])
}
Add(Label,3208925,714,763)
{
Left=10
Top=110
}
Add(Math,6863180,483,490)
{
OpType=3
Op2=98
}
Add(Hub,1205819,287,700)
{
link(onEvent1,4365065:doCheck,[])
link(onEvent2,4851072:doClear,[(339,713)(339,503)])
}
Add(PaintBox,327343,210,336)
{
Width=260
Height=100
Point(MouseX)
Point(MouseY)
link(onBeforeDraw,5631139:doDraw,[(261,342)(261,370)])
}
Add(Math,11903586,427,490)
{
OpType=3
Op2=16777215
link(onResult,6863180:doOperation,[])
}
Add(DoData,4778261,238,700)
{
link(onEventData,1205819:doEvent1,[])
}
Add(Memory,16239344,644,686)
{
}
Add(Math,10835606,532,791)
{
OpType=39
link(onResult,11391906:doEvent2,[(583,797)(583,699)])
link(Op1,16073743:Var2,[(538,775)(655,775)])
link(Op2,15145298:Var1,[(545,727)(535,727)(535,663)])
}
Add(Switch,4365065,413,679)
{
Point(doOn)
Point(doCheck)
Point(onOn)
Point(onOff)
link(onOn,70189:doEvent1,[])
link(onOff,10835606:doOperation,[(463,699)(463,797)])
}
Add(Hub,70189,476,686)
{
link(onEvent1,2857554:doData,[])
link(onEvent2,4719231:In,[])
}
Add(DoData,2857554,539,686)
{
link(onEventData,11391906:doEvent1,[])
link(Data,15145298:Var2,[(545,676)(544,676)])
}
Add(GetDataEx,15145298,538,658)
{
link(Data,6863180:Result,[(544,597)(489,597)])
}
Add(Hub,11391906,602,686)
{
InCount=2
OutCount=1
link(onEvent1,16239344:doValue,[])
}
Add(DoData,6882262,644,798)
{
link(onEventData,3208925:doText,[(695,804)(695,769)])
link(Data,16073743:Var1,[(649,750)])
}
Add(GetDataEx,16073743,649,745)
{
link(Data,16239344:Value,[(655,731)(650,731)])
}
Add(If_else,10412335,616,476)
{
link(onFalse,7479940:doCompare,[])
link(Op1,10096617:Var,[])
link(Op2,2448929:Var1,[(629,369)])
}
Add(Edit,2019045,665,294)
{
Left=215
Top=105
Text="0.5"
}
Add(BASS_Volume,11014103,1260,336)
{
}
Add(If_else,7479940,658,483)
{
Op2=Integer(0)
link(onTrue,11740997:doData,[(695,488)(734,488)(734,384)])
link(onFalse,6408730:doCompare,[(702,496)(702,503)])
link(Op1,14103495:Var,[])
}
Add(If_else,6408730,714,497)
{
Type=1
link(onTrue,14739289:doCalc,[(765,503)(765,482)])
link(onFalse,15127886:doCalc,[(768,510)(768,552)])
link(Op1,2448929:Var2,[(720,435)(650,435)])
link(Op2,14625299:Var,[])
}
Add(DoData,11740997,756,378)
{
link(onEventData,12045824:doEvent1,[(814,384)(814,398)])
link(Data,15114328:Var3,[(762,348)])
}
Add(MathParse,14739289,784,476)
{
MathStr="%1 - %2"
link(onResult,12045824:doEvent2,[(856,482)(856,405)])
link(X1,12056666:Var,[])
link(X2,2700782:Var,[])
}
Add(GetDataEx,14654900,718,823)
{
link(Data,3208925:Caption,[(724,809)(720,809)])
}
Add(Hub,12045824,882,392)
{
InCount=3
OutCount=1
link(onEvent1,11597872:doOperation,[])
}
Add(MathParse,15127886,784,546)
{
MathStr="%2 - %1"
link(onResult,12045824:doEvent3,[(871,552)(871,412)])
link(X1,339757:Var,[])
link(X2,8901848:Var,[])
}
Add(MultiReplace,7875,1260,413)
{
ReplaceList="1=1;\r\n0.982878863811493=0.99;\r\n0.966050863265991=0.98;\r\n0.949510991573334=0.97;\r\n0.932180464267731=0.96;\r\n0.916220486164093=0.95;\r\n0.89949756860733=0.94;\r\n0.883079886436462=0.93;\r\n0.866961896419525=0.92;\r\n0.85015869140625=0.91;\r\n0.834641575813293=0.9;\r\n0.818464815616608=0.89;\r\n0.80260157585144=0.88;\r\n0.787045776844025=0.87;\r\n0.771791517734528=0.86;\r\n0.755962073802948=0.85;\r\n0.741310238838196=0.84;\r\n0.726105988025665=0.83;\r\n0.711213529109955=0.82;\r\n0.695824980735779=0.81;\r\n0.681553602218628=0.8;\r\n0.666806757450104=0.79;\r\n0.652379035949707=0.78;\r\n0.638263463973999=0.77;\r\n0.623734831809998=0.76;\r\n0.610239088535309=0.75;\r\n0.596348345279694=0.74;\r\n0.582103252410889=0.73;\r\n0.568852961063385=0.72;\r\n0.55526465177536=0.71;\r\n0.542000889778137=0.7;\r\n0.52905398607254=0.69;\r\n0.515822172164917=0.68;\r\n0.502921283245087=0.67;\r\n0.489778816699982=0.66;\r\n0.477529287338257=0.65;\r\n0.465050399303436=0.64;\r\n0.452376484870911=0.63;\r\n0.440554887056351=0.62;\r\n0.428548514842987=0.61;\r\n0.416389733552933=0.6;\r\n0.404575914144516=0.59;\r\n0.393097251653671=0.58;\r\n0.38150480389595=0.57;\r\n0.370254218578339=0.56;\r\n0.358921945095062=0.55;\r\n0.347936511039734=0.54;\r\n0.336899220943451=0.53;\r\n0.326212048530579=0.52;\r\n0.315863907337189=0.51;\r\n0.305140614509583=0.5;\r\n0.294781357049942=0.49;\r\n0.284773796796799=0.48;\r\n0.274789422750473=0.47;\r\n0.26485002040863=0.46;\r\n0.255270153284073=0.45;\r\n0.245753675699234=0.44;\r\n0.236319750547409=0.43;\r\n0.227247968316078=0.42;\r\n0.218021854758263=0.41;\r\n0.209170296788216=0.4;\r\n0.200447216629982=0.39;\r\n0.191866889595985=0.38;\r\n0.183442518115044=0.37;\r\n0.17518624663353=0.36;\r\n0.167109072208405=0.35;\r\n0.15922087430954=0.34;\r\n0.151356130838394=0.33;\r\n0.143879860639572=0.32;\r\n0.136458322405815=0.31;\r\n0.12912192940712=0.3;\r\n0.122039385139942=0.29;\r\n0.115080043673515=0.28;\r\n0.10839270055294=0.27;\r\n0.101859144866467=0.26;\r\n0.0953893810510635=0.25;\r\n0.0892277657985687=0.24;\r\n0.0831763818860054=0.23;\r\n0.0773570761084557=0.22;\r\n0.0716968402266502=0.21;\r\n0.0662216544151306=0.2;\r\n0.0608835592865944=0.19;\r\n0.0557827651500702=0.18;\r\n0.0508744865655899=0.17;\r\n0.0461849011480808=0.16;\r\n0.0416869409382343=0.15;\r\n0.0373680144548416=0.14;\r\n0.0332276821136475=0.13;\r\n0.0293426979333162=0.12;\r\n0.0256448425352573=0.11;\r\n0.0221564434468746=0.1;\r\n0.018901664763689=0.9;\r\n0.0158671904355288=0.8;\r\n0.0130617106333375=0.7;\r\n0.0104954252019525=0.6;\r\n0.00816582515835762=0.5;\r\n0.00610239151865244=0.4;\r\n0.00429536495357752=0.3;\r\n0.00277012935839593=0.2;\r\n0.00153815490193665=0.1;\r\n0=0;"
Mode=1
link(onResult,2941822:doMultiReplace,[(1300,419)(1300,433)])
}
Add(MultiReplace,6373183,1197,336)
{
ReplaceList="1=1;\r\n0.99=0.982878863811493;\r\n0.98=0.966050863265991;\r\n0.97=0.949510991573334;\r\n0.96=0.932180464267731;\r\n0.95=0.916220486164093;\r\n0.94=0.89949756860733;\r\n0.93=0.883079886436462;\r\n0.92=0.866961896419525;\r\n0.91=0.85015869140625;\r\n0.9=0.834641575813293;\r\n0.89=0.818464815616608;\r\n0.88=0.80260157585144;\r\n0.87=0.787045776844025;\r\n0.86=0.771791517734528;\r\n0.85=0.755962073802948;\r\n0.84=0.741310238838196;\r\n0.83=0.726105988025665;\r\n0.82=0.711213529109955;\r\n0.81=0.695824980735779;\r\n0.80=0.681553602218628;\r\n0.79=0.666806757450104;\r\n0.78=0.652379035949707;\r\n0.77=0.638263463973999;\r\n0.76=0.623734831809998;\r\n0.75=0.610239088535309;\r\n0.74=0.596348345279694;\r\n0.73=0.582103252410889;\r\n0.72=0.568852961063385;\r\n0.71=0.55526465177536;\r\n0.7=0.542000889778137;\r\n0.69=0.52905398607254;\r\n0.68=0.515822172164917;\r\n0.67=0.502921283245087;\r\n0.66=0.489778816699982;\r\n0.65=0.477529287338257;\r\n0.64=0.465050399303436;\r\n0.63=0.452376484870911;\r\n0.62=0.440554887056351;\r\n0.61=0.428548514842987;\r\n0.6=0.416389733552933;\r\n0.59=0.404575914144516;\r\n0.58=0.393097251653671;\r\n0.57=0.38150480389595;\r\n0.56=0.370254218578339;\r\n0.55=0.358921945095062;\r\n0.54=0.347936511039734;\r\n0.53=0.336899220943451;\r\n0.52=0.326212048530579;\r\n0.51=0.315863907337189;\r\n0.5=0.305140614509583;\r\n0.49=0.294781357049942;\r\n0.48=0.284773796796799;\r\n0.47=0.274789422750473;\r\n0.46=0.26485002040863;\r\n0.45=0.255270153284073;\r\n0.44=0.245753675699234;\r\n0.43=0.236319750547409;\r\n0.42=0.227247968316078;\r\n0.41=0.218021854758263;\r\n0.4=0.209170296788216;\r\n0.39=0.200447216629982;\r\n0.38=0.191866889595985;\r\n0.37=0.183442518115044;\r\n0.36=0.17518624663353;\r\n0.35=0.167109072208405;\r\n0.34=0.15922087430954;\r\n0.33=0.151356130838394;\r\n0.32=0.143879860639572;\r\n0.31=0.136458322405815;\r\n0.3=0.12912192940712;\r\n0.29=0.122039385139942;\r\n0.28=0.115080043673515;\r\n0.27=0.10839270055294;\r\n0.26=0.101859144866467;\r\n0.25=0.0953893810510635;\r\n0.24=0.0892277657985687;\r\n0.23=0.0831763818860054;\r\n0.22=0.0773570761084557;\r\n0.21=0.0716968402266502;\r\n0.2=0.0662216544151306;\r\n0.19=0.0608835592865944;\r\n0.18=0.0557827651500702;\r\n0.17=0.0508744865655899;\r\n0.16=0.0461849011480808;\r\n0.15=0.0416869409382343;\r\n0.14=0.0373680144548416;\r\n0.13=0.0332276821136475;\r\n0.12=0.0293426979333162;\r\n0.11=0.0256448425352573;\r\n0.1=0.0221564434468746;\r\n0.9=0.018901664763689;\r\n0.8=0.0158671904355288;\r\n0.7=0.0130617106333375;\r\n0.6=0.0104954252019525;\r\n0.5=0.00816582515835762;\r\n0.4=0.00610239151865244;\r\n0.3=0.00429536495357752;\r\n0.2=0.00277012935839593;\r\n0.1=0.00153815490193665;\r\n0=0;"
Mode=1
link(onResult,11014103:doVolume,[])
}
Add(MultiReplace,2941822,1309,427)
{
ReplaceList="1=1;\r\n0.99=0.982878863811493;\r\n0.98=0.966050863265991;\r\n0.97=0.949510991573334;\r\n0.96=0.932180464267731;\r\n0.95=0.916220486164093;\r\n0.94=0.89949756860733;\r\n0.93=0.883079886436462;\r\n0.92=0.866961896419525;\r\n0.91=0.85015869140625;\r\n0.9=0.834641575813293;\r\n0.89=0.818464815616608;\r\n0.88=0.80260157585144;\r\n0.87=0.787045776844025;\r\n0.86=0.771791517734528;\r\n0.85=0.755962073802948;\r\n0.84=0.741310238838196;\r\n0.83=0.726105988025665;\r\n0.82=0.711213529109955;\r\n0.81=0.695824980735779;\r\n0.80=0.681553602218628;\r\n0.79=0.666806757450104;\r\n0.78=0.652379035949707;\r\n0.77=0.638263463973999;\r\n0.76=0.623734831809998;\r\n0.75=0.610239088535309;\r\n0.74=0.596348345279694;\r\n0.73=0.582103252410889;\r\n0.72=0.568852961063385;\r\n0.71=0.55526465177536;\r\n0.7=0.542000889778137;\r\n0.69=0.52905398607254;\r\n0.68=0.515822172164917;\r\n0.67=0.502921283245087;\r\n0.66=0.489778816699982;\r\n0.65=0.477529287338257;\r\n0.64=0.465050399303436;\r\n0.63=0.452376484870911;\r\n0.62=0.440554887056351;\r\n0.61=0.428548514842987;\r\n0.6=0.416389733552933;\r\n0.59=0.404575914144516;\r\n0.58=0.393097251653671;\r\n0.57=0.38150480389595;\r\n0.56=0.370254218578339;\r\n0.55=0.358921945095062;\r\n0.54=0.347936511039734;\r\n0.53=0.336899220943451;\r\n0.52=0.326212048530579;\r\n0.51=0.315863907337189;\r\n0.5=0.305140614509583;\r\n0.49=0.294781357049942;\r\n0.48=0.284773796796799;\r\n0.47=0.274789422750473;\r\n0.46=0.26485002040863;\r\n0.45=0.255270153284073;\r\n0.44=0.245753675699234;\r\n0.43=0.236319750547409;\r\n0.42=0.227247968316078;\r\n0.41=0.218021854758263;\r\n0.4=0.209170296788216;\r\n0.39=0.200447216629982;\r\n0.38=0.191866889595985;\r\n0.37=0.183442518115044;\r\n0.36=0.17518624663353;\r\n0.35=0.167109072208405;\r\n0.34=0.15922087430954;\r\n0.33=0.151356130838394;\r\n0.32=0.143879860639572;\r\n0.31=0.136458322405815;\r\n0.3=0.12912192940712;\r\n0.29=0.122039385139942;\r\n0.28=0.115080043673515;\r\n0.27=0.10839270055294;\r\n0.26=0.101859144866467;\r\n0.25=0.0953893810510635;\r\n0.24=0.0892277657985687;\r\n0.23=0.0831763818860054;\r\n0.22=0.0773570761084557;\r\n0.21=0.0716968402266502;\r\n0.2=0.0662216544151306;\r\n0.19=0.0608835592865944;\r\n0.18=0.0557827651500702;\r\n0.17=0.0508744865655899;\r\n0.16=0.0461849011480808;\r\n0.15=0.0416869409382343;\r\n0.14=0.0373680144548416;\r\n0.13=0.0332276821136475;\r\n0.12=0.0293426979333162;\r\n0.11=0.0256448425352573;\r\n0.1=0.0221564434468746;\r\n0.9=0.018901664763689;\r\n0.8=0.0158671904355288;\r\n0.7=0.0130617106333375;\r\n0.6=0.0104954252019525;\r\n0.5=0.00816582515835762;\r\n0.4=0.00610239151865244;\r\n0.3=0.00429536495357752;\r\n0.2=0.00277012935839593;\r\n0.1=0.00153815490193665;\r\n0=0;"
Mode=1
link(onResult,3697222:doString,[(1353,433)(1353,482)(1255,482)(1255,531)])
}
Add(FormatStr,3697222,1267,525)
{
DataCount=3
Mask="%1|%2|%3"
link(onFString,10834262:In,[])
link(Str1,12235397:Var,[])
link(Str2,7875:Result,[(1280,485)(1266,485)])
link(Str3,2941822:Result,[(1287,492)(1315,492)])
}
Add(Memory,9648094,1218,413)
{
link(onData,7875:doMultiReplace,[])
}
Add(Copy,12276841,1036,392)
{
Position=1
Count=2
link(onCopy,15345801:doString,[])
link(Str,6000662:Var,[])
}
Add(FormatStr,15345801,1092,392)
{
Mask="%1.%2"
link(onFString,5661999:doEvent1,[(1136,398)(1136,370)])
link(Str1,3728122:Var,[])
}
Add(MultiStrPart,16273290,987,392)
{
Char="."
link(onSplit,12276841:doCopy,[])
}
Add(Hub,5661999,1148,364)
{
link(onEvent1,6373183:doMultiReplace,[(1180,370)(1180,342)])
link(onEvent2,9648094:doValue,[(1190,377)(1190,419)])
}
Add(LineBreak,7275578,-7,217)
{
link(Out,16358250:doCaption,[])
Primary=[10834262,1316,308]
}
Add(LineBreak,8961199,574,476)
{
link(Out,10412335:doCompare,[])
Primary=[2457954,-406,-77]
}
Add(LineBreak,3406617,357,693)
{
link(Out,4365065:doOn,[])
Primary=[10413253,-189,-280]
}
Add(LineBreak,12604645,63,532)
{
Type=1
link(Data,14492990:Position,[])
Primary=[2523184,161,-77]
}
Add(LineBreak,8388037,161,532)
{
Type=1
link(Data,13349540:Position,[])
Primary=[12760261,70,-77]
}
Add(LineBreak,9780750,602,798)
{
link(Out,6882262:doData,[])
Primary=[4328187,-497,-301]
}
Add(LineBreak,6423065,357,686)
{
link(Out,4365065:doReset,[])
Primary=[4719231,147,7]
}
Add(LineBreak,7953254,987,434)
{
Type=1
link(Data,16273290:Part1,[])
Primary=[3728122,105,-70]
}
Add(LineBreak,3812458,994,434)
{
Type=1
link(Data,16273290:Part2,[])
Primary=[6000662,42,-70]
}
Add(LineBreak,12483405,1218,462)
{
Type=1
link(Data,9648094:Value,[])
Primary=[12235397,49,35]
}
Add(LineBreak,12092908,707,840)
{
Type=1
link(Data,14654900:Var1,[(713,828)])
Primary=[10096617,-91,-399]
}
Add(LineBreak,12083134,735,840)
{
Type=1
link(Data,3662240:Var3,[(741,828)])
Primary=[2700782,56,-392]
}
Add(GetDataEx,3662240,728,823)
{
Angle=3
link(Data,14654900:Var3,[])
}
Add(LineBreak,14227365,749,840)
{
Type=1
link(Data,5035011:Var2,[])
Primary=[339757,35,-322]
}
Add(GetDataEx,10512768,658,364)
{
Angle=1
link(Data,11696301:Var2,[(671,369)])
}
Add(LineBreak,7134847,658,392)
{
Type=1
link(Data,10512768:Var2,[])
Primary=[12056666,126,56]
}
Add(GetDataEx,11696301,665,357)
{
link(Data,15114328:Var2,[])
}
Add(LineBreak,3698691,672,378)
{
Type=1
link(Data,11696301:Var3,[(678,362)])
Primary=[8901848,119,140]
}
Add(GetDataEx,5035011,749,812)
{
Angle=3
link(Data,3662240:Var1,[(734,817)])
}
Add(LineBreak,14305795,770,826)
{
Type=1
link(Data,7654267:Var2,[])
Primary=[14103495,-112,-371]
}
Add(GetDataEx,2448929,644,364)
{
Angle=1
link(Data,10512768:Var1,[])
}
Add(GetDataEx,7654267,770,812)
{
link(Data,5035011:Var1,[(776,806)(755,806)])
}
Add(LineBreak,12484141,763,833)
{
Type=1
link(Data,7654267:Var1,[(769,817)])
Primary=[14625299,-42,-364]
}
Add(GetDataEx,15114328,665,343)
{
link(Data,2019045:Text,[])
}
Add(Math,11597872,917,392)
{
OpType=33
link(onResult,16273290:doSplit,[])
}

Что-то программа делает, но не нормализует громкость.
Помогите пожалуйста разобраться.
карма: 0

0