BEAST/BSE - Better Audio System and Sound Engine  0.8.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
standardguspatchenvelope.genidl.hh
Go to the documentation of this file.
00001 
00002 /*-------- begin ../sfi/sfidl generated code --------*/
00003 
00004 
00005 
00006 #include <bse/bsecxxplugin.hh>
00007 
00008 
00009 /* enum prototypes */
00010 
00011 
00012 /* choice prototypes */
00013 
00014 
00015 /* record prototypes */
00016 
00017 
00018 /* sequence prototypes */
00019 
00020 
00021 /* class prototypes */
00022 namespace Bse {
00023 namespace Standard {
00024 class GusPatchEnvelopeBase;
00025 class GusPatchEnvelope;
00026 #define BSE_STANDARD_TYPE_GUS_PATCH_ENVELOPE            BSE_CXX_DECLARED_CLASS_TYPE (Bse::Standard, GusPatchEnvelope)
00027 #define BSE_STANDARD_IS_GUS_PATCH_ENVELOPE(o) (::Bse::CxxBase::instance_is_a (o, BSE_STANDARD_TYPE_GUS_PATCH_ENVELOPE))
00028 
00029 
00030 /* enum definitions */
00031 
00032 
00033 /* sequence definitions */
00034 
00035 
00036 /* record definitions */
00037 
00038 
00039 /* enum declarations */
00040 
00041 
00042 /* sequence type declarations */
00043 
00044 
00045 /* record type declarations */
00046 
00047 
00048 /* procedure prototypes */
00049 
00050 
00051 /* class definitions */
00052 BSE_CXX_DECLARE_CLASS (GusPatchEnvelope);
00053 class GusPatchEnvelopeBase : public ::Bse::Effect {
00054 public:
00055   static inline const unsigned char* pixstream () { return NULL; }
00056   static void               class_init (::Bse::CxxBaseClass *klass);
00057   static inline const char* options   () { return "unstable"; }
00058   static inline const char* category  () { static const char *c = NULL;
00059     return c ? c : c = sfi_category_concat ("/Modules",  ("/Misc/StandardGusPatchEnvelope")); }
00060   static inline const char* i18n_category  () { static const char *c = NULL;
00061     return c ? c : c = sfi_category_concat ("/Modules", _("/Misc/StandardGusPatchEnvelope")); }
00062   static inline const char* blurb     () { return _("StandardGusPatchEnvelope is an Envelope for GUS Patches\n\nGUS Patches contain different volume settings and tremolo settings for different notes, and the envelopes are of a non-standard form, thus using a BseWaveOsc alone is not enough to produce the sound of the GUS Patches; to accomplish the playing, you thus need to connect one (or for stereo two) BseWaveOsc(s) and their Gate Output Signal to this module."); }
00063   static inline const char* authors   () { return "Stefan Westerfeld"; }
00064   static inline const char* license   () { return _("GNU Lesser General Public License"); }
00065   static inline const char* type_name () { return "BseStandardGusPatchEnvelope"; }
00066 public:
00067   enum {
00068     ICHANNEL_FREQUENCY,
00069     ICHANNEL_GATE_IN,
00070     ICHANNEL_RETRIGGER_IN,
00071     ICHANNEL_AUDIO_IN,
00072     ICHANNEL_AUDIO_GATE,
00073     N_ICHANNELS
00074   };
00075 public:
00076   enum {
00077     OCHANNEL_AUDIO_OUT1,
00078     OCHANNEL_AUDIO_OUT2,
00079     OCHANNEL_DONE_OUT,
00080     N_OCHANNELS
00081   };
00082 protected:
00083   enum GusPatchEnvelopePropertyID {
00084     PROP_WAVE = 1,
00085   };
00086 public:
00087   /* "transport" structure to configure synthesis modules from properties */
00088   struct GusPatchEnvelopeProperties {
00089     typedef GusPatchEnvelopePropertyID IDType;
00090     BseWave* wave;
00091     explicit GusPatchEnvelopeProperties (GusPatchEnvelopeBase *p) :
00092       wave (p->wave)
00093     {
00094     }
00095   };
00096 protected:
00097   typedef void AutoUpdateCategory;
00098 protected:
00099   BseWave* wave;
00100 public:
00101   void get_property (GusPatchEnvelopePropertyID prop_id, ::Bse::Value &value, GParamSpec *pspec)
00102   {
00103     switch (prop_id) {
00104     case PROP_WAVE:
00105       ::Bse::CxxBase::value_set_gobject (&value, wave);
00106     break;
00107     };
00108   }
00109   void set_property (GusPatchEnvelopePropertyID prop_id, const ::Bse::Value &value, GParamSpec *pspec)
00110   {
00111     switch (prop_id) {
00112     case PROP_WAVE:
00113       wave = ::Bse::CxxBase::value_get_gobject< BseWave> (&value);
00114     break;
00115     };
00116     property_changed (GusPatchEnvelopePropertyID (prop_id));
00117     update_modules();
00118     switch (prop_id) {
00119     default: ;
00120     };
00121   }
00122   virtual bool editable_property (GusPatchEnvelopePropertyID prop_id, GParamSpec *pspec)
00123   {
00124     return true;
00125   }
00126   virtual void get_candidates (GusPatchEnvelopePropertyID prop_id, ::Bse::PropertyCandidatesHandle &pch, GParamSpec *pspec)
00127   {
00128   }
00129   void property_updated (GusPatchEnvelopePropertyID prop_id, guint64 tick_stamp, double prop_value, GParamSpec *pspec)
00130   {
00131     bool seen_change = false;
00132     switch (prop_id) {
00133     default: ;
00134     };
00135     if (seen_change &&
00136         property_changed (GusPatchEnvelopePropertyID (prop_id)))
00137       update_modules();
00138   }
00139 private:
00140   static struct StaticData {
00141     int dummy;
00142   } static_data;
00143 protected:
00144   virtual bool property_changed (GusPatchEnvelopePropertyID) { return false; }
00145   virtual ~GusPatchEnvelopeBase ()
00146   {
00147   }
00148 public:
00149 };
00150 
00151 
00152 /* choice implementations */
00153 
00154 
00155 /* record implementations */
00156 
00157 
00158 /* sequence implementations */
00159 
00160 
00161 /* class implementations */
00162 void
00163 GusPatchEnvelopeBase::class_init (::Bse::CxxBaseClass *klass)
00164 {
00165   klass->set_accessors (::Bse::cxx_get_property_trampoline<GusPatchEnvelopeBase, GusPatchEnvelopePropertyID>,
00166                         ::Bse::cxx_set_property_trampoline<GusPatchEnvelopeBase, GusPatchEnvelopePropertyID>,
00167                         ::Bse::cxx_editable_property_trampoline<GusPatchEnvelopeBase, GusPatchEnvelopePropertyID>,
00168                         ::Bse::cxx_get_candidates_trampoline<GusPatchEnvelopeBase, GusPatchEnvelopePropertyID>,
00169                         NULL);
00170   klass->add_param (PROP_WAVE, sfidl_pspec_TypedObject_default (_("Properties"),"/opt/src/beast/plugins/standardguspatchenvelope.idl",753, "wave", BSE_TYPE_WAVE));
00171   klass->add_ichannel ("frequency", _("Frequency"), _("Frequency Input"), ICHANNEL_FREQUENCY);
00172   klass->add_ichannel ("gate_in", _("Gate In"), _("Gate input (activates/deactivates envelope)"), ICHANNEL_GATE_IN);
00173   klass->add_ichannel ("retrigger_in", _("Retrigger In"), _("Retrigger input (raising edge retriggers envelope)"), ICHANNEL_RETRIGGER_IN);
00174   klass->add_ichannel ("audio_in", _("Audio In"), _("Audio Input of the WaveOsc playing the patch"), ICHANNEL_AUDIO_IN);
00175   klass->add_ichannel ("audio_gate", _("Audio Gate"), _("Gate Output of the WaveOsc playing the patch"), ICHANNEL_AUDIO_GATE);
00176   klass->add_ochannel ("audio_out1", _("Audio Out1"), _("Envelope audio output 1 (left output signal)"), OCHANNEL_AUDIO_OUT1);
00177   klass->add_ochannel ("audio_out2", _("Audio Out2"), _("Envelope audio output 2 (right output signal)"), OCHANNEL_AUDIO_OUT2);
00178   klass->add_ochannel ("done_out", _("Done Out"), _("This signal goes high after the release phase has completed"), OCHANNEL_DONE_OUT);
00179 }
00180 
00181 
00182 /* procedure implementations */
00183 
00184 
00185 /* standardguspatchenvelope.idl type registrations */
00186 #define BSE_CXX_REGISTER_ALL_TYPES_FROM_STANDARDGUSPATCHENVELOPE_IDL() \
00187   BSE_CXX_REGISTER_EFFECT (GusPatchEnvelope); \
00188   /* standardguspatchenvelope.idl type registrations done */
00189 } // Standard
00190 } // Bse
00191 
00192 /*-------- end ../sfi/sfidl generated code --------*/
00193 
00194 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines