Author Topic: BASS_VST 2.4.0.6 - available for download  (Read 136304 times)

victor

  • Posts: 137
Re: BASS_VST 2.2.0.3 - available for download
« Reply #50 on: 11 Jun '06 - 13:39 »
calling BASS_VST_GetInfo, on some plug-ins, reports the editorHeight and editorWidth = 0. Is this a bug in GetInfo or is the information stored in the plug-in wrong?
Is there another way of getting the necessary height and width?
Opening the same plug-in in other host shows the proper height and width.
One example: Electri-Q from AIXcoustic creations shows well in Wavelab and reports 0 values.

http://www.aixcoustic.com/index.php/Electri-Q/13/0/

bpetersen

  • Posts: 70
Re: BASS_VST 2.3.0.3 - available for download
« Reply #51 on: 11 Jun '06 - 21:08 »
calling BASS_VST_GetInfo, on some plug-ins, reports the editorHeight and editorWidth = 0. Is this a bug in GetInfo or is the information stored in the plug-in wrong?
Is there another way of getting the necessary height and width? [...]

I've just tested Electri-Q and found out, that the plugin only reports the correct size of the editor after the editor is opened using BASS_VST_EmbedEditor(). This is seems to be a bad behaviour of the plugin; to support such plugins, you should assume editorWidth and editorHeight only to be valid while the editor is open.

While testing, I found another strange point: Electri-Q sometimes changes the number of parameters when selecting a different program - I'm no VST expert, but as far as I know, this should not happen. However, as this lead to crashes of BASS_VST under some circumstances, I've updated BASS_VST in the first post to be more tolerant to such plugins.

The API has not changed and the users of BASS_VST can still expect the number of parameters to be constant.

For more details, please have a look at bass_vst.h

Bjoern
« Last Edit: 12 Jun '06 - 01:10 by bpetersen »

bpetersen

  • Posts: 70
Re: BASS_VST 2.3.0.4 - available for download
« Reply #52 on: 12 Jun '06 - 01:09 »
I've updated the download link in the first post to point to BASS_VST 2.3.0.4 which fixes a little bug: Under some circumstances, BASS_VST_GetInfo() and BASS_VST_GetParamInfo() may have returned random string data if a plugin does not provide eg. the name of the effect. We return correct empty strings now and you should use a fallback-name in these cases, eg. the name of the file. However, all this is quite unusual.

For more details, please have a look at bass_vst.h

Bjoern

aafuss

  • Posts: 11
Re: BASS_VST 2.3.0.4 - available for download
« Reply #53 on: 15 Jul '06 - 08:51 »
Hi Bjoern,
How do I use BASS_VST in VB6-in particular to load a VST?

bpetersen

  • Posts: 70
Re: BASS_VST 2.3.0.4 - available for download
« Reply #54 on: 15 Jul '06 - 14:28 »
Hi Bjoern,
How do I use BASS_VST in VB6-in particular to load a VST?

Hello aafuss,

sorry, I do not know more about VB6 than the fact, that it is possible to access external DLLs written in C/C++ :)

Maybe someone else can help? The BASS_VST API itself is documented in bass_vst.h.

Best regards,
Bjoern

victor

  • Posts: 137
Re: BASS_VST 2.3.0.4 - available for download
« Reply #55 on: 8 Aug '06 - 20:42 »
Hi,

as stated in the header file bass_vst.h is Bass_VST a VST host compatible with the new VST 2.4 implementation incl. the new double precision processing.

@Ian:
are there any plans of providing double precision (64 bit floating point) as a native option in BASS?

Regards,
Viktor

Ian @ un4seen

  • Administrator
  • Posts: 26090
Re: BASS_VST 2.3.0.4 - available for download
« Reply #56 on: 9 Aug '06 - 14:30 »
are there any plans of providing double precision (64 bit floating point) as a native option in BASS?

No, I'm afraid there aren't currently any plans for that.

axellang

  • Posts: 16
Re: BASS_VST 2.3.0.4 - available for download
« Reply #57 on: 10 Aug '06 - 11:36 »
Hi folks,

