BASS_FX 2.4.12.1

Started by (: JOBnik! :),

p.abd

Artur,
Great! I'll wait for the news from you.

Ian,
Why you did not announce the BASS_FX update on the main page?

(: JOBnik! :)

Hi ;D

Can you please test the latest BASS_FX 2.4.6.
It has been updated to the latest SoundTouch version 1.5.1pre, which has some Tempo algorithm improvements.

Quote from: p.abdHello Artur!

Is there any way to enhance output quality on time-streching with the help of BASS_FX? In my tests it makes some artifacts on decreasing the tempo by 10 percents. I read that BASS_FX utilizes the SoundTouch library for time stretch, and the last one uses WSOLA-like algorithms:

QuoteTime-stretching means changing the audio stream duration without affecting it's pitch. SoundTouch uses WSOLA-like time-stretching routines that operate in the time domain. Compared to sample rate transposing, time-stretching is a much heavier operation and also requires a longer processing "window" of sound samples used by the processing algorithm, thus increasing the algorithm input/output latency. Typical i/o latency for the SoundTouch time-stretch algorithm is around 100 ms.
Source: http://www.surina.net/soundtouch/README.html

And I heard that the WSOLA algorithm is the best if the quality is the main requirement. Is there a flag to enable these WSOLA algorithms?

PS: I'm using BASS_FX 2.4.5 with regular/initial options.

p.abd

Saluto!

