Author Topic: BASS_FX 2.4.12.1  (Read 844173 times)

Chris

  • Posts: 2217
Re: BASS_FX 2.4.10.1
« Reply #625 on: 7 Apr '14 - 21:10 »
i did here a quick test in delphi xe5 working fine with x86 and working fine with x64.
looks like something in your code is wrong?
 show the relevant tempo code so maybe that make things clearer

smmsamm

  • Posts: 6
Re: BASS_FX 2.4.10.1
« Reply #626 on: 8 Apr '14 - 19:16 »
i did here a quick test in delphi xe5 working fine with x86 and working fine with x64.
looks like something in your code is wrong?
 show the relevant tempo code so maybe that make things clearer


I have used the demo source code and checked it again

I load a mp3 in chan
****************************
    chan := BASS_StreamCreateFile(FALSE, pChar(filename), 0, 0,
      Bass.BASS_POS_BYTE
{$IFDEF UNICODE} or BASS_UNICODE {$ENDIF});
    if chan = 0 then
    begin
      chan := BASS_MusicLoad(FALSE, pChar(filename), 0, 0, BASS_MUSIC_RAMPS or
        BASS_MUSIC_POSRESET or BASS_MUSIC_PRESCAN
{$IFDEF UNICODE} or BASS_UNICODE {$ENDIF}, 1);
      if (chan = 0) then
      begin
        ErrorPop('Can''t play file');
        Exit;
      end;
    end;
****************************

and with changing the track bar onchanging:
****************************
  If (BASS_ChannelIsActive(chan) = 0) Then
    Exit;

  BASS_ChannelSetAttribute(chan, BASS_ATTRIB_TEMPO, tbTempo.position);

****************************
it runs BASS_ChannelSetAttribute but it does not make any effect.

Chris

  • Posts: 2217
Re: BASS_FX 2.4.10.1
« Reply #627 on: 8 Apr '14 - 20:52 »
I don`t see there a Tempostream!!
shouldbe something like this

 
Code: [Select]
chan := BASS_StreamCreateFile(FALSE, pChar(filename), 0, 0,BASS_STREAM_DECODE or Bass.BASS_POS_BYTE or BASS_UNICODE );
 chan := BASS_FX_TempoCreate(chan, BASS_SAMPLE_LOOP or BASS_FX_FREESOURCE);

smmsamm

  • Posts: 6
Re: BASS_FX 2.4.10.1
« Reply #628 on: 8 Apr '14 - 21:13 »
I don`t see there a Tempostream!!
shouldbe something like this

 
Code: [Select]
chan := BASS_StreamCreateFile(FALSE, pChar(filename), 0, 0,BASS_STREAM_DECODE or Bass.BASS_POS_BYTE or BASS_UNICODE );
 chan := BASS_FX_TempoCreate(chan, BASS_SAMPLE_LOOP or BASS_FX_FREESOURCE);

Oh excuse me I have tested it before:

    // creating stream
    chan := BASS_StreamCreateFile(FALSE, pChar(filename), 0, 0,
      Bass.BASS_POS_BYTE
{$IFDEF UNICODE} or BASS_UNICODE {$ENDIF});
    if chan = 0 then
    begin
      chan := BASS_MusicLoad(FALSE, pChar(filename), 0, 0, BASS_MUSIC_RAMPS or
        BASS_MUSIC_POSRESET or BASS_MUSIC_PRESCAN
{$IFDEF UNICODE} or BASS_UNICODE {$ENDIF}, 1);
      if (chan = 0) then
      begin
        ErrorPop('Can''t play file');
        Exit;
      end;
    end;
    // create a new stream - decoded & resampled
    chan := BASS_FX_TempoCreate(chan, BASS_SAMPLE_LOOP Or BASS_FX_FREESOURCE);
    If (chan = 0) then
    begin
      Error('Couldnt create a resampled stream!');
      BASS_StreamFree(chan);
      Exit;
    end;

but chan value will be 0 and application will exit
when I debug before line:
    chan := BASS_FX_TempoCreate(chan, BASS_SAMPLE_LOOP Or BASS_FX_FREESOURCE);
