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

bpetersen

  • Posts: 70
Re: BASS_VST 2.4.0.4 - available for download
« Reply #75 on: 22 Jan '08 - 16:38 »
I think the problem is that you are not shifting the values to the required bits.

Exactly, however, there is an additional error in bass_vst.dll itself, I will upload an update (2.4.0.4) in the next minutes.

Bjoern
« Last Edit: 22 Jan '08 - 16:47 by bpetersen »

firemen

  • Posts: 163
Re: BASS_VST 2.4.0.4 - available for download
« Reply #76 on: 22 Jan '08 - 16:51 »
can better do not  PChar а DWORD for all ShortMessage ?

sample:


     dwParam1 := MAKELONG(MAKEWORD(MAKEBYTE(channel, 9), note), MAKEWORD(byte(velocity), 0))
   midiOutShortMsg(hout, dwParam1);


p.s.

Ian, can all the same it is possible to bind parsing of midi and conclusion on Vsti through  bassMidi ?  ;)
« Last Edit: 22 Jan '08 - 17:03 by firemen »

bpetersen

  • Posts: 70
Re: BASS_VST 2.4.0.4 - available for download
« Reply #77 on: 22 Jan '08 - 17:02 »
can better do not  PChar а DWORD ?

The pointer is needed as BASS_VST_ProcessEventRaw() can also take a pointer for SysEx messages:

Code: [Select]
// sending a SysEx message, last parameter is SysEx length
char msg[] = {0xF0,0x7E,0x7F,0x09,0x01,0xF7};
BASS_VST_ProcessEventRaw(vstHandle, (void*)msg, 6);

// sending a normal message, last parameter is null
DWORD msg = 0x903C64;
BASS_VST_ProcessEventRaw(vstHandle, (void*)msg, 0);

If you compare against midiOutShortMsg(), please also note, that midiOutShortMsg() needs a differnt byte order as BASS_VST_ProcessEventRaw().

Bjoern

firemen

  • Posts: 163
Re: BASS_VST 2.4.0.4 - available for download
« Reply #78 on: 25 Jan '08 - 20:11 »

  BASS_VST_ProcessEventRaw(vstChan, pointer($C015), 0);   or

  BASS_VST_ProcessEventRaw(vstChan, pointer($C01500), 0);  or

  BASS_VST_ProcessEvent(vstChan, 0, MIDI_EVENT_PROGRAM, $15); or

  BASS_VST_ProcessEvent(vstChan, 0, MIDI_EVENT_PROGRAM, $1500);

  sleep(500);

  BASS_VST_ProcessEventRaw(vstChan, pointer($903c64), 0);
  sleep(1000);
  BASS_VST_ProcessEventRaw(vstChan, pointer($803c00), 0);

no cange instrument.

you would not could together to the library to add a help and short example of work?

p.s.
can there is sense to do a library for example bass_vsti_midi  as bass_midi ?
« Last Edit: 25 Jan '08 - 20:17 by firemen »

bpetersen

  • Posts: 70
Re: BASS_VST 2.4.0.4 - available for download
« Reply #79 on: 25 Jan '08 - 20:32 »
BASS_VST_ProcessEventRaw(vstChan, pointer($C015), 0);   or

BASS_VST_ProcessEventRaw(vstChan, pointer($C01500), 0);  or

BASS_VST_ProcessEvent(vstChan, 0, MIDI_EVENT_PROGRAM, $15); or

BASS_VST_ProcessEvent(vstChan, 0, MIDI_EVENT_PROGRAM, $1500);

The correct variations to switch to program #21 on channel #1 are:

Code: [Select]
BASS_VST_ProcessEventRaw(vstChan, pointer($C01500), 0);
BASS_VST_ProcessEvent(vstChan, 0, MIDI_EVENT_PROGRAM, $15);

However, what happens, depends on the plugin - if playing a note works, but the instrument switch not (both using the raw-function) - maybe the plugin does not support instruments.

Moreover, please also note that the MIDI program change command may be different to the VST programs.

Just my ideas.
Bjoern

emiliojazz

  • Posts: 81
Re: BASS_VST 2.4.0.4 - available for download
« Reply #80 on: 8 Feb '08 - 11:46 »
Hello everybody!
I'm very happy with new BASS_VST, especially for its VSTi support.
But... ;)...I have a couple of questions:

