Author Topic: BASS_SFX v2.4.2.1 for winamp, sonique, bassbox, & WMP visual plugin support!  (Read 285160 times)

(: JOBnik! :)

  • Posts: 1080
Hi ;D

RevG, I think it's also better to stick with the version as other add-ons ;)
i.e: 2.4.x.x (Add-on For BASS version.Add-on Version.Add-on Revision)

As it's only in beta stages...

It's only a suggestion :)

radio42

  • Posts: 4839
Hi RevG,

do you mind explaining the new BASS_SFX_Init params (HINSTANCE hInstance, HWND hWnd) - as the docs are missing them and how to use them ;-)

sonam

  • Guest
Hey,Any idea why bassvis has gone?Just curious.

ramses

  • Posts: 103
Hi,

The fonction BASS_SFX_PluginModuleGetName() described in the help file does not exist in the dll ?

Any idea ?

Regards,

Philippe

ramses

  • Posts: 103
Hi,

I have problem to render WINAMP plugins (nothing happens)

Here the sequence i make:

BASS_SFX_PluginCreate()
BASS_SFX_PluginStart()
BASS_SFX_PluginModuleSetActive()

Did you have any idea ?

Regards,

Philippe

http://www.qpratools.com

Irrational86

  • Posts: 960
Re: BASSVIS gone? Try BASS_SFX v2.1 (February 25, 2009)
« Reply #30 on: 19 Mar '09 - 12:49 »
...Xminion worked very hard on BassVis and you took over his project and also worked very hard on it and I don't want to take anything away from that...
Aww, that's very nice of you to remember me. I just happened to come check out the good ol' Un4seen and saw BassVis gone. So I saw BASS SFX with something related to visualizations and came to check out the thread.

What a surprise that I would read this ;D

Best of luck with your new library dude!

*thumbs up*


--Edit--
I just took a quick look at your source code and the only thing I can say is congratulations on an amazing work. Within a few days you have managed to write what took me way longer and that I didn't even finish.

If by any chance you still want the source code for the very old BassVis that I had released, please let me know and I will gladly hand it over. (Unfortunately, I do not have and cannot release any source code thereafter since I was not the programmer/coder)
--/Edit--
« Last Edit: 19 Mar '09 - 14:03 by XMinioNX »

POG-iMplayer

  • Posts: 15
It would be quite good to add support of plug-ins AIMP  ;D

I'am realization:
Quote
  IAIMP2VisualPlugin = interface
    function AuthorName: PWideChar; stdcall;
    function PluginName: PWideChar; stdcall;
    function PluginInfo: PWideChar; stdcall;
    function PluginFlags: DWORD; stdcall;
    function Initialize: BOOL; stdcall;
    procedure Deinitialize; stdcall;
    procedure DisplayClick(X, Y: Integer); stdcall;
    procedure DisplayRender(DC: HDC; AData: PVisualData); stdcall;
    procedure DisplayResize(AWidth, AHeight: Integer); stdcall;
  end;

  TAIMPVisualProc = function: IAIMP2VisualPlugin; stdcall;
....
var
  AIMPVisInfo: IAIMP2VisualPlugin;
  QueryModuleAimp: TAIMPVisualProc;

  if VisDllHandle <= 0 then Exit;

   New(AIMPVisData);







      Bass_ChannelGetInfo(PChannel.FChannel,Info);
      if info.chans = 1 then begin
        Bass_ChannelGetData(PChannel.FChannel,@data,1024);
        for i:= 0 to 511 do begin

          AIMPVisData.WaveForm[0,i]:= data shr 8;
          AIMPVisData.WaveForm[1,i]:= data shr 8;
        end;
      end
      else begin
        Bass_ChannelGetData(PChannel.FChannel,@data,2048);
        for i:= 0 to 511 do begin
          AIMPVisData.WaveForm[0,i]:= Data[i * 2] shr 8;
          AIMPVisData.WaveForm[1,i]:= Data[(i * 2) + 1] shr 8;
        end;
      end;



      Bass_ChannelGetData(PChannel.FChannel,@FFT,BASS_DATA_FFT512);
      for i:= 0 to 255 do begin
        AIMPVisData.Spectrum[0,i]:= Min(255,Round(FFT * 256));
        AIMPVisData.Spectrum[1,i]:= Min(255,Round(FFT * 256));
      end;





  Level:= Bass_ChannelGetLevel(PChannel.FChannel);
  LevelL:= HIWORD(Level) div 900;
  LevelR:= LOWORD(Level) div 900;

  AIMPVisData.LevelL:= LevelL;
  AIMPVisData.LevelR:= LevelR;



  try
     
    AIMPVisInfo.DisplayResize(VisBuff.Width,VisBuff.Height);
    AIMPVisInfo.DisplayRender(VisBuff.Canvas.Handle,AIMPVisData);



  except
    Exit;
  end;
  Dispose(AIMPVisData);