here is a wrapper unit to dynamic load bass_vst.dll (thks to Chris/Se).
Let me know if something doesn't work.

Axel

Code: [Select]

(*************************************************************
  Delphi Header translation bass_vst.dll v2.4.0.1 (13/01/2008) by AxelLang

  For Version History, Documentation see bass_vst.h!

  Original Source : Bass_vst.h by Bjoern Petersen
  Bjoern Petersen Software Design and Development, Hamburg, Germany.
  VST PlugIn Interface Technology by Steinberg Media Technologies GmbH.
  Contact: drsilver@silverjuke.net - http://www.silverjuke.net

  How to install
  ----------------
  Copy DYN_BASSVST.PAS to the \LIB subdirectory of your Delphi path or your project dir
  Call Load_BASSVST (eg. in FormCreate) to load bass_vst.dll before using any functions, and
  Unload_BASSVST (eg. in FormDestory) to unload it when you're done.

  I AM NOT RESPONSIBLE FOR ANYTHING! USE AT YOUR OWN RISK!

**************************************************************)

Unit dyn_Bassvst;

interface

uses
  Windows;


const
  BASS_VST_PARAM_CHANGED    = 1;
  BASS_VST_EDITOR_RESIZED   = 2;
  BASS_VST_AUDIO_MASTER     = 3;

  BASS_VST_ERROR_NOINPUTS     = 3000;  // the given effect has no inputs and is probably a VST instrument and no effect
  BASS_VST_ERROR_NOOUTPUTS    = 3001; // the given effect has no outputs
  BASS_VST_ERROR_NOREALTIME   = 3002; // the given effect does not support realtime processing

  BASS_VST_KEEP_CHANS = 1;    (*By default, mono effects assigned to stereo channels
                                        are mixed down before processing and converted back
                                        to stereo afterwards. Set this flag to avoid this
                                        behaviour in which case only the first channel is
                                        affected by processing.*)


type

BASS_VST_PARAM_INFO = record
    name :  array [0..15] of Char;         // examples: Time, Gain, RoomType
    FUnit : array [0..15] of Char;         // examples: sec, dB, type
    Display : array [0..15] of Char;       // the current value in a readable format, examples: 0.5, -3, PLATE
    defaultValue : single;                 // the default value
end;

BASS_VST_INFO = record
    ChannelHandle : DWORD;                 // the channelHandle as given to BASS_VST_ChannelSetDSP()
    uniqueID :DWORD;                       // a unique ID for the effect (the IDs are registered at Steinberg)
    effectName : array [0..79] of Char;    // the effect name
    effectVersion : DWORD;                 // the effect version
    effectVstVersion : DWORD;              // the VST version, the effect was written for
    hostVstVersion : DWORD;                // the VST version supported by BASS_VST, currently 2.4
    productName : array [0..79] of Char;   // the product name, may be empty
    vendorName: array [0..79] of Char;     // the vendor name, may be empty
    vendorVersion : DWORD;                 // vendor-specific version number
    chansIn : DWORD;                       // max. number of possible input channels
    chansOut : DWORD;                      // max. number of possible output channels
    initialDelay : DWORD;                  // for algorithms which need input in the first place, in milliseconds
    hasEditor : DWORD;                     // can the BASS_VST_EmbedEditor() function be called?
    editorWidth : DWORD;                   // initial/current width of the editor, also note BASS_VST_EDITOR_RESIZED
    editorHeight : DWORD;                  // initial/current height of the editor, also note BASS_VST_EDITOR_RESIZED
    aeffect : Pointer;                     // the underlying AEffect object (see the VST SDK)

end;


VSTPROC = procedure (vstHandle : DWORD; Action : DWORD; Param1,Param2 : DWORD; User : Pointer); stdcall;


var
BASS_VST_ChannelSetDSP : function(ChanHandle : DWORD; const DLLFile : PChar; flags: DWORD; priority: Integer): DWORD; stdcall;
  BASS_VST_ChannelRemoveDSP : function(ChanHandle : DWORD; vstHandle : DWORD) : BOOL; stdcall;