1) Is BASS_VST_ProcessEventRaw quicker than BASS_VST_ProcessEvent? I'm asking this because I have
   a plugin (B4 II from Native Instruments) that seems to skip some messages, and so very often it comes up
   with sustained notes forever, or notes not played at all...
   One thing that must be said is that the problem only occurs with that plugin (B4). Trying another plugin
   all works perfectly. Maybe there's an issue only with that plugin?

2) I have a plugin (Edirol's Super Quartet) that doesn't open its editor. When BASS_VST_EmbedEditor is called, then   window appears for a very short time and then disappears...


Thank you for your help,
any suggestion will be appreciated!
Emiliano Paterlini
« Last Edit: 9 Feb '08 - 18:40 by emiliojazz »

emiliojazz

  • Posts: 81
Re: BASS_VST 2.4.0.4 - available for download
« Reply #81 on: 9 Feb '08 - 15:36 »
Also the "Kontakt" from Native Instruments have the problem of notes held forever (or until you press again the note, in order to resend noteoff message).
It seems to be an issue with noteoff's messages...sometimes (and only with some plugins B4, Kontakt..), if you play a run on the keyboard for example, many notes remain open...

EDIT: The problem occurs also with NOTE-ON events...in fact also playing, for example, two fifth chords in sequence (very slowly) sometimes only one note of the chord is triggered.
So the problem also occurs with very few notes played. It isn't a matter of buffering (some messages being lost).
The only plugins on which I noticed that problem is Native Instruments' B4 and Kontakt...but I suppose that they are write quite correctly...so the problem must be the interface between BASS_VST and those plugins..

Can the problem be in using BASS_VST_ProcessEvent instead of BASS_VST_ProcessEventRaw?
Please help!!!

Emiliano Paterlini
« Last Edit: 9 Feb '08 - 18:38 by emiliojazz »

Franck REVOLLE

  • Posts: 23
Re: BASS_VST 2.4.0.4 - available for download
« Reply #82 on: 11 Feb '08 - 07:44 »
1- Tempo and VST
Is it possible to send tempo to VST ?
Some VST use the tempo to adapt their effect (arpegiator, delay, ...)

2- Midi-in and VST
Is it possible to receve MIDI-events sent by the VST ?
e.g. improving the BASS_VST_SetCallback, with a BASS_VST_MIDI_RECEIVE similar to  BASS_VST_AUDIO_MASTER ) ?




bpetersen

  • Posts: 70
Re: BASS_VST 2.4.0.4 - available for download
« Reply #83 on: 11 Feb '08 - 09:49 »
Hello emiliojazz,

there should be no significant different between BASS_VST_ProcessEvent() and BASS_VST_ProcessEventRaw(). However, the MIDI-Interface offered by BASS_VST is only a small subset of the possibilities offered by VST itself. Maybe the B4-plugin relies on "more special" options normally not available in BASS?

If you know VST and if you like, you can try it yourself by processing VstMidiEvent structures directly:

Code: [Select]
#include <aeffectx.h> // you can get this file from Steinberg

BASS_VST_GetInfo(vstHandle, &info);
info.aeffect->dispatcher(info.aeffect, effProcessEvents, 0, 0, events, 0.0);

On the other hand - other plugins work correctly - may the support from Native Instruments has an idea?

Regards,
Bjoern

bpetersen

  • Posts: 70
Re: BASS_VST 2.4.0.4 - available for download
« Reply #84 on: 11 Feb '08 - 09:51 »
Hello Franck REVOLLE,

same answer as to emiliojazz - I think such special stuff requires some direct access to VST. And also note, that only the tempo may not be sufficient for plugins - they will also need the signature, the current position and much more, see VstTimeInfo for details.

To setup such a structure and/or to receive MIDI from a plugin, you have to subclass BASS_VST's audio master:

Code: [Select]
#include <aeffectx.h> // you can get this file from Steinberg

DWORD myCallback(DWORD vstHandle, DWORD action, DWORD param1, DWORD param2, void* user)
{
  if( action == BASS_VST_AUDIO_MASTER )
  {
    BASS_VST_AUDIO_MASTER_PARAM* audioMaster = (BASS_VST_AUDIO_MASTER_PARAM*)param1;
    if( audioMaster->opcode == audioMasterGetTime )
    {
      static VstTimeInfo ti;
      ti.timeSigNumerator = ... // set up much more here ...
      audioMaster->doDefault = 0;
      return (VstIntPtr)&ti;
    }
    else if( audioMaster->opcode == audioMasterProcessEvents )
    {
      VstEvents* evt = audioMaster->ptr;
      // ... do what to do with the MIDI events from the plugin ...
      audioMaster->doDefault = 0;
    }
  }
  return 0;
}

BASS_VST_SetCallback(vstHandle, myCallback, 0);

Please let me know if I have missed something general useful and important in BASS_VST, however, IMHO for special stuff the way above seems to be more usefull.

Regards,
Bjoern
« Last Edit: 11 Feb '08 - 09:57 by bpetersen »

Franck REVOLLE

  • Posts: 23
Re: BASS_VST 2.4.0.4 - available for download
« Reply #85 on: 20 Feb '08 - 11:57 »
Tempo and Midi function in VSTi : thank you very much for your complete answer. :)
This option is flexible and open.
One "missing" function is the support of ASIO and VST(i and e) for Macintosh : Mac is an important actor for VST, and I (and other I think) need to have VST for both platforms.

bpetersen

  • Posts: 70
Re: BASS_VST 2.4.0.4 - available for download
« Reply #86 on: 20 Feb '08 - 19:16 »
One "missing" function is the support of ASIO and VST(i and e) for Macintosh [...]

Currently, I have not the time for a mac port, but maybe it will be done with the help of another member, see above.

Regarding ASIO - I am not sure what VST has to do with ASIO - beside the fact that both techniques are created by Steinberg.

Best regards,
Bjoern

Chris

  • Posts: 2217
Re: BASS_VST 2.4.0.4 - available for download
« Reply #87 on: 9 Mar '08 - 16:00 »
Hello
Can you please test this Compressor Plugin.
It will produce a Floating Point Error(Division to Null) Error after
the  BASS_VST_ChannelSetDSP Call
http://www.dyvision.co.uk/6bc.htm

Also it would be interessenting How other Applications (e.g Wavelab,Acid,Soundforge and so on)
will dedected which VST/Direct Plugins are installed and how they are find a way to access them
e.g Wave Plugins will working on all Applications(so far I know) that will have Directx/VST Plugins Support.
Cheers Chris
« Last Edit: 9 Mar '08 - 23:09 by Chris »

gabsoftware

  • Posts: 30
Re: BASS_VST 2.4.0.4 - available for download
« Reply #88 on: 7 Apr '08 - 12:51 »
Hello,

I try to use BassVST for many days now in my .NET audio player, but i don't find how to do this correctly. Especially how to use BASS_VST_SetScope (not very well documented...).
What is a scope? How do I now the previous scope ? how do I define a new scope ? Is it a kind of magic number ? Is is the VST plugin uniqueID ?


Let's take for example the Classic EQ vst Plugin

Here is how things should work for my player :

- I load a VST effect and display its embeded editor into a window, or create my own GUI otherwise. No active playing channel are necessary passed to BASS_VST_ChannelSetDSP, as I want it's possible to display the effect GUI at any time.

- If the audio player plays a music file, the effect editor's window should update all the Vu-meters, sliders, etc... but never do so.

However that's not so easy to do. If I load and display a plugin DURING I play a file than everything is okay, the vu-meters and sliders are updated.
If I close the effect window, and reopen it, the plugins is no longer updating the vu-meters. But the effect is loaded, I can hear it !
If I play a new music, then the effect window is updating again the VU-meter...


When I load the window I do the following :

Code: [Select]
BassVST.BASS_VST_EmbedEditor(Me.vstEntry.vstHandle, IntPtr.Zero)  '=> will return FALSE the first time I run the code, I do this as a security
BassVST.BASS_VST_EmbedEditor(Me.vstEntry.vstHandle, Me.Handle)  '=>will return TRUE the first time I run the code, but always FALSE each time I reopen the window and the same music is playing...


When I close the window I do the following :

Code: [Select]
BassVSTClass.BASS_VST_EmbedEditor(Me.vstEntry.vstHandle, IntPtr.Zero) '=> will return TRUE each time I close the window

When I play a new music, I do the following :

I close the effect window.

Code: [Select]
BassVst.BASS_VST_EmbedEditor(vstHandle, 0)


