1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>libfluidsynth: event.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6-20040222 -->
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a></div>
<h1>event.h</h1><a href="event_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/* FluidSynth - A Software Synthesizer</span>
00002 <span class="comment"> *</span>
00003 <span class="comment"> * Copyright (C) 2003 Peter Hanappe and others.</span>
00004 <span class="comment"> *</span>
00005 <span class="comment"> * This library is free software; you can redistribute it and/or</span>
00006 <span class="comment"> * modify it under the terms of the GNU Library General Public License</span>
00007 <span class="comment"> * as published by the Free Software Foundation; either version 2 of</span>
00008 <span class="comment"> * the License, or (at your option) any later version.</span>
00009 <span class="comment"> *</span>
00010 <span class="comment"> * This library is distributed in the hope that it will be useful, but</span>
00011 <span class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</span>
00012 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
00013 <span class="comment"> * Library General Public License for more details.</span>
00014 <span class="comment"> * </span>
00015 <span class="comment"> * You should have received a copy of the GNU Library General Public</span>
00016 <span class="comment"> * License along with this library; if not, write to the Free</span>
00017 <span class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA</span>
00018 <span class="comment"> * 02111-1307, USA</span>
00019 <span class="comment"> */</span>
00020
00021 <span class="preprocessor">#ifndef _FLUIDSYNTH_EVENT_H</span>
00022 <span class="preprocessor"></span><span class="preprocessor">#define _FLUIDSYNTH_EVENT_H</span>
00023 <span class="preprocessor"></span>
00024 <span class="preprocessor">#ifdef __cplusplus</span>
00025 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
00026 <span class="preprocessor">#endif</span>
00027 <span class="preprocessor"></span>
00028
<a name="l00029"></a><a class="code" href="event_8h.html#a57">00029</a> <span class="keyword">enum</span> <a class="code" href="event_8h.html#a57">fluid_seq_event_type</a> {
00030 <a class="code" href="event_8h.html#a57a0">FLUID_SEQ_NOTE</a> = 0,
00031 <a class="code" href="event_8h.html#a57a1">FLUID_SEQ_NOTEON</a>,
00032 <a class="code" href="event_8h.html#a57a2">FLUID_SEQ_NOTEOFF</a>,
00033 <a class="code" href="event_8h.html#a57a3">FLUID_SEQ_ALLSOUNDSOFF</a>,
00034 <a class="code" href="event_8h.html#a57a4">FLUID_SEQ_ALLNOTESOFF</a>,
00035 <a class="code" href="event_8h.html#a57a5">FLUID_SEQ_BANKSELECT</a>,
00036 <a class="code" href="event_8h.html#a57a6">FLUID_SEQ_PROGRAMCHANGE</a>,
00037 <a class="code" href="event_8h.html#a57a7">FLUID_SEQ_PROGRAMSELECT</a>,
00038 <a class="code" href="event_8h.html#a57a8">FLUID_SEQ_PITCHBEND</a>,
00039 <a class="code" href="event_8h.html#a57a9">FLUID_SEQ_PITCHWHHELSENS</a>,
00040 <a class="code" href="event_8h.html#a57a10">FLUID_SEQ_MODULATION</a>,
00041 <a class="code" href="event_8h.html#a57a11">FLUID_SEQ_SUSTAIN</a>,
00042 <a class="code" href="event_8h.html#a57a12">FLUID_SEQ_CONTROLCHANGE</a>,
00043 <a class="code" href="event_8h.html#a57a13">FLUID_SEQ_PAN</a>,
00044 <a class="code" href="event_8h.html#a57a14">FLUID_SEQ_VOLUME</a>,
00045 <a class="code" href="event_8h.html#a57a15">FLUID_SEQ_REVERBSEND</a>,
00046 <a class="code" href="event_8h.html#a57a16">FLUID_SEQ_CHORUSSEND</a>,
00047 <a class="code" href="event_8h.html#a57a17">FLUID_SEQ_TIMER</a>,
00048 <a class="code" href="event_8h.html#a57a18">FLUID_SEQ_ANYCONTROLCHANGE</a>, <span class="comment">// used for remove_events only</span>
00049 <a class="code" href="event_8h.html#a57a19">FLUID_SEQ_LASTEVENT</a>
00050 };
00051
00052 <span class="comment">/* Event alloc/free */</span>
00053 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <a class="code" href="types_8h.html#a17">fluid_event_t</a>* <a class="code" href="event_8h.html#a20">new_fluid_event</a>(<span class="keywordtype">void</span>);
00054 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">void</span> <a class="code" href="event_8h.html#a21">delete_fluid_event</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt);
00055
00056 <span class="comment">/* Initializing events */</span>
00057 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">void</span> <a class="code" href="event_8h.html#a22">fluid_event_set_source</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt, <span class="keywordtype">short</span> src);
00058 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">void</span> <a class="code" href="event_8h.html#a23">fluid_event_set_dest</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt, <span class="keywordtype">short</span> dest);
00059
00060 <span class="comment">/* Timer events */</span>
00061 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">void</span> <a class="code" href="event_8h.html#a24">fluid_event_timer</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt, <span class="keywordtype">void</span>* data);
00062
00063 <span class="comment">/* Note events */</span>
00064 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">void</span> <a class="code" href="event_8h.html#a25">fluid_event_note</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt, <span class="keywordtype">int</span> channel,
00065 <span class="keywordtype">short</span> key, <span class="keywordtype">short</span> vel,
00066 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> duration);
00067
00068 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">void</span> <a class="code" href="event_8h.html#a26">fluid_event_noteon</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt, <span class="keywordtype">int</span> channel, <span class="keywordtype">short</span> key, <span class="keywordtype">short</span> vel);
00069 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">void</span> <a class="code" href="event_8h.html#a27">fluid_event_noteoff</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt, <span class="keywordtype">int</span> channel, <span class="keywordtype">short</span> key);
00070 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">void</span> <a class="code" href="event_8h.html#a28">fluid_event_all_sounds_off</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt, <span class="keywordtype">int</span> channel);
00071 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">void</span> <a class="code" href="event_8h.html#a29">fluid_event_all_notes_off</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt, <span class="keywordtype">int</span> channel);
00072
00073 <span class="comment">/* Instrument selection */</span>
00074 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">void</span> <a class="code" href="event_8h.html#a30">fluid_event_bank_select</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt, <span class="keywordtype">int</span> channel, <span class="keywordtype">short</span> bank_num);
00075 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">void</span> <a class="code" href="event_8h.html#a31">fluid_event_program_change</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt, <span class="keywordtype">int</span> channel, <span class="keywordtype">short</span> preset_num);
00076 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">void</span> <a class="code" href="event_8h.html#a32">fluid_event_program_select</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt, <span class="keywordtype">int</span> channel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sfont_id, <span class="keywordtype">short</span> bank_num, <span class="keywordtype">short</span> preset_num);
00077
00078 <span class="comment">/* Real-time generic instrument controllers */</span>
00079 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a>
00080 <span class="keywordtype">void</span> <a class="code" href="event_8h.html#a33">fluid_event_control_change</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt, <span class="keywordtype">int</span> channel, <span class="keywordtype">short</span> control, <span class="keywordtype">short</span> val);
00081
00082 <span class="comment">/* Real-time instrument controllers shortcuts */</span>
00083 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">void</span> <a class="code" href="event_8h.html#a34">fluid_event_pitch_bend</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt, <span class="keywordtype">int</span> channel, <span class="keywordtype">int</span> val);
00084 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">void</span> <a class="code" href="event_8h.html#a35">fluid_event_pitch_wheelsens</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt, <span class="keywordtype">int</span> channel, <span class="keywordtype">short</span> val);
00085 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">void</span> <a class="code" href="event_8h.html#a36">fluid_event_modulation</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt, <span class="keywordtype">int</span> channel, <span class="keywordtype">short</span> val);
00086 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">void</span> <a class="code" href="event_8h.html#a37">fluid_event_sustain</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt, <span class="keywordtype">int</span> channel, <span class="keywordtype">short</span> val);
00087 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">void</span> <a class="code" href="event_8h.html#a38">fluid_event_pan</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt, <span class="keywordtype">int</span> channel, <span class="keywordtype">short</span> val);
00088 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">void</span> <a class="code" href="event_8h.html#a39">fluid_event_volume</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt, <span class="keywordtype">int</span> channel, <span class="keywordtype">short</span> val);
00089 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">void</span> <a class="code" href="event_8h.html#a40">fluid_event_reverb_send</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt, <span class="keywordtype">int</span> channel, <span class="keywordtype">short</span> val);
00090 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">void</span> <a class="code" href="event_8h.html#a41">fluid_event_chorus_send</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt, <span class="keywordtype">int</span> channel, <span class="keywordtype">short</span> val);
00091
00092 <span class="comment">/* Only for removing events */</span>
00093 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">void</span> <a class="code" href="event_8h.html#a42">fluid_event_any_control_change</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt, <span class="keywordtype">int</span> channel);
00094
00095 <span class="comment">/* Accessing event data */</span>
00096 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="event_8h.html#a43">fluid_event_get_type</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt);
00097 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">short</span> <a class="code" href="event_8h.html#a44">fluid_event_get_source</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt);
00098 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">short</span> <a class="code" href="event_8h.html#a45">fluid_event_get_dest</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt);
00099 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="event_8h.html#a46">fluid_event_get_channel</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt);
00100 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">short</span> <a class="code" href="event_8h.html#a47">fluid_event_get_key</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt);
00101 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">short</span> <a class="code" href="event_8h.html#a48">fluid_event_get_velocity</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt);
00102 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">short</span> <a class="code" href="event_8h.html#a49">fluid_event_get_control</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt);
00103 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">short</span> <a class="code" href="event_8h.html#a50">fluid_event_get_value</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt);
00104 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">short</span> <a class="code" href="event_8h.html#a51">fluid_event_get_program</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt);
00105 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">void</span>* <a class="code" href="event_8h.html#a52">fluid_event_get_data</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt);
00106 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="event_8h.html#a53">fluid_event_get_duration</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt);
00107 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">short</span> <a class="code" href="event_8h.html#a54">fluid_event_get_bank</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt);
00108 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="event_8h.html#a55">fluid_event_get_pitch</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt);
00109 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="event_8h.html#a56">fluid_event_get_sfont_id</a>(<a class="code" href="types_8h.html#a17">fluid_event_t</a>* evt);
00110
00111 <span class="preprocessor">#ifdef __cplusplus</span>
00112 <span class="preprocessor"></span>}
00113 <span class="preprocessor">#endif</span>
00114 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* _FLUIDSYNTH_EVENT_H */</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue Aug 17 14:37:45 2004 for libfluidsynth by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.6-20040222 </small></address>
</body>
</html>
|