the chan has a value like 2934456234 but after the BASS_FX_TempoCreate the chan value will be 0

Chris

  • Posts: 2217
Re: BASS_FX 2.4.10.1
« Reply #629 on: 8 Apr '14 - 21:53 »
 
Quote
// creating stream
    chan := BASS_StreamCreateFile(FALSE, pChar(filename), 0, 0,
      Bass.BASS_POS_BYTE
{$IFDEF UNICODE} or BASS_UNICODE {$ENDIF});

must be
  chan := BASS_StreamCreateFile(FALSE, pChar(filename), 0, 0, Bass.BASS_POS_BYTE or BASS_UNICODE or BASS_STREAM_DECODE);

smmsamm

  • Posts: 6
Re: BASS_FX 2.4.10.1
« Reply #630 on: 8 Apr '14 - 22:07 »
Quote
// creating stream
    chan := BASS_StreamCreateFile(FALSE, pChar(filename), 0, 0,
      Bass.BASS_POS_BYTE
{$IFDEF UNICODE} or BASS_UNICODE {$ENDIF});

must be
  chan := BASS_StreamCreateFile(FALSE, pChar(filename), 0, 0, Bass.BASS_POS_BYTE or BASS_UNICODE or BASS_STREAM_DECODE);

I changed and
Again chan has value 0 after BASS_FX_TempoCreate(chan, BASS_SAMPLE_LOOP Or BASS_FX_FREESOURCE);

And I checked it with different mp3 with different bitrate and some wav but all of the time chan became to 0.
« Last Edit: 8 Apr '14 - 22:17 by smmsamm »

Chris

  • Posts: 2217
Re: BASS_FX 2.4.10.1
« Reply #631 on: 9 Apr '14 - 00:43 »
did you make a  BASS_FX_GetVersion() Call ??
by the way which Delphi Version?
If this will not help show me the complete code .

smmsamm

  • Posts: 6
Re: BASS_FX 2.4.10.1
« Reply #632 on: 9 Apr '14 - 12:40 »
did you make a  BASS_FX_GetVersion() Call ??
by the way which Delphi Version?
If this will not help show me the complete code .
thank you for your kindly answer,
My bass_fx.dll had problem,
Now it works perfect.

aybe

  • Posts: 162
Re: BASS_FX 2.4.10.1
« Reply #633 on: 1 May '14 - 20:49 »
Hi !

There's a slight issue while trying to free BassFx when using a 64-bit process, it will never succeed.

Whether using BassFx.FreeMe or Utils.LIBFreeLibrary it always return false.

Sample to reproduce the error :

Code: [Select]
        private static void Main(string[] args)
        {
            bool b = Bass.LoadMe();
            bool bassInit = Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);
            int libLoadLibrary = Utils.LIBLoadLibrary("bass_fx.dll");
            bool libFreeLibrary = Utils.LIBFreeLibrary(libLoadLibrary);
            bool loadMe = BassFx.LoadMe();
            bool freeMe = BassFx.FreeMe();
            bool me = Bass.FreeMe();
        }

Thank you  :D

norbert

  • Posts: 135
Re: BASS_FX 2.4.10.1
« Reply #634 on: 2 May '14 - 13:13 »
I'm trying to execute the android Reverse demo on my real devices , but the app just crashes with error:

Java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "__clzsi2" referenced by "libbass_fx.so"...

In my project I have a armeabi-v7a folder with libbbass.so and libbbass_fx.so.

I'm also wondering why I can't find  these calls:

BASS.BASS_PluginLoad(nativeLibDir + "/libbass_fx.so", 0) and also not BASS_FX.GetVersion()  in the Reverse.java code ?
But even when I add these calls the above error occurrs... ???

BenMaas

  • Posts: 10
Re: BASS_FX 2.4.10.1
« Reply #635 on: 8 Aug '14 - 18:15 »
I wanted to ask politly if there are currently updates of BassFX in progress. I haven't implemented it yet and did some other work on my engine.
Just want to know if it's worth to wait a bit longer. (freeverb like reverb and an option to wait for effect tails would be great)

