BEAST/BSE - Better Audio System and Sound Engine  0.8.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
bsestandardosc.hh
Go to the documentation of this file.
00001  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
00002 #ifndef __BSE_STANDARD_OSC_H__
00003 #define __BSE_STANDARD_OSC_H__
00004 #include <bse/bsesource.hh>
00005 #include <bse/gsloscillator.hh>
00006 G_BEGIN_DECLS
00007 
00008 #define BSE_TYPE_STANDARD_OSC              (BSE_TYPE_ID (BseStandardOsc))
00009 #define BSE_STANDARD_OSC(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), BSE_TYPE_STANDARD_OSC, BseStandardOsc))
00010 #define BSE_STANDARD_OSC_CLASS(class)      (G_TYPE_CHECK_CLASS_CAST ((class), BSE_TYPE_STANDARD_OSC, BseStandardOscClass))
00011 #define BSE_IS_STANDARD_OSC(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), BSE_TYPE_STANDARD_OSC))
00012 #define BSE_IS_STANDARD_OSC_CLASS(class)   (G_TYPE_CHECK_CLASS_TYPE ((class), BSE_TYPE_STANDARD_OSC))
00013 #define BSE_STANDARD_OSC_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), BSE_TYPE_STANDARD_OSC, BseStandardOscClass))
00014 
00015 typedef enum
00016 {
00017   BSE_STANDARD_OSC_SINE         = GSL_OSC_WAVE_SINE,            /*< nick=Sine >*/
00018   BSE_STANDARD_OSC_TRIANGLE     = GSL_OSC_WAVE_TRIANGLE,        /*< nick=Triangle >*/
00019   BSE_STANDARD_OSC_SAW_RISE     = GSL_OSC_WAVE_SAW_RISE,        /*< nick=Rising Saw >*/
00020   BSE_STANDARD_OSC_SAW_FALL     = GSL_OSC_WAVE_SAW_FALL,        /*< nick=Falling Saw >*/
00021   BSE_STANDARD_OSC_PEAK_RISE    = GSL_OSC_WAVE_PEAK_RISE,       /*< nick=Rising Peak >*/
00022   BSE_STANDARD_OSC_PEAK_FALL    = GSL_OSC_WAVE_PEAK_FALL,       /*< nick=Falling Peak >*/
00023   BSE_STANDARD_OSC_MOOG_SAW     = GSL_OSC_WAVE_MOOG_SAW,        /*< nick=Moog Saw >*/
00024   BSE_STANDARD_OSC_SQUARE       = GSL_OSC_WAVE_SQUARE,          /*< nick=Square >*/
00025   BSE_STANDARD_OSC_PULSE        = GSL_OSC_WAVE_PULSE_SAW        /*< nick=Pulse >*/
00026 } BseStandardOscWaveType;
00027 
00028 struct BseStandardOsc : BseSource {
00029   BseStandardOscWaveType wave;
00030   GslOscConfig           config;
00031   int                    transpose;
00032   gfloat                 fm_strength;
00033   gfloat                 n_octaves;
00034 };
00035 struct BseStandardOscClass : BseSourceClass
00036 {};
00037 
00038 enum
00039 {
00040   BSE_STANDARD_OSC_ICHANNEL_FREQ,
00041   BSE_STANDARD_OSC_ICHANNEL_FREQ_MOD,
00042   BSE_STANDARD_OSC_ICHANNEL_PWM,
00043   BSE_STANDARD_OSC_ICHANNEL_SYNC,
00044   BSE_STANDARD_OSC_N_ICHANNELS
00045 };
00046 enum
00047 {
00048   BSE_STANDARD_OSC_OCHANNEL_OSC,
00049   BSE_STANDARD_OSC_OCHANNEL_SYNC,
00050   BSE_STANDARD_OSC_N_OCHANNELS
00051 };
00052 
00053 G_END_DECLS
00054 
00055 #endif /* __BSE_STANDARD_OSC_H__ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines