24 May '13 - 05:14 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: because it does not work BASS_VST_ProcessEventRAW ??  (Read 523 times)
Salvo
Posts: 41


« on: 16 Oct '10 - 07:15 »
Reply with quoteQuote

I implemented this part of the code is I have a roland VSTi.
When you open the editor and sending a reset GM2 in practice, the VSTi does not receive the reset.
Where wrong?
------------------------------------------------------------------------------
procedure TMidiOutputPort.OutLongEvent (const Event : TMidiEventData);
var MIDIHDR:TmidiHdr;
    err:Integer;
    buf:array [0..200] of AnsiChar;
begin
  if Assigned (fPhysicalPort) then with Event.data do
  begin
    if status = midiSysex then
    begin
      if Event.Sysexsize>199 then
        Exit;
      Buf[0]:=chr(240);
      for err:=1 to Event.Sysexsize do
        Buf[err]:=sysex[err-1];
      midiHdr.lpData := Buf;
      midiHdr.dwBufferLength:=Event.Sysexsize+1;
      midiHdr.dwFlags:=0;
      if fCanale>0 then ////// output VSTi
           BASS_VST_ProcessEventRAW(fCanale,PChar(midiHdr.lpData),midiHdr.dwBufferLength)
      else
      begin //// normal midi output
          Err:=midiOutPrepareHeader(handle,@midiHdr,sizeof(MIDIHDR));
          if err=0 then
          begin
            midiOutLongMsg (handle,@midiHdr,sizeof(MIDIHDR));
            midiOutUnPrepareHeader(handle,@midiHdr,sizeof(MIDIHDR));
          end;
      end;          
---------------------------------------------------------------------------------

Thanks for anyone who wants to help me.
Logged
Salvo
Posts: 41


« Reply #1 on: 16 Oct '10 - 09:04 »
Reply with quoteQuote

If I send a reset
PChar(Chr (240)+Chr(126)+Chr(127)+Chr(9)+Chr(3)+Chr(247)) / / reset GM2
I installed the HyperCanvas roland
the system not reset.
If I put
err:=BASS_VST_ProcessEventRAW(fCanale,PChar(Chr (240)+Chr(126)+Chr(127)+Chr(9)+Chr(3)+Chr(247)),6);
err -> True

by not reset
Hi
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines