関数名 | 戻り値 | 引数 | 概要 |
getVendorString | bool型 | char* text | ホストアプリケーションに作者(ベンダー)名を教えるための関数 作者(ベンダー)名をtextに格納する。 作者(ベンダー)名の格納に成功するとtrueを返す |
getVendorVersion | VstInt32 | なし | ホストアプリケーションにVSTバージョンを教えるための関数 VSTバージョンを返す |
getProductString | bool型 | char* text | ホストアプリケーションにVSTの製品名を教えるための関数 VSTの製品名をtextに格納する。 VSTの製品名の格納に成功するとtrueを返す |
getEffectName | bool型 | char* name | ホストアプリケーションにVSTの名前を教えるための関数 VSTの名前をnameに格納する。 VSTの名前の格納に成功するとtrueを返す |
setParameter | なし | VstInt32 index float value |
ホストアプリケーションがパラメータに値を設定するための関数 indexで示されるパラメータにvalueの値を設定する valueは0.0~1.0の範囲で渡される |
getParameter | float型 | VstInt32 index | ホストアプリケーションにパラメータの値を教えるための関数 indexで示されるパラメータの値を返す 戻り値は0.0~1.0の間でなければならない |
getParameterName | なし | VstInt32 index char* text |
ホストアプリケーションにパラメータの名前を教えるための関数 indexで示されるパラメータの名前をtextに格納する。 |
getParameterLabel | なし | VstInt32 index char* label |
ホストアプリケーションにパラメータの単位を教えるための関数 indexで示されるパラメータの単位をlabelに格納する。 |
getParameterDisplay | なし | VstInt32 index char* text |
ホストアプリケーションにパラメータの表示内容を教えるための関数 indexで示されるパラメータの表示内容をtextに格納する。 |
processReplacing | なし | float** inputs float** outputs VstInt32 sampleFrames |
音声処理を行う関数。 定期的にホストアプリケーションから呼び出される。 バッファinputsで与えられる音声信号を加工してバッファoutputsに格納する。 処理するバッファサイズはsampleFramesで与えられる。 |
class SampleVST : public AudioEffectX
{
protected:
//設計したパラメータや内部変数・関数を記述する
public:
//コンストラクタ・デストラクタ
SampleVST (audioMasterCallback audioMaster);
~SampleVST ();
//以下AudioEffectXクラスからオーバーライドした関数
//作者(ベンダー)名、バージョン、製品名、VSTの名前を
//Hostアプリケーションへ知らせるメンバー関数
virtual bool getVendorString (char* text);
virtual VstInt32 getVendorVersion ();
virtual bool getProductString (char* text);
virtual bool getEffectName (char* name);
// エフェクターのパラメータに関するメンバー関数
virtual void setParameter (VstInt32 index, float value);
virtual float getParameter (VstInt32 index);
virtual void getParameterName (VstInt32 index, char* text);
virtual void getParameterLabel (VstInt32 index, char* label);
virtual void getParameterDisplay (VstInt32 index, char* text);
// 音声信号を処理するメンバー関数
virtual void processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames);
};
AudioEffect* createEffectInstance (audioMasterCallback audioMaster)
{
//newでこのVSTを生成したポインタを返す
return new SampleVST (audioMaster);
}