Types

 

TWaveT (fp_def)
This is the type of published wavetables.

Delphi

TWaveT = array[0..WaveT_Size-1] of single;
PWaveT = ^TWaveT;

C++

float TWaveT[WaveT_Size];
TWaveT *PWaveT;

 

TWAV32FS (fp_def)
The type for an interlaced stereo 32Bit float buffer. The first dimension of the array gives you an index into the audio data, while the second dimension specifies whether you want to access the left (0) or right (1) channel.

Delphi

TWAV32FS = array[0..0, 0..1] of single;
PWAV32FS = ^TWAV32FS

C++

float TWAV32FS[1][2]; 
TWAV32FS *PWAV32FS;

 

TMIDIOutMsg (fp_def)
This record / struct is used as the parameter of the MidiOut function of TFruityPlugHost. It contains the three midi data bytes and the port on which to send.

Delphi

TMIDIOutMsg=Packed Record 
  Status,
  Data1,
  Data2,
  Port    : Byte; 
End;

C++

typedef struct { 
    unsigned char Status; 
    unsigned char Data1; 
    unsigned char Data2; 
    unsigned char Port; 
} TMIDIOutMsg, *PMIDIOutMsg;

 

TNoteParams (fp_plugclass)
This structure describes a note that is going to be added to the piano roll.

Delphi

TNoteParams=Record 
  Position,Length :Integer; // in PPQ 

  // levels 
  Pan :Integer; // default=0 
  Vol :Single; // default=100/128        
  Note :Integer; // default=60 
  Pitch :Integer; // default=0 
  FCut,FRes :Single;        // default=0 
End; 

C++

typedef struct {
    int Position;  // in PPQ
    int Length;    // in PPQ
               
    // levels
    int Pan;       // default=0
    int Vol;       // default=100/128
    int Note;      // default=60
    int Pitch;     // default=0
    float FCut;    // default=0
    float FRes;    // default=0 
    End;
} TNoteParams;

 

TNotesParams (fp_plugclass)
This structure holds information about the list of notes that has to be added to the piano roll (Also see TNotesParams flags for possible values of the Flags member).

Delphi

TNotesParams=Record 
  Target :Integer;   // 0=step seq (not supported yet), 1=piano roll 
  Flags :Integer;    // see NPF_EmptyFirst 
  PatNum :Integer;   // -1 for current 
  ChanNum :Integer;  // -1 for plugin's channel 
  Count :Integer;    // the # of notes in the structure 
  NoteParams:Array[0..0] of TNoteParams; // array of notes 
End; 
PNotesParams=^TNotesParams;

C++

typedef struct {
    int Target;              // 0=step seq (not supported yet), 1=piano roll
    int Flags;               // see NPF_EmptyFirst
    int PatNum;              // -1 for current
    int ChanNum;             // -1 for plugin's channel
    int Count;               // the # of notes in the structure
    TNoteParams NoteParams[1];  // array of notes (variale size)
} TNotesParams, *PNotesParams;

 

TParamMenuEntry (fp_plugclass)
This structure is returned by the host Dispatcher function when it's called with FHD_GetParamMenuEntry. It describes an item that should be added to a control's right-click popup menu.

Delphi

TParamMenuEntry=Record 
  Name :PChar;   // name of the menu entry (or menu separator if '-') 
  Flags:Integer; // checked or disabled, see FHP_Disabled        
End; PParamMenuEntry=^TParamMenuEntry;

C++

typedef struct {
    char *Name;   // name of the menu entry (or menu separator if '-')
    int Flags;    // checked or disabled, see FHP_Disabled
} TParamMenuEntry, *PParamMenuEntry;

 

TSampleInfo (fp_plugclass)
This structure can be obtained by a call to the GetSampleInfo method of TFruityPlugHost and provides more detailed information about a sample.

Delphi

TSampleInfo=Packed Record
  Size              :Integer;  // size of this structure, MUST BE SET BY THE PLUGIN
  Data              :Pointer;  // pointer to the samples
  Length            :Integer;  // length in samples
  SolidLength       :Integer;  // length without ending silence
  LoopStart,LoopEnd :Integer;  // loop points (LoopStart=-1 if no loop points)
  SmpRateConv       :Double;   // host sample rate*SmpRateConv = sample rate
NumRegions :Integer; // number of regions in the sample (see GetSampleRegion)
NumBeats :Single; // length in beats
Tempo :Single; NumChans :Integer; // 1=mono, 2=stereo, MUST BE SET BY THE PLUGIN, to -1 if all formats are accepted
Format :Integer; // 0=16I, 1=32F, MUST BE SET BY THE PLUGIN, to -1 if all formats are accepted
Reserved :Array[0..12] of Integer; // future use End; PSampleInfo=^TSampleInfo;


C++

typedef struct {
int Size; // size of this structure, MUST BE SET BY THE PLUGIN
void *Data; // pointer to the samples
int Length; // length in samples
int SolidLength; // length without ending silence
int LoopStart;
int LoopEnd; // loop points (LoopStart=-1 if no loop points) double SmpRateConv; // host sample rate*SmpRateConv = sample rate int NumRegions; // number of regions in the sample (see GetSampleRegion)
float NumBeats; // length in beats
float Tempo; int NumChans; // 1=mono, 2=stereo, MUST BE SET BY THE PLUGIN, to -1 if all formats are accepted
int Format; // 0=16I, 1=32F, MUST BE SET BY THE PLUGIN, to -1 if all formats are accepted
int Reserved[13]; // future use } TSampleInfo, *PSampleInfo;

 

TSampleInfo (fp_plugclass)
This structure can be obtained by a call to the GetSampleRegion method of TFruityPlugHost.

Delphi

// sample region
TSampleRegion=Record
SampleStart,SampleEnd:Integer;
Name,Info :Array[0..255] of Char;
Time :Single; // beat position, mainly for loop dumping (-1 if not supported)
KeyNum :Integer; // linked MIDI note number (-1 if not supported)
Reserved :Array[0..3] of Integer;
End;
PSampleRegion=^TSampleRegion;


C++

// sample region
typedef struct {
int SampleStart;
int SampleEnd;
char Name[256];
char Info[256];
float Time; // beat position, mainly for loop dumping (-1 if not supported)
int KeyNum; // linked MIDI note number (-1 if not supported)
int Reserved[4];
} TSampleRegion, *PSampleRegion;

 

TFPTime (fp_plugclass)
Time information record for FHD_GetMixingTime.

Delphi

TFPTime = Packed Record
    t,t2:Double;
end;
PFPTime=^TFPTime;


C++

typedef struct {
    double t, t2;
} TFPTime, *PFPTime;