Thanks for your time - I checked it out, but artifacts are still there (unfortunately  :()

Quote from: (: JOBnik! :)Hi ;D

Can you please test the latest BASS_FX 2.4.6.
It has been updated to the latest SoundTouch version 1.5.1pre, which has some Tempo algorithm improvements.

Valerio

hello,

could you please add a simple userdata field to pass to the bpmprocessproc?

p.abd

I'm still needed an advice regarding the WSOLA algorithms in BASS_FX.

(: JOBnik! :)

Hi ;D

Quote from: Valeriohello,

could you please add a simple userdata field to pass to the bpmprocessproc?

Yep, it could be added, but it would require an API change for BPMPROCESSPROC callback...
I can send you an update with this new param, but the changes will have to wait for the 2.5 version.
PM me your e-mail address.

Quote from: p.abdI'm still needed an advice regarding the WSOLA algorithms in BASS_FX.

I've sent an e-mail to Olli and waiting for his reply :)

fmcoder

Why BASS_FX_BPM_DecodeGet always returns zero?

I use this code to get average BPM of a file:
  C := BASS_StreamCreateFile(False, PChar(FN), 0, 0, BASS_UNICODE or BASS_STREAM_DECODE);
  L := BASS_ChannelBytes2Seconds(C, BASS_ChannelGetLength(C, 0));
  Bpm := BASS_FX_BPM_DecodeGet(C, 0, L, 0, BASS_FX_FREESOURCE, BPMCallback);
the resulting "Bpm" is zero :(

Also  the help file states "flags BASS_FX_BPM_xxx " but I didn't find the description of those flags...

(: JOBnik! :)

Hi ;D

Quote from: fmcoderWhy BASS_FX_BPM_DecodeGet always returns zero?

I use this code to get average BPM of a file:
  C := BASS_StreamCreateFile(False, PChar(FN), 0, 0, BASS_UNICODE or BASS_STREAM_DECODE);
  L := BASS_ChannelBytes2Seconds(C, BASS_ChannelGetLength(C, 0));
  Bpm := BASS_FX_BPM_DecodeGet(C, 0, L, 0, BASS_FX_FREESOURCE, BPMCallback);
the resulting "Bpm" is zero :(

Also  the help file states "flags BASS_FX_BPM_xxx " but I didn't find the description of those flags...

For any file?
Please send me some file to test.

I'll add more info in docs for these flags :)

fmcoder

For example, this one: http://www.pilotstudio.ru/Track%2001.mp3
I tested about 5 tracks (from different artists) and it returns zero.
It's very strange, as BPM of the files is definitely much than 0.

Art60

Quote from: fmcoder  Bpm := BASS_FX_BPM_DecodeGet(C, 0, L, 0, BASS_FX_FREESOURCE, BPMCallback);
the resulting "Bpm" is zero :(

Just a question, are your Bpm variable and BPMCallback correct ?

Chris

#510
Are you shure that your code is correct??

Quote from: fmcoder  C := BASS_StreamCreateFile(False, PChar(FN), 0, 0, BASS_UNICODE or BASS_STREAM_DECODE);
  L := BASS_ChannelBytes2Seconds(C, BASS_ChannelGetLength(C, 0));
  Bpm := BASS_FX_BPM_DecodeGet(C, 0, L, 0, BASS_FX_FREESOURCE, BPMCallback);
the resulting "Bpm" is zero :(

should be
 C := BASS_StreamCreateFile(False, PChar(FN), 0, 0, BASS_UNICODE or BASS_STREAM_DECODE);
  L := BASS_ChannelBytes2Seconds(C, BASS_ChannelGetLength(C, 0));
  Bpm := BASS_FX_BPM_DecodeGet(C, 0, L, 0, BASS_FX_FREESOURCE, @BPMCallback);


How does your BPMPROCESSPROC look like??

Chris


fmcoder

The BPMCallback function:
procedure BPMCallback(chan: DWORD; percent: FLOAT); stdcall;
begin
  Form2.ProgressBar1.Position := Trunc(percent);
  Application.ProcessMessages;
end;

Adding "@" before the function name changed nothing. Even if I pass "nil" instead of function, there's no difference.
Also, I found some tracks, where BPM is not zero (using my code).
But, the main question remains, why does it return "0" for some tracks? Zero BPM should be only when entire file is a silence, isn't it?

Art60, yes, the "BPM" variable type is Extended so it won't be a problem to hold the return value.

(: JOBnik! :)

Hi ;D

Yep, the mp3 file return 0 BPM...
I'll see what I can do to solve this issue.

fmcoder

I have many other mp3's which return 0 Bpm. I'll send them to you if you need it for tests. Thanks.

p.abd

Artur, are there any news from Olli?

AniPhoneDev

So, BASS_FX runs on iOS and it includes SoundTouch? What about the LGPL licence of SoundTouch? As far as I know LGPL is a no go for iOS developers except if they want to release the source code of their app.  ??? ??? ???

p.abd

AniPhoneDev
Perhaps, these guys (JOBnik and the author of SoundTouch) have some private agreement. Just a thought.

Jonathan

Can you use BASS_FX_TempoCreate with a dummy stream on the iPhone?  When I try to do it I get BASS_ERROR_NOTAVAIL from the call to BASS_FX_TempoCreate.


(: JOBnik! :)

Hi ;D

Quote from: p.abdArtur, are there any news from Olli?

Here's an aswer that Olli has sent to me:

QuoteHello Arthur,

Sorry for slow response but I've been fully utilized elsewhere.

For the question; simple answer is that there isn't a simple answer - time stretching is rather brutal operation and outcome is always compromise of variety of factors. For certain kind of audio such as speech or single-instrument sound it'd be possible to tune algorithm parameters differently, but then again that would produce worse outcome with yet another kind of sound.

best regards, Olli

Quote from: AniPhoneDevSo, BASS_FX runs on iOS and it includes SoundTouch? What about the LGPL licence of SoundTouch? As far as I know LGPL is a no go for iOS developers except if they want to release the source code of their app.  ??? ??? ???

I'm still waiting for a confirmation e-mail from Olli.

Quote from: JonathanCan you use BASS_FX_TempoCreate with a dummy stream on the iPhone?  When I try to do it I get BASS_ERROR_NOTAVAIL from the call to BASS_FX_TempoCreate.

BASS_FX_TempoCreate function should get a decoded stream, i.e: created using BASS_STREAM_DECODE flag. Please show you code to see where's the problem.

Skyer

Hello guys. Now I developing an audio player and I interfere with some problems with equalizer. When I use profile Full Bass & Treble. May be I use a wrong value of bandwidth? I do 18-line eqalizer with next frequencis
31,63,125,170,250,310,600,1000,1500,2000,3000,4000,6000,8000,10000,12000,14000,16000 Hz and
write this code (I use Delphi)
  for i := 1 to BandsCount do begin
    fx[i] := BASS_ChannelSetFX(Channel, BASS_FX_DX8_PARAMEQ, 1);
    BASS_FXGetParameters(fx[i], @parameq);
    parameq.fCenter := parameq_bands[i];//parameq_bands - array with frequencis values
    parameq.fBandwidth:=1.5;
    parameq.fGain:=0;
    BASS_FXSetParameters(fx[i], @parameq);
  end;

Please, help me :)

(: JOBnik! :)

Hi ;D

Quote from: SkyerHello guys. Now I developing an audio player and I interfere with some problems with equalizer. When I use profile Full Bass & Treble. May be I use a wrong value of bandwidth? I do 18-line eqalizer with next frequencis
31,63,125,170,250,310,600,1000,1500,2000,3000,4000,6000,8000,10000,12000,14000,16000 Hz and
write this code (I use Delphi)
  for i := 1 to BandsCount do begin
    fx[i] := BASS_ChannelSetFX(Channel, BASS_FX_DX8_PARAMEQ, 1);
    BASS_FXGetParameters(fx[i], @parameq);
    parameq.fCenter := parameq_bands[i];//parameq_bands - array with frequencis values
    parameq.fBandwidth:=1.5;
    parameq.fGain:=0;
    BASS_FXSetParameters(fx[i], @parameq);
  end;

Please, help me :)

BASS_FX_DX8_PARAMEQ won't support frequencies below 80Hz, to support them please use BASS_FX add-on with BASS_FX_BFX_PEAKEQ effect ;)

Skyer

Ok, thank you. But is my value of Gain is right?

Jonathan

Quote from: JonathanCan you use BASS_FX_TempoCreate with a dummy stream on the iPhone?  When I try to do it I get BASS_ERROR_NOTAVAIL from the call to BASS_FX_TempoCreate.

BASS_FX_TempoCreate function should get a decoded stream, i.e: created using BASS_STREAM_DECODE flag. Please show you code to see where's the problem.
[/quote]

Sure thing!  Thanks for getting back to me.. here's what I'm doing:

To init:
BASS_Init(0, 44100, 0, NULL, NULL);
HSTREAM fx_stream = BASS_StreamCreate(44100, 1, BASS_STREAM_DECODE, STREAMPROC_DUMMY, NULL);

// Then I create the resampled stream
fx_stream = BASS_FX_TempoCreate(fx_stream, BASS_STREAM_DECODE);

// Change the pitch
BASS_ChannelSetAttribute(fx_stream, BASS_ATTRIB_TEMPO_PITCH, 2)

Then in my decoding loop:
BASS_ChannelGetData(fx_stream, abl->mBuffers[0].mData, abl->mBuffers[0].mDataByteSize)

The result is silence.  If I remove the ChannelGetData function I hear the unchanged sound.  If I replace with a BASS effect (ie: reverb) it works, but anything driven by BASS_FX yields silence.

Any ideas?

(: JOBnik! :)

Hi ;D

Quote from: SkyerOk, thank you. But is my value of Gain is right?

fGain value is in dB -15....0....+15, when 0 the filter won't change sound for specific band.

Quote from: Jonathan
Quote from: JonathanCan you use BASS_FX_TempoCreate with a dummy stream on the iPhone?  When I try to do it I get BASS_ERROR_NOTAVAIL from the call to BASS_FX_TempoCreate.

QuoteBASS_FX_TempoCreate function should get a decoded stream, i.e: created using BASS_STREAM_DECODE flag. Please show you code to see where's the problem.

Sure thing!  Thanks for getting back to me.. here's what I'm doing:

To init:
BASS_Init(0, 44100, 0, NULL, NULL);
HSTREAM fx_stream = BASS_StreamCreate(44100, 1, BASS_STREAM_DECODE, STREAMPROC_DUMMY, NULL);

// Then I create the resampled stream
fx_stream = BASS_FX_TempoCreate(fx_stream, BASS_STREAM_DECODE);

// Change the pitch
BASS_ChannelSetAttribute(fx_stream, BASS_ATTRIB_TEMPO_PITCH, 2)

Then in my decoding loop:
BASS_ChannelGetData(fx_stream, abl->mBuffers[0].mData, abl->mBuffers[0].mDataByteSize)

The result is silence.  If I remove the ChannelGetData function I hear the unchanged sound.  If I replace with a BASS effect (ie: reverb) it works, but anything driven by BASS_FX yields silence.

Any ideas?

Please read in this thread for an answer:
http://www.un4seen.com/forum/?topic=11377.msg79195#msg79195

Skyer

(: JOBnik! :) : Sorry, I confused a Gain value with Bandwidth. I wanted to ask, is my value of Bandwidth normal? What value of bandwidth is better?