Regards, Ben.

(: JOBnik! :)

  • Posts: 1080
Re: BASS_FX 2.4.10.1
« Reply #636 on: 8 Aug '14 - 23:48 »
Hi ;D

Here's the latest beta to test (Win32 and Win64), it includes "Freeverb" effect and C/C++ API with example.
http://www.jobnik.net/files/beta/bass_fx24109-beta.zip

I guess on next week I'll release it as final 2.4.11 version for all platforms.

Changes in this release:
* BASS_FX:
   * Fixed an issue on OSX (now it's "@loader_path" instead of "@executable_path")
   * Tempo/Reverse fixed a thread-safety crash.
   * Tempo/Reverse added CTYPE info for these streams.
   * Android, added "x86" architecture support.
   * iOS, added "arm64" architecture support.

* Tempo:
   * Updated to latest SoundTouch library version 1.8.0
   * Fixed a crash when using syncs on tempo, as described in this thread: https://www.un4seen.com/forum/?topic=15708.0
   * Added 3 interpolation algorithms to set using BASS_FX_TEMPO_ALGO_XXX flags (BASS_FX_TempoCreate):
      * BASS_FX_TEMPO_ALGO_LINEAR
      * BASS_FX_TEMPO_ALGO_CUBIC   (default)
      * BASS_FX_TEMPO_ALGO_SHANNON

* DSP:
   * Fixed a bug in BASS_FX_BFX_VOLUME_ENV effect with the "bFollow" option on mobile devices,
     as described in this thread https://www.un4seen.com/forum/?topic=15866
   * Added new effects:
     * BASS_FX_BFX_PITCHSHIFT, that uses FFT for its pitch shifting while maintaining duration.
     * BASS_FX_BFX_FREEVERB, a reverb effect.
« Last Edit: 26 Jul '21 - 18:28 by (: JOBnik! :) »

BenMaas

  • Posts: 10
Re: BASS_FX 2.4.10.1
« Reply #637 on: 9 Aug '14 - 14:26 »
freaking nice :)

Renegade

  • Posts: 160
Re: BASS_FX 2.4.10.1
« Reply #638 on: 22 Aug '14 - 13:52 »
The bass_fx24.zip file seems to be corrupt. I've tried a couple archivers, and neither work on the file.

Size: 253 KB (259,908 bytes)

The file starts:

50 4B (PK)

So, that's correct.

(: JOBnik! :)

  • Posts: 1080
Re: BASS_FX 2.4.10.1
« Reply #639 on: 22 Aug '14 - 19:40 »
Hi ;D

Please try again, the website was down for a few minutes today :)

Renegade

  • Posts: 160
Re: BASS_FX 2.4.10.1
« Reply #640 on: 23 Aug '14 - 04:40 »
Hi ;D

Please try again, the website was down for a few minutes today :)