BASS_VST_EmbedEditor   : function(vstHandle : DWORD; ParentWindow : hwnd) : BOOL; stdcall;
BASS_VST_SetScope       : function(vstHandle : DWORD, scope : DWORD) : BOOL; stdcall;
  BASS_VST_GetInfo       : function(vstHandle : DWORD; pInfo: Pointer) : BOOL; stdcall;
  BASS_VST_GetParam     : function(vstHandle : DWORD; paramIndex : integer) : single; stdcall;
  BASS_VST_SetParam     : function(vstHandle : DWORD; paramIndex : integer; value : single) : BOOL; stdcall;
  BASS_VST_GetParamCount : function(vstHandle : DWORD) : integer; stdcall;
  BASS_VST_GetParamInfo : function(vstHandle : DWORD; paramIndex : Integer; var Info : BASS_VST_PARAM_INFO): boolean; stdcall;
  BASS_VST_Resume       : function(vstHandle : DWORD) : BOOL; stdcall;
  BASS_VST_SetCallback   : function(vstHandle : DWORD; VSTPROC, user : Pointer;) : BOOL; stdcall;
  BASS_VST_SetLanguage   : function(const Lang : PChar) : BOOL; stdcall;
  BASS_VST_GetBypass     : function(vstHandle : DWORD): DWORD; stdcall;
BASS_VST_SetBypass     : function(vstHandle : DWORD; state : boolean) : BOOL; stdcall;
  BASS_VST_GetProgramParam : function(vstHandle : DWORD; programIndex : Integer) : PSingle; stdcall;
  BASS_VST_SetProgramParam : function(vstHandle : DWORD; programIndex : Integer; const param : PSingle) : BOOL;  stdcall;
BASS_VST_GetProgramCount : function(vstHandle : DWORD) : Integer; stdcall;
  BASS_VST_GetProgram   : function(vstHandle : DWORD) : Integer; stdcall;
  BASS_VST_SetProgram   : function(vstHandle : DWORD; programIndex : Integer) : BOOL; stdcall;
  BASS_VST_GetProgramName : function(vstHandle : DWORD; programIndex : Integer) : PChar; stdcall;
  BASS_VST_SetProgramName : function(vstHandle : DWORD; programIndex : Integer; const name : PChar) : BOOL;  stdcall;

  var BASSVST_Handle : Thandle = 0;


  function Load_BASSVST(const dllfilename : string) : boolean;
  procedure Unload_BASSVST;


implementation

function Load_BASSVST(const dllfilename : string) : boolean;
var
   oldmode : integer;
