/usr/include/faust/vst/faust.h is in faust-common 0.9.95~repack1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | #ifndef __VST_FAUST_H__
#define __VST_FAUST_H__
#include <list>
#include <map>
#include <vector>
#include "audioeffectx.h"
//#include "../audio/dsp.h"
const int MAX_POLYPHONY = 10;
const int INITIAL_TEMP_OUTPUT_SIZE = 1024;
//////////////////////////////////////////////////////////////////
// Faust class definition
// This class implements the abstract methods of AudioEffectX
// that define the VST instrument behavior.
//////////////////////////////////////////////////////////////////
class Faust : public AudioEffectX {
public:
// Constructor
Faust(audioMasterCallback audioMaster, dsp* dspi, vstUI* dspUIi);
// Destructor
virtual ~Faust();
virtual void processReplacing (FAUSTFLOAT** inputs, FAUSTFLOAT** outputs, VstInt32 sampleFrames);
virtual VstInt32 processEvents (VstEvents* events);
virtual void setProgram (VstInt32 program);
virtual void setProgramName (const char *name);
virtual void getProgramName (char *name);
virtual bool getProgramNameIndexed (VstInt32 category, VstInt32 index, char *text);
virtual void setParameter (VstInt32 index, float value);
virtual float getParameter (VstInt32 index);
virtual void getParameterLabel (VstInt32 index, char *label);
virtual void getParameterDisplay (VstInt32 index, char *text);
virtual void getParameterName (VstInt32 index, char *text);
virtual bool getParameterProperties(VstInt32 index, VstParameterProperties* properties);
virtual void setSampleRate (float sampleRate);
virtual bool getInputProperties (VstInt32 index, VstPinProperties *properties);
virtual bool getOutputProperties (VstInt32 index, VstPinProperties *properties);
virtual bool getEffectName (char *name);
virtual bool getVendorString (char *text);
virtual bool getProductString (char *text);
virtual VstInt32 getVendorVersion ();
virtual VstInt32 canDo (const char *text);
virtual VstInt32 getNumMidiInputChannels ();
virtual VstInt32 getNumMidiOutputChannels ();
virtual VstInt32 getMidiProgramName (VstInt32 channel, MidiProgramName *midiProgramName);
virtual VstInt32 getCurrentMidiProgram (VstInt32 channel, MidiProgramName *currentProgram);
virtual VstInt32 getMidiProgramCategory (VstInt32 channel, MidiProgramCategory *category);
private:
// Get metadata supplied by Faust compiler
const char* getMetadata(const char* key, const char* defaultString);
void initProcess ();
void noteOn (VstInt32 note, VstInt32 velocity, VstInt32 delta);
void noteOff (VstInt32 note, VstInt32 delta);
void allNotesOff( void );
void fillProgram (VstInt32 channel, VstInt32 prg, MidiProgramName* mpn);
void synthProcessReplacing(float **inputs, float **outputs,
VstInt32 sampleFrames);
void compute(float** inputs, float** outputs, VstInt32 sampleFrames);
void bendPitch(float bend);
dsp* m_dsp;
vstUI* m_dspUI;
// For synths:
bool noteIsOn;
VstInt32 currentNote;
VstInt32 currentVelocity;
VstInt32 currentDelta;
std::list<VstInt32> m_currentNotes;
std::list<VstInt32> m_currentVelocities;
std::list<VstInt32> m_currentDeltas;
char programName[kVstMaxProgNameLen + 1];
// Polyphony
std::vector<Voice*> m_voices;
// Occupied voices - map note to voice index
struct voice_node {
VstInt32 note;
int voice;
};
std::list<voice_node*> m_playingVoices;
// key off but still sounding
std :: vector< int > m_releasedVoices;
// Free voices - currently rot playing
std :: list< int > m_freeVoices;
// Previously played voice
int m_prevVoice;
FAUSTFLOAT** m_tempOutputs;
size_t m_tempOutputSize; // in float frames
}; // end of Faust class
#endif
|