Still no love. Same error. :(

I can download it no problem - I just can't extract anything.

(: JOBnik! :)

  • Posts: 1080
Re: BASS_FX 2.4.10.1
« Reply #641 on: 24 Aug '14 - 10:44 »
Hi ;D

Please try downloading with different browser.
I myself tried with Chrome and IE and could extract without any problem.
Maybe your antivirus is blocking it?

victor

  • Posts: 137
Re: BASS_FX 2.4.10.1
« Reply #642 on: 29 Aug '14 - 19:11 »
Here's the latest beta to test (Win32 and Win64), it includes "Freeverb" effect and C/C++ API with example.
http://www.jobnik.org/files/beta/bass_fx24109-beta.zip

I guess on next week I'll release it as final 2.4.11 version for all platforms.
when will you release the 2.4.11?
Could you please make a download with an OSX beta?

Thanks.

devid1988

  • Posts: 47
Re: BASS_FX 2.4.10.1
« Reply #643 on: 29 Aug '14 - 20:39 »
Hi  ;D
Works well with me
  But how does it work on Delphi

freeverb

Thank you very much


(: JOBnik! :)

  • Posts: 1080
Re: BASS_FX 2.4.11
« Reply #644 on: 1 Sep '14 - 23:53 »
Hi ;D

there's now version 2.4.11 is released

2.4.11 - 02/09/2014
* BASS_FX:
   * Fixed an issue on OSX (The Xcode project's "Installation Directory" setting set to "@loader_path" instead of "@executable_path").
   * Tempo/Reverse fixed a thread-safety crash.
   * Tempo/Reverse added CTYPE info for these streams.
   * Android, added "x86" architecture support (some effects are buggy, will be fixed soon).
   * iOS, added "arm64" architecture support.
   * Fixed Delphi/Pascal unit by changing "FLOAT" to "Single".
   * Added C/C++ "freeverb" example.

* Tempo:
   * Updated to latest SoundTouch library version 1.8.0
   * Fixed a crash when using syncs on tempo, as described in this thread: https://www.un4seen.com/forum/?topic=15708.0
   * Added 3 interpolation algorithms to set using BASS_FX_TEMPO_ALGO_XXX flags (BASS_FX_TempoCreate):
      * BASS_FX_TEMPO_ALGO_LINEAR
      * BASS_FX_TEMPO_ALGO_CUBIC   (default)
      * BASS_FX_TEMPO_ALGO_SHANNON

* DSP:
   * Fixed a bug in BASS_FX_BFX_VOLUME_ENV effect with the "bFollow" option on mobile devices,
     as described in this thread https://www.un4seen.com/forum/?topic=15866
   * Added new effects:
     * BASS_FX_BFX_PITCHSHIFT, that uses FFT for its pitch shifting while maintaining duration.
     * BASS_FX_BFX_FREEVERB, a reverb effect.

BenMaas

  • Posts: 10
Re: BASS_FX 2.4.11
« Reply #645 on: 2 Sep '14 - 15:35 »
Hi.

I think the Delphi version of bass_fx.pas has some minor mistakes.

   // Freeverb
const
   BASS_BFX_FREEVERB_MODE_FREEZE = 1;

type
   BASS_BFX_FREEVERB = record
      fDryMix: Single;                 // dry (unaffected) signal mix            [0........1], def. 0
      fWetMix: Single;                 // wet (affected) signal mix            [0........3], def. 1.0f
      fRoomSize: Single;               // room size                        [0........1], def. 0.5f
      fDamp: Single;                   // damping                           [0........1], def. 0.5f
      fWidth: Single;                  // stereo width                        [0........1], def. 1
      lMode: DWORD;                   // 0 or BASS_BFX_FREEVERB_MODE_FREEZE, def. 0 (no freeze)
      lChannel: Integer;              // BASS_BFX_CHANxxx flag/s
   end;

Also :

   // tempo algorithm flags
   BASS_FX_TEMPO_ALGO_LINEAR  = $200 ;      
   BASS_FX_TEMPO_ALGO_CUBIC   = $400  ;            // default
   BASS_FX_TEMPO_ALGO_SHANNON = $800 ;

Red stuff was missing.

BenMaas

  • Posts: 10
Re: BASS_FX 2.4.11
« Reply #646 on: 2 Sep '14 - 19:34 »
hi again.

Some posts earlier Ian @ Un4seen posted a way to add silent padding to a sample. Since i am a delphi user and never got into C i have a bit trouble to convert it. Would be really nice if someone could help me.

Code: [Select]
decoder=BASS_StreamCreateFile(FALSE, filename, 0, 0, BASS_STREAM_DECODE); // create decoder for audio file
BASS_CHANNELINFO ci;
BASS_ChannelGetInfo(decoder, &ci); // get sample format
output=BASS_StreamCreate(ci.freq, ci.chans, ci.flags&~BASS_STREAM_DECODE, StreamProc, 0); // create stream to play decoded data + silent padding
padding=BASS_ChannelSeconds2Bytes(output, paddingseconds); // length of silent padding
BASS_ChannelPlay(output, 0); // start the output

...

DWORD CALLBACK StreamProc(HSTREAM handle, void *buffer, DWORD length, void *user)
{
int r=BASS_ChannelGetData(decoder, buffer, length); // get data from the decoder
if (r<0 || !BASS_ChannelIsActive(decoder)) { // end of file, add padding...
if (r<0) r=0;
int c=min(length-r, padding); // amount of padding to add
memset(((BYTE*)buffer)+r, 0, c); // add the padding
r+=c;
padding-=c; // decrease padding counter
if (!padding) r|=BASS_STREAMPROC_END; // no more padding, end of stream
}
return r;
}

I know most of the equivalent syntax but i don't know what the counterpart for memset is.

(: JOBnik! :)

  • Posts: 1080
Re: BASS_FX 2.4.11
« Reply #647 on: 2 Sep '14 - 19:52 »
Hi ;D

Thanks, Delphi/Pascal unit is fixed now :)

Hi.

I think the Delphi version of bass_fx.pas has some minor mistakes.

   // Freeverb
const
   BASS_BFX_FREEVERB_MODE_FREEZE = 1;

type
   BASS_BFX_FREEVERB = record
      fDryMix: Single;                 // dry (unaffected) signal mix            [0........1], def. 0
      fWetMix: Single;                 // wet (affected) signal mix            [0........3], def. 1.0f
      fRoomSize: Single;               // room size                        [0........1], def. 0.5f
      fDamp: Single;                   // damping                           [0........1], def. 0.5f
      fWidth: Single;                  // stereo width                        [0........1], def. 1
      lMode: DWORD;                   // 0 or BASS_BFX_FREEVERB_MODE_FREEZE, def. 0 (no freeze)
      lChannel: Integer;              // BASS_BFX_CHANxxx flag/s
   end;

Also :

   // tempo algorithm flags
   BASS_FX_TEMPO_ALGO_LINEAR  = $200 ;      
   BASS_FX_TEMPO_ALGO_CUBIC   = $400  ;            // default
   BASS_FX_TEMPO_ALGO_SHANNON = $800 ;

Red stuff was missing.

devid1988

  • Posts: 47
Re: BASS_FX 2.4.11
« Reply #648 on: 3 Sep '14 - 10:21 »
Thank you very much
It works successfully


 ;D
« Last Edit: 3 Sep '14 - 10:33 by devid1988 »

BenMaas

  • Posts: 10
Re: BASS_FX 2.4.11
« Reply #649 on: 5 Sep '14 - 22:30 »
Effecttails for Delphi users :

I managed to get Ians example making effecttails possible to work under Delphi and thought that i can share it.

Code: [Select]
var

    decoder,chan : Dword;
    silentpadding : Qword;
    ci : Bass_channelinfo;

Code: [Select]
 decoder := BASS_StreamCreateFile(FALSE, pchar(filename), 0, 0, BASS_STREAM_DECODE or BASS_UNICODE);
  BASS_ChannelGetInfo(decoder, ci);

  chan := BASS_StreamCreate(ci.freq, ci.chans, ci.flags and not BASS_STREAM_DECODE, @effecttailcallback, 0);
  silentpadding := BASS_ChannelSeconds2Bytes(chan, 10);  //a maximum freeverb effect has an effecttail of about 9 seconds, so 10 seconds should be enough for any setting

  BASS_ChannelPlay(chan, FALSE);

Code: [Select]
function  effecttailcallback (handle: HSTREAM; buffer: Pointer; length: DWORD; user: Pointer): DWORD; stdcall;
var r,c : integer;
      buffer2 : pointer;
      buf2car : cardinal;

begin
//
r := BASS_ChannelGetData(decoder, buffer, length); // get data from the decoder
if ((r < 0) or (BASS_ChannelIsActive(decoder) = BASS_ACTIVE_STOPPED)) then  // end of file, add padding...
begin
                if (r<0) then r:=0;
c := min(length-r, silentpadding); // amount of padding to add

                buf2car := cardinal (buffer);
                buffer2 := pointer (buf2car + r)
                fillchar (buffer^, c , #0);

r := r + c;
silentpadding := silentpadding - c; // decrease padding counter

if silentpadding <= 0 then r := BASS_STREAMPROC_END; // no more padding, end of stream
end;

result := r;
end;

« Last Edit: 8 Sep '14 - 04:41 by BenMaas »