BEAST - Free Software Audio Synthesizer and Tracker  0.10.0
bseinstrument.hh
Go to the documentation of this file.
1  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
2 #ifndef __BSE_INSTRUMENT_H__
3 #define __BSE_INSTRUMENT_H__
4 
5 #include <bse/bseitem.hh>
6 
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif /* __cplusplus */
11 
12 
13 /* --- BSE type macros --- */
14 #define BSE_TYPE_INSTRUMENT (BSE_TYPE_ID (BseInstrument))
15 #define BSE_INSTRUMENT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), BSE_TYPE_INSTRUMENT, BseInstrument))
16 #define BSE_INSTRUMENT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), BSE_TYPE_INSTRUMENT, BseInstrumentClass))
17 #define BSE_IS_INSTRUMENT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), BSE_TYPE_INSTRUMENT))
18 #define BSE_IS_INSTRUMENT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), BSE_TYPE_INSTRUMENT))
19 #define BSE_INSTRUMENT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), BSE_TYPE_INSTRUMENT, BseInstrumentClass))
20 
21 
22 /* --- BseInstrument --- */
23 typedef struct _BseEnvelope BseEnvelope;
24 typedef enum
25 {
26  BSE_INSTRUMENT_NONE, /*< skip >*/
27  BSE_INSTRUMENT_WAVE, /*< nick=Custom Wave >*/
28  BSE_INSTRUMENT_SYNTH_NET, /*< nick=Custom Synth Net >*/
29  BSE_INSTRUMENT_STANDARD_PIANO, /*< nick=Piano >*/
30  BSE_INSTRUMENT_LAST /*< skip >*/
31 } BseInstrumentType;
33 {
34  guint delay_time;
35  guint attack_time;
36  gfloat attack_level;
37  guint decay_time;
38  gfloat sustain_level;
39  guint sustain_time;
40  gfloat release_level;
41  guint release_time;
42 };
44 {
45  BseItem parent_instance;
46 
47  BseInstrumentType type;
48  BseWave *wave;
49  BseSNet *user_snet;
50  BseSNet *seq_snet; /* sequencer snet */
51 
52  gfloat volume_factor;
53  gint balance;
54  gint transpose;
55  gint fine_tune;
56 
57  BseEnvelope env;
58 };
60 {
61  BseItemClass parent_class;
62 };
63 
64 
65 /* --- prototypes -- */
66 
67 
68 
69 #ifdef __cplusplus
70 }
71 #endif /* __cplusplus */
72 
73 #endif /* __BSE_INSTRUMENT_H__ */
Definition: bseinstrument.hh:59
Definition: bsesnet.hh:36
Definition: bseinstrument.hh:32
Definition: bseinstrument.hh:43
Definition: bsewave.hh:26
Definition: bseitem.hh:39
Definition: bseitem.hh:34