Author Topic: Mixer, fade in\out between tracks  (Read 249 times)

Olek

  • Posts: 18
Mixer, fade in\out between tracks
« on: 7 Sep '17 - 12:00 »
We created xamarin forms apps and got first feedbacks. Some users hear fade in and out effects between tracks.
I set BASSFlag.BASS_MIXER_NORAMPIN to channels but didn't help. Also I checked files and they don't have fade in\out effects.

Documentation for BASS_MIXER_NORAMPIN says - "Don't ramp-in the start, including after seeking (BASS_Mixer_ChannelSetPosition(Int32, Int64, BASSMode)). This is useful for gap-less playback, where a source channel is intended to seamlessly follow another. This does not affect volume and pan changes, which are always ramped."
What does it mean "volume and pan changes, which are always ramped"?
It might be I don't understand what is "ramp-in", I think it's "fade in".

Anyway I need to get rid of that effect and kindly ask for your help.




Ian @ un4seen

  • Administrator
  • Posts: 20396
Re: Mixer, fade in\out between tracks
« Reply #1 on: 7 Sep '17 - 14:25 »
Yes, a "ramp-in" in basically just a very short fade-in. If you're using the BASS_MIXER_NORAMPIN flag, then the sources shouldn't be ramped-in by the mixer when they start. "volume and pan changes" mean changes to the source's BASS_ATTRIB_VOLUME/PAN settings. If you aren't changing those (eg. via BASS_ChannelSetAttribute), then there won't be any ramping from that either.

Are you sure the fade-in/out that you (or your users) are hearing isn't in the file itself? How long is the fade-in/out, and does it apply to all files of all formats?

Olek

  • Posts: 18
Re: Mixer, fade in\out between tracks
« Reply #2 on: 9 Sep '17 - 07:38 »
Yes, I use BASS_MIXER_NORAMPIN flag.

Quote
Are you sure the fade-in/out that you (or your users) are hearing isn't in the file itself? How long is the fade-in/out, and does it apply to all files of all formats?

Good questions. We checked files and they don't have fade-in\out. I'm going to record output sound from iPhone somehow.

Issue is related to mp3 files(our mp3 files have 320 kbps bit rate).

Ian @ un4seen

  • Administrator
  • Posts: 20396
Re: Mixer, fade in\out between tracks
« Reply #3 on: 11 Sep '17 - 16:48 »
Please use the BASSenc add-on to record the mixer output to a WAV file. Something like this:

Code: [Select]
BASS_Encode_Start(mixer, outputfilename, BASS_ENCODE_PCM|BASS_ENCODE_AUTOFREE, NULL, NULL);

You can then load the written WAV file in a sample editor to check for any fade-in/out. You could also set a WAV writer on the MP3 file's stream to see if a fade-in/out is in that.

Olek

  • Posts: 18
Re: Mixer, fade in\out between tracks
« Reply #4 on: 12 Sep '17 - 17:34 »
I recorded output from device (Huawei p8 lite) using stereo in on my motherboard. I found fade in \ out  in one of the files after recording. Fade out effect was to long to think that problem in BASS. Having fadeout start and end time I found such effect in file. However users reported this effect in other place.

For example one of the simple audio program that we have:

[__intro track__][__loopable track__][__end track__]
[_other track_]

loopable track can be repeated N times(including infinity times). it depends on user preferences.
If user wants to repeat loopable track 3 times I just add to mixer the same file 2 times more:

[__intro track__][__loopable track__][__loopable track__][__loopable track__][__end track__]
[_other track_]

If user wants to repeat it infinity times I enable looping on loopable track using BASS_SAMPLE_LOOP flag and remove end track from mixer.

[__intro track__][__loopable track__]
[_other track_]

So users report that fade in\out effects are between intro track and loopable track OR between loopable track repeats(using flag or copies in mixer).
However I don't see fade in and fade out in my recordings.
We will investigate it further.




Olek

  • Posts: 18
Re: Mixer, fade in\out between tracks
« Reply #5 on: 12 Sep '17 - 17:41 »
Meanwhile we faced with another issue. In android application we found clicks in sound.  I attached 2 files. Not sure what to do as they appears randomly.