'then I have a new music handle. I plug the new effect to it.
BassVst.BASS_VST_ChannelRemoveDSP(oldaudiostrm, oldvsthandle)
vstHandle = BassVst.BASS_VST_ChannelSetDSP(newStrm, vstPath, BASSVSTDsp.BASS_VST_DEFAULT, 1)

Then open the effect window editor again.


I must add : all is working so well for the effects with no GUI. That's just displaying and updating the editor which is problematic.


So how to get this work ?
« Last Edit: 7 Apr '08 - 14:59 by gabsoftware »

bpetersen

  • Posts: 70
Re: BASS_VST 2.4.0.4 - available for download
« Reply #89 on: 7 Apr '08 - 20:00 »
Well, I will try to explain BASS_VST_SetScope() which is probably be the key to your problem.

The "scope" is used to forward "real" audio data to "unchanneled" editors (you may want to use these editors as you may want the user to open the editor window at any time, independent of a playing channel).

Imaging the following code, where two streams are prepared for crossfading:

Code: [Select]
ch1 = BASS_StreamCreateFile(false, "sth1.ogg", ...);
dsp1 = BASS_VST_ChannelSetDSP(ch1, "sth.dll", ...);

ch2 = BASS_StreamCreateFile(false, "sth2.ogg", ...);
dsp2 = BASS_VST_ChannelSetDSP(ch2, "sth.dll", ...);

// do the crossfade here ...

For the user, this is one logical channel. If the user opens the editor for the "sth" effect, it should display first the spectrum/vu/etc from the first, after crossfading from the second channel. To let the editor know this, you should use the "scope". The "scope" simply brings independent channels together to one logical unit - mainly for displaying the correct spectrum/vu/etc in the editors.

So before the crossfade, you should set the scope:

Code: [Select]
BASS_VST_SetScope(dsp1, 123); // any number, scope is created implicitly
BASS_VST_SetScope(dsp2, 123); // any number, scope is created implicitly

// do the crossfade here ...

To open the unchanneled editor, you can then simply use the following code:

Code: [Select]
editor = BASS_VST_ChannelSetDSP(0, "sth.dll", ...);
BASS_VST_SetScope(editor, 123);
BASS_VST_EmbedEditor(editor, ...);

The editor can then be opened, closed, created and destroyed independingly of the playing stuff.

Finally: If you use BASSMIX, maybe you won't need the VST-scopes as you can add the effects to the finaly mix. However, even in this case, there may be situations where BASS_VST_SetScope() ist just fine and simplifies your code ;-)

HTH -
Bjoern

gabsoftware

  • Posts: 30
Re: BASS_VST 2.4.0.4 - available for download
« Reply #90 on: 8 Apr '08 - 05:43 »
So if I understand well, I need at least two simultaneous VST handles in order to be able to open an editor at any time ? The editor vst handle should always have 0 for the audio stream, and other vst handles should have a valid audio stream but never display the editor. All vst should have same scope. Is that right ? :)

Thank you for your explanation, I will test this and repost the result of my modifications.

I use Bassmix, but I don't know how to use it well with bassvst...

Maybe a real-life application sample could show me the way ! (Bass + bassmix + bassvst with unchannelled editors working together)

I return to my happy programming :)

gabsoftware

  • Posts: 30
Re: BASS_VST 2.4.0.4 - available for download
« Reply #91 on: 8 Apr '08 - 08:04 »
Now i can get all the vu-meters, but sometimes withour any reason the sound just cut for some plugins and not for others, when I load the effect (just load, not display the editor).

Also and that's more ennoying, when I move the embeded editor sliders and knobs, nothing happens, as there is no channel for the editor...

Is the solution with BASS_VST_SetParamCopyParams() ? If so, how to do ? (other way than the dirty .net timer ticking every 100ms and calling BASS_VST_SetParamCopyParams)


So how to deal with this ?

gabsoftware

  • Posts: 30
Re: BASS_VST 2.4.0.4 - available for download
« Reply #92 on: 8 Apr '08 - 08:42 »
I try with Bass_vst_setparamscopyparams and now almost everything works as expected.
However, I can't have two different vst editors both with vu-meters in same time... I add one, it's working, I add another one. The first still work but the second don't update although it have the same scope. As soon as I close the first editor then the second editor is updated !

