BASS_VST 2.4.0.6 - available for download

Started by bpetersen,

bpetersen

Quote from: firemenIf you did parse of midi file or Ian would add support of VSTi in bass_midi it would be simply splendidly [...]

Well, I do not think that parsing MIDI-files will become a part of the BASS_VST core. Maybe BASS_MIDI or an independent function is a solution? (there is need to know any BASS_VST internals to just play a MIDI file).

Best regards,
Bjoern Petersen


firemen

Help to understand, forces are not present already  (:

I want to play midi through Vsti

....

  for I := MIDI_EVENT_NOTE to MIDI_EVENT_TEMPO do
      BASS_ChannelSetSync(fStream, BASS_SYNC_MIDI_EVENT, i, @EventSync, i);

  BASS_ChannelPlay(fStream, false);
....

procedure EventSync(Handle : HSYNC; Stream : HSTREAM; data, user : DWORD); stdcall;
var
  chan: Word;
  param: Word;
begin
  chan:= HiWord(data);
  param:= LoWord(data);
  BASS_VST_ProcessEvent(vstChan, chan, user, param); // user - midi event
end;

at playing of midi file a sound is irregular and in general not correctly
what do I do right not?

radio42


Chris

@ Fireman your code is wrong
  The User Param as Bass 2.4 must be a Pointer and not a DWORD so
it must look like that
for I := MIDI_EVENT_NOTE to MIDI_EVENT_TEMPO do
      BASS_ChannelSetSync(fStream, BASS_SYNC_MIDI_EVENT, i, @EventSync, Pointer(i));

  BASS_ChannelPlay(fStream, false);
....

procedure EventSync(Handle : HSYNC; Stream : HSTREAM; data: DWORD;User:Pointer); stdcall;
var
  chan: Word;
  param: Word;
begin
  chan:= HiWord(data);
  param:= LoWord(data);
  BASS_VST_ProcessEvent(vstChan, chan, DWORD(User), param); // user - midi event
end;

firemen

T-RackS 3 VST RTAS
http://rapidshare.com/files/163151654/IKM.TRACK.DELUX.VSRTA.3.0.rar

Does not turn out to work with to information of VST.

Task to memorize position of all of pens and on call to recover.
For other VST and T-racks 1-2 I divide so

  ParamVST - TIniFile

  ParamVST.EraseSection(VSTsection);
  x:= BASS_VST_GetParamCount(FVSTHandle);
  for i := 0 to x - 1 do ParamVST.WriteFloat(VSTsection, IntToStr(i+1), BASS_VST_GetParam(FVSTHandle, i));
  ParamVST.UpdateFile;

  in future set the stored tuning of

  while ParamVST.ReadString(VSTsection, IntToStr(i), '') <> '' do begin
    param:= ParamVST.ReadFloat(VSTsection, IntToStr(i), 0);
    BASS_VST_SetParam(FVSTHandle, i-1, param);
    inc(i);
  end;

With T-racks 3 nothing turns out.
BASS_VST_GetParam(FVSTHandle, i)  returns always 0

Can prompt me how to read all setup of tuning and then to set them?

Quentschi

Hey Björn!

That´s really a cool add-on what you have written.

I have a little problem and may be you can help me. I wrote an software
where the functionality and the GUI are separate on different computer.
So i have to design my own GUI for the VST-Plugin, because the original GUI
of the VST-plugin (if it has one) can not be handled above network, right?
If i create an own GUI it should be pretty easy one, just sliders. But i want to
know, how much parameter the plugin have and the names of them.

_vstHandle = BassVst.BASS_VST_ChannelSetDSP(_output, "C:\\VSTPlugins\\NWEQ_V1_21.dll", BASSVSTDsp.BASS_VST_DEFAULT, 1);
int i = BassVst.BASS_VST_GetParamCount(_vstHandle);
BASS_VST_PARAM_INFO BVPI = new BASS_VST_PARAM_INFO();
for (int j = 0; j < i; j++)
{
     BassVst.BASS_VST_GetParamInfo(_vstHandle, i, BVPI);
}

Counting of the parameters is right, but the informationen of the parameter,
stored in BVPI, are always empty. What i´m doing wrong?
(Tested it with Kjaerhus Classic Compressor and NWEQ of WWAYM)

Thank´s a lot!
Andreas

firemen


francky23012301

Hi everybody

Is it possible to create a similar function to BASS_VST_EmbedEditor for vsti bpetersen ?

Thank you

radio42

@Quentschi:
Your code looks actually right and when I test it here I can retrieve all param values/names.
So could it be, that either of the functions fails (check the return value), e.g. BASS_VST_ChannelSetDSP or BASS_VST_GetParamInfo?
I also tested it here with the Kjaerhus Classic Compressor and it just works like a charm.

lyh_007

Hi,
I want to play midi file through vsti with C#,  who can tell me the step or code? thanks.

bpetersen

As get many requests regarding BASS_VST without having enough time to handle them all, I decided to release BASS_VST under the LGPL license.

For details and source code, please refer to https://github.com/r10s/BASS_VST - moreover, anyone to contribute to BASS_VST is welcome here.

Best regards,
Björn

radio42

I just added to the above Git repository (https://github.com/r10s/BASS_VST) the related windows binaries for the last stable version 2.4.0.8 (compiled with VS2010, platform toolset v100).

Note:
v2.4.0.7 is the official version of Bjorn Petersen.

v2.4.0.8 contain the following enhancements:
1) BASS_VST_Get/SetChunk added: plain binary parameter data handling
2) BASS_VST_Get/SetProgramParam length parameter added: to yield better .Net interoperability
3) Default/last parameter value handling optimized: as some VSTs can dynamically add/remove parameters

