diff options
author | Robert Jonsson <spamatica@gmail.com> | 2010-10-13 19:34:22 +0000 |
---|---|---|
committer | Robert Jonsson <spamatica@gmail.com> | 2010-10-13 19:34:22 +0000 |
commit | 8a2c2824a59d7644e13bc52c9a0ecbd641f21f95 (patch) | |
tree | 064ad3f2bf8daab0ad27b128abd86a9bbdb1e496 /muse2/muse/vst.h | |
parent | a27706d9629e8b592cca4659f865b70adef24e6d (diff) |
new branch muse2, first checkin
Diffstat (limited to 'muse2/muse/vst.h')
-rw-r--r-- | muse2/muse/vst.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/muse2/muse/vst.h b/muse2/muse/vst.h new file mode 100644 index 00000000..38585e8e --- /dev/null +++ b/muse2/muse/vst.h @@ -0,0 +1,83 @@ +//========================================================= +// MusE +// Linux Music Editor +// $Id: vst.h,v 1.11.2.3 2009/11/25 09:09:44 terminator356 Exp $ +// (C) Copyright 2004 Werner Schweer (ws@seh.de) +//========================================================= + +#ifndef __VST_H__ +#define __VST_H__ + +#include "synth.h" +//Added by qt3to4: +#include <Q3PopupMenu> + +struct _FSTHandle; +struct _FST; + +//--------------------------------------------------------- +// VstSynth +//--------------------------------------------------------- + +class VstSynth : public Synth { + _FSTHandle* fstHandle; + + public: + //VstSynth(const QFileInfo& fi) : Synth(fi) { fstHandle = 0; } + VstSynth(const QFileInfo& fi) : Synth(fi, fi->baseName()) { + fstHandle = 0; + } + + virtual ~VstSynth() {} + virtual void incInstances(int val); + virtual void* instantiate(); + //virtual SynthIF* createSIF() const; + virtual SynthIF* createSIF(SynthI*) const; + }; + +//--------------------------------------------------------- +// VstSynthIF +// VSTi synthesizer instance +//--------------------------------------------------------- + +class VstSynthIF : public SynthIF + { + _FST* _fst; + bool _guiVisible; + + public: + //VstSynthIF() { _fst = 0; _guiVisible = false; } + VstSynthIF(SynthI* s) : SynthIF(s) { + _fst = 0; + _guiVisible = false; + } + + virtual bool initGui() { return true; }; + virtual void guiHeartBeat() { } + virtual bool guiVisible() const; + virtual void showGui(bool v); + virtual bool hasGui() const; + virtual void getGeometry(int*, int*, int*, int*) const {} + virtual void setGeometry(int, int, int, int) {} + virtual void preProcessAlways() { }; + virtual iMPEvent getData(MidiPort*, MPEventList*, iMPEvent, unsigned pos, int ports, unsigned n, float** buffer) ; + virtual bool putEvent(const MidiPlayEvent& ev); + virtual MidiPlayEvent receiveEvent(); + virtual int eventsPending() const { return 0; } + virtual bool init(Synth*); + virtual int channels() const; + virtual int totalOutChannels() const; + virtual int totalInChannels() const; + virtual void deactivate3(); + virtual const char* getPatchName(int, int, int, bool) const { return ""; } + virtual const char* getPatchName(int, int, MType, bool) { return ""; } + virtual void populatePatchPopup(Q3PopupMenu*, int, MType, bool) {}; + virtual void write(int level, Xml& xml) const; + virtual float getParameter(unsigned long idx) const; + virtual void setParameter(unsigned long idx, float value); + virtual int getControllerInfo(int, const char**, int*, int*, int*, int*) { return 0; } + }; + + +#endif + |