BEAST/BSE - Better Audio System and Sound Engine  0.8.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
bsemidivoice.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_MIDI_VOICE_H__
00003 #define __BSE_MIDI_VOICE_H__
00004 
00005 #include <bse/bsesource.hh>
00006 #include <bse/bsesnet.hh>
00007 
00008 G_BEGIN_DECLS
00009 
00010 /* --- object type macros --- */
00011 #define BSE_TYPE_MIDI_VOICE_INPUT               (BSE_TYPE_ID (BseMidiVoiceInput))
00012 #define BSE_MIDI_VOICE_INPUT(object)            (G_TYPE_CHECK_INSTANCE_CAST ((object), BSE_TYPE_MIDI_VOICE_INPUT, BseMidiVoiceInput))
00013 #define BSE_MIDI_VOICE_INPUT_CLASS(class)       (G_TYPE_CHECK_CLASS_CAST ((class), BSE_TYPE_MIDI_VOICE_INPUT, BseMidiVoiceInputClass))
00014 #define BSE_IS_MIDI_VOICE_INPUT(object)         (G_TYPE_CHECK_INSTANCE_TYPE ((object), BSE_TYPE_MIDI_VOICE_INPUT))
00015 #define BSE_IS_MIDI_VOICE_INPUT_CLASS(class)    (G_TYPE_CHECK_CLASS_TYPE ((class), BSE_TYPE_MIDI_VOICE_INPUT))
00016 #define BSE_MIDI_VOICE_INPUT_GET_CLASS(object)  (G_TYPE_INSTANCE_GET_CLASS ((object), BSE_TYPE_MIDI_VOICE_INPUT, BseMidiVoiceInputClass))
00017 #define BSE_TYPE_MIDI_VOICE_SWITCH              (BSE_TYPE_ID (BseMidiVoiceSwitch))
00018 #define BSE_MIDI_VOICE_SWITCH(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), BSE_TYPE_MIDI_VOICE_SWITCH, BseMidiVoiceSwitch))
00019 #define BSE_MIDI_VOICE_SWITCH_CLASS(class)      (G_TYPE_CHECK_CLASS_CAST ((class), BSE_TYPE_MIDI_VOICE_SWITCH, BseMidiVoiceSwitchClass))
00020 #define BSE_IS_MIDI_VOICE_SWITCH(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), BSE_TYPE_MIDI_VOICE_SWITCH))
00021 #define BSE_IS_MIDI_VOICE_SWITCH_CLASS(class)   (G_TYPE_CHECK_CLASS_TYPE ((class), BSE_TYPE_MIDI_VOICE_SWITCH))
00022 #define BSE_MIDI_VOICE_SWITCH_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), BSE_TYPE_MIDI_VOICE_SWITCH, BseMidiVoiceSwitchClass))
00023 
00024 struct BseMidiVoiceSwitch : BseSource {
00025   guint          midi_channel;
00026   GSList        *midi_voices;
00027 };
00028 struct BseMidiVoiceSwitchClass : BseSourceClass
00029 {};
00030 struct BseMidiVoiceInput : BseSource {
00031   BseMidiVoiceSwitch *voice_switch;
00032 };
00033 struct BseMidiVoiceInputClass : BseSourceClass
00034 {};
00035 
00036 void           bse_midi_voice_switch_set_midi_channel (BseMidiVoiceSwitch *self,
00037                                                        guint               midi_channel);
00038 BseMidiContext bse_midi_voice_switch_ref_poly_voice   (BseMidiVoiceSwitch *self,
00039                                                        guint               context_handle,
00040                                                        BseTrans           *trans);
00041 BseMidiContext bse_midi_voice_switch_peek_poly_voice  (BseMidiVoiceSwitch *self,
00042                                                        guint               context_handle);
00043 void           bse_midi_voice_switch_unref_poly_voice (BseMidiVoiceSwitch *self,
00044                                                        guint               context_handle,
00045                                                        BseTrans           *trans);
00046 void           bse_midi_voice_input_set_voice_switch  (BseMidiVoiceInput  *self,
00047                                                        BseMidiVoiceSwitch *voice_switch);
00048 
00049 
00050 /* --- channels --- */
00051 enum
00052 {
00053   BSE_MIDI_VOICE_INPUT_OCHANNEL_FREQUENCY,
00054   BSE_MIDI_VOICE_INPUT_OCHANNEL_GATE,
00055   BSE_MIDI_VOICE_INPUT_OCHANNEL_VELOCITY,
00056   BSE_MIDI_VOICE_INPUT_OCHANNEL_AFTERTOUCH
00057 };
00058 enum
00059 {
00060   BSE_MIDI_VOICE_SWITCH_ICHANNEL_LEFT,
00061   BSE_MIDI_VOICE_SWITCH_ICHANNEL_RIGHT,
00062   BSE_MIDI_VOICE_SWITCH_ICHANNEL_DISCONNECT
00063 };
00064 enum
00065 {
00066   BSE_MIDI_VOICE_SWITCH_OCHANNEL_LEFT,
00067   BSE_MIDI_VOICE_SWITCH_OCHANNEL_RIGHT,
00068   BSE_MIDI_VOICE_SWITCH_OCHANNEL_DISCONNECT
00069 };
00070 
00071 G_END_DECLS
00072 
00073 #endif /* __BSE_MIDI_VOICE_H__ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines