Main Page | Data Structures | File List | Data Fields | Globals

event.h

Go to the documentation of this file.
00001 /* FluidSynth - A Software Synthesizer 00002 * 00003 * Copyright (C) 2003 Peter Hanappe and others. 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Library General Public License 00007 * as published by the Free Software Foundation; either version 2 of 00008 * the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, but 00011 * WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Library General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Library General Public 00016 * License along with this library; if not, write to the Free 00017 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 00018 * 02111-1307, USA 00019 */ 00020 00021 #ifndef _FLUIDSYNTH_EVENT_H 00022 #define _FLUIDSYNTH_EVENT_H 00023 00024 #ifdef __cplusplus 00025 extern "C" { 00026 #endif 00027 00028 00029 enum fluid_seq_event_type { 00030 FLUID_SEQ_NOTE = 0, 00031 FLUID_SEQ_NOTEON, 00032 FLUID_SEQ_NOTEOFF, 00033 FLUID_SEQ_ALLSOUNDSOFF, 00034 FLUID_SEQ_ALLNOTESOFF, 00035 FLUID_SEQ_BANKSELECT, 00036 FLUID_SEQ_PROGRAMCHANGE, 00037 FLUID_SEQ_PROGRAMSELECT, 00038 FLUID_SEQ_PITCHBEND, 00039 FLUID_SEQ_PITCHWHHELSENS, 00040 FLUID_SEQ_MODULATION, 00041 FLUID_SEQ_SUSTAIN, 00042 FLUID_SEQ_CONTROLCHANGE, 00043 FLUID_SEQ_PAN, 00044 FLUID_SEQ_VOLUME, 00045 FLUID_SEQ_REVERBSEND, 00046 FLUID_SEQ_CHORUSSEND, 00047 FLUID_SEQ_TIMER, 00048 FLUID_SEQ_ANYCONTROLCHANGE, // used for remove_events only 00049 FLUID_SEQ_LASTEVENT 00050 }; 00051 00052 /* Event alloc/free */ 00053 FLUIDSYNTH_API fluid_event_t* new_fluid_event(void); 00054 FLUIDSYNTH_API void delete_fluid_event(fluid_event_t* evt); 00055 00056 /* Initializing events */ 00057 FLUIDSYNTH_API void fluid_event_set_source(fluid_event_t* evt, short src); 00058 FLUIDSYNTH_API void fluid_event_set_dest(fluid_event_t* evt, short dest); 00059 00060 /* Timer events */ 00061 FLUIDSYNTH_API void fluid_event_timer(fluid_event_t* evt, void* data); 00062 00063 /* Note events */ 00064 FLUIDSYNTH_API void fluid_event_note(fluid_event_t* evt, int channel, 00065 short key, short vel, 00066 unsigned int duration); 00067 00068 FLUIDSYNTH_API void fluid_event_noteon(fluid_event_t* evt, int channel, short key, short vel); 00069 FLUIDSYNTH_API void fluid_event_noteoff(fluid_event_t* evt, int channel, short key); 00070 FLUIDSYNTH_API void fluid_event_all_sounds_off(fluid_event_t* evt, int channel); 00071 FLUIDSYNTH_API void fluid_event_all_notes_off(fluid_event_t* evt, int channel); 00072 00073 /* Instrument selection */ 00074 FLUIDSYNTH_API void fluid_event_bank_select(fluid_event_t* evt, int channel, short bank_num); 00075 FLUIDSYNTH_API void fluid_event_program_change(fluid_event_t* evt, int channel, short preset_num); 00076 FLUIDSYNTH_API void fluid_event_program_select(fluid_event_t* evt, int channel, unsigned int sfont_id, short bank_num, short preset_num); 00077 00078 /* Real-time generic instrument controllers */ 00079 FLUIDSYNTH_API 00080 void fluid_event_control_change(fluid_event_t* evt, int channel, short control, short val); 00081 00082 /* Real-time instrument controllers shortcuts */ 00083 FLUIDSYNTH_API void fluid_event_pitch_bend(fluid_event_t* evt, int channel, int val); 00084 FLUIDSYNTH_API void fluid_event_pitch_wheelsens(fluid_event_t* evt, int channel, short val); 00085 FLUIDSYNTH_API void fluid_event_modulation(fluid_event_t* evt, int channel, short val); 00086 FLUIDSYNTH_API void fluid_event_sustain(fluid_event_t* evt, int channel, short val); 00087 FLUIDSYNTH_API void fluid_event_pan(fluid_event_t* evt, int channel, short val); 00088 FLUIDSYNTH_API void fluid_event_volume(fluid_event_t* evt, int channel, short val); 00089 FLUIDSYNTH_API void fluid_event_reverb_send(fluid_event_t* evt, int channel, short val); 00090 FLUIDSYNTH_API void fluid_event_chorus_send(fluid_event_t* evt, int channel, short val); 00091 00092 /* Only for removing events */ 00093 FLUIDSYNTH_API void fluid_event_any_control_change(fluid_event_t* evt, int channel); 00094 00095 /* Accessing event data */ 00096 FLUIDSYNTH_API int fluid_event_get_type(fluid_event_t* evt); 00097 FLUIDSYNTH_API short fluid_event_get_source(fluid_event_t* evt); 00098 FLUIDSYNTH_API short fluid_event_get_dest(fluid_event_t* evt); 00099 FLUIDSYNTH_API int fluid_event_get_channel(fluid_event_t* evt); 00100 FLUIDSYNTH_API short fluid_event_get_key(fluid_event_t* evt); 00101 FLUIDSYNTH_API short fluid_event_get_velocity(fluid_event_t* evt); 00102 FLUIDSYNTH_API short fluid_event_get_control(fluid_event_t* evt); 00103 FLUIDSYNTH_API short fluid_event_get_value(fluid_event_t* evt); 00104 FLUIDSYNTH_API short fluid_event_get_program(fluid_event_t* evt); 00105 FLUIDSYNTH_API void* fluid_event_get_data(fluid_event_t* evt); 00106 FLUIDSYNTH_API unsigned int fluid_event_get_duration(fluid_event_t* evt); 00107 FLUIDSYNTH_API short fluid_event_get_bank(fluid_event_t* evt); 00108 FLUIDSYNTH_API int fluid_event_get_pitch(fluid_event_t* evt); 00109 FLUIDSYNTH_API unsigned int fluid_event_get_sfont_id(fluid_event_t* evt); 00110 00111 #ifdef __cplusplus 00112 } 00113 #endif 00114 #endif /* _FLUIDSYNTH_EVENT_H */

Generated on Sat Jun 11 17:30:08 2005 for libfluidsynth by doxygen 1.3.8