BASS_FX 2.4.12.1

Started by (: JOBnik! :), 3 Dec '03 - 22:43

(: JOBnik! :)

#150
Hi ;D

Quote from: nadia on 24 Mar '05 - 09:361- does the BASS_FX_TempoGetSource returns a valid handle if the BASS_FX_TempoCreate was called using the BASS_FX_FREESOURCE flag? From the documentation I cannot find this information.

That  flag has nothing to do with the returned value, all it does is to check if the user wants BASS_FX to free the source handle as well when calling BASS_StreamFree function or not, i.e. not freeing the source handle, that has created using BASS_StreamCreateFile(..,BASS_STREAM_DECODE) function, so without that flag you'll have to do it by yourself ;)

i.e:
1. Creating a Tempo stream without BASS_FX_FREESOURCE will only free the handle created with BASS_FX_TempoCreate function.

2. Creating a Tempo stream using BASS_FX_FREESOURCE will free the handles created with BASS_StreamCreateFile and BASS_FX_TempoCreate as well ;)

Quote from: nadia on 24 Mar '05 - 09:362- if I call the BASS_FX_TempoGetSource without specifying BASS_FX_FREESOURCE flag, how will the original channel be deallocated?

Are you sure you wrote a right function? I think you meant to write about BASS_FX_TempoCreate? if so, check the explanations above ;)

BASS_FX_TempoGetSource returns the handle of the e.g: BASS_StreamCreateFile function.

@Chris, which effect are you using? :)

Have fun!

8) JOBnik! 8)

nadia

Hi JOBnik,  ;D

thanks for your answer: I was believing that calling BASS_FX_TempoCreate with BASS_FX_FREESOURCE flag would have caused an immediate free of the original stream decoding channel created using  BASS_StreamCreateFile: instead this flag simply tells to the future call to BASS_StreamFree function to free the original decoding channel and also the resampled channel? Have I understood correctly?  ;)

Kind Regards  ;D

Nadia

Chris

#152
 Hi JOBnik
BASS_FX_DSPFX_DAMP,

The curious is that the Crash will not come on the same File sometimes it will crash sometimes not...
After the Crash the Sound will hang in a Endless Loop (Playing the Last Buffers in a Endless Loop)
Greets Chris

I forget
i have no change made on the  Standard Parameters


MB_SOFT

Hi JOBnik,
hope you're fine now!!
I'm sorry to bother you with the same problem: i have some file sthat play totally silently when using BASS_FX_DSPFX_DAMP with 16 bit buffers.
Here is an exemple:
http://www.mbsoft.biz/download/radiojingle.mp3
If you try this file in a 16 bit buffer with the following parameters:
.fTarget = 0.96
.fQuiet = 0.01
.fRate = 0.05
.fGain = 1.0
.fDelay = 0.2
you'll hear only silence....
Note that just changing .fdelay to 0.3 it play fine....

Hope you have some time to check calculations in the DAMP source code...
Anyway thank you for your this great fx dll

Angel

in order to get the BPM of a file via bass_fx, does the stream has to be a decoding stream? or will a regular stream work aswell?

big_gun

Typically a decoding stream works. Don't worry, you can open the same file, once normal, and once for decoding at the same time...

Rick

big_gun

Oh, By The Way:

Bass for VB.NET and C# has been updated to reflect the changes in version 2.1.0.1 of Bass_FX.

Download it here http://www.un4seen.com/bass.html#addons

Angel

Quote from: big_gun on 26 Mar '05 - 07:59Typically a decoding stream works. Don't worry, you can open the same file, once normal, and once for decoding at the same time...

Rick

well,i don't want to use a decoding stream next to my normal stream if it isnt really needed, the old bpmf.dll had an example which i used, unfortunatly,using that causes a slight 'hang' in the system while the BPM is being calculated. Another decoding stream next to my normal stream means more resources (altho it wouldnt be much).Reading the bassfx help file,i come to the conclusion that i can get the bpm from a non decoding stream with 'BASS_FX_BPM_CallbackSet', but i migh be mistaken,the helpfile isnt really as clear as the bass helpfile is

(: JOBnik! :)

Hi ;D

Quote from: nadia on 24 Mar '05 - 10:23thanks for your answer: I was believing that calling BASS_FX_TempoCreate with BASS_FX_FREESOURCE flag would have caused an immediate free of the original stream decoding channel created using  BASS_StreamCreateFile: instead this flag simply tells to the future call to BASS_StreamFree function to free the original decoding channel and also the resampled channel? Have I understood correctly?  ;)

Well... think of it the other way around ;) if this flag would free the source handle, then you would hear silence, you know... ;)

You've understood correctly! ;)

Quote from: Chris on 24 Mar '05 - 10:30BASS_FX_DSPFX_DAMP,

The curious is that the Crash will not come on the same File sometimes it will crash sometimes not...
After the Crash the Sound will hang in a Endless Loop (Playing the Last Buffers in a Endless Loop)

Are you using some other effects as well, Tempo, Reverse or BPM? Because DynamicAMP has nothing to do with BASS_ChannelGetData(..) function. Please send me the dr. watson's debug file or the full debug info, and if you can please send a file that may reproduce the crash :)

Quote from: MB_SOFT on 24 Mar '05 - 12:57hope you're fine now!!

Thanks :) getting better :)

Quote from: MB_SOFT on 24 Mar '05 - 12:57I'm sorry to bother you with the same problem: i have some file sthat play totally silently when using BASS_FX_DSPFX_DAMP with 16 bit buffers.
Here is an exemple:
http://www.mbsoft.biz/download/radiojingle.mp3
If you try this file in a 16 bit buffer with the following parameters:
.fTarget = 0.96
.fQuiet = 0.01
.fRate = 0.05
.fGain = 1.0
.fDelay = 0.2
you'll hear only silence....
Note that just changing .fdelay to 0.3 it play fine....

Hope you have some time to check calculations in the DAMP source code...

As I've already said :) the file is playing fine here and the file before that. It plays fine with 16 and 32 bits.

I've made a loop that starts the sound from 6% and it raised to what I've choosed and no silence at all :)

My system is: Intel P4 3.0GHz, RealTek 7.1 (onboard) sound card, DirectX 9.0c, WinXP PRO SP2 with latests sound drivers... which system do you have?

Quote from: MB_SOFT on 24 Mar '05 - 12:57Anyway thank you for your this great fx dll

You're welcome and thank you and all who're using BASS_FX :)

Quote from: Angel on 26 Mar '05 - 11:42well,i don't want to use a decoding stream next to my normal stream if it isnt really needed, the old bpmf.dll had an example which i used, unfortunatly,using that causes a slight 'hang' in the system while the BPM is being calculated. Another decoding stream next to my normal stream means more resources (altho it wouldnt be much).Reading the bassfx help file,i come to the conclusion that i can get the bpm from a non decoding stream with 'BASS_FX_BPM_CallbackSet', but i migh be mistaken,the helpfile isnt really as clear as the bass helpfile is

1st of all you don't have to use the decoding channel for detecting the BPM, as you've found out you can use BASS_FX_BPM_CallbackSet(..) function. The decoding BPM check is good if you want to check the BPM of a file from that exact point to another with almost no time :) the other options Callback will only calculate the BPM from the last choosen seconds, e.g. you want to know a BPM every 10 (or else) seconds (you'll get a BPM after the seconds number you've choosed).
I'll see what kind of improvements can I add to the helpfile ;)

Quote from: big_gun on 26 Mar '05 - 07:59Oh, By The Way:

Bass for VB.NET and C# has been updated to reflect the changes in version 2.1.0.1 of Bass_FX.

Download it here http://www.un4seen.com/bass.html#addons

There're still some errors in APIs there ;) I'll send you the list of correction to do ;)

Thank you :)

Have fun!

8) JOBnik! 8)

MB_SOFT

#159
As I've already said  the file is playing fine here and the file before that. It plays fine with 16 and 32 bits.
I've made a loop that starts the sound from 6% and it raised to what I've choosed and no silence at all


Thank you for your reply and tests.
I'm surprised you was not able to reproduce the problem as i'm having the problem to all my users on very different hardware/os systems. Note that the problem occurs when starting play the file from the absolute begin position; if i seek the start position of 1 or 2 seconds then it play fine.
Here there is another "silent" file:
http://www.mbsoft.biz/download/introspot.mp3
I remarked that the problem occur with files having some gap on top.
Do you have any test application to run on my computer to check the problem?

Here the calls sequence on my application:
BASS_StreamCreateFile
BASS_StreamGetLength
BASS_ChannelBytes2Seconds
BASS_FX_DSP_Set
BASS_ChannelPlay

