vstd
- class
VSTHost
;
- This class represents the
VSTHost
, actions or values can be requested by
this class.
- int
masterVersion
();
- Returns:
hosts version
- int
inputLatency
();
- Returns:
input latency in frames
- void
wantEvents
();
- Deprecated:
This call is deprecated, but was added to support older hosts (like MaxMSP).
- float
samplingRate
();
- Returns:
current sampling rate of host.
- int
blockSize
();
- Returns:
current block size of host.
- class
VSTPresetManager
;
- This class handles preset handling. Basicly, each paramater from the plugin will be
mirrored into a preset in this class.
- this(VSTPlugin plugin, int count);
- Create the main VST programmer (preset manager).
Params:
| int count |
the number of preset to create |
- class
VSTParam
;
- Basic (float) vst parameter.
- this(char[] name, float* v);
- Creates a new generic float parameter.
Params:
| char[] name |
the name of the parameter |
| float* v |
the pointer of the attached float value |
- this(char[] name, float* v, char[] label);
- Creates a new generic float parameter.
Params:
| char[] name |
the name of the parameter |
| float* v |
the pointer of the attached float value |
| char[] label |
the label of this value |
- float
value
();
- Returns:
the current
value
of this parameter
- void delegate(VSTParam param, float value)
onChange
;
- Set this delegate if you want to be notified when the value of this
parameter has been changed
- void
value
(float v);
- Sets
value
of this parameter. The onChange delegate
will never be called if the
value
has changed.
Params:
| float v |
new float
value
of this parameter |
- void
setValue
(float v);
- Sets the value of this parameter. onChange will called
if the value is different than the original one
Params:
| float v |
new float value of this parameter |
- char[]
toString
();
- Override this to return a string value of the parameter. By default this
class will simply return the float value.
Returns:
string value of current parameter
- class
VSTParamSelect
: vstd.VSTParam;
- VSTParam that is based on a list of strings.
- this(char[] name, float* v, char[][] selector);
- Creates a new 'string' parameter. This string parameter will be based on the
selector.
Params:
| char[] name |
name of the parameter |
| char[][] selector |
a list of string representing the value |
- this(char[] name, float* v, char[][] selector, char[] label);
- Creates a new 'string' parameter. This string parameter will be based on the
selector.
Params:
| char[] name |
name of the parameter |
| char[][] selector |
a list of string representing the value |
| char[] label |
the label of this value |
- int
index
();
- Returns:
Returns the current selected
index
based on the array of string (selector)
passed in the constructor.
- void delegate(VSTParam param, int idx)
onChange
;
- Set this delegate if you want to be notified when the value of this
parameter has been changed
- class
VSTPinProperties
;
- Use to describe a pin property in a VSTPlugin.
- char[]
name
;
- Pin long
name
.
- char[]
shortName
;
- Pin short name.
- void
isActive
(bool v);
- Set this pin active.
Params:
- void
isStereo
(bool v);
- Sets stereo status of this pin.
Params:
- class
VSTPlugin
;
- Basic class that represents the VST plugin. Most of the initialization section
must be done in the constructor.
In the constructor, you must :
- Call declareInputs()/declareOutputs() to set the inputs/outputs
- Initialize the paramHandler array with VST parameters
- Set the uniqueId
- Initialize the name, product and vendor
- protected VSTHost
vsthost
;
- VSTHost interface, used to call or get values from host. It is instanciated
when the object is created.
- protected VSTParam[]
paramHandler
;
- VST parameter list. This list will be updated based on numParams attributes.
Based on initialization, all parameters must be stored in this array or the
VST loader will fail.
- protected VSTPresetManager
presetManager
;
- VST Program handler. This is the class that will manage your VST parameters,
they are only used if you want to load/save presets.
- protected VSTPinProperties[]
inputs
;
- Fill in these array to define your VST pin properties in input.
Use declareInput to define your input names.
- protected VSTPinProperties[]
outputs
;
- Fill in these array to define your VST pin properties in output.
Use declareInput to define your input names.
- protected char[]
effectName
;
- Sets effect name.
- protected char[]
vendorString
;
- Sets vendor name.
- protected char[]
productString
;
- Sets product name.
- protected bool
canReceiveVstMidiEvents
;
- Set this to true if you want to receive midi events.
- protected bool
canReceiveVstEvents
;
- Set this to true if you want to receive events.
- protected int
pluginCategory
;
- Sets plugin category for this synth. See VstPlugCategory.
- protected void
blockSize
(int value);
- Override this method if you need to be notified by a new block size.
Params:
| int value |
new block size value |
- protected void
sampleRate
(float value);
- Override this method if you need to be notified by a new sampling rate.
Params:
| float value |
new sampling rate |
- protected void
uniqueID
(int id);
- Sets the unique id of this VST plugin.
Params:
- protected void
isSynth
(bool state);
- Set VST capatibilities. If this is property is set to try, this VST will
have to override 'processEvents' to read VST events.
Params:
| bool state |
true if this is an VST is a synth. |
- protected int
processEvents
(VstEvents * events);
- Process a set of vst events.
Params:
| VstEvents * events |
event to be processed. |
- protected void
declareInputs
(char[][] names);
- This will define the number of input for you VST plugin. Use a string
to identify each pin. Later you can change the properties by accessing
the field
inputs.
Example:
declareInputs
(["In1", "In2"]);
- protected void
declareOutputs
(char[][] names);
- This will define the number of output for you VST plugin. Use a string
to identify each pin. Later you can change the properties by accessing
the field
outputs.
Example:
declareOutputs
(["Out1", "Out2"]);
- protected void
processReplacing
(float** inputs, float** outputs, int sampleFrames);
- Main audio processing method; to be overriden.
Params:
| float** inputs |
[channel [value]] audio input |
| float** outputs |
[chanel [value]] audio output |
| int sampleFrames |
the number of frames to process |
- protected AEffect *
getAEffect
();
- Returns:
The C struct of the AEffect structure.
- class
VSTSynth
: vstd.VSTPlugin;
-
VSTSynth
main class. Just like a VSTPlugin except that it will decode midi
data via method noteOn/noteOff.
- void
noteOn
(int chl, int note, int velocity, int delta);
- This method is called when a note-on midi message is received.
Params:
| int chl |
the channel of the event (0-15) |
| int note |
the note of the event (0-127) |
| int velocity |
the velocity of this note (0-127) |
| int delta |
the delta time of this note |
- void
noteOff
(int chl, int note, int delta);
- This method is called when a note-off midi message is received.
Params:
| int chl |
the channel of the event (0-15) |
| int note |
the note of the event (0-127) |
| int delta |
the delta time of this note |
- void
ctrl
(int chl, int name, int value, int delta);
- This method is called when a controller change midi message
is received.
Params:
| int chl |
the channel event (0-15) |
| int name |
the controller param (0-127) |
| int value |
the value of this parameter (0-127) |
| int delta |
the delta time of this event |
- uint
generateHeader
(char[] magic);
- This function will generate a 'magic' int header that is based on a string. This
header is often used to identify the plugin by the host
Params :
magic : 4 caracter string
- void
fillCString
(char* dest, char[] src, int size);
- Copies a D String into a C string with a maximum
size.
Params:
| char* dest |
the pointer where we should copy the string |
| char[] src |
the original string |
| int size |
the maximum size that we can copy to (doesn't include the null param) |
- void
registerPlugin
(ClassInfo clz);
- Call this function in your static VST class initializer to register
the main VST object.
Params:
| ClassInfo clz |
the class to instanciate when the dynamic library is loaded |
|