begin
   if BASSVST_Handle <> 0 then
      result := true
   else begin
     oldmode := SetErrorMode($8001);
     BASSVST_Handle := LoadLibrary(pchar(dllfilename));
     SetErrorMode(oldmode);
   if BASSVST_Handle <> 0 then
      begin

           @BASS_VST_ChannelSetDSP   := GetProcAddress(BASSVST_Handle, 'BASS_VST_ChannelSetDSP');
           @BASS_VST_ChannelRemoveDSP := GetProcAddress(BASSVST_Handle, 'BASS_VST_ChannelRemoveDSP');
           @BASS_VST_EmbedEditor    := GetProcAddress(BASSVST_Handle, 'BASS_VST_EmbedEditor');
           @BASS_VST_SetScope         := GetProcAddress(BASSVST_Handle, 'BASS_VST_SetScope');
           @BASS_VST_GetInfo       := GetProcAddress(BASSVST_Handle, 'BASS_VST_GetInfo');
           @BASS_VST_GetParam     := GetProcAddress(BASSVST_Handle, 'BASS_VST_GetParam');
           @BASS_VST_SetParam     := GetProcAddress(BASSVST_Handle, 'BASS_VST_SetParam');
           @BASS_VST_GetParamCount   := GetProcAddress(BASSVST_Handle, 'BASS_VST_GetParamCount');
           @BASS_VST_GetParamInfo   := GetProcAddress(BASSVST_Handle, 'BASS_VST_GetParamInfo');
           @BASS_VST_Resume       := GetProcAddress(BASSVST_Handle, 'BASS_VST_Resume');
           @BASS_VST_SetCallback     := GetProcAddress(BASSVST_Handle, 'BASS_VST_SetCallback');
           @BASS_VST_SetLanguage     := GetProcAddress(BASSVST_Handle, 'BASS_VST_SetLanguage');
           @BASS_VST_GetBypass     := GetProcAddress(BASSVST_Handle, 'BASS_VST_GetBypass');
           @BASS_VST_SetBypass     := GetProcAddress(BASSVST_Handle, 'BASS_VST_SetBypass');
           @BASS_VST_GetProgramParam := GetProcAddress(BASSVST_Handle, 'BASS_VST_GetProgramParam');
           @BASS_VST_SetProgramParam := GetProcAddress(BASSVST_Handle, 'BASS_VST_SetProgramParam');
           @BASS_VST_GetProgramCount  := GetProcAddress(BASSVST_Handle, 'BASS_VST_GetProgramCount');
           @BASS_VST_GetProgram     := GetProcAddress(BASSVST_Handle, 'BASS_VST_GetProgram');
           @BASS_VST_SetProgram     := GetProcAddress(BASSVST_Handle, 'BASS_VST_SetProgram');
           @BASS_VST_GetProgramName := GetProcAddress(BASSVST_Handle, 'BASS_VST_GetProgramName');
           @BASS_VST_SetProgramName := GetProcAddress(BASSVST_Handle, 'BASS_VST_SetProgramName');


       if (@BASS_VST_ChannelSetDSP = nil) or
          (@BASS_VST_ChannelRemoveDSP = nil) or
          (@BASS_VST_EmbedEditor = nil)    or
          (@BASS_VST_SetScope = nil)      or
          (@BASS_VST_GetInfo = nil)      or
          (@BASS_VST_GetParam = nil)      or
          (@BASS_VST_SetParam = nil)      or
          (@BASS_VST_GetParamCount = nil) or
          (@BASS_VST_GetParamInfo = nil)    or
          (@BASS_VST_Resume = nil)        or
          (@BASS_VST_SetCallback = nil)    or
          (@BASS_VST_SetLanguage = nil)    or
          (@BASS_VST_GetBypass = nil)    or
          (@BASS_VST_SetBypass = nil)    or
          (@BASS_VST_GetProgramParam = nil)  or
          (@BASS_VST_SetProgramParam = nil)  or
          (@BASS_VST_GetProgramCount = nil)  or
          (@BASS_VST_GetProgram = nil)    or
          (@BASS_VST_SetProgram = nil)    or
          (@BASS_VST_GetProgramName = nil) or
          (@BASS_VST_SetProgramName = nil) then
           begin
              FreeLibrary(BASSVST_Handle);
              BASSVST_Handle := 0;
           end;
      end;
     result := (BASSVST_Handle <> 0);
   end;
end;

procedure Unload_BASSVST;
begin
   if BASSVST_Handle <> 0 then
FreeLibrary(BASSVST_Handle);
BASSVST_Handle := 0;
end;

end.
« Last Edit: 13 Jan '08 - 11:35 by axellang »

bpetersen

  • Posts: 70
Re: BASS_VST 2.3.0.6 - available for download
« Reply #58 on: 3 Nov '07 - 20:43 »
nadia has found a little bug (more in the plugins but in BASS_VST), see the following thread for details:
http://www.un4seen.com/forum/?topic=7678.msg52379#msg52379

I've updated the download link in the first post of this thread, the new version is BASS_VST 2.3.0.6 and will fix the problem.

Regards,
Bjoern

bpetersen

  • Posts: 70
Re: BASS_VST 2.4.0.1 - available for download
« Reply #59 on: 12 Jan '08 - 21:59 »
A version compatible to the upcoming BASS 2.4 is available in the first post of this thread. The new version number is 2.4.0.1 and the new version is compatible to BASS 2.2, BASS 2.3 and BASS 2.4

