Functions |
TranslateMidi (FP_DelphiPlug.pas / FP_CPlug.h)
This function is used to translate a value from the range 0..65536 to the range
Min..Max. This is necessary in the ProcessParams function of TFruityPlug when
the flag REC_FromMIDI is specified.
Parameters :
Value
(int64 / __int64) : The value between 0..65536
Min
(int64 / __int64) : The minimum value of the control
Max
(int64 / __int64) : The maximum value of the control
Result (integer / int) : The new value (between Min and Max, inclusive)
MinOf (FP_Extra .pas/.h)
An easy way to retrieve the smallest of two values.
Delphi :
function MinOf(a, b: integer): integer;
C++ :
int MinOf(int a, int b);
MulShift16 (FP_Extra .pas/.h)
Multiplies its two parameters and shifts them left by 16 bits.
Delphi :
function MulShift16(a,b:Integer):Integer;
C++ :
int MulShift16(int a, int b);
VolumeToVelocity (FP_Extra .pas/.h)
Translates the host's voice volume to a linear MIDI velocity (values between
0 and 1). Simply pass it the InitLevels.Vol field of the VoiceParams record.
Delphi :
function VolumeToVelocity(Volume: single): single;
C++ :
float VolumeToVelocity(float Volume);
VolumeToMIDIVelocity (FP_Extra .pas/.h)
Translates the host's voice volume to a linear MIDI velocity (values between
0 and 127). Simply pass it the InitLevels.Vol field of the VoiceParams record.
Delphi :
function VolumeToMIDIVelocity(Volume: single): single;
C++ :
float VolumeToMIDIVelocity(float Volume);