Bert B.

According to the documentation in http://jvstwrapper.sourceforge.net/vst20spec.pdf, page 13, the length of the name of a parameter may be 24 characters in length.

Currently it is defined as follows.

typedef struct
{
char name[16]; /* examples: Time, Gain, RoomType */
char unit[16]; /* examples: sec, dB, type */
char display[16]; /* the current value in a readable format, examples: 0.5, -3, PLATE */
float defaultValue; /* the default value - this is the value used by the VST plugin just after creation */
} BASS_VST_PARAM_INFO;

Could this be changed in a future version?


radio42

I guess that doc is not really correct.
The param names are actually limited to 8 characers.

See here: http://ygrabit.steinberg.de/~ygrabit/public_html/vstsdk/OnlineDoc/vstsdk2.3/html/plug/1.0/AudioEffect.html#getParameterName
The following dispatcher commands are used:
- getParameterName
- getParameterLabel
- getParameterDisplay
All are limited to 8 chars. Due to some Unicode implementation we are using 16 char in the API.

The "aeffect.h" file even defies:
kVstMaxParamStrLen   = 8,   ///< used for #effGetParamLabel, #effGetParamDisplay, #effGetParamName


lybxlpsv

#139
how do I compile this? i've tried doing most of the stuff that github readme.md told me but ends up with 8.5kb dll that doesn't work :L
edit : I also tried to compile with VS2010 but now ends up with 9.5kb dll that also doesn't works.
I wanted to add this
case MIDI_EVENT_BANK_LSB: CONTROLLER(32, loparam); break;

Ian @ un4seen

I haven't tried building it myself, but if you're getting a very small DLL, then I guess it has no exports? If so, check that your project's "Module Definition File" option is set to the BASS_VST.DEF file. You can use Dependency Walker to confirm whether your DLL has any exports.

dts350z

Hey,

I'm attempting to get a VST GUI up and running from my windows console program. I've solved the window from console issue and have the editor up in a window and responding to mouse inputs, but the program is looping forever on the message loop for the window and the audio doesn't play until I kill the VST window. So, it seems the window needs to be in its own thread?

If so I'm confused about how to go about it and what parts of BASS need to be in that thread. I'm coding in c/c++

Quote// assign a VST plugin DLL to the channel -- the returned hndle can be used
             // with all BASS_VST_*() functions
             DWORD dsp = BASS_VST_ChannelSetDSP(chan, "C:\\Users\\gnewell\\Google Drive\\SpecWeb 1.32\\Release\\Install\\bin\\5.1 Master Limiter.dll", 0, 0);

            BASS_VST_INFO info;
            BASS_VST_GetInfo(dsp, &info);
 
            if( info.hasEditor )
               {
                    
                   // Use the functions from WinMainParameters.h to get the values that would've been passed to WinMain.
                  // Note that these functions are in the WinMainParameters namespace.
                  HINSTANCE hInstance = GetHInstance();
                  HINSTANCE hPrevInstance = GetHPrevInstance();
                  LPWSTR lpCmdLine = GetLPCmdLine();
                  int nCmdShow = GetNCmdShow();

                  // Assert that the values returned are expected.
                  assert(hInstance != nullptr);
                  assert(hPrevInstance == nullptr);
                  assert(lpCmdLine != nullptr);
                  // Note: The remainder of the code in this file comes from the default Visual C++ Win32 Application
                  // template (with a few minor alterations). It serves as an example that the program works, not as an
                  // example of good, modern C++ code style.

                  UNREFERENCED_PARAMETER(hPrevInstance);
                  UNREFERENCED_PARAMETER(lpCmdLine);

                  // TODO: Place code here.
                  MSG msg;
                  HACCEL hAccelTable;

                  // Initialize global strings
                  LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
                  LoadString(hInstance, IDC_LAUNCHWIN32WINDOWFROMCONSOLE, szWindowClass, MAX_LOADSTRING);
                  MyRegisterClass(hInstance);

                  HWND hWnd;

                  //hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
                  hWnd = CreateWindow(szWindowClass, info.effectName, WS_BORDER, CW_USEDEFAULT, 0, info.editorWidth + 4, info.editorHeight + 34, NULL, NULL, hInstance, NULL);

                  if (hWnd) {
                     BASS_VST_EmbedEditor(dsp,hWnd);
                     ShowWindow(hWnd, nCmdShow);
                     UpdateWindow(hWnd);
                     hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_LAUNCHWIN32WINDOWFROMCONSOLE));
                     // Main message loop:
                     while (GetMessage(&msg, NULL, 0, 0))
                     {
                        if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
                        {
                           TranslateMessage(&msg);
                           DispatchMessage(&msg);
                        }
                     }                     
                  }
                  

               }


