1 /* 2 * fluid.h 3 * JACK audio and MIDI backends. 4 * 5 * for Denemo, a gtk+ frontend to GNU Lilypond 6 * Copyright (C) 2011 Dominic Sacré 7 * 8 * This program is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation, either version 3 of the License, or 11 * (at your option) any later version. 12 */ 13 14 #ifndef FLUID_H 15 #define FLUID_H 16 17 #include <denemo/denemo_types.h> 18 19 20 int fluidsynth_init (DenemoPrefs * config, unsigned int samplerate); 21 void fluidsynth_shutdown (); 22 23 24 /** 25 * Feeds a MIDI event to the synth engine. 26 */ 27 void fluidsynth_feed_midi (unsigned char *event_data, size_t event_length); 28 29 /** 30 * Sends an all-notes-off event to the synth engine. 31 */ 32 void fluidsynth_all_notes_off (); 33 34 /** 35 * Renders the given number of audio frames into a buffer. 36 */ 37 void fluidsynth_render_audio (unsigned int nframes, float *left_channel, float *right_channel); 38 39 /** 40 * Select the soundfont to use for playback 41 */ 42 void choose_sound_font (GtkWidget * widget, GtkWidget * fluidsynth_soundfont); 43 void reset_synth_channels (void); 44 #endif // FLUID_H 45