ProcName - AIMP_QueryVisual
« Last Edit: 24 Mar '09 - 02:29 by POG-iMplayer »

RevG

  • Posts: 458
Re: BASSVIS gone? Try BASS_SFX v2.1 (February 25, 2009)
« Reply #32 on: 24 Mar '09 - 05:56 »
Aww, that's very nice of you to remember me. I just happened to come check out the good ol' Un4seen and saw BassVis gone. So I saw BASS SFX with something related to visualizations and came to check out the thread.

What a surprise that I would read this ;D

Best of luck with your new library dude!

*thumbs up*


--Edit--
I just took a quick look at your source code and the only thing I can say is congratulations on an amazing work. Within a few days you have managed to write what took me way longer and that I didn't even finish.

If by any chance you still want the source code for the very old BassVis that I had released, please let me know and I will gladly hand it over. (Unfortunately, I do not have and cannot release any source code thereafter since I was not the programmer/coder)
--/Edit--

Hi! Good to hear from you XminionX :)

Yes I believe it is very important to give credit where credit is due. :) Many programmers such as yourself have helped me and others a lot by providing great libraries and tools for the community and I don't forget that.

That would be great if you could provide me with the old BassVis source code as I am sure there are many areas in the SFX code that could be improved with the help of your BassVis code. I will pm you my email address!

Hi ;D

RevG, I think it's also better to stick with the version as other add-ons ;)
i.e: 2.4.x.x (Add-on For BASS version.Add-on Version.Add-on Revision)

As it's only in beta stages...

It's only a suggestion :)

Yes, great idea Jobnik! I will do this for the next release.

Hi RevG,

do you mind explaining the new BASS_SFX_Init params (HINSTANCE hInstance, HWND hWnd) - as the docs are missing them and how to use them ;-)

Oh ya, I forgot to update that  :P I will also update this next release :)

Also sorry to all that I have not been around last week or so. Just bought a house and I am moving and have a lot of things to take care of but I am almost done with the move and everything and then I will be back more active again!

Cheers!

firemen

  • Posts: 163
please test sample in Delphi  :'(

similarly correct
in help -  BOOL WINAPI BASS_SFX_Init(); // no parameter!
in bass_sfx.pas - function BASS_SFX_Init(hInstance : DWORD; hwnd : THandle): BOOL;


POG-iMplayer

  • Posts: 15
Bass_SFX_Init(hInstance: DWORD; hwnd: Thandle): BOOL;

POG-iMplayer

  • Posts: 15
Quote
Hi,

Can you try calling this in Delphi before loading the library.
Set8087CW($133F)

Maybe that fixes it?

Cheers,
Greg

Very Good, WORKING!!! Great Thanks

POG-iMplayer

  • Posts: 15
Please add function Set8087CW($133F) to function BASS_SFX_Init  ;D

radio42

  • Posts: 4839
Hi RevG,

it seems, that the version number returned by BASS_SFX is a bit out of what all other add-ons return.
Today a call to Bass_SFX_GetVersion will return 0x03 as the version number.

Shouldn't it be: 0x03000000 ?

RevG

  • Posts: 458
Hi RevG,