There is only one little API change: The "user" parameter of BASS_VST_SetCallback() is a pointer now.

Best regards,
Bjoern
« Last Edit: 17 Jan '08 - 16:33 by bpetersen »

alenofx

  • Posts: 28
Re: BASS_VST 2.4.0.1 - available for download
« Reply #60 on: 18 Jan '08 - 18:31 »
Hi,

is there a possibility to have a Mac version of BASS_VST? ;D

bpetersen

  • Posts: 70
Re: BASS_VST 2.4.0.1 - available for download
« Reply #61 on: 18 Jan '08 - 18:52 »
is there a possibility to have a Mac version of BASS_VST? ;D

Well, at the moment I do not  have the time for a port. I fear, BASS_VST for Mac has a very low priority for me.

Regards,
Bjoern

alenofx

  • Posts: 28
Re: BASS_VST 2.4.0.1 - available for download
« Reply #62 on: 18 Jan '08 - 20:02 »
is there a possibility to have a Mac version of BASS_VST? ;D

Well, at the moment I do not  have the time for a port. I fear, BASS_VST for Mac has a very low priority for me.

Regards,
Bjoern

That's a pity...  :(
I've read that the source code is not public available, anyway if you want/need support for the Mac port feel free to contact me. ;)

Thank you for the fast reply.

bpetersen

  • Posts: 70
Re: BASS_VST 2.4.0.1 - available for download
« Reply #63 on: 18 Jan '08 - 20:44 »
[...] anyway if you want/need support for the Mac port feel free to contact me. ;)

Are you interested in doing the Mac port? If so, we can talk about sharing the source code.

Regards,
Bjoern

alenofx

  • Posts: 28
Re: BASS_VST 2.4.0.1 - available for download
« Reply #64 on: 18 Jan '08 - 21:23 »
[...] anyway if you want/need support for the Mac port feel free to contact me. ;)

Are you interested in doing the Mac port? If so, we can talk about sharing the source code.

Regards,
Bjoern

Yes, if there is this possibility I'm interested and glad to help you with the Mac port.

bpetersen

  • Posts: 70
Re: BASS_VST 2.4.0.1 - available for download
« Reply #65 on: 18 Jan '08 - 21:36 »
Yes, if there is this possibility I'm interested and glad to help you with the Mac port.

Okay - currently I am trying to add support for VST instrument plugins (VSTi plugins), see http://www.un4seen.com/forum/?topic=7890.0

When done (in a week or so), I can send you the source and you can try to port it.

Please contact me if I forget it ;-)

Regards,
Bjoern

alenofx

  • Posts: 28
Re: BASS_VST 2.4.0.1 - available for download
« Reply #66 on: 18 Jan '08 - 21:40 »
Great news, and thank you!  ;)

bpetersen

  • Posts: 70
Re: BASS_VST 2.4.0.2 - available for download
« Reply #67 on: 21 Jan '08 - 12:26 »
Hello,

I've updated the download link in the first post to point to BASS_VST 2.4.0.2. The new version now supports VST instruments (VSTi plugins). Moreover, I've fixed some minor bugs to be compatible with more plugins.

To use VST instruments, you have to create a new BASS channel; to hear something, most often you have to send MIDI events to this channel:

Code: [Select]
// create a VST instrument stream -- the returned handle can be used with
// all BASS_Channel*() and all BASS_VST_*() functions
DWORD ch = BASS_VST_ChannelCreate(44100, 2, "c:\\instr.dll", 0);

// the returned handle can be used like any other BASS channel handle -
// eg. you can add a VST effect and start the stream
BASS_VST_ChannelSetDSP(ch, "c:\\equalizer.dll", 0, 0);
BASS_ChannelPlay(ch);

// ... trigger notes using BASS_VST_ProcessEvent() ...
BASS_VST_ProcessEvent(ch, 0, MIDI_EVENT_NOTE, MAKEWORD(60, 100));
Sleep(1000);

// when done, delete the VST instrument stream
BASS_VST_ChannelFree(ch);

