Author Topic: Re: Normalize output sound?!  (Read 2267 times)

SeregaZ

  • Posts: 30
Re: Normalize output sound?!
« Reply #25 on: 4 Aug '22 - 19:10 »
aaaaa! forgot one thing! how close two channels of equalizer can be? i think to make some possibility for user manualy switching fCenter param.

for example i have: 80 - 170 - 310...
and now i think to move 170 closer to 80. how close i can move it? or i can free move it down to 81? same with highest border - 309? or it is have some special limitations for that minimum space between channels?

Ian @ un4seen

  • Administrator
  • Posts: 25275
Re: Normalize output sound?!
« Reply #26 on: 5 Aug '22 - 12:53 »
You can have the bands as close as you like, but note that they may overlap (affect each other), depending on the bandwidth settings. If you have bands at 80 and 81 Hz, they will be pretty much identical, and you could instead just have a single band with a combined gain value.

An equalizer would usually have its bands evenly spaced (logarithmically), all with the same bandwidth value. Note the bands are 1 octave apart in the example code I linked above.

SeregaZ

  • Posts: 30
Re: Normalize output sound?!
« Reply #27 on: 7 Aug '22 - 09:35 »
i have a problem :(

i am fill structure - fCenter, fGain, fBandwidth = 1 and lChannel = -1

Code: [Select]
SEid.l = BASS_ChannelSetFX(chan, #BASS_FX_BFX_PEAKEQ, 0)
Debug "SEid = " + Str(SEid)
Debug "BASS_ChannelSetFX = " + Str(BASS_ErrorGetCode()) ; will show 0 - ok

SEpar.BASS_BFX_BQF
SEpar\fCenter = 100
SEpar\lFilter = 0
SEpar\fGain = -10
SEpar\fBandwidth = 1
;SEpar\fS = 0.1
;SEpar\fQ = 0.1
SEpar\lChannel = -1

Debug SEpar\fGain ; will show -10
BASS_FXSetParameters(SEid, SEpar)
Debug SEpar\fGain ; will show 0 ?????????
Debug BASS_ErrorGetCode() ; 0 = ok
;BASS_FXSetParameters(SEid, @SEpar) ; with or without @ - both same effect
;Debug BASS_ErrorGetCode() ; 0 = ok

Debug SEpar\fCenter
Debug SEpar\lFilter
Debug SEpar\fGain         ; it save all params, exept gain
Debug SEpar\fBandwidth
Debug SEpar\lChannel

BASS_FXSetParameters is eat fGain value. enter with -10 param, after use BASS_FXSetParameters - fGain inside of that structure becomes to 0. why that? i am define structure with wrong types of variable? i set .f type for everything exept lChannel and lFilter - they are .l type (if i set for lFilter f.type application is freeze).
Code: [Select]
Structure BASS_BFX_BQF
    lFilter.l;   
    fCenter.f
    fGain.f
    fBandwidth.f
    fQ.f
    fS.f
    lChannel.l;
EndStructure

so it eat fGain param inside structure after apply and i didnt hear any changes after use this code no matter BASS_ErrorGetCode() shows 0 - ok. probably is not ok... or maybe i need update bass.dlls for last one?


no. i am update all dlls to last one. no any changes. still that fGain is eat everytime after use. and no any effects happen (but it work fine with previous case #BASS_FX_DX8_PARAMEQ param and BASS_DX8_PARAMEQ structure)
« Last Edit: 7 Aug '22 - 10:36 by SeregaZ »

Ian @ un4seen

  • Administrator
  • Posts: 25275
Re: Normalize output sound?!
« Reply #28 on: 8 Aug '22 - 12:39 »
You need to use the BASS_BFX_PEAKEQ structure for the BASS_FX_BFX_PEAKEQ effect parameters (BASS_BFX_BQF is only for the BASS_FX_BFX_BQF effect). Please try correcting that and see if you still have the problem then.

SeregaZ

  • Posts: 30
Re: Normalize output sound?!
« Reply #29 on: 8 Aug '22 - 13:09 »
aaaaaaaaaa... i am write - understand, but that was another understand about what i am thinking :)))) now i am see what you meaning for that old post... yes, now it works. thanks. i will go to bring good news to our community.