it seems, that the version number returned by BASS_SFX is a bit out of what all other add-ons return.
Today a call to Bass_SFX_GetVersion will return 0x03 as the version number.

Shouldn't it be: 0x03000000 ?

Hi!

Yes it is wrong. I am working on it right now. I am changing the version number to be standard like all other addons 2.4.1.1 for the next version. I am hoping to have a new version up in the next couple days which addresses all of the issues everyone has brought up in this thread! I will have documentation updated as well.

Thanks for all the feedback, suggestions, and bug reports guys :D

Cheers,
Greg

ghis

  • Posts: 10
I download the last version fo BASS_SFX: 3.0.0.0 (creation date : 2009-03-22).

I use BASS.NET 2.4.4.1, that support Bass_SFX 3.0.0.0.

When i load this DLL with BassSfx.LoadMe() or when i call the method BASS_SFX_Init, i receive a windows with this message : 
-------------------------------------------
A incorrect version of Bass_SFX was loaded!

Version loaded: 0.0
Version expected: 3.0

File: ......\bass_sfx.dll
FileVersion: 3.0.0.0
Description: BASS_SFX
Compagny: Copyright (C) 2009
Language: Anglais(État-Unis)
--------------------------------------------


Why i received this windows?

Ghislain Plante



RevG

  • Posts: 458
Hi,

I have problem to render WINAMP plugins (nothing happens)

Here the sequence i make:

BASS_SFX_PluginCreate()
BASS_SFX_PluginStart()
BASS_SFX_PluginModuleSetActive()

Did you have any idea ?

Regards,

Philippe

http://www.qpratools.com

Have you called BASS_SFX_PluginSetStream? You need to call this before BASS_SFX_PluginStart for winamp plugins.

Cheers,
Greg

radio42

  • Posts: 4839
Just what RevG reported above.
Today BASS_SFX uses the version number 3.0.0.0.

However BASS_SFX returns 0x00000003 as the version number - which will be treated as verison number 0.0.0.3.
So BASS.NET checks for the correct and expected version number...and 0.0.0.3 is not 3.0.0.0.
The BASS.NET check for the correct version is by comparing the expected major and minor version number, which is:
Expected: 3.0.
Effective: 0.0.

So I guess we just need to wait for the next BASS_SFX version and all should be fine...

RevG

  • Posts: 458
Just what RevG reported above.
Today BASS_SFX uses the version number 3.0.0.0.

However BASS_SFX returns 0x00000003 as the version number - which will be treated as verison number 0.0.0.3.
So BASS.NET checks for the correct and expected version number...and 0.0.0.3 is not 3.0.0.0.
The BASS.NET check for the correct version is by comparing the expected major and minor version number, which is:
Expected: 3.0.
Effective: 0.0.

So I guess we just need to wait for the next BASS_SFX version and all should be fine...

Yes new version is available now, see first post in thread :)
Version is now 2.4.1.1

Cheers,
Greg

RevG

  • Posts: 458
BASS_SFX v2.4.1.2 now released. Now supports BassBox visual plugins. As always see first post in thread for more details.  :D

smeesseman

  • Posts: 6
hi there, we've recently moved to the new bass version and it broke bass_vis, when I came to the forums to see if anyone else had reported it, I saw this thread, nice work!!  I have coded the SFX module into our application, but nothing is happening.  The function calls are returning success, but the visual is not being painted.  Bass_vis previously used a PictureBox control to paint the visualization to, we still have the picturebox control there, might this be the problem?  Does it matter which type control SFX paints to?

Thanks for your time,
Scott

RevG

  • Posts: 458
hi there, we've recently moved to the new bass version and it broke bass_vis, when I came to the forums to see if anyone else had reported it, I saw this thread, nice work!!  I have coded the SFX module into our application, but nothing is happening.  The function calls are returning success, but the visual is not being painted.  Bass_vis previously used a PictureBox control to paint the visualization to, we still have the picturebox control there, might this be the problem?  Does it matter which type control SFX paints to?

Thanks for your time,
Scott