Plesae report any problems with BASS_VST 2.4.0.2 in this thread. I will try to fix bugs as soon as possible. For more details, please have a look at README.TXT and bass_vst.h

Have a nice day -
Bjoern
« Last Edit: 21 Jan '08 - 12:28 by bpetersen »

firemen

  • Posts: 163
Re: BASS_VST 2.4.0.2 - available for download
« Reply #68 on: 21 Jan '08 - 13:09 »
woohoo!

- who can do header for Delphi ?
- Ian, whether it is possible to combine with bass_midi choice of the use of sf2 or Vsti,  example bass_midi.createVstiStream(vstChannel, .....) ?

bpetersen

  • Posts: 70
Re: BASS_VST 2.4.0.3 - available for download
« Reply #69 on: 21 Jan '08 - 15:19 »
2.4.0.3 fixed some bugs with BASS_VST_ProcessEvent() and adds BASS_VST_ProcessEventRaw() (thanks to radio42).

When redownloading from the first post, plase make sure, you do not get an old version from the browser cache.

Bjoern

firemen

  • Posts: 163
Re: BASS_VST 2.4.0.3 - available for download
« Reply #70 on: 21 Jan '08 - 16:21 »
attachment Delphi dyn_headerVST.

The separate parcel of midi commands works (:

Who will not be divided by the source code of parsing midi file with possibility to apply him for the conclusion of commands through Vsti ?
« Last Edit: 21 Jan '08 - 22:35 by firemen »

firemen

  • Posts: 163
Re: BASS_VST 2.4.0.3 - available for download
« Reply #71 on: 22 Jan '08 - 13:30 »
prompt me please what format  EventRaw ?

for example reproducing of note:

BASS_VST_ProcessEvent(vstChan, 0, MIDI_EVENT_NOTE, $4040);

work.

I try through  raw

// 9n nn vv - Note On

  BASS_VST_ProcessEventRaw(vstChan,
  #$90+
  #$40+
  #$40,
  3);

not work :(

as correctly there will be raw the notes given for reproducing  ?

radio42

  • Posts: 4839
Re: BASS_VST 2.4.0.3 - available for download
« Reply #72 on: 22 Jan '08 - 14:22 »
There are two types of MIDI messages:
1. MIDI Short or Standard Messages
2. MIDI System Exclusive Messages (SysEx)

A MIDI Short message is sent to a VSTi plugin via:
    BASS_VST_ProcessEventRaw(vstChan, msg, 0);
Note, that length must be 0!

A MIDI SysEx message is sent to a VSTi plugin via:
    BASS_VST_ProcessEventRaw(vstChan, msg, length);
Note, that now length must be set to the length of the sysex msg in bytes.

In your example you are using a length value, and this denotes a SysEx message - but infact you are trying to send a short message. So try to set your length value to 0!

For a list of MIDI messages and how to compose them, see here:
http://www.midi.org/about-midi/table1.shtml


firemen

  • Posts: 163
Re: BASS_VST 2.4.0.3 - available for download
« Reply #73 on: 22 Jan '08 - 15:38 »
radio42  thank you very much!

I know about MIDI Standard and System of report.

for me does not turn out even elementaryly to lose a note.

 BASS_VST_ProcessEventRaw(vstChan,
  #$90+
  #$40+
  #$40,
  0);

does not work similarly :(

would not you could to make an example ?

//   BASS_VST_ProcessEventRaw: function  (vstHandle: DWORD; const event: PChar; length: DWORD) :BOOL; stdcall;

Ian @ un4seen

  • Administrator
  • Posts: 26090
Re: BASS_VST 2.4.0.3 - available for download
« Reply #74 on: 22 Jan '08 - 16:32 »
BASS_VST_ProcessEventRaw(vstChan,
  #$90+
  #$40+
  #$40,
  0);

I think the problem is that you are not shifting the values to the required bits. For example, in C/C++, you'd do this (if I'm reading the API correctly :))...

Code: [Select]
BASS_VST_ProcessEventRaw(vstChan, (void*)((0x90<<16)|(0x40<<8)|0x40), 0);