Ну и
BASS FX
BASS_SPX
BASS_MPC
BASS_AC3
BASS_AAC
BASS_ALAC
BASS_TTA
BASS_APE
BASS_OFR
BASS_ADX
BASS_SFX
BASS_WA
Tags
http://www.un4seen.com/bass.html#maddons или [url=http://209.85.135.132/translate_c?hl=ru&sl=en&u=http://www.un4seen.com/bass.html&prev=/search%3Fq%3Dbass_vst%26hl%3Dru%26lr%3D%26client%3Dopera%26rls%3Dru%26sa%3DG&usg=ALkJrhj8qyW_rOxtBSarytG86UY6H-NjEQ#maddons]перевод от гугла[/url]
вот Bass_vst.pas
#pas
Unit Bass_VST;
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
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
rsvd : array [0..255] of Char;
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)
rsvd: array [0..255] of Char;
end;
VSTPROC = procedure (vstHandle : DWORD;Action : DWORD;Param1,Param2,User : DWORD);stdcall;
const BASS_VSTDLL = 'bass_vst.dll';
function BASS_VST_ChannelSetDSP (Channel : DWORD;const DLLFile : PChar;flags: DWORD; priority:Integer): DWORD;stdcall;external BASS_VSTDLL;
function BASS_VST_ChannelRemoveDSP(Channel : DWORD;vstHandle : DWORD): Bool;stdcall;external BASS_VSTDLL;
function BASS_VST_EmbedEditor(Channel : DWORD;ParentWindow : hwnd): Bool;stdcall;external BASS_VSTDLL;
function BASS_VST_GetInfo(VSTHandle : DWORD;pInfo: Pointer):Bool;stdcall;external BASS_VSTDLL;
function BASS_VST_GetParam(vstHandle : DWORD;paramIndex : integer): single;stdcall;external BASS_VSTDLL;
function BASS_VST_SetParam(vstHandle : DWORD;paramIndex : integer;value : single): Bool;stdcall;external BASS_VSTDLL;
function BASS_VST_GetParamCount(vstHandle : DWORD) : integer;stdcall;external BASS_VSTDLL;
function BASS_VST_GetParamInfo(vstHandle : DWORD;paramIndex : Integer;var Info : BASS_VST_PARAM_INFO): boolean;stdcall;external BASS_VSTDLL;
function BASS_VST_Resume(vstHandle : DWORD):Bool;stdcall;external BASS_VSTDLL;
function BASS_VST_SetCallback(vstHandle : DWORD; PROC : Pointer; user : DWORD):Bool;stdcall;external BASS_VSTDLL;
function BASS_VST_SetLanguage(const Lang : PChar):Bool;stdcall;external BASS_VSTDLL;
function BASS_VST_SetBypass(vstHandle : DWORD; state:boolean):bool;stdcall;external BASS_VSTDLL;
function BASS_VST_GetBypass(vstHandle : DWORD):dword;stdcall;external BASS_VSTDLL;
implementation
end.
#pas
unit frmMain;
interface
uses
Windows, Messages, SysUtils, classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, StdCtrls, ExtCtrls, Buttons;
type
TForm1 = class(TForm)
GroupBox1: TGroupBox;
ListBox1: TListBox;
Button1: TButton;
Label1: TLabel;
TrackBar1: TTrackBar;
Timer1: TTimer;
OpenDialog1: TOpenDialog;
VSTEdit: TEdit;
BitBtn1: TBitBtn;
VSTEffectCbx: TCheckBox;
VSTEffectShowBtn: TButton;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure TrackBar1Change(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure VSTEffectCbxClick(Sender: TObject);
procedure VSTEffectShowBtnClick(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Bass, Bass_vst, unit2;
var
chan: HSTREAM;
vstHandle : dword;
{$R *.dfm}
// display error messages
procedure Error(es: String);
begin
MessageBox(Application.Handle, PChar(es + #13#10 + '(error code: ' + IntToStr(BASS_ErrorGetCode()) + ')'), PChar('Error'), MB_OK);
end;
procedure TForm1.FormCreate(Sender: TObject);
var
sRec: TSearchRec;
i: Integer;
begin
// Check that BASS 2.2 was loaded
if (BASS_GetVersion <> DWORD(MAKELONG(2,2))) then
begin
MessageBox(0,'BASS version 2.2 was not loaded','Incorrect BASS.DLL',0);
Halt;
end;
// initialize default output device
if (not BASS_Init(-1,44100,0,Handle,nil)) then
begin
Error('Can''t initialize device');
Halt;
end;
// look for plugins (in the current directory)
i := FindFirst('bass*.dll', faAnyFile, sRec);
while i = 0 do
begin
if (BASS_PluginLoad(pchar(sRec.Name)) <> 0) then // plugin loaded...
ListBox1.Items.Add(sRec.Name);
i := FindNext(sRec);
end;
FindClose(sRec);
if (ListBox1.Items.Count = 0) then // no plugins...
begin
ListBox1.Items.Add('no plugins - ');
ListBox1.Items.Add('visit the BASS');
ListBox1.Items.Add('webpage to get some');
end;
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
BASS_Free();
BASS_PluginFree(0);
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
TrackBar1.Position := Trunc(BASS_ChannelBytes2Seconds(chan,BASS_ChannelGetPosition(chan))); // update position
end;
procedure TForm1.TrackBar1Change(Sender: TObject);
begin
// set the position
//removed because repeat the sample twice. BASS_ChannelSetPosition(chan,BASS_ChannelSeconds2Bytes(chan,TrackBar1.Position));
end;
procedure TForm1.Button1Click(Sender: TObject);
var
info: BASS_CHANNELINFO;
begin
if (not OpenDialog1.Execute) then
Exit;
BASS_StreamFree(chan);
chan := BASS_StreamCreateFile(False, pchar(OpenDialog1.FileName), 0, 0, BASS_SAMPLE_LOOP);
if (chan = 0) then
begin // it ain't playable
Button1.Caption := 'Click here to open a file...';
Label1.Caption := '';
Error('Can''t play the file');
Exit;
end;
BASS_ChannelGetInfo(chan, info);
Button1.Caption := OpenDialog1.FileName;
Label1.Caption := 'channel type = ' + IntToHex(info.ctype, 5);
TrackBar1.Max := Trunc(BASS_ChannelBytes2Seconds(chan, BASS_ChannelGetLength(chan)));
BASS_ChannelPlay(chan, False);
end;
procedure TForm1.VSTEffectCbxClick(Sender: TObject);
begin
if vsteffectCbx.checked then
// assign a VST plugin DLL to the channel
vstHandle := BASS_VST_ChannelSetDSP(chan, pchar(VSTEdit.text), 0, 0)
else
BASS_VST_ChannelRemoveDSP(Chan, vstHandle);
end;
procedure TForm1.VSTEffectShowBtnClick(Sender: TObject);
begin
if EffectForm.visible or ((vsthandle<>0)
and BASS_VST_EmbedEditor(vsthandle, EffectForm.handle)) then
EffectForm.show;
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
if (not OpenDialog1.Execute) then exit;
VSTEdit.text := OpenDialog1.filename;
end;
end.