00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _FLUIDSYNTH_MIDI_H
00022 #define _FLUIDSYNTH_MIDI_H
00023
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027
00028
00029
00030 FLUIDSYNTH_API fluid_midi_event_t* new_fluid_midi_event(void);
00031 FLUIDSYNTH_API int delete_fluid_midi_event(fluid_midi_event_t* event);
00032
00033 FLUIDSYNTH_API int fluid_midi_event_set_type(fluid_midi_event_t* evt, int type);
00034 FLUIDSYNTH_API int fluid_midi_event_get_type(fluid_midi_event_t* evt);
00035 FLUIDSYNTH_API int fluid_midi_event_set_channel(fluid_midi_event_t* evt, int chan);
00036 FLUIDSYNTH_API int fluid_midi_event_get_channel(fluid_midi_event_t* evt);
00037 FLUIDSYNTH_API int fluid_midi_event_get_key(fluid_midi_event_t* evt);
00038 FLUIDSYNTH_API int fluid_midi_event_set_key(fluid_midi_event_t* evt, int key);
00039 FLUIDSYNTH_API int fluid_midi_event_get_velocity(fluid_midi_event_t* evt);
00040 FLUIDSYNTH_API int fluid_midi_event_set_velocity(fluid_midi_event_t* evt, int vel);
00041 FLUIDSYNTH_API int fluid_midi_event_get_control(fluid_midi_event_t* evt);
00042 FLUIDSYNTH_API int fluid_midi_event_set_control(fluid_midi_event_t* evt, int ctrl);
00043 FLUIDSYNTH_API int fluid_midi_event_get_value(fluid_midi_event_t* evt);
00044 FLUIDSYNTH_API int fluid_midi_event_set_value(fluid_midi_event_t* evt, int val);
00045 FLUIDSYNTH_API int fluid_midi_event_get_program(fluid_midi_event_t* evt);
00046 FLUIDSYNTH_API int fluid_midi_event_set_program(fluid_midi_event_t* evt, int val);
00047 FLUIDSYNTH_API int fluid_midi_event_get_pitch(fluid_midi_event_t* evt);
00048 FLUIDSYNTH_API int fluid_midi_event_set_pitch(fluid_midi_event_t* evt, int val);
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058 typedef int (*handle_midi_event_func_t)(void* data, fluid_midi_event_t* event);
00059
00060
00061
00062
00063
00064
00065
00066
00067
00071 FLUIDSYNTH_API fluid_midi_router_t* new_fluid_midi_router(fluid_settings_t* settings,
00072 handle_midi_event_func_t handler,
00073 void* event_handler_data);
00074
00080 FLUIDSYNTH_API int delete_fluid_midi_router(fluid_midi_router_t* handler);
00081
00084 FLUIDSYNTH_API int fluid_midi_router_handle_midi_event(void* data, fluid_midi_event_t* event);
00085
00088 FLUIDSYNTH_API int fluid_midi_dump_prerouter(void* data, fluid_midi_event_t* event);
00089
00092 FLUIDSYNTH_API int fluid_midi_dump_postrouter(void* data, fluid_midi_event_t* event);
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103 FLUIDSYNTH_API
00104 fluid_midi_driver_t* new_fluid_midi_driver(fluid_settings_t* settings,
00105 handle_midi_event_func_t handler,
00106 void* event_handler_data);
00107
00108 FLUIDSYNTH_API void delete_fluid_midi_driver(fluid_midi_driver_t* driver);
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120 FLUIDSYNTH_API fluid_player_t* new_fluid_player(fluid_synth_t* synth);
00121 FLUIDSYNTH_API int delete_fluid_player(fluid_player_t* player);
00122 FLUIDSYNTH_API int fluid_player_add(fluid_player_t* player, char* midifile);
00123 FLUIDSYNTH_API int fluid_player_play(fluid_player_t* player);
00124 FLUIDSYNTH_API int fluid_player_stop(fluid_player_t* player);
00125 FLUIDSYNTH_API int fluid_player_join(fluid_player_t* player);
00126 FLUIDSYNTH_API int fluid_player_set_loop(fluid_player_t* player, int loop);
00127 FLUIDSYNTH_API int fluid_player_set_midi_tempo(fluid_player_t* player, int tempo);
00128 FLUIDSYNTH_API int fluid_player_set_bpm(fluid_player_t* player, int bpm);
00129
00130 #ifdef __cplusplus
00131 }
00132 #endif
00133
00134 #endif