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 127 128 129 130 131 132
|
<!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: midi.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>midi.h</h1><a href="midi_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_MIDI_H</span>
00022 <span class="preprocessor"></span><span class="preprocessor">#define _FLUIDSYNTH_MIDI_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
00029
00030 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <a class="code" href="types_8h.html#a10">fluid_midi_event_t</a>* <a class="code" href="midi_8h.html#a1">new_fluid_midi_event</a>(<span class="keywordtype">void</span>);
00031 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a2">delete_fluid_midi_event</a>(<a class="code" href="types_8h.html#a10">fluid_midi_event_t</a>* event);
00032
00033 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a3">fluid_midi_event_set_type</a>(<a class="code" href="types_8h.html#a10">fluid_midi_event_t</a>* evt, <span class="keywordtype">int</span> type);
00034 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a4">fluid_midi_event_get_type</a>(<a class="code" href="types_8h.html#a10">fluid_midi_event_t</a>* evt);
00035 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a5">fluid_midi_event_set_channel</a>(<a class="code" href="types_8h.html#a10">fluid_midi_event_t</a>* evt, <span class="keywordtype">int</span> chan);
00036 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a6">fluid_midi_event_get_channel</a>(<a class="code" href="types_8h.html#a10">fluid_midi_event_t</a>* evt);
00037 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a7">fluid_midi_event_get_key</a>(<a class="code" href="types_8h.html#a10">fluid_midi_event_t</a>* evt);
00038 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a8">fluid_midi_event_set_key</a>(<a class="code" href="types_8h.html#a10">fluid_midi_event_t</a>* evt, <span class="keywordtype">int</span> key);
00039 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a9">fluid_midi_event_get_velocity</a>(<a class="code" href="types_8h.html#a10">fluid_midi_event_t</a>* evt);
00040 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a10">fluid_midi_event_set_velocity</a>(<a class="code" href="types_8h.html#a10">fluid_midi_event_t</a>* evt, <span class="keywordtype">int</span> vel);
00041 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a11">fluid_midi_event_get_control</a>(<a class="code" href="types_8h.html#a10">fluid_midi_event_t</a>* evt);
00042 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a12">fluid_midi_event_set_control</a>(<a class="code" href="types_8h.html#a10">fluid_midi_event_t</a>* evt, <span class="keywordtype">int</span> ctrl);
00043 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a13">fluid_midi_event_get_value</a>(<a class="code" href="types_8h.html#a10">fluid_midi_event_t</a>* evt);
00044 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a14">fluid_midi_event_set_value</a>(<a class="code" href="types_8h.html#a10">fluid_midi_event_t</a>* evt, <span class="keywordtype">int</span> val);
00045 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a15">fluid_midi_event_get_program</a>(<a class="code" href="types_8h.html#a10">fluid_midi_event_t</a>* evt);
00046 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a16">fluid_midi_event_set_program</a>(<a class="code" href="types_8h.html#a10">fluid_midi_event_t</a>* evt, <span class="keywordtype">int</span> val);
00047 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a17">fluid_midi_event_get_pitch</a>(<a class="code" href="types_8h.html#a10">fluid_midi_event_t</a>* evt);
00048 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a18">fluid_midi_event_set_pitch</a>(<a class="code" href="types_8h.html#a10">fluid_midi_event_t</a>* evt, <span class="keywordtype">int</span> val);
00049
00050
00051 <span class="comment">/* Generic callback function for MIDI events.</span>
00052 <span class="comment"> * Will be used between</span>
00053 <span class="comment"> * - MIDI driver and MIDI router</span>
00054 <span class="comment"> * - MIDI router and synth</span>
00055 <span class="comment"> * to communicate events.</span>
00056 <span class="comment"> * In the not-so-far future...</span>
00057 <span class="comment"> */</span>
<a name="l00058"></a><a class="code" href="midi_8h.html#a0">00058</a> <span class="keyword">typedef</span> int (*<a class="code" href="midi_8h.html#a0">handle_midi_event_func_t</a>)(<span class="keywordtype">void</span>* data, <a class="code" href="types_8h.html#a10">fluid_midi_event_t</a>* event);
00059
00060 <span class="comment">/*</span>
00061 <span class="comment"> *</span>
00062 <span class="comment"> * MIDI router</span>
00063 <span class="comment"> *</span>
00064 <span class="comment"> * The MIDI handler forwards incoming MIDI events to the synthesizer</span>
00065 <span class="comment"> *</span>
00066 <span class="comment"> */</span>
00067
00071 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <a class="code" href="types_8h.html#a12">fluid_midi_router_t</a>* <a class="code" href="midi_8h.html#a19">new_fluid_midi_router</a>(<a class="code" href="types_8h.html#a0">fluid_settings_t</a>* settings,
00072 <a class="code" href="midi_8h.html#a0">handle_midi_event_func_t</a> handler,
00073 <span class="keywordtype">void</span>* event_handler_data);
00074
00080 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a20">delete_fluid_midi_router</a>(<a class="code" href="types_8h.html#a12">fluid_midi_router_t</a>* handler);
00081
00084 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a21">fluid_midi_router_handle_midi_event</a>(<span class="keywordtype">void</span>* data, <a class="code" href="types_8h.html#a10">fluid_midi_event_t</a>* event);
00085
00088 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a22">fluid_midi_dump_prerouter</a>(<span class="keywordtype">void</span>* data, <a class="code" href="types_8h.html#a10">fluid_midi_event_t</a>* event);
00089
00092 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a23">fluid_midi_dump_postrouter</a>(<span class="keywordtype">void</span>* data, <a class="code" href="types_8h.html#a10">fluid_midi_event_t</a>* event);
00093
00094 <span class="comment">/*</span>
00095 <span class="comment"> *</span>
00096 <span class="comment"> * MIDI driver</span>
00097 <span class="comment"> *</span>
00098 <span class="comment"> * The MIDI handler forwards incoming MIDI events to the synthesizer</span>
00099 <span class="comment"> *</span>
00100 <span class="comment"> */</span>
00101
00102
00103 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a>
00104 <a class="code" href="types_8h.html#a11">fluid_midi_driver_t</a>* <a class="code" href="midi_8h.html#a24">new_fluid_midi_driver</a>(<a class="code" href="types_8h.html#a0">fluid_settings_t</a>* settings,
00105 <a class="code" href="midi_8h.html#a0">handle_midi_event_func_t</a> handler,
00106 <span class="keywordtype">void</span>* event_handler_data);
00107
00108 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">void</span> <a class="code" href="midi_8h.html#a25">delete_fluid_midi_driver</a>(<a class="code" href="types_8h.html#a11">fluid_midi_driver_t</a>* driver);
00109
00110
00111
00112 <span class="comment">/*</span>
00113 <span class="comment"> *</span>
00114 <span class="comment"> * MIDI file player</span>
00115 <span class="comment"> *</span>
00116 <span class="comment"> * The MIDI player allows you to play MIDI files with the FLUID Synth</span>
00117 <span class="comment"> *</span>
00118 <span class="comment"> */</span>
00119
00120 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <a class="code" href="types_8h.html#a9">fluid_player_t</a>* <a class="code" href="midi_8h.html#a26">new_fluid_player</a>(<a class="code" href="types_8h.html#a1">fluid_synth_t</a>* synth);
00121 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a27">delete_fluid_player</a>(<a class="code" href="types_8h.html#a9">fluid_player_t</a>* player);
00122 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a28">fluid_player_add</a>(<a class="code" href="types_8h.html#a9">fluid_player_t</a>* player, <span class="keywordtype">char</span>* midifile);
00123 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a29">fluid_player_play</a>(<a class="code" href="types_8h.html#a9">fluid_player_t</a>* player);
00124 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a30">fluid_player_stop</a>(<a class="code" href="types_8h.html#a9">fluid_player_t</a>* player);
00125 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a31">fluid_player_join</a>(<a class="code" href="types_8h.html#a9">fluid_player_t</a>* player);
00126 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a32">fluid_player_set_loop</a>(<a class="code" href="types_8h.html#a9">fluid_player_t</a>* player, <span class="keywordtype">int</span> loop);
00127 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a33">fluid_player_set_midi_tempo</a>(<a class="code" href="types_8h.html#a9">fluid_player_t</a>* player, <span class="keywordtype">int</span> tempo);
00128 <a class="code" href="fluidsynth_8h.html#a0">FLUIDSYNTH_API</a> <span class="keywordtype">int</span> <a class="code" href="midi_8h.html#a34">fluid_player_set_bpm</a>(<a class="code" href="types_8h.html#a9">fluid_player_t</a>* player, <span class="keywordtype">int</span> bpm);
00129
00130 <span class="preprocessor">#ifdef __cplusplus</span>
00131 <span class="preprocessor"></span>}
00132 <span class="preprocessor">#endif</span>
00133 <span class="preprocessor"></span>
00134 <span class="preprocessor">#endif </span><span class="comment">/* _FLUIDSYNTH_MIDI_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>
|