What is the cause of this ?

Thank you for your help ! :)

bpetersen

  • Posts: 70
Re: BASS_VST 2.4.0.4 - available for download
« Reply #93 on: 8 Apr '08 - 13:02 »
What is the cause of this ?

This only affects the displayed vu meters etc. Forwarding is done only to one editor - so you should use only one open editor per scope. However, I think this shouldn't be a problem, as there will other problems arise if you open an editor for a plugin twice (sliders and parameters out of sync etc.).

gabsoftware

  • Posts: 30
Re: BASS_VST 2.4.0.4 - available for download
« Reply #94 on: 8 Apr '08 - 18:34 »
I mean, of course, two different plugins (eg Classic EQ and Classic autofilter) ;) Only one is updated at a time. However the willling to assign different effect on a same audio channel is not uncommon. How to do then ? Allowing the simultaneous display of only one vst effect editor ?

bpetersen

  • Posts: 70
Re: BASS_VST 2.4.0.4 - available for download
« Reply #95 on: 8 Apr '08 - 19:19 »
Okay - of course you can add several effects to channels.

Code: [Select]
ch1 = BASS_StreamCreateFile(false, "sth1.ogg", ...);

dsp1a = BASS_VST_ChannelSetDSP(ch1, "sth1a.dll", ...);
BASS_VST_SetScope(dsp1a, 123);

dsp1b = BASS_VST_ChannelSetDSP(ch1, "sth1b.dll", ...);
BASS_VST_SetScope(dsp1b, 123);

And both editors can be opened independingly and unchanneled:

Code: [Select]
editor1a = BASS_VST_ChannelSetDSP(0, "sth1a.dll", ...);
BASS_VST_SetScope(editor1a, 123);
BASS_VST_EmbedEditor(editor1a, ...);

editor1b = BASS_VST_ChannelSetDSP(0, "sth1a.dll", ...);
BASS_VST_SetScope(editor1b, 123);
BASS_VST_EmbedEditor(editor1b, ...);

Again, there is no need to use unchanneled editors in every case. For editors assigned to a channel, you can use the following, shorter code:

Code: [Select]
ch1 = BASS_StreamCreateFile(false, "sth1.ogg", ...);

dsp1a = BASS_VST_ChannelSetDSP(ch1, "sth1a.dll", ...);
dsp1b = BASS_VST_ChannelSetDSP(ch1, "sth1b.dll", ...);

BASS_VST_EmbedEditor(dsp1a, ...);
BASS_VST_EmbedEditor(dsp1b, ...);

gabsoftware

  • Posts: 30
Re: BASS_VST 2.4.0.4 - available for download
« Reply #96 on: 9 Apr '08 - 13:07 »
Hello,


I just took 3 screenshots to show you what I think is a bassvst problem, not mine (but maybe I'm wrong) :)

Screenshot #1 :
I opened two different vst plugins with the same scope. The audio channel have also the same scope. But, just the first plugin I opened have its vu-meter updated.

Screenshot #2 :
I closed the Classic EQ window and what happens ? the Classic audio filter vu-meters are updated !

Screenshot #3 :
I then reopened the Classic EQ window. But only the Classic Audio filter remains updated.


I hope now you understand when I say that I can't get two different vst plugins updated with the same audio channel ! :)
Or maybe the way I do it is not correct ? Can you successfully get two editors updated on your computer, using the same audio channel ?
« Last Edit: 9 Apr '08 - 13:16 by gabsoftware »

bpetersen

  • Posts: 70
Re: BASS_VST 2.4.0.4 - available for download
« Reply #97 on: 9 Apr '08 - 15:06 »
Thank you for your detailed report, it really seems as if there is a bug in BASS_VST_SetScope(), I will check this.

Bjoern

gabsoftware

  • Posts: 30
Re: BASS_VST 2.4.0.4 - available for download
« Reply #98 on: 10 Apr '08 - 06:26 »
Thank you ! I wait for the update  ;)

bpetersen

  • Posts: 70
Re: BASS_VST 2.4.0.5 - available for download
« Reply #99 on: 10 Apr '08 - 09:11 »
Hello,

I've updated the download link in the first post to point to BASS_VST 2.4.0.5. The new version should fix the BASS_VST_SetScope()-problem described above.

Best regards,
Bjoern Petersen