System:
Windows: XP Service Pack 2 2600
Pc Freq: 1534 Mhz - AuthenticAMD - 1 Cpu(s) - 0
Free Ram: 348 MB
DirectX version is: 9
Bass.dll version: 2. 1
BassFx.dll version: 2. 1
BASS_GetDeviceDescription: Periferica wave SB Live!
Latency is: 1 with a min buffer: 50
device driver: C:\WINDOWS\system32\drivers\emu10k1m.sys - 5.12.1.3300
Bass DLL buffer: 500
Bass DLL period is: 100

Irrational86

Quote from: MB_SOFT on 29 Mar '05 - 18:31I'm surprised you was not able to reproduce the problem as i'm having the problem to all my users on very different hardware/os systems. Note that the problem occurs when starting play the file from the absolute begin position; if i seek the start position of 1 or 2 seconds then it play fine.
I had this happen to me when I used the (AutoAmp) code that Ian posted on this board a long time ago. It is due to the amount of silence in the begining of the file. Since the concept of the AutoAmp is to reduce the volume even more when it is below certain level, it will keep reducing the Gain factor, making the factor so small, that to increase it to a normal (louder) volume takes time, or never happens...

The fix is to make some checks and not let the AmpGain go toooo low...

MB_SOFT

Hi Jobnik,
i sent you a private message with a link to a small application test that hopefully will demonstrate you the "silence" problem..

Let me know your results...

thank you
Maurizio

(: JOBnik! :)

Hi ;D

BASS_FX is updated to version 2.1.0.2 :)

The updates are:

2.1.0.2 - 07/05/2005
--------------------
* DSP:
  * Chorus: fixed a bug, that would convert stereo to mono.
  * Low Pass Filter: fixed a bug, that would convert stereo to mono.
  * DynamicAMP: another bug fix, that would sometimes cause a total silence.
  + Added:
    * A new effect: Distortion
    * DSPFX.TXT - a values to use with some effects, to achieve different
                           effect with the same one (not using other effect/s) :)

Have fun!

8) JOBnik! 8)

(: JOBnik! :)

#163
Hi ;D

1st of all I would like to say, that BASS_FX is 3 years old (from yesterday!) :)
And I would like to thank all BASS_FX users for using it :)

In a few days I'll release a new 2.1.0.3 version, that won't include any GPL code, so it will be for sure, that BASS_FX is usable in any commercial softwares.

Thanks a lot!

Have fun!

8) JOBnik! 8)

HarryHar

When I use a BASS_FX_TempoCreate stream, I can't seem to be able to do this

procedure TfrmPlayer.SetLoopSync;
begin
  NextLoopSync := BASS_ChannelSetSync(uBassFrame.aOutputChannel[fPlayerId], BASS_SYNC_ONETIME or BASS_SYNC_POS or BASS_SYNC_MIXTIME,BASS_ChannelSeconds2Bytes(uBassFrame.aOutputChannel[fPlayerId], LoopEnd / 1000), LoopEvent, Integer( Self ));
end;

procedure TfrmPlayer.MyLoopEvent(Sender: TObject);
begin
  if Looping then begin
    SetPosition( LoopStart );
    SetLoopSync;
  end;
end;
The program freezes. It looks like the SetPosition is not executed before I set the newsync pos, wich is still the current, so it locks up.

If I fall back to a standard Bass_stream, all works fine,

Any idea?

gr. Harold

Chris

Hi
Integer( Self )
Thats wrong must be
DWORD(self)
 
QuoteIf I fall back to a standard Bass_stream, all works fine

Please Show how you will create the tempo stream.....

and with which version you are working of the bass_fx.dll

Greets Chris


HarryHar

Hello chris,

Here's the code you requested.

function TBassFrame.Load(const aFilename : String ): Boolean;
var
  Flags : Integer;
  BassStream : HStream;
begin
  Flags := 0;
  if HasMulti then begin
    case MainOutputChannels of
      osFront  : Flags := BASS_SPEAKER_FRONT;
      osRear   : Flags := BASS_SPEAKER_REAR;
      osCentre : Flags := BASS_SPEAKER_CENLFE;
    end;
  end;

  if UseSetPos then
    Flags := Flags or BASS_MP3_SETPOS;

  if isFloat[ PlayerId ] then
    Flags := Flags or BASS_SAMPLE_FLOAT;

  BassStream := BASS_StreamCreateFile( False, Pchar( aFilename ),0,0, Flags or Bass_Stream_Decode);

  aOutputChannel[fPlayerId] := BASS_FX_TempoCreate( BassStream, Flags );
