BEAST/BSE - Better Audio System and Sound Engine  0.8.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
bsesimpleadsr.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_SIMPLE_ADSR_H__
00003 #define __BSE_SIMPLE_ADSR_H__
00004 
00005 #include <bse/bseplugin.hh>
00006 #include <bse/bsesource.hh>
00007 
00008 G_BEGIN_DECLS
00009 
00010 /* --- object type macros --- */
00011 #define BSE_TYPE_SIMPLE_ADSR              (bse_simple_adsr_get_type())
00012 #define BSE_SIMPLE_ADSR(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), BSE_TYPE_SIMPLE_ADSR, BseSimpleADSR))
00013 #define BSE_SIMPLE_ADSR_CLASS(class)      (G_TYPE_CHECK_CLASS_CAST ((class), BSE_TYPE_SIMPLE_ADSR, BseSimpleADSRClass))
00014 #define BSE_IS_SIMPLE_ADSR(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), BSE_TYPE_SIMPLE_ADSR))
00015 #define BSE_IS_SIMPLE_ADSR_CLASS(class)   (G_TYPE_CHECK_CLASS_TYPE ((class), BSE_TYPE_SIMPLE_ADSR))
00016 #define BSE_SIMPLE_ADSR_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), BSE_TYPE_SIMPLE_ADSR, BseSimpleADSRClass))
00017 
00018 struct BseSimpleADSRVars {
00019   float   attack_level;
00020   float   attack_inc;
00021   float   decay_dec;
00022   float   sustain_level;
00023   float   release_dec;
00024 };
00025 struct BseSimpleADSR : BseSource {
00026   float     attack_time;
00027   float     decay_time;
00028   float     sustain_level;
00029   float     release_time;
00030   BseTimeRangeType  time_range;
00031 };
00032 struct BseSimpleADSRClass : BseSourceClass
00033 {};
00034 
00035 enum
00036 {
00037   BSE_SIMPLE_ADSR_ICHANNEL_GATE,
00038   BSE_SIMPLE_ADSR_ICHANNEL_RETRIGGER,
00039   BSE_SIMPLE_ADSR_N_ICHANNELS
00040 };
00041 enum
00042 {
00043   BSE_SIMPLE_ADSR_OCHANNEL_OUT,
00044   BSE_SIMPLE_ADSR_OCHANNEL_DONE,
00045   BSE_SIMPLE_ADSR_N_OCHANNELS
00046 };
00047 
00048 G_END_DECLS
00049 
00050 #endif /* __BSE_SIMPLE_ADSR_H__ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines