Author Topic: BASS_FX 2.4.12.1  (Read 839539 times)

p.abd

  • Posts: 33
Re: BASS_FX 2.4.6
« Reply #500 on: 19 Aug '10 - 13:30 »
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! :)

  • Posts: 1080
Re: BASS_FX 2.4.6
« Reply #501 on: 22 Aug '10 - 15:08 »
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.

Hello 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:

Quote
Time-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

  • Posts: 33
Re: BASS_FX 2.4.6
« Reply #502 on: 22 Aug '10 - 18:15 »
Saluto!

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

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

  • Posts: 25
Re: BASS_FX 2.4.6
« Reply #503 on: 30 Aug '10 - 12:10 »
hello,

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

p.abd

  • Posts: 33
Re: BASS_FX 2.4.6
« Reply #504 on: 30 Aug '10 - 15:54 »
I'm still needed an advice regarding the WSOLA algorithms in BASS_FX.

(: JOBnik! :)

  • Posts: 1080
Re: BASS_FX 2.4.6
« Reply #505 on: 1 Sep '10 - 13:01 »
Hi ;D

hello,

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.

I'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

  • Posts: 485
Re: BASS_FX 2.4.6
« Reply #506 on: 7 Sep '10 - 12:05 »
Why BASS_FX_BPM_DecodeGet always returns zero?

I use this code to get average BPM of a file:
Code: [Select]
  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! :)

  • Posts: 1080
Re: BASS_FX 2.4.6
« Reply #507 on: 8 Sep '10 - 12:03 »
Hi ;D

Why BASS_FX_BPM_DecodeGet always returns zero?

I use this code to get average BPM of a file:
Code: [Select]
  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

  • Posts: 485
Re: BASS_FX 2.4.6
« Reply #508 on: 8 Sep '10 - 16:10 »
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

  • Posts: 137
Re: BASS_FX 2.4.6
« Reply #509 on: 8 Sep '10 - 16:27 »
Code: [Select]
  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

  • Posts: 2216
Re: BASS_FX 2.4.6
« Reply #510 on: 8 Sep '10 - 20:28 »
Are you shure that your code is correct??


Code: [Select]
 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
Code: [Select]
 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

« Last Edit: 8 Sep '10 - 20:35 by Chris »

fmcoder

  • Posts: 485
Re: BASS_FX 2.4.6
« Reply #511 on: 9 Sep '10 - 10:58 »
The BPMCallback function:
Code: [Select]
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! :)

  • Posts: 1080
Re: BASS_FX 2.4.6
« Reply #512 on: 10 Sep '10 - 12:26 »
Hi ;D

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

fmcoder

  • Posts: 485
Re: BASS_FX 2.4.6
« Reply #513 on: 10 Sep '10 - 19:22 »
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

  • Posts: 33
Re: BASS_FX 2.4.6
« Reply #514 on: 21 Sep '10 - 17:37 »
Artur, are there any news from Olli?

AniPhoneDev

  • Guest
Re: BASS_FX 2.4.6
« Reply #515 on: 22 Sep '10 - 22:06 »
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

  • Posts: 33
Re: BASS_FX 2.4.6
« Reply #516 on: 23 Sep '10 - 04:11 »
AniPhoneDev
Perhaps, these guys (JOBnik and the author of SoundTouch) have some private agreement. Just a thought.

Jonathan

  • Guest
Re: BASS_FX 2.4.6
« Reply #517 on: 24 Sep '10 - 10:54 »
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! :)

  • Posts: 1080
Re: BASS_FX 2.4.6
« Reply #518 on: 28 Sep '10 - 10:34 »
Hi ;D

Artur, are there any news from Olli?

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

Quote
Hello 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

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.  ??? ??? ???

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

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.

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

  • Posts: 4
Re: BASS_FX 2.4.6
« Reply #519 on: 30 Sep '10 - 20:16 »
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)
Code: [Select]
  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! :)

  • Posts: 1080
Re: BASS_FX 2.4.6
« Reply #520 on: 1 Oct '10 - 11:26 »
Hi ;D

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)
Code: [Select]
  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

  • Posts: 4
Re: BASS_FX 2.4.6
« Reply #521 on: 1 Oct '10 - 12:35 »
Ok, thank you. But is my value of Gain is right?

Jonathan

  • Guest
Re: BASS_FX 2.4.6
« Reply #522 on: 1 Oct '10 - 19:50 »
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.

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:
Code: [Select]
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:
Code: [Select]
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! :)

  • Posts: 1080
Re: BASS_FX 2.4.6
« Reply #523 on: 2 Oct '10 - 11:59 »
Hi ;D

Ok, 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.

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.

Quote
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.

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

To init:
Code: [Select]
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:
Code: [Select]
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:
https://www.un4seen.com/forum/?topic=11377.msg79195#msg79195

Skyer

  • Posts: 4
Re: BASS_FX 2.4.6
« Reply #524 on: 4 Oct '10 - 16:19 »
(: 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?