end;

I also found out that EndSyncs I use appear to happen buffersize miliseconds too soon, where buffersize is set using :

BASS_SetConfig(BASS_CONFIG_BUFFER, buffersize)
and buffersize = 3000 the syncpoint fires 3 seconden before the actual position in the stream. It's just Like it looks at the underlaying basschannel and not the tempo channel.

gr. Harold

Chris

#167
Hi

try this please
function TBassFrame.Load(const aFilename : String ): Boolean;
var
  Flags : Integer;
begin
  Flags := 0;
  if HasMulti then begin
    case MainOutputChannels of
      osFront  : Flags := BASS_SPEAKER_FRONT;
      osRear   : Flags := BASS_SPEAKER_REAR;
      osCentre : Flags := BASS_SPEAKER_CENLFE;
    end;
  end;

  if UseSetPos then
    Flags := Flags or BASS_MP3_SETPOS;

  if isFloat[ PlayerId ] then
    Flags := Flags or BASS_SAMPLE_FLOAT;

  aOutputChannel[fPlayerId] := BASS_StreamCreateFile( False, Pchar( aFilename ),0,0, Flags or Bass_Stream_Decode);
  if aOutputChannel[fPlayerId] = 0 then
  begin
     // Error Dedecting........the audiofile is not loaded
     exit;
  end;
   aOutputChannel[fPlayerId] := BASS_FX_TempoCreate( aOutputChannel, Flags or BASS_FX_FREESOURCE );
end;
Greets Chris



HarryHar

Hi Chris,

Sorry, doesn't make any difference.

How about the endsync problem? Maybe I need to be talking to the underlaying bassChannel?

gr. Harold

Chris

You will meant a notify if a channel has end ??
i'm using that in my aplication (also tempo,bass)
with the tempochannel
and its absolute accurate
Greets Chris

HarryHar

I hardly even use the End sync, the biggest problem I have is an SyncPos at let say 750 ms before the end of the song. If I use a buffer of 3000 ms then the position is fired at appx. 3700 ms beore the end of the song. Without using the Tempo channel all works flawless.

ps. Using Bass_FX.DLL 2.1.0.2 and Bass.DLL 2.1.0.5

gr. Harold

Chris

Hi
sorry I`m at this moment not at Home (repairing a PC from a Friend)
If I`m at home i will test that in a little demo
Greets Chris

Chris

#172
Hi
after testing here a little bit  try the follwing about the pos sync...

with the following i will became here absolute a perfect sync with tempo 

function BassGetLen : DWORD;
var
  SongLength: float;
  FloatLen: FLOAT;
begin
   SongLength := BASS_ChannelBytes2Seconds(chan, BASS_StreamGetLength(Chan));
   FloatLen := SongLength / (BASS_FX_TempoGetRateRatio(Chan));
   Result := round(1000 * FloatLen);
end;

SyncPosHandle := Bass_ChannelSetSync(Chan,BASS_SYNC_POS,
  BASS_ChannelSeconds2Bytes(Chan, (BassGetLen -
 (750 - BASS_GetConfig(BASS_CONFIG_BUFFER))) / 1000),@SyncPosProc,DWORD(self));

testfile1
testfile Len : 4:19.971
sync will occurs on 4:19.165

testfile2
testfile Len : 35:32.645
sync will occurs on 35:31.927

testfile3

testfile Len : 2:53.845
sync will occurs on 2:53.104

Remember tempo will resample so you must calculate the buffer additionally to your value where you want the sync

Greets Chris


HarryHar

Ok, looks good, i'll give it a try. But what if my syncpos is at 50 ms from the end (which happens a lot with mix CD's), and the buffersize is 250? Any idea what would happen? Or would it mean I can't have sync points beyond Filelength-configbuffer?

gr. Harold

nadia

Hi,  ;D

I found a strange behaviour; I load a sound that has a duration of 3 minutes and 31 seconds; if I call:

BASS_FX_TempoSet (hStream, 0.0f, -1, -100.0f)

the loaded song duration grows to 3 minutes and 33 seconds: why? 0.0 shouldn't cause a change...  ???

Regards  ;D

Nadia