Hmm im not sure what a picturebox is. Are you using Delphi? I think you should be able to paint the visualization to any windows control that has a window handle. Could you paste some of your source code here so I could figure out the problem? :)

Edit:
If you can get a handle to a device context then you should be able to paint to any control. I have tested the following code using a static control and even just a windows button control. Example:

Code: [Select]
//you would have to make sure that the hDC variable is global
//or at least that it is in scope so that the PluginRender call can use it of course :)
HWND hVisWnd = m_oVisWnd.m_hWnd;
HDC hDC = ::GetDC(hVisWnd);

...
//then in some timer
BASS_SFX_PluginRender(hSFX, hStream, hVisWnd);

Thanks,
Greg
« Last Edit: 7 Apr '09 - 02:11 by RevG »

smeesseman

  • Posts: 6
Hmm im not sure what a picturebox is. Are you using Delphi? I think you should be able to paint the visualization to any windows control that has a window handle. Could you paste some of your source code here so I could figure out the problem? :)
Actually it was not a picturebox control now that i looked into the code, it was a Label control, I've tried Panel too, still nothing though, I guess this is not the issue.

I am using Sonique visualizations, using c# with Bass.NET wrapper...

I call:
bool init = BassSfx.BASS_SFX_Init(Marshal.GetHINSTANCE(typeof(Application).Module), this.Handle);
IntPtr hVisDC = Win32.GetDC(panelVis.Handle);
int viswidth = panelVis.Width;
int visheight = panelVis.Height;
int hSFX = BassSfx.BASS_SFX_PluginCreate(vispath, viswidth, visheight);
bool pluginstarted = BassSfx.BASS_SFX_PluginStart(hSFX);
bool bassrender = BassSfx.BASS_SFX_PluginRender(hSFX, Music.strm, hVisDC);

evrything returns true, hSFX is non-zero, PluginStart and PluginRender both return true, but no visual in my control...





smeesseman

  • Posts: 6
ok i have it working somewhat, but after so long, (usually between 30-45 seconds), the calls to BASS_SFX_PluginRender() start to return false.  They are in a timer with an interval of 27 milliseconds, all calls retun true for a while, then all of a sudden they start returning false, and the visual stops updating.  Any idea what could be causing this?

Thanks for your help!!

P.S.  Are you in to the CarPC Community?
« Last Edit: 7 Apr '09 - 08:10 by smeesseman »

Patrice Terrier

  • Posts: 108
Greg,

I downloaded you BASS_SFX project to check how it works with BassBox plugins.

I have checked the SFXTest.exe located in the MFC\Bin folder.
I clicked on the Button "Create & Start", then i can see the "Oscilloscope" plugin in the small window located top left, but i can't hear anything nor see the animation playing.

I am using VISTA 64, and take this opportunity to inform you, that the BassBox plugins being Win32 DLLs, they can't be used from a 64-bit application.
C# VS does the wrong assumption (default) that it must create/work in 64-bit when compiled on a 64-bit computer, that is not yet the standard, thus better to switch the project to target the 32-bit mode.

But for the ultimate performance (real time application) it is better to use unmanaged code and the good unsafe pointers, after all we are programmers aren't we?  ;D

 

radio42

  • Posts: 4839
Here is some code C# which is actually working fine here:
Code: [Select]
BassSfx.BASS_SFX_Init(Process.GetCurrentProcess().Handle, this.Handle);
...
_vis = BassSfx.BASS_SFX_PluginCreate(_visPluginFile, pictureBoxVis.Width, pictureBoxVis.Height);
BassSfx.BASS_SFX_PluginSetStream(_vis, _stream);
BassSfx.BASS_SFX_PluginStart(_vis);
_timerVis.Enabled = true;
...
private void timerVis_Tick(object sender, EventArgs e)
{
    if (_vis != 0)
    {
        using (Graphics g = pictureBoxVis.CreateGraphics())
        {
            BassSfx.BASS_SFX_PluginRender(_vis, _stream, g.GetHdc());
        }
    }
}