Any suggestions?

Thanks

dts350z

OK I have it running with the window containing the VST in its own thread, and all is working except the window update rate (has meters) is very slow.

I tried raising the priority of the VST window thread but it didn't help.

Suggestions?

 

Vitaliy

Hello.
My problem of the week: Do not load any VST plug-ins into Lazarus (free Pascal),
vstHandle: = BASS_VST_ChannelSetDSP (stream, 'name.dll', BASS_Unicode, 1); = zero reaction to any VST.dll files,

result:
vstHandle = 0
GetParamCount = 0
GetParam = 0

Both Bass_streamCreateFile and Bass_channelPlay(stream, false) function normally.
What could be the problem? Anyone can help?
I use the latest versions of bass.dll and bass_vst.dll.
Are there any more working VST-Hosts for Bass.dll, other than bass_vst.dll?

Vitaliy

Quote from: VitaliyHello.
My problem of the week: Do not load any VST plug-ins into Lazarus (free Pascal),
vstHandle: = BASS_VST_ChannelSetDSP (stream, 'name.dll', BASS_Unicode, 1); = zero reaction to any VST.dll files,

result:
vstHandle = 0
GetParamCount = 0
GetParam = 0

Both Bass_streamCreateFile and Bass_channelPlay(stream, false) function normally.
What could be the problem? Anyone can help?
I use the latest versions of bass.dll and bass_vst.dll.
Are there any more working VST-Hosts for Bass.dll, other than bass_vst.dll?
I use the 64-bit Bass.dll and bass_vst.dll, and 32-bit after compilation return me error "0xc000007b", windows 10.

Ian @ un4seen

I'm not a VST plugin user myself, but I think most of them are 32-bit? If so, your EXE and DLLs (including BASS) would need to be 32-bit too (not 64-bit).

radio42

Nowadays most VST2 plugins come as 32 and 64 bit.
I am using a 64-bit version of BASS_VST myself (with BASS/BASS.NET and C#) without any issues so far - so maybe it is a Lazarus specific issue?

And I just found this one here: https://www.youtube.com/watch?v=UgwPlX5uNfs

saga

Error 0xc000007b typically means that you're mixing 32-bit and 64-bit code, which is not possible. (Note that if you wanted to use 32-bit plugins a 64-bit host, you need a plugin bridge like jBridge). If all DLLs and other depenencies have the same bitness as your own program, there is also the possibility that you your manifest file specifies a wrong bitness for a dependency.

Vitaliy

Quote from: radio42Nowadays most VST2 plugins come as 32 and 64 bit.
I am using a 64-bit version of BASS_VST myself (with BASS/BASS.NET and C#) without any issues so far - so maybe it is a Lazarus specific issue?

And I just found this one here: https://www.youtube.com/watch?v=UgwPlX5uNfs
Thanks to everyone!
If I use any bass.net.dll in my project without bass_vst.dll, I get the error 0xc00007b. And I do not understand how to apply BassNet.Registration (,) in the Lazarus (Delphi) environment.

I will try 32-bit Bass.dll or jBridge.

Falcosoft

Hi,
QuoteIf I use any bass.net.dll in my project without bass_vst.dll, I get the error 0xc00007b. And I do not understand how to apply BassNet.Registration (,) in the Lazarus (Delphi) environment.
Lazarus is native code, so you do not have to use any bass.net dlls but use the native bass libraries with the associated Delphi import units.

vstHandle: = BASS_VST_ChannelSetDSP (stream, 'name.dll', BASS_Unicode, 1); = zero reaction to any VST.dll files,If you use BASS_Unicode the function expects WideChars. AFAIK Lazarus unicode implementation is different from Delphi and uses UTF8 instead of UTF16 (WideChars). So if 'name.dll' is a literal string in your source it is most likely a single byte string. Try to remove the BASS_Unicode flag.