Author Topic: Set a channel volume over than 1, possible or not ?  (Read 641 times)

jpf

  • Posts: 120
Re: Set a channel volume over than 1, possible or not ?
« Reply #25 on: 24 Jun '22 - 03:16 »
Well done! If you have enough CPU margin I think you don't need to worry about lowering VUs' CPU consumption. Anyway, if you're sure that the VU's GUI is responsible for most of the CPU consumption, you can lower it by 1) refreshing them less often (raise BASS_ChannelGetLevelEx's averaging time and timer interval accordingly) and 2) setting a lower resolution on the level to send to the VUs before comparing past and new values, like multiplying the float (Single) level from BASS_ChannelGetLevelEx by a smaller Integer (let's say 200 instead of 15000). This will make more values identical, specially on highly compressed music. I tried this and it had some effect on CPU consumption.

Ian @ un4seen

  • Administrator
  • Posts: 24494
Re: Set a channel volume over than 1, possible or not ?
« Reply #26 on: 24 Jun '22 - 16:06 »
Also, I'm trying to compare BASS_FX_VOLUME and BASS_FX_BFX_VOLUME, as well as theey looks to give (in my tests) the same result.
So, which one I should choose ? One is better than other ?  Less CPU ? Etc etc ?

If you don't use the specific features of each VOLUME effect then they should indeed give the same result. The specific features are that BASS_FX_VOLUME supports ramping/transitioning, while BASS_FX_BFX_VOLUME supports per-channel levels. The CPU usage of both should be about the same, while BASS_ATTRIB_VOL will be lower than both, but it won't be a big difference in any case. I would generally recommend using BASS_ATTRIB_VOL when possible, as it'll give less delay in hearing in volume changes (without disabling buffering), but the VOLUME effects will be preferable in some cases, eg. for their specific features and when you want the level change applied in the sample data (for BASS_ChannelGetData).

Couin

  • Posts: 40
Re: Set a channel volume over than 1, possible or not ?
« Reply #27 on: 28 Jun '22 - 01:32 »
Hi jpf,

Of course, on "recent" machine, CPU is not a problem, but for peoples who want to keep an old machine which already running JP v4.4.4 to run the new version, it could be better to not spend CPU if not really needed :)

Hi Ian,

Thanks for explonations :)
So, in the case of I would choose between BASS_FX_BFX_VOLUME  and BASS_FX_VOLUME (to get the realistic relation between level, VU-Meter, an audio rendering) and as well as a palette has 30 jingles (so 30 channels), and I would have  I should use BASS_FX_BFX_VOLUME (that supports per-channel) to set level of each jingle.

About BASS_ATTRIB_VOL, I will keep it for Automix feature.

Just have to code and that  ;D

Ian @ un4seen

  • Administrator
  • Posts: 24494
Re: Set a channel volume over than 1, possible or not ?
« Reply #28 on: 28 Jun '22 - 12:31 »
So, in the case of I would choose between BASS_FX_BFX_VOLUME  and BASS_FX_VOLUME (to get the realistic relation between level, VU-Meter, an audio rendering) and as well as a palette has 30 jingles (so 30 channels), and I would have  I should use BASS_FX_BFX_VOLUME (that supports per-channel) to set level of each jingle.

You could use either effect in that case. It is a bit confusing because the word "channel" can refer to multiple things. When I wrote "per-channel" above, I meant you could have separate levels for the left and right channels of a stereo sound (via BASS_FX_BFX_VOLUME's lChannel parameter) for example, rather than separate levels for BASS channels. Both effects are applied to separate BASS channels. It's too late to change now but if BASS was being created from scratch today, the BASS "channel" would be named differently!

Couin

  • Posts: 40
Re: Set a channel volume over than 1, possible or not ?
« Reply #29 on: 29 Jun '22 - 00:47 »
Oh I understand (So, I think , ahah);
BFX "channels" are the 2 channels (L/R) of a channel (like a fader on a DJ mixer).
So as well as I not plan to make a balance (L/R) effect, I can use FX like BFX.
I add started (just rest some small things) with BFX, and I removed BASS buffer (so changing volume , but also EQs, Tempo/Pitch/Samplerate without delay). I think I don't take a big risk with disabled buffer (?).

Ian @ un4seen

  • Administrator
  • Posts: 24494
Re: Set a channel volume over than 1, possible or not ?
« Reply #30 on: 29 Jun '22 - 17:21 »
Disabling playback buffering (via BASS_ATTRIB_BUFFER) will make it more at risk to I/O delays causing problems (ie. little gaps), but you can reduce the chances of that by using the BASS_ASYNCFILE option.

Couin

  • Posts: 40
Re: Set a channel volume over than 1, possible or not ?
« Reply #31 on: 29 Jun '22 - 20:40 »
Thanks

Perhaps another solution could be keep the buffer (default 500 ms if I understand well, as it's the defaut value of BASS_CONFIG_BUFFER), and disable only when I call the Setting FX form (to get no delay between changing a slider position and effect applied to the audio), and put back the (defaut) buffer when closing the form ?

Ian @ un4seen

  • Administrator
  • Posts: 24494
Re: Set a channel volume over than 1, possible or not ?
« Reply #32 on: 30 Jun '22 - 16:56 »
Yes, you could do that, but you would need to disable buffering at least 500ms (or whatever BASS_ATTRIB_BUFFER is set to) before the BASS_FXSetParameters call, to give time for the already buffered data to be played out first.

Couin

  • Posts: 40
Re: Set a channel volume over than 1, possible or not ?
« Reply #33 on: 30 Jun '22 - 17:05 »
Thanks for the tip :)
Also, I didn't implented this delay, but I noticed nothing (no dropout or other strange audio result), when if I open the Effect winow (so disabling buffer) while jingle is playing.
In all case, I think an eventually strange thing can only happen when opening effect while jingle is already playing (so we should do this only when we are preparing jingles, not when we use them in live).