fluidsynth 2.0.5 compiled with -Denable-readline=OFF and without portaudio
This commit is contained in:
parent
370d599f62
commit
d22c2cd4fa
Binary file not shown.
BIN
Builds/MacOSX/lib/libfluidsynth.dylib
Executable file → Normal file
BIN
Builds/MacOSX/lib/libfluidsynth.dylib
Executable file → Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Builds/MacOSX/lib/libintl.8.dylib
Executable file → Normal file
BIN
Builds/MacOSX/lib/libintl.8.dylib
Executable file → Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
# Example input:
|
# Example input:
|
||||||
# ./make_portable.sh mycoolbinary
|
# ./make_portable.sh mycoolbinary
|
||||||
|
# Or:
|
||||||
|
# USE_RPATH=1 ./make_portable.sh mycoolbinary
|
||||||
|
#
|
||||||
# where mycoolbinary is a mach-o object file
|
# where mycoolbinary is a mach-o object file
|
||||||
# (for example an executable binary or a .dylib)
|
# (for example an executable binary or a .dylib)
|
||||||
#
|
#
|
||||||
|
@ -29,11 +32,27 @@ trap 'error ${LINENO}' ERR
|
||||||
|
|
||||||
BINARY="$1"
|
BINARY="$1"
|
||||||
BINARYDIR=$(dirname "$BINARY")
|
BINARYDIR=$(dirname "$BINARY")
|
||||||
LIBREL="lib"
|
LIBDIRNAME=${LIBDIRNAME:-lib}
|
||||||
LIB="$BINARYDIR/$LIBREL"
|
LIBOUTPUTDIR="$BINARYDIR/$LIBDIRNAME"
|
||||||
|
|
||||||
|
# assume that our binary is running from:
|
||||||
|
# CoolBinary.app/Contents/MacOS/coolbinary
|
||||||
|
# and wants to navigate to:
|
||||||
|
# CoolBinary.app/Contents/lib/coollibrary.dylib
|
||||||
|
RPATH_FALLBACK="@loader_path/../$LIBDIRNAME"
|
||||||
|
|
||||||
|
if [ -z ${USE_RPATH+x} ]; then
|
||||||
|
# don't use rpath
|
||||||
|
OBJLOADREL="$RPATH_FALLBACK"
|
||||||
|
else
|
||||||
|
OBJLOADREL="@rpath"
|
||||||
|
# define in our binary what it should expand the
|
||||||
|
# runtime search path @rpath to
|
||||||
|
install_name_tool -add_rpath "$RPATH_FALLBACK" "$BINARY"
|
||||||
|
fi
|
||||||
|
|
||||||
# make a lib folder
|
# make a lib folder
|
||||||
mkdir -p "$LIB"
|
mkdir -p "$LIBOUTPUTDIR"
|
||||||
|
|
||||||
# find every LC_LOAD_DYLIB command in the obj file
|
# find every LC_LOAD_DYLIB command in the obj file
|
||||||
# filter to just loads under /usr/local
|
# filter to just loads under /usr/local
|
||||||
|
@ -65,22 +84,22 @@ get_env_specific_dependencies_recursive () {
|
||||||
|
|
||||||
DEP_PATHS=$(get_env_specific_dependencies_recursive "$BINARY")
|
DEP_PATHS=$(get_env_specific_dependencies_recursive "$BINARY")
|
||||||
|
|
||||||
mkdir -p "$LIB"
|
mkdir -p "$LIBOUTPUTDIR"
|
||||||
# copy each distinct dylib in the dependency tree into our lib folder
|
# copy each distinct dylib in the dependency tree into our lib folder
|
||||||
echo "$DEP_PATHS" \
|
echo "$DEP_PATHS" \
|
||||||
| xargs -n1 realpath \
|
| xargs -n1 realpath \
|
||||||
| sort \
|
| sort \
|
||||||
| uniq \
|
| uniq \
|
||||||
| xargs -I'{}' cp {} "$LIB/"
|
| xargs -I'{}' cp {} "$LIBOUTPUTDIR/"
|
||||||
|
|
||||||
chmod +w "$LIB"/*.dylib
|
chmod +w "$BINARY" "$LIBOUTPUTDIR"/*.dylib
|
||||||
|
|
||||||
while read -r obj; do
|
while read -r obj; do
|
||||||
[ -z "$obj" ] && continue
|
[ -z "$obj" ] && continue
|
||||||
OBJ_LEAF_NAME=$(echo "$obj" | awk -F'/' '{print $NF}')
|
OBJ_LEAF_NAME=$(echo "$obj" | awk -F'/' '{print $NF}')
|
||||||
# rewrite the install name of this obj file. completely optional.
|
# rewrite the install name of this obj file. completely optional.
|
||||||
# provides good default for future people who link to it.
|
# provides good default for future people who link to it.
|
||||||
install_name_tool -id "@rpath/$OBJ_LEAF_NAME" "$obj"
|
install_name_tool -id "$OBJLOADREL/$OBJ_LEAF_NAME" "$obj"
|
||||||
|
|
||||||
# iterate over every LC_LOAD_DYLIB command in the objfile
|
# iterate over every LC_LOAD_DYLIB command in the objfile
|
||||||
while read -r load; do
|
while read -r load; do
|
||||||
|
@ -88,10 +107,6 @@ while read -r obj; do
|
||||||
LOAD_LEAF_NAME=$(echo "$load" | awk -F'/' '{print $NF}')
|
LOAD_LEAF_NAME=$(echo "$load" | awk -F'/' '{print $NF}')
|
||||||
# rewrite a LC_LOAD_DYLIB command in this obj file
|
# rewrite a LC_LOAD_DYLIB command in this obj file
|
||||||
# to point relative to @rpath
|
# to point relative to @rpath
|
||||||
install_name_tool -change "$load" "@rpath/$LOAD_LEAF_NAME" "$obj"
|
install_name_tool -change "$load" "$OBJLOADREL/$LOAD_LEAF_NAME" "$obj"
|
||||||
done < <(get_env_specific_direct_dependencies "$obj")
|
done < <(get_env_specific_direct_dependencies "$obj")
|
||||||
done < <(cat <(echo "$BINARY") <(echo "$DEP_PATHS" | awk -F'/' -v l="$LIB" -v OFS='/' '{print l,$NF}'))
|
done < <(cat <(echo "$BINARY") <(echo "$DEP_PATHS" | awk -F'/' -v l="$LIBOUTPUTDIR" -v OFS='/' '{print l,$NF}'))
|
||||||
|
|
||||||
# define in our binary what it should expand the
|
|
||||||
# runtime search path @rpath to
|
|
||||||
install_name_tool -add_rpath "@loader_path/$LIBREL" "$BINARY"
|
|
||||||
|
|
|
@ -97,7 +97,6 @@ extern "C" {
|
||||||
#include "fluidsynth/synth.h"
|
#include "fluidsynth/synth.h"
|
||||||
#include "fluidsynth/shell.h"
|
#include "fluidsynth/shell.h"
|
||||||
#include "fluidsynth/sfont.h"
|
#include "fluidsynth/sfont.h"
|
||||||
#include "fluidsynth/ramsfont.h"
|
|
||||||
#include "fluidsynth/audio.h"
|
#include "fluidsynth/audio.h"
|
||||||
#include "fluidsynth/event.h"
|
#include "fluidsynth/event.h"
|
||||||
#include "fluidsynth/midi.h"
|
#include "fluidsynth/midi.h"
|
||||||
|
|
|
@ -52,25 +52,25 @@ extern "C" {
|
||||||
* @param out Array of buffers to store (dry) audio to. Buffers may alias with buffers of \c fx.
|
* @param out Array of buffers to store (dry) audio to. Buffers may alias with buffers of \c fx.
|
||||||
* @return Should return #FLUID_OK on success, #FLUID_FAILED if an error occured.
|
* @return Should return #FLUID_OK on success, #FLUID_FAILED if an error occured.
|
||||||
*/
|
*/
|
||||||
typedef int (*fluid_audio_func_t)(void* data, int len,
|
typedef int (*fluid_audio_func_t)(void *data, int len,
|
||||||
int nfx, float* fx[],
|
int nfx, float *fx[],
|
||||||
int nout, float* out[]);
|
int nout, float *out[]);
|
||||||
|
|
||||||
FLUIDSYNTH_API fluid_audio_driver_t* new_fluid_audio_driver(fluid_settings_t* settings,
|
FLUIDSYNTH_API fluid_audio_driver_t *new_fluid_audio_driver(fluid_settings_t *settings,
|
||||||
fluid_synth_t* synth);
|
fluid_synth_t *synth);
|
||||||
|
|
||||||
FLUIDSYNTH_API fluid_audio_driver_t* new_fluid_audio_driver2(fluid_settings_t* settings,
|
FLUIDSYNTH_API fluid_audio_driver_t *new_fluid_audio_driver2(fluid_settings_t *settings,
|
||||||
fluid_audio_func_t func,
|
fluid_audio_func_t func,
|
||||||
void* data);
|
void *data);
|
||||||
|
|
||||||
FLUIDSYNTH_API void delete_fluid_audio_driver(fluid_audio_driver_t* driver);
|
FLUIDSYNTH_API void delete_fluid_audio_driver(fluid_audio_driver_t *driver);
|
||||||
|
|
||||||
FLUIDSYNTH_API fluid_file_renderer_t *new_fluid_file_renderer(fluid_synth_t* synth);
|
FLUIDSYNTH_API fluid_file_renderer_t *new_fluid_file_renderer(fluid_synth_t *synth);
|
||||||
FLUIDSYNTH_API int fluid_file_renderer_process_block(fluid_file_renderer_t* dev);
|
FLUIDSYNTH_API int fluid_file_renderer_process_block(fluid_file_renderer_t *dev);
|
||||||
FLUIDSYNTH_API void delete_fluid_file_renderer(fluid_file_renderer_t* dev);
|
FLUIDSYNTH_API void delete_fluid_file_renderer(fluid_file_renderer_t *dev);
|
||||||
FLUIDSYNTH_API int fluid_file_set_encoding_quality(fluid_file_renderer_t* dev, double q);
|
FLUIDSYNTH_API int fluid_file_set_encoding_quality(fluid_file_renderer_t *dev, double q);
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_audio_driver_register(const char** adrivers);
|
FLUIDSYNTH_API int fluid_audio_driver_register(const char **adrivers);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,8 @@ extern "C" {
|
||||||
/**
|
/**
|
||||||
* Sequencer event type enumeration.
|
* Sequencer event type enumeration.
|
||||||
*/
|
*/
|
||||||
enum fluid_seq_event_type {
|
enum fluid_seq_event_type
|
||||||
|
{
|
||||||
FLUID_SEQ_NOTE = 0, /**< Note event with duration */
|
FLUID_SEQ_NOTE = 0, /**< Note event with duration */
|
||||||
FLUID_SEQ_NOTEON, /**< Note on event */
|
FLUID_SEQ_NOTEON, /**< Note on event */
|
||||||
FLUID_SEQ_NOTEOFF, /**< Note off event */
|
FLUID_SEQ_NOTEOFF, /**< Note off event */
|
||||||
|
@ -65,71 +66,71 @@ enum fluid_seq_event_type {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Event alloc/free */
|
/* Event alloc/free */
|
||||||
FLUIDSYNTH_API fluid_event_t* new_fluid_event(void);
|
FLUIDSYNTH_API fluid_event_t *new_fluid_event(void);
|
||||||
FLUIDSYNTH_API void delete_fluid_event(fluid_event_t* evt);
|
FLUIDSYNTH_API void delete_fluid_event(fluid_event_t *evt);
|
||||||
|
|
||||||
/* Initializing events */
|
/* Initializing events */
|
||||||
FLUIDSYNTH_API void fluid_event_set_source(fluid_event_t* evt, fluid_seq_id_t src);
|
FLUIDSYNTH_API void fluid_event_set_source(fluid_event_t *evt, fluid_seq_id_t src);
|
||||||
FLUIDSYNTH_API void fluid_event_set_dest(fluid_event_t* evt, fluid_seq_id_t dest);
|
FLUIDSYNTH_API void fluid_event_set_dest(fluid_event_t *evt, fluid_seq_id_t dest);
|
||||||
|
|
||||||
/* Timer events */
|
/* Timer events */
|
||||||
FLUIDSYNTH_API void fluid_event_timer(fluid_event_t* evt, void* data);
|
FLUIDSYNTH_API void fluid_event_timer(fluid_event_t *evt, void *data);
|
||||||
|
|
||||||
/* Note events */
|
/* Note events */
|
||||||
FLUIDSYNTH_API void fluid_event_note(fluid_event_t* evt, int channel,
|
FLUIDSYNTH_API void fluid_event_note(fluid_event_t *evt, int channel,
|
||||||
short key, short vel,
|
short key, short vel,
|
||||||
unsigned int duration);
|
unsigned int duration);
|
||||||
|
|
||||||
FLUIDSYNTH_API void fluid_event_noteon(fluid_event_t* evt, int channel, short key, short vel);
|
FLUIDSYNTH_API void fluid_event_noteon(fluid_event_t *evt, int channel, short key, short vel);
|
||||||
FLUIDSYNTH_API void fluid_event_noteoff(fluid_event_t* evt, int channel, short key);
|
FLUIDSYNTH_API void fluid_event_noteoff(fluid_event_t *evt, int channel, short key);
|
||||||
FLUIDSYNTH_API void fluid_event_all_sounds_off(fluid_event_t* evt, int channel);
|
FLUIDSYNTH_API void fluid_event_all_sounds_off(fluid_event_t *evt, int channel);
|
||||||
FLUIDSYNTH_API void fluid_event_all_notes_off(fluid_event_t* evt, int channel);
|
FLUIDSYNTH_API void fluid_event_all_notes_off(fluid_event_t *evt, int channel);
|
||||||
|
|
||||||
/* Instrument selection */
|
/* Instrument selection */
|
||||||
FLUIDSYNTH_API void fluid_event_bank_select(fluid_event_t* evt, int channel, short bank_num);
|
FLUIDSYNTH_API void fluid_event_bank_select(fluid_event_t *evt, int channel, short bank_num);
|
||||||
FLUIDSYNTH_API void fluid_event_program_change(fluid_event_t* evt, int channel, short preset_num);
|
FLUIDSYNTH_API void fluid_event_program_change(fluid_event_t *evt, int channel, short preset_num);
|
||||||
FLUIDSYNTH_API void fluid_event_program_select(fluid_event_t* evt, int channel, unsigned int sfont_id, short bank_num, short preset_num);
|
FLUIDSYNTH_API void fluid_event_program_select(fluid_event_t *evt, int channel, unsigned int sfont_id, short bank_num, short preset_num);
|
||||||
|
|
||||||
/* Real-time generic instrument controllers */
|
/* Real-time generic instrument controllers */
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
void fluid_event_control_change(fluid_event_t* evt, int channel, short control, short val);
|
void fluid_event_control_change(fluid_event_t *evt, int channel, short control, short val);
|
||||||
|
|
||||||
/* Real-time instrument controllers shortcuts */
|
/* Real-time instrument controllers shortcuts */
|
||||||
FLUIDSYNTH_API void fluid_event_pitch_bend(fluid_event_t* evt, int channel, int val);
|
FLUIDSYNTH_API void fluid_event_pitch_bend(fluid_event_t *evt, int channel, int val);
|
||||||
FLUIDSYNTH_API void fluid_event_pitch_wheelsens(fluid_event_t* evt, int channel, short val);
|
FLUIDSYNTH_API void fluid_event_pitch_wheelsens(fluid_event_t *evt, int channel, short val);
|
||||||
FLUIDSYNTH_API void fluid_event_modulation(fluid_event_t* evt, int channel, short val);
|
FLUIDSYNTH_API void fluid_event_modulation(fluid_event_t *evt, int channel, short val);
|
||||||
FLUIDSYNTH_API void fluid_event_sustain(fluid_event_t* evt, int channel, short val);
|
FLUIDSYNTH_API void fluid_event_sustain(fluid_event_t *evt, int channel, short val);
|
||||||
FLUIDSYNTH_API void fluid_event_pan(fluid_event_t* evt, int channel, short val);
|
FLUIDSYNTH_API void fluid_event_pan(fluid_event_t *evt, int channel, short val);
|
||||||
FLUIDSYNTH_API void fluid_event_volume(fluid_event_t* evt, int channel, short val);
|
FLUIDSYNTH_API void fluid_event_volume(fluid_event_t *evt, int channel, short val);
|
||||||
FLUIDSYNTH_API void fluid_event_reverb_send(fluid_event_t* evt, int channel, short val);
|
FLUIDSYNTH_API void fluid_event_reverb_send(fluid_event_t *evt, int channel, short val);
|
||||||
FLUIDSYNTH_API void fluid_event_chorus_send(fluid_event_t* evt, int channel, short val);
|
FLUIDSYNTH_API void fluid_event_chorus_send(fluid_event_t *evt, int channel, short val);
|
||||||
|
|
||||||
FLUIDSYNTH_API void fluid_event_key_pressure(fluid_event_t* evt, int channel, short key, short val);
|
FLUIDSYNTH_API void fluid_event_key_pressure(fluid_event_t *evt, int channel, short key, short val);
|
||||||
FLUIDSYNTH_API void fluid_event_channel_pressure(fluid_event_t* evt, int channel, short val);
|
FLUIDSYNTH_API void fluid_event_channel_pressure(fluid_event_t *evt, int channel, short val);
|
||||||
FLUIDSYNTH_API void fluid_event_system_reset(fluid_event_t* evt);
|
FLUIDSYNTH_API void fluid_event_system_reset(fluid_event_t *evt);
|
||||||
|
|
||||||
|
|
||||||
/* Only for removing events */
|
/* Only for removing events */
|
||||||
FLUIDSYNTH_API void fluid_event_any_control_change(fluid_event_t* evt, int channel);
|
FLUIDSYNTH_API void fluid_event_any_control_change(fluid_event_t *evt, int channel);
|
||||||
|
|
||||||
/* Only when unregistering clients */
|
/* Only when unregistering clients */
|
||||||
FLUIDSYNTH_API void fluid_event_unregistering(fluid_event_t* evt);
|
FLUIDSYNTH_API void fluid_event_unregistering(fluid_event_t *evt);
|
||||||
|
|
||||||
/* Accessing event data */
|
/* Accessing event data */
|
||||||
FLUIDSYNTH_API int fluid_event_get_type(fluid_event_t* evt);
|
FLUIDSYNTH_API int fluid_event_get_type(fluid_event_t *evt);
|
||||||
FLUIDSYNTH_API fluid_seq_id_t fluid_event_get_source(fluid_event_t* evt);
|
FLUIDSYNTH_API fluid_seq_id_t fluid_event_get_source(fluid_event_t *evt);
|
||||||
FLUIDSYNTH_API fluid_seq_id_t fluid_event_get_dest(fluid_event_t* evt);
|
FLUIDSYNTH_API fluid_seq_id_t fluid_event_get_dest(fluid_event_t *evt);
|
||||||
FLUIDSYNTH_API int fluid_event_get_channel(fluid_event_t* evt);
|
FLUIDSYNTH_API int fluid_event_get_channel(fluid_event_t *evt);
|
||||||
FLUIDSYNTH_API short fluid_event_get_key(fluid_event_t* evt);
|
FLUIDSYNTH_API short fluid_event_get_key(fluid_event_t *evt);
|
||||||
FLUIDSYNTH_API short fluid_event_get_velocity(fluid_event_t* evt);
|
FLUIDSYNTH_API short fluid_event_get_velocity(fluid_event_t *evt);
|
||||||
FLUIDSYNTH_API short fluid_event_get_control(fluid_event_t* evt);
|
FLUIDSYNTH_API short fluid_event_get_control(fluid_event_t *evt);
|
||||||
FLUIDSYNTH_API short fluid_event_get_value(fluid_event_t* evt);
|
FLUIDSYNTH_API short fluid_event_get_value(fluid_event_t *evt);
|
||||||
FLUIDSYNTH_API short fluid_event_get_program(fluid_event_t* evt);
|
FLUIDSYNTH_API short fluid_event_get_program(fluid_event_t *evt);
|
||||||
FLUIDSYNTH_API void* fluid_event_get_data(fluid_event_t* evt);
|
FLUIDSYNTH_API void *fluid_event_get_data(fluid_event_t *evt);
|
||||||
FLUIDSYNTH_API unsigned int fluid_event_get_duration(fluid_event_t* evt);
|
FLUIDSYNTH_API unsigned int fluid_event_get_duration(fluid_event_t *evt);
|
||||||
FLUIDSYNTH_API short fluid_event_get_bank(fluid_event_t* evt);
|
FLUIDSYNTH_API short fluid_event_get_bank(fluid_event_t *evt);
|
||||||
FLUIDSYNTH_API int fluid_event_get_pitch(fluid_event_t* evt);
|
FLUIDSYNTH_API int fluid_event_get_pitch(fluid_event_t *evt);
|
||||||
FLUIDSYNTH_API unsigned int fluid_event_get_sfont_id(fluid_event_t* evt);
|
FLUIDSYNTH_API unsigned int fluid_event_get_sfont_id(fluid_event_t *evt);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,8 @@ extern "C" {
|
||||||
/**
|
/**
|
||||||
* Generator (effect) numbers (Soundfont 2.01 specifications section 8.1.3)
|
* Generator (effect) numbers (Soundfont 2.01 specifications section 8.1.3)
|
||||||
*/
|
*/
|
||||||
enum fluid_gen_type {
|
enum fluid_gen_type
|
||||||
|
{
|
||||||
GEN_STARTADDROFS, /**< Sample start address offset (0-32767) */
|
GEN_STARTADDROFS, /**< Sample start address offset (0-32767) */
|
||||||
GEN_ENDADDROFS, /**< Sample end address offset (-32767-0) */
|
GEN_ENDADDROFS, /**< Sample end address offset (-32767-0) */
|
||||||
GEN_STARTLOOPADDROFS, /**< Sample loop start address offset (-32767-32767) */
|
GEN_STARTLOOPADDROFS, /**< Sample loop start address offset (-32767-32767) */
|
||||||
|
|
|
@ -52,7 +52,8 @@ extern "C" {
|
||||||
/**
|
/**
|
||||||
* FluidSynth log levels.
|
* FluidSynth log levels.
|
||||||
*/
|
*/
|
||||||
enum fluid_log_level {
|
enum fluid_log_level
|
||||||
|
{
|
||||||
FLUID_PANIC, /**< The synth can't function correctly any more */
|
FLUID_PANIC, /**< The synth can't function correctly any more */
|
||||||
FLUID_ERR, /**< Serious error occurred */
|
FLUID_ERR, /**< Serious error occurred */
|
||||||
FLUID_WARN, /**< Warning */
|
FLUID_WARN, /**< Warning */
|
||||||
|
@ -69,12 +70,12 @@ enum fluid_log_level {
|
||||||
* @param message Log message text
|
* @param message Log message text
|
||||||
* @param data User data pointer supplied to fluid_set_log_function().
|
* @param data User data pointer supplied to fluid_set_log_function().
|
||||||
*/
|
*/
|
||||||
typedef void (*fluid_log_function_t)(int level, char* message, void* data);
|
typedef void (*fluid_log_function_t)(int level, const char *message, void *data);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
fluid_log_function_t fluid_set_log_function(int level, fluid_log_function_t fun, void* data);
|
fluid_log_function_t fluid_set_log_function(int level, fluid_log_function_t fun, void *data);
|
||||||
|
|
||||||
FLUIDSYNTH_API void fluid_default_log_function(int level, char* message, void* data);
|
FLUIDSYNTH_API void fluid_default_log_function(int level, const char *message, void *data);
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_log(int level, const char *fmt, ...);
|
FLUIDSYNTH_API int fluid_log(int level, const char *fmt, ...);
|
||||||
|
|
||||||
|
|
|
@ -30,31 +30,35 @@ extern "C" {
|
||||||
* @brief Functions for MIDI events, drivers and MIDI file playback.
|
* @brief Functions for MIDI events, drivers and MIDI file playback.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
FLUIDSYNTH_API fluid_midi_event_t* new_fluid_midi_event(void);
|
FLUIDSYNTH_API fluid_midi_event_t *new_fluid_midi_event(void);
|
||||||
FLUIDSYNTH_API void delete_fluid_midi_event(fluid_midi_event_t* event);
|
FLUIDSYNTH_API void delete_fluid_midi_event(fluid_midi_event_t *event);
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_midi_event_set_type(fluid_midi_event_t* evt, int type);
|
FLUIDSYNTH_API int fluid_midi_event_set_type(fluid_midi_event_t *evt, int type);
|
||||||
FLUIDSYNTH_API int fluid_midi_event_get_type(fluid_midi_event_t* evt);
|
FLUIDSYNTH_API int fluid_midi_event_get_type(fluid_midi_event_t *evt);
|
||||||
FLUIDSYNTH_API int fluid_midi_event_set_channel(fluid_midi_event_t* evt, int chan);
|
FLUIDSYNTH_API int fluid_midi_event_set_channel(fluid_midi_event_t *evt, int chan);
|
||||||
FLUIDSYNTH_API int fluid_midi_event_get_channel(fluid_midi_event_t* evt);
|
FLUIDSYNTH_API int fluid_midi_event_get_channel(fluid_midi_event_t *evt);
|
||||||
FLUIDSYNTH_API int fluid_midi_event_get_key(fluid_midi_event_t* evt);
|
FLUIDSYNTH_API int fluid_midi_event_get_key(fluid_midi_event_t *evt);
|
||||||
FLUIDSYNTH_API int fluid_midi_event_set_key(fluid_midi_event_t* evt, int key);
|
FLUIDSYNTH_API int fluid_midi_event_set_key(fluid_midi_event_t *evt, int key);
|
||||||
FLUIDSYNTH_API int fluid_midi_event_get_velocity(fluid_midi_event_t* evt);
|
FLUIDSYNTH_API int fluid_midi_event_get_velocity(fluid_midi_event_t *evt);
|
||||||
FLUIDSYNTH_API int fluid_midi_event_set_velocity(fluid_midi_event_t* evt, int vel);
|
FLUIDSYNTH_API int fluid_midi_event_set_velocity(fluid_midi_event_t *evt, int vel);
|
||||||
FLUIDSYNTH_API int fluid_midi_event_get_control(fluid_midi_event_t* evt);
|
FLUIDSYNTH_API int fluid_midi_event_get_control(fluid_midi_event_t *evt);
|
||||||
FLUIDSYNTH_API int fluid_midi_event_set_control(fluid_midi_event_t* evt, int ctrl);
|
FLUIDSYNTH_API int fluid_midi_event_set_control(fluid_midi_event_t *evt, int ctrl);
|
||||||
FLUIDSYNTH_API int fluid_midi_event_get_value(fluid_midi_event_t* evt);
|
FLUIDSYNTH_API int fluid_midi_event_get_value(fluid_midi_event_t *evt);
|
||||||
FLUIDSYNTH_API int fluid_midi_event_set_value(fluid_midi_event_t* evt, int val);
|
FLUIDSYNTH_API int fluid_midi_event_set_value(fluid_midi_event_t *evt, int val);
|
||||||
FLUIDSYNTH_API int fluid_midi_event_get_program(fluid_midi_event_t* evt);
|
FLUIDSYNTH_API int fluid_midi_event_get_program(fluid_midi_event_t *evt);
|
||||||
FLUIDSYNTH_API int fluid_midi_event_set_program(fluid_midi_event_t* evt, int val);
|
FLUIDSYNTH_API int fluid_midi_event_set_program(fluid_midi_event_t *evt, int val);
|
||||||
FLUIDSYNTH_API int fluid_midi_event_get_pitch(fluid_midi_event_t* evt);
|
FLUIDSYNTH_API int fluid_midi_event_get_pitch(fluid_midi_event_t *evt);
|
||||||
FLUIDSYNTH_API int fluid_midi_event_set_pitch(fluid_midi_event_t* evt, int val);
|
FLUIDSYNTH_API int fluid_midi_event_set_pitch(fluid_midi_event_t *evt, int val);
|
||||||
FLUIDSYNTH_API int fluid_midi_event_set_sysex(fluid_midi_event_t* evt, void *data,
|
FLUIDSYNTH_API int fluid_midi_event_set_sysex(fluid_midi_event_t *evt, void *data,
|
||||||
int size, int dynamic);
|
int size, int dynamic);
|
||||||
FLUIDSYNTH_API int fluid_midi_event_set_text(fluid_midi_event_t *evt,
|
FLUIDSYNTH_API int fluid_midi_event_set_text(fluid_midi_event_t *evt,
|
||||||
void *data, int size, int dynamic);
|
void *data, int size, int dynamic);
|
||||||
|
FLUIDSYNTH_API int fluid_midi_event_get_text(fluid_midi_event_t *evt,
|
||||||
|
void **data, int *size);
|
||||||
FLUIDSYNTH_API int fluid_midi_event_set_lyrics(fluid_midi_event_t *evt,
|
FLUIDSYNTH_API int fluid_midi_event_set_lyrics(fluid_midi_event_t *evt,
|
||||||
void *data, int size, int dynamic);
|
void *data, int size, int dynamic);
|
||||||
|
FLUIDSYNTH_API int fluid_midi_event_get_lyrics(fluid_midi_event_t *evt,
|
||||||
|
void **data, int *size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MIDI router rule type.
|
* MIDI router rule type.
|
||||||
|
@ -85,35 +89,35 @@ typedef enum
|
||||||
* to communicate events.
|
* to communicate events.
|
||||||
* In the not-so-far future...
|
* In the not-so-far future...
|
||||||
*/
|
*/
|
||||||
typedef int (*handle_midi_event_func_t)(void* data, fluid_midi_event_t* event);
|
typedef int (*handle_midi_event_func_t)(void *data, fluid_midi_event_t *event);
|
||||||
|
|
||||||
FLUIDSYNTH_API fluid_midi_router_t* new_fluid_midi_router(fluid_settings_t* settings,
|
FLUIDSYNTH_API fluid_midi_router_t *new_fluid_midi_router(fluid_settings_t *settings,
|
||||||
handle_midi_event_func_t handler,
|
handle_midi_event_func_t handler,
|
||||||
void* event_handler_data);
|
void *event_handler_data);
|
||||||
FLUIDSYNTH_API void delete_fluid_midi_router(fluid_midi_router_t* handler);
|
FLUIDSYNTH_API void delete_fluid_midi_router(fluid_midi_router_t *handler);
|
||||||
FLUIDSYNTH_API int fluid_midi_router_set_default_rules (fluid_midi_router_t *router);
|
FLUIDSYNTH_API int fluid_midi_router_set_default_rules(fluid_midi_router_t *router);
|
||||||
FLUIDSYNTH_API int fluid_midi_router_clear_rules (fluid_midi_router_t *router);
|
FLUIDSYNTH_API int fluid_midi_router_clear_rules(fluid_midi_router_t *router);
|
||||||
FLUIDSYNTH_API int fluid_midi_router_add_rule (fluid_midi_router_t *router,
|
FLUIDSYNTH_API int fluid_midi_router_add_rule(fluid_midi_router_t *router,
|
||||||
fluid_midi_router_rule_t *rule, int type);
|
fluid_midi_router_rule_t *rule, int type);
|
||||||
FLUIDSYNTH_API fluid_midi_router_rule_t *new_fluid_midi_router_rule (void);
|
FLUIDSYNTH_API fluid_midi_router_rule_t *new_fluid_midi_router_rule(void);
|
||||||
FLUIDSYNTH_API void delete_fluid_midi_router_rule (fluid_midi_router_rule_t *rule);
|
FLUIDSYNTH_API void delete_fluid_midi_router_rule(fluid_midi_router_rule_t *rule);
|
||||||
FLUIDSYNTH_API void fluid_midi_router_rule_set_chan (fluid_midi_router_rule_t *rule,
|
FLUIDSYNTH_API void fluid_midi_router_rule_set_chan(fluid_midi_router_rule_t *rule,
|
||||||
int min, int max, float mul, int add);
|
int min, int max, float mul, int add);
|
||||||
FLUIDSYNTH_API void fluid_midi_router_rule_set_param1 (fluid_midi_router_rule_t *rule,
|
FLUIDSYNTH_API void fluid_midi_router_rule_set_param1(fluid_midi_router_rule_t *rule,
|
||||||
int min, int max, float mul, int add);
|
int min, int max, float mul, int add);
|
||||||
FLUIDSYNTH_API void fluid_midi_router_rule_set_param2 (fluid_midi_router_rule_t *rule,
|
FLUIDSYNTH_API void fluid_midi_router_rule_set_param2(fluid_midi_router_rule_t *rule,
|
||||||
int min, int max, float mul, int add);
|
int min, int max, float mul, int add);
|
||||||
FLUIDSYNTH_API int fluid_midi_router_handle_midi_event(void* data, fluid_midi_event_t* event);
|
FLUIDSYNTH_API int fluid_midi_router_handle_midi_event(void *data, fluid_midi_event_t *event);
|
||||||
FLUIDSYNTH_API int fluid_midi_dump_prerouter(void* data, fluid_midi_event_t* event);
|
FLUIDSYNTH_API int fluid_midi_dump_prerouter(void *data, fluid_midi_event_t *event);
|
||||||
FLUIDSYNTH_API int fluid_midi_dump_postrouter(void* data, fluid_midi_event_t* event);
|
FLUIDSYNTH_API int fluid_midi_dump_postrouter(void *data, fluid_midi_event_t *event);
|
||||||
|
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
fluid_midi_driver_t* new_fluid_midi_driver(fluid_settings_t* settings,
|
fluid_midi_driver_t *new_fluid_midi_driver(fluid_settings_t *settings,
|
||||||
handle_midi_event_func_t handler,
|
handle_midi_event_func_t handler,
|
||||||
void* event_handler_data);
|
void *event_handler_data);
|
||||||
|
|
||||||
FLUIDSYNTH_API void delete_fluid_midi_driver(fluid_midi_driver_t* driver);
|
FLUIDSYNTH_API void delete_fluid_midi_driver(fluid_midi_driver_t *driver);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -127,23 +131,23 @@ enum fluid_player_status
|
||||||
FLUID_PLAYER_DONE /**< Player is finished playing */
|
FLUID_PLAYER_DONE /**< Player is finished playing */
|
||||||
};
|
};
|
||||||
|
|
||||||
FLUIDSYNTH_API fluid_player_t* new_fluid_player(fluid_synth_t* synth);
|
FLUIDSYNTH_API fluid_player_t *new_fluid_player(fluid_synth_t *synth);
|
||||||
FLUIDSYNTH_API void delete_fluid_player(fluid_player_t* player);
|
FLUIDSYNTH_API void delete_fluid_player(fluid_player_t *player);
|
||||||
FLUIDSYNTH_API int fluid_player_add(fluid_player_t* player, const char *midifile);
|
FLUIDSYNTH_API int fluid_player_add(fluid_player_t *player, const char *midifile);
|
||||||
FLUIDSYNTH_API int fluid_player_add_mem(fluid_player_t* player, const void *buffer, size_t len);
|
FLUIDSYNTH_API int fluid_player_add_mem(fluid_player_t *player, const void *buffer, size_t len);
|
||||||
FLUIDSYNTH_API int fluid_player_play(fluid_player_t* player);
|
FLUIDSYNTH_API int fluid_player_play(fluid_player_t *player);
|
||||||
FLUIDSYNTH_API int fluid_player_stop(fluid_player_t* player);
|
FLUIDSYNTH_API int fluid_player_stop(fluid_player_t *player);
|
||||||
FLUIDSYNTH_API int fluid_player_join(fluid_player_t* player);
|
FLUIDSYNTH_API int fluid_player_join(fluid_player_t *player);
|
||||||
FLUIDSYNTH_API int fluid_player_set_loop(fluid_player_t* player, int loop);
|
FLUIDSYNTH_API int fluid_player_set_loop(fluid_player_t *player, int loop);
|
||||||
FLUIDSYNTH_API int fluid_player_set_midi_tempo(fluid_player_t* player, int tempo);
|
FLUIDSYNTH_API int fluid_player_set_midi_tempo(fluid_player_t *player, int tempo);
|
||||||
FLUIDSYNTH_API int fluid_player_set_bpm(fluid_player_t* player, int bpm);
|
FLUIDSYNTH_API int fluid_player_set_bpm(fluid_player_t *player, int bpm);
|
||||||
FLUIDSYNTH_API int fluid_player_set_playback_callback(fluid_player_t* player, handle_midi_event_func_t handler, void* handler_data);
|
FLUIDSYNTH_API int fluid_player_set_playback_callback(fluid_player_t *player, handle_midi_event_func_t handler, void *handler_data);
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_player_get_status(fluid_player_t* player);
|
FLUIDSYNTH_API int fluid_player_get_status(fluid_player_t *player);
|
||||||
FLUIDSYNTH_API int fluid_player_get_current_tick(fluid_player_t * player);
|
FLUIDSYNTH_API int fluid_player_get_current_tick(fluid_player_t *player);
|
||||||
FLUIDSYNTH_API int fluid_player_get_total_ticks(fluid_player_t * player);
|
FLUIDSYNTH_API int fluid_player_get_total_ticks(fluid_player_t *player);
|
||||||
FLUIDSYNTH_API int fluid_player_get_bpm(fluid_player_t * player);
|
FLUIDSYNTH_API int fluid_player_get_bpm(fluid_player_t *player);
|
||||||
FLUIDSYNTH_API int fluid_player_get_midi_tempo(fluid_player_t * player);
|
FLUIDSYNTH_API int fluid_player_get_midi_tempo(fluid_player_t *player);
|
||||||
FLUIDSYNTH_API int fluid_player_seek(fluid_player_t *player, int ticks);
|
FLUIDSYNTH_API int fluid_player_seek(fluid_player_t *player, int ticks);
|
||||||
|
|
||||||
///
|
///
|
||||||
|
|
|
@ -60,8 +60,8 @@ extern "C" {
|
||||||
#define FLUID_FAILED (-1)
|
#define FLUID_FAILED (-1)
|
||||||
|
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_is_soundfont (const char *filename);
|
FLUIDSYNTH_API int fluid_is_soundfont(const char *filename);
|
||||||
FLUIDSYNTH_API int fluid_is_midifile (const char *filename);
|
FLUIDSYNTH_API int fluid_is_midifile(const char *filename);
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -69,27 +69,27 @@ enum fluid_mod_src
|
||||||
FLUID_MOD_PITCHWHEELSENS = 16 /**< Pitch wheel sensitivity */
|
FLUID_MOD_PITCHWHEELSENS = 16 /**< Pitch wheel sensitivity */
|
||||||
};
|
};
|
||||||
|
|
||||||
FLUIDSYNTH_API fluid_mod_t* new_fluid_mod(void);
|
FLUIDSYNTH_API fluid_mod_t *new_fluid_mod(void);
|
||||||
FLUIDSYNTH_API void delete_fluid_mod(fluid_mod_t * mod);
|
FLUIDSYNTH_API void delete_fluid_mod(fluid_mod_t *mod);
|
||||||
FLUIDSYNTH_API size_t fluid_mod_sizeof(void);
|
FLUIDSYNTH_API size_t fluid_mod_sizeof(void);
|
||||||
|
|
||||||
FLUIDSYNTH_API void fluid_mod_set_source1(fluid_mod_t* mod, int src, int flags);
|
FLUIDSYNTH_API void fluid_mod_set_source1(fluid_mod_t *mod, int src, int flags);
|
||||||
FLUIDSYNTH_API void fluid_mod_set_source2(fluid_mod_t* mod, int src, int flags);
|
FLUIDSYNTH_API void fluid_mod_set_source2(fluid_mod_t *mod, int src, int flags);
|
||||||
FLUIDSYNTH_API void fluid_mod_set_dest(fluid_mod_t* mod, int dst);
|
FLUIDSYNTH_API void fluid_mod_set_dest(fluid_mod_t *mod, int dst);
|
||||||
FLUIDSYNTH_API void fluid_mod_set_amount(fluid_mod_t* mod, double amount);
|
FLUIDSYNTH_API void fluid_mod_set_amount(fluid_mod_t *mod, double amount);
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_mod_get_source1(const fluid_mod_t* mod);
|
FLUIDSYNTH_API int fluid_mod_get_source1(const fluid_mod_t *mod);
|
||||||
FLUIDSYNTH_API int fluid_mod_get_flags1(const fluid_mod_t* mod);
|
FLUIDSYNTH_API int fluid_mod_get_flags1(const fluid_mod_t *mod);
|
||||||
FLUIDSYNTH_API int fluid_mod_get_source2(const fluid_mod_t* mod);
|
FLUIDSYNTH_API int fluid_mod_get_source2(const fluid_mod_t *mod);
|
||||||
FLUIDSYNTH_API int fluid_mod_get_flags2(const fluid_mod_t* mod);
|
FLUIDSYNTH_API int fluid_mod_get_flags2(const fluid_mod_t *mod);
|
||||||
FLUIDSYNTH_API int fluid_mod_get_dest(const fluid_mod_t* mod);
|
FLUIDSYNTH_API int fluid_mod_get_dest(const fluid_mod_t *mod);
|
||||||
FLUIDSYNTH_API double fluid_mod_get_amount(const fluid_mod_t* mod);
|
FLUIDSYNTH_API double fluid_mod_get_amount(const fluid_mod_t *mod);
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_mod_test_identity(const fluid_mod_t * mod1, const fluid_mod_t * mod2);
|
FLUIDSYNTH_API int fluid_mod_test_identity(const fluid_mod_t *mod1, const fluid_mod_t *mod2);
|
||||||
FLUIDSYNTH_API int fluid_mod_has_source(const fluid_mod_t * mod, int cc, int ctrl);
|
FLUIDSYNTH_API int fluid_mod_has_source(const fluid_mod_t *mod, int cc, int ctrl);
|
||||||
FLUIDSYNTH_API int fluid_mod_has_dest(const fluid_mod_t * mod, int gen);
|
FLUIDSYNTH_API int fluid_mod_has_dest(const fluid_mod_t *mod, int gen);
|
||||||
|
|
||||||
FLUIDSYNTH_API void fluid_mod_clone(fluid_mod_t* mod, const fluid_mod_t* src);
|
FLUIDSYNTH_API void fluid_mod_clone(fluid_mod_t *mod, const fluid_mod_t *src);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,66 +0,0 @@
|
||||||
/* FluidSynth - A Software Synthesizer
|
|
||||||
*
|
|
||||||
* Copyright (C) 2003 Peter Hanappe and others.
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2.1 of
|
|
||||||
* the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful, but
|
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free
|
|
||||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
||||||
* 02110-1301, USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* RAM SoundFonts: October 2002 - Antoine Schmitt */
|
|
||||||
|
|
||||||
#ifndef _FLUIDSYNTH_RAMSFONT_H
|
|
||||||
#define _FLUIDSYNTH_RAMSFONT_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @file ramsfont.h
|
|
||||||
* @brief API for creating and managing SoundFont instruments in RAM.
|
|
||||||
*
|
|
||||||
* RAM SoundFonts live in ram. The samples are loaded from files
|
|
||||||
* or from RAM. A minimal API manages a soundFont structure,
|
|
||||||
* with presets, each preset having only one preset-zone, which
|
|
||||||
* instrument has potentially many instrument-zones. No global
|
|
||||||
* zones, and nor generator nor modulator other than the default
|
|
||||||
* ones are permitted. This may be extensible in the future.
|
|
||||||
*/
|
|
||||||
|
|
||||||
FLUIDSYNTH_API fluid_sfont_t* fluid_ramsfont_create_sfont(void);
|
|
||||||
FLUIDSYNTH_API int fluid_ramsfont_set_name(fluid_ramsfont_t* sfont, const char *name);
|
|
||||||
FLUIDSYNTH_API
|
|
||||||
int fluid_ramsfont_add_izone(fluid_ramsfont_t* sfont,
|
|
||||||
int bank, int num, fluid_sample_t* sample,
|
|
||||||
int lokey, int hikey);
|
|
||||||
FLUIDSYNTH_API
|
|
||||||
int fluid_ramsfont_remove_izone(fluid_ramsfont_t* sfont,
|
|
||||||
int bank, int num, fluid_sample_t* sample);
|
|
||||||
FLUIDSYNTH_API
|
|
||||||
int fluid_ramsfont_izone_set_gen(fluid_ramsfont_t* sfont,
|
|
||||||
int bank, int num, fluid_sample_t* sample,
|
|
||||||
int gen_type, float value);
|
|
||||||
FLUIDSYNTH_API
|
|
||||||
int fluid_ramsfont_izone_set_loop(fluid_ramsfont_t* sfont,
|
|
||||||
int bank, int num, fluid_sample_t* sample,
|
|
||||||
int on, float loopstart, float loopend);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* _FLUIDSYNTH_RAMSFONT_H */
|
|
|
@ -37,39 +37,39 @@ extern "C" {
|
||||||
* @param seq The sequencer instance
|
* @param seq The sequencer instance
|
||||||
* @param data User defined data registered with the client
|
* @param data User defined data registered with the client
|
||||||
*/
|
*/
|
||||||
typedef void (*fluid_event_callback_t)(unsigned int time, fluid_event_t* event,
|
typedef void (*fluid_event_callback_t)(unsigned int time, fluid_event_t *event,
|
||||||
fluid_sequencer_t* seq, void* data);
|
fluid_sequencer_t *seq, void *data);
|
||||||
|
|
||||||
|
|
||||||
FLUIDSYNTH_API fluid_sequencer_t* new_fluid_sequencer(void);
|
FLUIDSYNTH_API fluid_sequencer_t *new_fluid_sequencer(void);
|
||||||
FLUIDSYNTH_API fluid_sequencer_t* new_fluid_sequencer2(int use_system_timer);
|
FLUIDSYNTH_API fluid_sequencer_t *new_fluid_sequencer2(int use_system_timer);
|
||||||
FLUIDSYNTH_API void delete_fluid_sequencer(fluid_sequencer_t* seq);
|
FLUIDSYNTH_API void delete_fluid_sequencer(fluid_sequencer_t *seq);
|
||||||
FLUIDSYNTH_API int fluid_sequencer_get_use_system_timer(fluid_sequencer_t* seq);
|
FLUIDSYNTH_API int fluid_sequencer_get_use_system_timer(fluid_sequencer_t *seq);
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
fluid_seq_id_t fluid_sequencer_register_client(fluid_sequencer_t* seq, const char *name,
|
fluid_seq_id_t fluid_sequencer_register_client(fluid_sequencer_t *seq, const char *name,
|
||||||
fluid_event_callback_t callback, void* data);
|
fluid_event_callback_t callback, void *data);
|
||||||
FLUIDSYNTH_API void fluid_sequencer_unregister_client(fluid_sequencer_t* seq, fluid_seq_id_t id);
|
FLUIDSYNTH_API void fluid_sequencer_unregister_client(fluid_sequencer_t *seq, fluid_seq_id_t id);
|
||||||
FLUIDSYNTH_API int fluid_sequencer_count_clients(fluid_sequencer_t* seq);
|
FLUIDSYNTH_API int fluid_sequencer_count_clients(fluid_sequencer_t *seq);
|
||||||
FLUIDSYNTH_API fluid_seq_id_t fluid_sequencer_get_client_id(fluid_sequencer_t* seq, int index);
|
FLUIDSYNTH_API fluid_seq_id_t fluid_sequencer_get_client_id(fluid_sequencer_t *seq, int index);
|
||||||
FLUIDSYNTH_API char* fluid_sequencer_get_client_name(fluid_sequencer_t* seq, fluid_seq_id_t id);
|
FLUIDSYNTH_API char *fluid_sequencer_get_client_name(fluid_sequencer_t *seq, fluid_seq_id_t id);
|
||||||
FLUIDSYNTH_API int fluid_sequencer_client_is_dest(fluid_sequencer_t* seq, fluid_seq_id_t id);
|
FLUIDSYNTH_API int fluid_sequencer_client_is_dest(fluid_sequencer_t *seq, fluid_seq_id_t id);
|
||||||
FLUIDSYNTH_API void fluid_sequencer_process(fluid_sequencer_t* seq, unsigned int msec);
|
FLUIDSYNTH_API void fluid_sequencer_process(fluid_sequencer_t *seq, unsigned int msec);
|
||||||
FLUIDSYNTH_API void fluid_sequencer_send_now(fluid_sequencer_t* seq, fluid_event_t* evt);
|
FLUIDSYNTH_API void fluid_sequencer_send_now(fluid_sequencer_t *seq, fluid_event_t *evt);
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_sequencer_send_at(fluid_sequencer_t* seq, fluid_event_t* evt,
|
int fluid_sequencer_send_at(fluid_sequencer_t *seq, fluid_event_t *evt,
|
||||||
unsigned int time, int absolute);
|
unsigned int time, int absolute);
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
void fluid_sequencer_remove_events(fluid_sequencer_t* seq, fluid_seq_id_t source, fluid_seq_id_t dest, int type);
|
void fluid_sequencer_remove_events(fluid_sequencer_t *seq, fluid_seq_id_t source, fluid_seq_id_t dest, int type);
|
||||||
FLUIDSYNTH_API unsigned int fluid_sequencer_get_tick(fluid_sequencer_t* seq);
|
FLUIDSYNTH_API unsigned int fluid_sequencer_get_tick(fluid_sequencer_t *seq);
|
||||||
FLUIDSYNTH_API void fluid_sequencer_set_time_scale(fluid_sequencer_t* seq, double scale);
|
FLUIDSYNTH_API void fluid_sequencer_set_time_scale(fluid_sequencer_t *seq, double scale);
|
||||||
FLUIDSYNTH_API double fluid_sequencer_get_time_scale(fluid_sequencer_t* seq);
|
FLUIDSYNTH_API double fluid_sequencer_get_time_scale(fluid_sequencer_t *seq);
|
||||||
|
|
||||||
// Compile in internal traceing functions
|
// Compile in internal traceing functions
|
||||||
#define FLUID_SEQ_WITH_TRACE 0
|
#define FLUID_SEQ_WITH_TRACE 0
|
||||||
|
|
||||||
#if FLUID_SEQ_WITH_TRACE
|
#if FLUID_SEQ_WITH_TRACE
|
||||||
FLUIDSYNTH_API char * fluid_seq_gettrace(fluid_sequencer_t* seq);
|
FLUIDSYNTH_API char *fluid_seq_gettrace(fluid_sequencer_t *seq);
|
||||||
FLUIDSYNTH_API void fluid_seq_cleartrace(fluid_sequencer_t* seq);
|
FLUIDSYNTH_API void fluid_seq_cleartrace(fluid_sequencer_t *seq);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -33,9 +33,9 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
fluid_seq_id_t fluid_sequencer_register_fluidsynth(fluid_sequencer_t* seq, fluid_synth_t* synth);
|
fluid_seq_id_t fluid_sequencer_register_fluidsynth(fluid_sequencer_t *seq, fluid_synth_t *synth);
|
||||||
FLUIDSYNTH_API int
|
FLUIDSYNTH_API int
|
||||||
fluid_sequencer_add_midi_event_to_buffer(void* data, fluid_midi_event_t* event);
|
fluid_sequencer_add_midi_event_to_buffer(void *data, fluid_midi_event_t *event);
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -88,7 +88,8 @@ extern "C" {
|
||||||
* set of values. The type of each setting can be retrieved using the
|
* set of values. The type of each setting can be retrieved using the
|
||||||
* function fluid_settings_get_type()
|
* function fluid_settings_get_type()
|
||||||
*/
|
*/
|
||||||
enum fluid_types_enum {
|
enum fluid_types_enum
|
||||||
|
{
|
||||||
FLUID_NO_TYPE = -1, /**< Undefined type */
|
FLUID_NO_TYPE = -1, /**< Undefined type */
|
||||||
FLUID_NUM_TYPE, /**< Numeric (double) */
|
FLUID_NUM_TYPE, /**< Numeric (double) */
|
||||||
FLUID_INT_TYPE, /**< Integer */
|
FLUID_INT_TYPE, /**< Integer */
|
||||||
|
@ -97,58 +98,58 @@ enum fluid_types_enum {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
FLUIDSYNTH_API fluid_settings_t* new_fluid_settings(void);
|
FLUIDSYNTH_API fluid_settings_t *new_fluid_settings(void);
|
||||||
FLUIDSYNTH_API void delete_fluid_settings(fluid_settings_t* settings);
|
FLUIDSYNTH_API void delete_fluid_settings(fluid_settings_t *settings);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_settings_get_type(fluid_settings_t* settings, const char *name);
|
int fluid_settings_get_type(fluid_settings_t *settings, const char *name);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_settings_get_hints(fluid_settings_t* settings, const char *name, int* val);
|
int fluid_settings_get_hints(fluid_settings_t *settings, const char *name, int *val);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_settings_is_realtime(fluid_settings_t* settings, const char *name);
|
int fluid_settings_is_realtime(fluid_settings_t *settings, const char *name);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_settings_setstr(fluid_settings_t* settings, const char *name, const char *str);
|
int fluid_settings_setstr(fluid_settings_t *settings, const char *name, const char *str);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_settings_copystr(fluid_settings_t* settings, const char *name, char *str, int len);
|
int fluid_settings_copystr(fluid_settings_t *settings, const char *name, char *str, int len);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_settings_dupstr(fluid_settings_t* settings, const char *name, char** str);
|
int fluid_settings_dupstr(fluid_settings_t *settings, const char *name, char **str);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_settings_getstr_default(fluid_settings_t* settings, const char *name, char** def);
|
int fluid_settings_getstr_default(fluid_settings_t *settings, const char *name, char **def);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_settings_str_equal(fluid_settings_t* settings, const char *name, const char *value);
|
int fluid_settings_str_equal(fluid_settings_t *settings, const char *name, const char *value);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_settings_setnum(fluid_settings_t* settings, const char *name, double val);
|
int fluid_settings_setnum(fluid_settings_t *settings, const char *name, double val);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_settings_getnum(fluid_settings_t* settings, const char *name, double* val);
|
int fluid_settings_getnum(fluid_settings_t *settings, const char *name, double *val);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_settings_getnum_default(fluid_settings_t* settings, const char *name, double* val);
|
int fluid_settings_getnum_default(fluid_settings_t *settings, const char *name, double *val);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_settings_getnum_range(fluid_settings_t* settings, const char *name,
|
int fluid_settings_getnum_range(fluid_settings_t *settings, const char *name,
|
||||||
double* min, double* max);
|
double *min, double *max);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_settings_setint(fluid_settings_t* settings, const char *name, int val);
|
int fluid_settings_setint(fluid_settings_t *settings, const char *name, int val);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_settings_getint(fluid_settings_t* settings, const char *name, int* val);
|
int fluid_settings_getint(fluid_settings_t *settings, const char *name, int *val);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_settings_getint_default(fluid_settings_t* settings, const char *name, int* val);
|
int fluid_settings_getint_default(fluid_settings_t *settings, const char *name, int *val);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_settings_getint_range(fluid_settings_t* settings, const char *name,
|
int fluid_settings_getint_range(fluid_settings_t *settings, const char *name,
|
||||||
int* min, int* max);
|
int *min, int *max);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback function type used with fluid_settings_foreach_option()
|
* Callback function type used with fluid_settings_foreach_option()
|
||||||
|
@ -159,14 +160,14 @@ int fluid_settings_getint_range(fluid_settings_t* settings, const char *name,
|
||||||
typedef void (*fluid_settings_foreach_option_t)(void *data, const char *name, const char *option);
|
typedef void (*fluid_settings_foreach_option_t)(void *data, const char *name, const char *option);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
void fluid_settings_foreach_option(fluid_settings_t* settings,
|
void fluid_settings_foreach_option(fluid_settings_t *settings,
|
||||||
const char* name, void* data,
|
const char *name, void *data,
|
||||||
fluid_settings_foreach_option_t func);
|
fluid_settings_foreach_option_t func);
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_settings_option_count (fluid_settings_t* settings, const char* name);
|
int fluid_settings_option_count(fluid_settings_t *settings, const char *name);
|
||||||
FLUIDSYNTH_API char *fluid_settings_option_concat (fluid_settings_t* settings,
|
FLUIDSYNTH_API char *fluid_settings_option_concat(fluid_settings_t *settings,
|
||||||
const char* name,
|
const char *name,
|
||||||
const char* separator);
|
const char *separator);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback function type used with fluid_settings_foreach()
|
* Callback function type used with fluid_settings_foreach()
|
||||||
|
@ -177,7 +178,7 @@ FLUIDSYNTH_API char *fluid_settings_option_concat (fluid_settings_t* settings,
|
||||||
typedef void (*fluid_settings_foreach_t)(void *data, const char *name, int type);
|
typedef void (*fluid_settings_foreach_t)(void *data, const char *name, int type);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
void fluid_settings_foreach(fluid_settings_t* settings, void* data,
|
void fluid_settings_foreach(fluid_settings_t *settings, void *data,
|
||||||
fluid_settings_foreach_t func);
|
fluid_settings_foreach_t func);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -64,7 +64,8 @@ extern "C" {
|
||||||
/**
|
/**
|
||||||
* Some notification enums for presets and samples.
|
* Some notification enums for presets and samples.
|
||||||
*/
|
*/
|
||||||
enum {
|
enum
|
||||||
|
{
|
||||||
FLUID_PRESET_SELECTED, /**< Preset selected notify */
|
FLUID_PRESET_SELECTED, /**< Preset selected notify */
|
||||||
FLUID_PRESET_UNSELECTED, /**< Preset unselected notify */
|
FLUID_PRESET_UNSELECTED, /**< Preset unselected notify */
|
||||||
FLUID_SAMPLE_DONE /**< Sample no longer needed notify */
|
FLUID_SAMPLE_DONE /**< Sample no longer needed notify */
|
||||||
|
@ -91,7 +92,7 @@ enum fluid_sample_type
|
||||||
* @param filename File name or other string identifier
|
* @param filename File name or other string identifier
|
||||||
* @return The loaded instrument file (SoundFont) or NULL if an error occured.
|
* @return The loaded instrument file (SoundFont) or NULL if an error occured.
|
||||||
*/
|
*/
|
||||||
typedef fluid_sfont_t* (*fluid_sfloader_load_t)(fluid_sfloader_t* loader, const char* filename);
|
typedef fluid_sfont_t *(*fluid_sfloader_load_t)(fluid_sfloader_t *loader, const char *filename);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The free method should free the memory allocated for a fluid_sfloader_t instance in
|
* The free method should free the memory allocated for a fluid_sfloader_t instance in
|
||||||
|
@ -100,13 +101,13 @@ typedef fluid_sfont_t* (*fluid_sfloader_load_t)(fluid_sfloader_t* loader, const
|
||||||
* needs to be freed, setting this to delete_fluid_sfloader() is sufficient.
|
* needs to be freed, setting this to delete_fluid_sfloader() is sufficient.
|
||||||
* @param loader SoundFont loader
|
* @param loader SoundFont loader
|
||||||
*/
|
*/
|
||||||
typedef void (*fluid_sfloader_free_t)(fluid_sfloader_t* loader);
|
typedef void (*fluid_sfloader_free_t)(fluid_sfloader_t *loader);
|
||||||
|
|
||||||
|
|
||||||
FLUIDSYNTH_API fluid_sfloader_t* new_fluid_sfloader(fluid_sfloader_load_t load, fluid_sfloader_free_t free);
|
FLUIDSYNTH_API fluid_sfloader_t *new_fluid_sfloader(fluid_sfloader_load_t load, fluid_sfloader_free_t free);
|
||||||
FLUIDSYNTH_API void delete_fluid_sfloader(fluid_sfloader_t* loader);
|
FLUIDSYNTH_API void delete_fluid_sfloader(fluid_sfloader_t *loader);
|
||||||
|
|
||||||
FLUIDSYNTH_API fluid_sfloader_t* new_fluid_defsfloader(fluid_settings_t* settings);
|
FLUIDSYNTH_API fluid_sfloader_t *new_fluid_defsfloader(fluid_settings_t *settings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens the file or memory indicated by \c filename in binary read mode.
|
* Opens the file or memory indicated by \c filename in binary read mode.
|
||||||
|
@ -114,14 +115,14 @@ FLUIDSYNTH_API fluid_sfloader_t* new_fluid_defsfloader(fluid_settings_t* setting
|
||||||
*
|
*
|
||||||
* @return returns a file handle on success, NULL otherwise
|
* @return returns a file handle on success, NULL otherwise
|
||||||
*/
|
*/
|
||||||
typedef void * (* fluid_sfloader_callback_open_t )(const char * filename);
|
typedef void *(* fluid_sfloader_callback_open_t)(const char *filename);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads \c count bytes to the specified buffer \c buf.
|
* Reads \c count bytes to the specified buffer \c buf.
|
||||||
*
|
*
|
||||||
* @return returns #FLUID_OK if exactly \c count bytes were successfully read, else returns #FLUID_FAILED and leaves \a buf unmodified.
|
* @return returns #FLUID_OK if exactly \c count bytes were successfully read, else returns #FLUID_FAILED and leaves \a buf unmodified.
|
||||||
*/
|
*/
|
||||||
typedef int (* fluid_sfloader_callback_read_t )(void *buf, int count, void * handle);
|
typedef int (* fluid_sfloader_callback_read_t)(void *buf, int count, void *handle);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Same purpose and behaviour as fseek.
|
* Same purpose and behaviour as fseek.
|
||||||
|
@ -130,28 +131,28 @@ typedef int (* fluid_sfloader_callback_read_t )(void *buf, int count, void * han
|
||||||
*
|
*
|
||||||
* @return returns #FLUID_OK if the seek was successfully performed while not seeking beyond a buffer or file, #FLUID_FAILED otherwise
|
* @return returns #FLUID_OK if the seek was successfully performed while not seeking beyond a buffer or file, #FLUID_FAILED otherwise
|
||||||
*/
|
*/
|
||||||
typedef int (* fluid_sfloader_callback_seek_t )(void * handle, long offset, int origin);
|
typedef int (* fluid_sfloader_callback_seek_t)(void *handle, long offset, int origin);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Closes the handle returned by #fluid_sfloader_callback_open_t and frees used ressources.
|
* Closes the handle returned by #fluid_sfloader_callback_open_t and frees used ressources.
|
||||||
*
|
*
|
||||||
* @return returns #FLUID_OK on success, #FLUID_FAILED on error
|
* @return returns #FLUID_OK on success, #FLUID_FAILED on error
|
||||||
*/
|
*/
|
||||||
typedef int (* fluid_sfloader_callback_close_t )(void * handle);
|
typedef int (* fluid_sfloader_callback_close_t)(void *handle);
|
||||||
|
|
||||||
/** @return returns current file offset or #FLUID_FAILED on error */
|
/** @return returns current file offset or #FLUID_FAILED on error */
|
||||||
typedef long (* fluid_sfloader_callback_tell_t )(void * handle);
|
typedef long (* fluid_sfloader_callback_tell_t)(void *handle);
|
||||||
|
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_sfloader_set_callbacks(fluid_sfloader_t* loader,
|
FLUIDSYNTH_API int fluid_sfloader_set_callbacks(fluid_sfloader_t *loader,
|
||||||
fluid_sfloader_callback_open_t open,
|
fluid_sfloader_callback_open_t open,
|
||||||
fluid_sfloader_callback_read_t read,
|
fluid_sfloader_callback_read_t read,
|
||||||
fluid_sfloader_callback_seek_t seek,
|
fluid_sfloader_callback_seek_t seek,
|
||||||
fluid_sfloader_callback_tell_t tell,
|
fluid_sfloader_callback_tell_t tell,
|
||||||
fluid_sfloader_callback_close_t close);
|
fluid_sfloader_callback_close_t close);
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_sfloader_set_data(fluid_sfloader_t* loader, void* data);
|
FLUIDSYNTH_API int fluid_sfloader_set_data(fluid_sfloader_t *loader, void *data);
|
||||||
FLUIDSYNTH_API void* fluid_sfloader_get_data(fluid_sfloader_t* loader);
|
FLUIDSYNTH_API void *fluid_sfloader_get_data(fluid_sfloader_t *loader);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -160,7 +161,7 @@ FLUIDSYNTH_API void* fluid_sfloader_get_data(fluid_sfloader_t* loader);
|
||||||
* @param sfont Virtual SoundFont
|
* @param sfont Virtual SoundFont
|
||||||
* @return The name of the virtual SoundFont.
|
* @return The name of the virtual SoundFont.
|
||||||
*/
|
*/
|
||||||
typedef const char* (*fluid_sfont_get_name_t)(fluid_sfont_t* sfont);
|
typedef const char *(*fluid_sfont_get_name_t)(fluid_sfont_t *sfont);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a virtual SoundFont preset by bank and program numbers.
|
* Get a virtual SoundFont preset by bank and program numbers.
|
||||||
|
@ -170,7 +171,7 @@ typedef const char* (*fluid_sfont_get_name_t)(fluid_sfont_t* sfont);
|
||||||
* @return Should return an allocated virtual preset or NULL if it could not
|
* @return Should return an allocated virtual preset or NULL if it could not
|
||||||
* be found.
|
* be found.
|
||||||
*/
|
*/
|
||||||
typedef fluid_preset_t* (*fluid_sfont_get_preset_t)(fluid_sfont_t* sfont, int bank, int prenum);
|
typedef fluid_preset_t *(*fluid_sfont_get_preset_t)(fluid_sfont_t *sfont, int bank, int prenum);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start virtual SoundFont preset iteration method.
|
* Start virtual SoundFont preset iteration method.
|
||||||
|
@ -178,19 +179,17 @@ typedef fluid_preset_t* (*fluid_sfont_get_preset_t)(fluid_sfont_t* sfont, int ba
|
||||||
*
|
*
|
||||||
* Starts/re-starts virtual preset iteration in a SoundFont.
|
* Starts/re-starts virtual preset iteration in a SoundFont.
|
||||||
*/
|
*/
|
||||||
typedef void (*fluid_sfont_iteration_start_t)(fluid_sfont_t* sfont);
|
typedef void (*fluid_sfont_iteration_start_t)(fluid_sfont_t *sfont);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Virtual SoundFont preset iteration function.
|
* Virtual SoundFont preset iteration function.
|
||||||
* @param sfont Virtual SoundFont
|
* @param sfont Virtual SoundFont
|
||||||
* @param preset Caller supplied uninitialized buffer to fill in with current preset information
|
|
||||||
* @return NULL when no more presets are available, otherwise the a pointer to the current preset
|
* @return NULL when no more presets are available, otherwise the a pointer to the current preset
|
||||||
*
|
*
|
||||||
* Should store preset information to the caller supplied \a preset structure
|
* Returns preset information to the caller. The returned buffer is only valid until a subsequent
|
||||||
* and advance the internal iteration state to the next preset for subsequent
|
* call to this function.
|
||||||
* calls.
|
|
||||||
*/
|
*/
|
||||||
typedef fluid_preset_t* (*fluid_sfont_iteration_next_t)(fluid_sfont_t* sfont);
|
typedef fluid_preset_t *(*fluid_sfont_iteration_next_t)(fluid_sfont_t *sfont);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to free a virtual SoundFont bank. Any custom user provided cleanup function must ultimately call
|
* Method to free a virtual SoundFont bank. Any custom user provided cleanup function must ultimately call
|
||||||
|
@ -201,25 +200,25 @@ typedef fluid_preset_t* (*fluid_sfont_iteration_next_t)(fluid_sfont_t* sfont);
|
||||||
* if some of the samples could not be freed because they are still in use,
|
* if some of the samples could not be freed because they are still in use,
|
||||||
* in which case the free will be tried again later, until success.
|
* in which case the free will be tried again later, until success.
|
||||||
*/
|
*/
|
||||||
typedef int (*fluid_sfont_free_t)(fluid_sfont_t* sfont);
|
typedef int (*fluid_sfont_free_t)(fluid_sfont_t *sfont);
|
||||||
|
|
||||||
|
|
||||||
FLUIDSYNTH_API fluid_sfont_t* new_fluid_sfont(fluid_sfont_get_name_t get_name,
|
FLUIDSYNTH_API fluid_sfont_t *new_fluid_sfont(fluid_sfont_get_name_t get_name,
|
||||||
fluid_sfont_get_preset_t get_preset,
|
fluid_sfont_get_preset_t get_preset,
|
||||||
fluid_sfont_iteration_start_t iter_start,
|
fluid_sfont_iteration_start_t iter_start,
|
||||||
fluid_sfont_iteration_next_t iter_next,
|
fluid_sfont_iteration_next_t iter_next,
|
||||||
fluid_sfont_free_t free);
|
fluid_sfont_free_t free);
|
||||||
|
|
||||||
FLUIDSYNTH_API int delete_fluid_sfont(fluid_sfont_t* sfont);
|
FLUIDSYNTH_API int delete_fluid_sfont(fluid_sfont_t *sfont);
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_sfont_set_data(fluid_sfont_t* sfont, void* data);
|
FLUIDSYNTH_API int fluid_sfont_set_data(fluid_sfont_t *sfont, void *data);
|
||||||
FLUIDSYNTH_API void* fluid_sfont_get_data(fluid_sfont_t* sfont);
|
FLUIDSYNTH_API void *fluid_sfont_get_data(fluid_sfont_t *sfont);
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_sfont_get_id(fluid_sfont_t* sfont);
|
FLUIDSYNTH_API int fluid_sfont_get_id(fluid_sfont_t *sfont);
|
||||||
FLUIDSYNTH_API const char* fluid_sfont_get_name(fluid_sfont_t* sfont);
|
FLUIDSYNTH_API const char *fluid_sfont_get_name(fluid_sfont_t *sfont);
|
||||||
FLUIDSYNTH_API fluid_preset_t* fluid_sfont_get_preset(fluid_sfont_t* sfont, int bank, int prenum);
|
FLUIDSYNTH_API fluid_preset_t *fluid_sfont_get_preset(fluid_sfont_t *sfont, int bank, int prenum);
|
||||||
FLUIDSYNTH_API void fluid_sfont_iteration_start(fluid_sfont_t* sfont);
|
FLUIDSYNTH_API void fluid_sfont_iteration_start(fluid_sfont_t *sfont);
|
||||||
FLUIDSYNTH_API fluid_preset_t* fluid_sfont_iteration_next(fluid_sfont_t* sfont);
|
FLUIDSYNTH_API fluid_preset_t *fluid_sfont_iteration_next(fluid_sfont_t *sfont);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to get a virtual SoundFont preset name.
|
* Method to get a virtual SoundFont preset name.
|
||||||
|
@ -228,21 +227,21 @@ FLUIDSYNTH_API fluid_preset_t* fluid_sfont_iteration_next(fluid_sfont_t* sfont);
|
||||||
* valid for the duration of the virtual preset (or the duration of the
|
* valid for the duration of the virtual preset (or the duration of the
|
||||||
* SoundFont, in the case of preset iteration).
|
* SoundFont, in the case of preset iteration).
|
||||||
*/
|
*/
|
||||||
typedef const char* (*fluid_preset_get_name_t)(fluid_preset_t* preset);
|
typedef const char *(*fluid_preset_get_name_t)(fluid_preset_t *preset);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to get a virtual SoundFont preset MIDI bank number.
|
* Method to get a virtual SoundFont preset MIDI bank number.
|
||||||
* @param preset Virtual SoundFont preset
|
* @param preset Virtual SoundFont preset
|
||||||
* @param return The bank number of the preset
|
* @param return The bank number of the preset
|
||||||
*/
|
*/
|
||||||
typedef int (*fluid_preset_get_banknum_t)(fluid_preset_t* preset);
|
typedef int (*fluid_preset_get_banknum_t)(fluid_preset_t *preset);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to get a virtual SoundFont preset MIDI program number.
|
* Method to get a virtual SoundFont preset MIDI program number.
|
||||||
* @param preset Virtual SoundFont preset
|
* @param preset Virtual SoundFont preset
|
||||||
* @param return The program number of the preset
|
* @param return The program number of the preset
|
||||||
*/
|
*/
|
||||||
typedef int (*fluid_preset_get_num_t)(fluid_preset_t* preset);
|
typedef int (*fluid_preset_get_num_t)(fluid_preset_t *preset);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to handle a noteon event (synthesize the instrument).
|
* Method to handle a noteon event (synthesize the instrument).
|
||||||
|
@ -266,7 +265,7 @@ typedef int (*fluid_preset_get_num_t)(fluid_preset_t* preset);
|
||||||
* start playing the synthesis voice. Starting with FluidSynth 1.1.0 all voices
|
* start playing the synthesis voice. Starting with FluidSynth 1.1.0 all voices
|
||||||
* created will be started at the same time.
|
* created will be started at the same time.
|
||||||
*/
|
*/
|
||||||
typedef int (*fluid_preset_noteon_t)(fluid_preset_t* preset, fluid_synth_t* synth, int chan, int key, int vel);
|
typedef int (*fluid_preset_noteon_t)(fluid_preset_t *preset, fluid_synth_t *synth, int chan, int key, int vel);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to free a virtual SoundFont preset. Any custom user provided cleanup function must ultimately call
|
* Method to free a virtual SoundFont preset. Any custom user provided cleanup function must ultimately call
|
||||||
|
@ -275,38 +274,38 @@ typedef int (*fluid_preset_noteon_t)(fluid_preset_t* preset, fluid_synth_t* synt
|
||||||
* @param preset Virtual SoundFont preset
|
* @param preset Virtual SoundFont preset
|
||||||
* @return Should return 0
|
* @return Should return 0
|
||||||
*/
|
*/
|
||||||
typedef void (*fluid_preset_free_t)(fluid_preset_t* preset);
|
typedef void (*fluid_preset_free_t)(fluid_preset_t *preset);
|
||||||
|
|
||||||
FLUIDSYNTH_API fluid_preset_t* new_fluid_preset(fluid_sfont_t* parent_sfont,
|
FLUIDSYNTH_API fluid_preset_t *new_fluid_preset(fluid_sfont_t *parent_sfont,
|
||||||
fluid_preset_get_name_t get_name,
|
fluid_preset_get_name_t get_name,
|
||||||
fluid_preset_get_banknum_t get_bank,
|
fluid_preset_get_banknum_t get_bank,
|
||||||
fluid_preset_get_num_t get_num,
|
fluid_preset_get_num_t get_num,
|
||||||
fluid_preset_noteon_t noteon,
|
fluid_preset_noteon_t noteon,
|
||||||
fluid_preset_free_t free);
|
fluid_preset_free_t free);
|
||||||
FLUIDSYNTH_API void delete_fluid_preset(fluid_preset_t* preset);
|
FLUIDSYNTH_API void delete_fluid_preset(fluid_preset_t *preset);
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_preset_set_data(fluid_preset_t* preset, void* data);
|
FLUIDSYNTH_API int fluid_preset_set_data(fluid_preset_t *preset, void *data);
|
||||||
FLUIDSYNTH_API void* fluid_preset_get_data(fluid_preset_t* preset);
|
FLUIDSYNTH_API void *fluid_preset_get_data(fluid_preset_t *preset);
|
||||||
|
|
||||||
FLUIDSYNTH_API const char* fluid_preset_get_name(fluid_preset_t* preset);
|
FLUIDSYNTH_API const char *fluid_preset_get_name(fluid_preset_t *preset);
|
||||||
FLUIDSYNTH_API int fluid_preset_get_banknum(fluid_preset_t* preset);
|
FLUIDSYNTH_API int fluid_preset_get_banknum(fluid_preset_t *preset);
|
||||||
FLUIDSYNTH_API int fluid_preset_get_num(fluid_preset_t* preset);
|
FLUIDSYNTH_API int fluid_preset_get_num(fluid_preset_t *preset);
|
||||||
FLUIDSYNTH_API fluid_sfont_t* fluid_preset_get_sfont(fluid_preset_t* preset);
|
FLUIDSYNTH_API fluid_sfont_t *fluid_preset_get_sfont(fluid_preset_t *preset);
|
||||||
|
|
||||||
FLUIDSYNTH_API fluid_sample_t* new_fluid_sample(void);
|
FLUIDSYNTH_API fluid_sample_t *new_fluid_sample(void);
|
||||||
FLUIDSYNTH_API void delete_fluid_sample(fluid_sample_t* sample);
|
FLUIDSYNTH_API void delete_fluid_sample(fluid_sample_t *sample);
|
||||||
FLUIDSYNTH_API size_t fluid_sample_sizeof(void);
|
FLUIDSYNTH_API size_t fluid_sample_sizeof(void);
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_sample_set_name(fluid_sample_t* sample, const char *name);
|
FLUIDSYNTH_API int fluid_sample_set_name(fluid_sample_t *sample, const char *name);
|
||||||
FLUIDSYNTH_API int fluid_sample_set_sound_data (fluid_sample_t* sample,
|
FLUIDSYNTH_API int fluid_sample_set_sound_data(fluid_sample_t *sample,
|
||||||
short *data,
|
short *data,
|
||||||
char *data24,
|
char *data24,
|
||||||
unsigned int nbframes,
|
unsigned int nbframes,
|
||||||
unsigned int sample_rate,
|
unsigned int sample_rate,
|
||||||
short copy_data);
|
short copy_data);
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_sample_set_loop(fluid_sample_t* sample, unsigned int loop_start, unsigned int loop_end);
|
FLUIDSYNTH_API int fluid_sample_set_loop(fluid_sample_t *sample, unsigned int loop_start, unsigned int loop_end);
|
||||||
FLUIDSYNTH_API int fluid_sample_set_pitch(fluid_sample_t* sample, int root_key, int fine_tune);
|
FLUIDSYNTH_API int fluid_sample_set_pitch(fluid_sample_t *sample, int root_key, int fine_tune);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,42 +39,42 @@ extern "C" {
|
||||||
FLUIDSYNTH_API fluid_istream_t fluid_get_stdin(void);
|
FLUIDSYNTH_API fluid_istream_t fluid_get_stdin(void);
|
||||||
FLUIDSYNTH_API fluid_ostream_t fluid_get_stdout(void);
|
FLUIDSYNTH_API fluid_ostream_t fluid_get_stdout(void);
|
||||||
|
|
||||||
FLUIDSYNTH_API char* fluid_get_userconf(char* buf, int len);
|
FLUIDSYNTH_API char *fluid_get_userconf(char *buf, int len);
|
||||||
FLUIDSYNTH_API char* fluid_get_sysconf(char* buf, int len);
|
FLUIDSYNTH_API char *fluid_get_sysconf(char *buf, int len);
|
||||||
|
|
||||||
|
|
||||||
/* The command handler */
|
/* The command handler */
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
fluid_cmd_handler_t* new_fluid_cmd_handler(fluid_synth_t* synth, fluid_midi_router_t* router);
|
fluid_cmd_handler_t *new_fluid_cmd_handler(fluid_synth_t *synth, fluid_midi_router_t *router);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
void delete_fluid_cmd_handler(fluid_cmd_handler_t* handler);
|
void delete_fluid_cmd_handler(fluid_cmd_handler_t *handler);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
void fluid_cmd_handler_set_synth(fluid_cmd_handler_t* handler, fluid_synth_t* synth);
|
void fluid_cmd_handler_set_synth(fluid_cmd_handler_t *handler, fluid_synth_t *synth);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Command function */
|
/* Command function */
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_command(fluid_cmd_handler_t* handler, const char *cmd, fluid_ostream_t out);
|
int fluid_command(fluid_cmd_handler_t *handler, const char *cmd, fluid_ostream_t out);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_source(fluid_cmd_handler_t* handler, const char *filename);
|
int fluid_source(fluid_cmd_handler_t *handler, const char *filename);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
void fluid_usershell(fluid_settings_t* settings, fluid_cmd_handler_t* handler);
|
void fluid_usershell(fluid_settings_t *settings, fluid_cmd_handler_t *handler);
|
||||||
|
|
||||||
|
|
||||||
/* Shell */
|
/* Shell */
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
fluid_shell_t* new_fluid_shell(fluid_settings_t* settings, fluid_cmd_handler_t* handler,
|
fluid_shell_t *new_fluid_shell(fluid_settings_t *settings, fluid_cmd_handler_t *handler,
|
||||||
fluid_istream_t in, fluid_ostream_t out, int thread);
|
fluid_istream_t in, fluid_ostream_t out, int thread);
|
||||||
|
|
||||||
FLUIDSYNTH_API void delete_fluid_shell(fluid_shell_t* shell);
|
FLUIDSYNTH_API void delete_fluid_shell(fluid_shell_t *shell);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -82,12 +82,12 @@ FLUIDSYNTH_API void delete_fluid_shell(fluid_shell_t* shell);
|
||||||
|
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
fluid_server_t* new_fluid_server(fluid_settings_t* settings,
|
fluid_server_t *new_fluid_server(fluid_settings_t *settings,
|
||||||
fluid_synth_t* synth, fluid_midi_router_t* router);
|
fluid_synth_t *synth, fluid_midi_router_t *router);
|
||||||
|
|
||||||
FLUIDSYNTH_API void delete_fluid_server(fluid_server_t* server);
|
FLUIDSYNTH_API void delete_fluid_server(fluid_server_t *server);
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_server_join(fluid_server_t* server);
|
FLUIDSYNTH_API int fluid_server_join(fluid_server_t *server);
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -46,43 +46,43 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
FLUIDSYNTH_API fluid_synth_t* new_fluid_synth(fluid_settings_t* settings);
|
FLUIDSYNTH_API fluid_synth_t *new_fluid_synth(fluid_settings_t *settings);
|
||||||
FLUIDSYNTH_API void delete_fluid_synth(fluid_synth_t* synth);
|
FLUIDSYNTH_API void delete_fluid_synth(fluid_synth_t *synth);
|
||||||
FLUIDSYNTH_API fluid_settings_t* fluid_synth_get_settings(fluid_synth_t* synth);
|
FLUIDSYNTH_API fluid_settings_t *fluid_synth_get_settings(fluid_synth_t *synth);
|
||||||
|
|
||||||
/* MIDI channel messages */
|
/* MIDI channel messages */
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_synth_noteon(fluid_synth_t* synth, int chan, int key, int vel);
|
FLUIDSYNTH_API int fluid_synth_noteon(fluid_synth_t *synth, int chan, int key, int vel);
|
||||||
FLUIDSYNTH_API int fluid_synth_noteoff(fluid_synth_t* synth, int chan, int key);
|
FLUIDSYNTH_API int fluid_synth_noteoff(fluid_synth_t *synth, int chan, int key);
|
||||||
FLUIDSYNTH_API int fluid_synth_cc(fluid_synth_t* synth, int chan, int ctrl, int val);
|
FLUIDSYNTH_API int fluid_synth_cc(fluid_synth_t *synth, int chan, int ctrl, int val);
|
||||||
FLUIDSYNTH_API int fluid_synth_get_cc(fluid_synth_t* synth, int chan, int ctrl, int* pval);
|
FLUIDSYNTH_API int fluid_synth_get_cc(fluid_synth_t *synth, int chan, int ctrl, int *pval);
|
||||||
FLUIDSYNTH_API int fluid_synth_sysex(fluid_synth_t *synth, const char *data, int len,
|
FLUIDSYNTH_API int fluid_synth_sysex(fluid_synth_t *synth, const char *data, int len,
|
||||||
char *response, int *response_len, int *handled, int dryrun);
|
char *response, int *response_len, int *handled, int dryrun);
|
||||||
FLUIDSYNTH_API int fluid_synth_pitch_bend(fluid_synth_t* synth, int chan, int val);
|
FLUIDSYNTH_API int fluid_synth_pitch_bend(fluid_synth_t *synth, int chan, int val);
|
||||||
FLUIDSYNTH_API int fluid_synth_get_pitch_bend(fluid_synth_t* synth, int chan, int* ppitch_bend);
|
FLUIDSYNTH_API int fluid_synth_get_pitch_bend(fluid_synth_t *synth, int chan, int *ppitch_bend);
|
||||||
FLUIDSYNTH_API int fluid_synth_pitch_wheel_sens(fluid_synth_t* synth, int chan, int val);
|
FLUIDSYNTH_API int fluid_synth_pitch_wheel_sens(fluid_synth_t *synth, int chan, int val);
|
||||||
FLUIDSYNTH_API int fluid_synth_get_pitch_wheel_sens(fluid_synth_t* synth, int chan, int* pval);
|
FLUIDSYNTH_API int fluid_synth_get_pitch_wheel_sens(fluid_synth_t *synth, int chan, int *pval);
|
||||||
FLUIDSYNTH_API int fluid_synth_program_change(fluid_synth_t* synth, int chan, int program);
|
FLUIDSYNTH_API int fluid_synth_program_change(fluid_synth_t *synth, int chan, int program);
|
||||||
FLUIDSYNTH_API int fluid_synth_channel_pressure(fluid_synth_t* synth, int chan, int val);
|
FLUIDSYNTH_API int fluid_synth_channel_pressure(fluid_synth_t *synth, int chan, int val);
|
||||||
FLUIDSYNTH_API int fluid_synth_key_pressure(fluid_synth_t* synth, int chan, int key, int val);
|
FLUIDSYNTH_API int fluid_synth_key_pressure(fluid_synth_t *synth, int chan, int key, int val);
|
||||||
FLUIDSYNTH_API int fluid_synth_bank_select(fluid_synth_t* synth, int chan, int bank);
|
FLUIDSYNTH_API int fluid_synth_bank_select(fluid_synth_t *synth, int chan, int bank);
|
||||||
FLUIDSYNTH_API int fluid_synth_sfont_select(fluid_synth_t* synth, int chan, int sfont_id);
|
FLUIDSYNTH_API int fluid_synth_sfont_select(fluid_synth_t *synth, int chan, int sfont_id);
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_synth_program_select(fluid_synth_t* synth, int chan, int sfont_id,
|
int fluid_synth_program_select(fluid_synth_t *synth, int chan, int sfont_id,
|
||||||
int bank_num, int preset_num);
|
int bank_num, int preset_num);
|
||||||
FLUIDSYNTH_API int
|
FLUIDSYNTH_API int
|
||||||
fluid_synth_program_select_by_sfont_name (fluid_synth_t* synth, int chan,
|
fluid_synth_program_select_by_sfont_name(fluid_synth_t *synth, int chan,
|
||||||
const char *sfont_name, int bank_num,
|
const char *sfont_name, int bank_num,
|
||||||
int preset_num);
|
int preset_num);
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_synth_get_program(fluid_synth_t* synth, int chan, int* sfont_id,
|
int fluid_synth_get_program(fluid_synth_t *synth, int chan, int *sfont_id,
|
||||||
int* bank_num, int* preset_num);
|
int *bank_num, int *preset_num);
|
||||||
FLUIDSYNTH_API int fluid_synth_unset_program (fluid_synth_t *synth, int chan);
|
FLUIDSYNTH_API int fluid_synth_unset_program(fluid_synth_t *synth, int chan);
|
||||||
FLUIDSYNTH_API int fluid_synth_program_reset(fluid_synth_t* synth);
|
FLUIDSYNTH_API int fluid_synth_program_reset(fluid_synth_t *synth);
|
||||||
FLUIDSYNTH_API int fluid_synth_system_reset(fluid_synth_t* synth);
|
FLUIDSYNTH_API int fluid_synth_system_reset(fluid_synth_t *synth);
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_synth_all_notes_off(fluid_synth_t* synth, int chan);
|
FLUIDSYNTH_API int fluid_synth_all_notes_off(fluid_synth_t *synth, int chan);
|
||||||
FLUIDSYNTH_API int fluid_synth_all_sounds_off(fluid_synth_t* synth, int chan);
|
FLUIDSYNTH_API int fluid_synth_all_sounds_off(fluid_synth_t *synth, int chan);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The midi channel type used by fluid_synth_set_channel_type()
|
* The midi channel type used by fluid_synth_set_channel_type()
|
||||||
|
@ -93,49 +93,49 @@ enum fluid_midi_channel_type
|
||||||
CHANNEL_TYPE_DRUM = 1 /**< Drum midi channel */
|
CHANNEL_TYPE_DRUM = 1 /**< Drum midi channel */
|
||||||
};
|
};
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_synth_set_channel_type(fluid_synth_t* synth, int chan, int type);
|
FLUIDSYNTH_API int fluid_synth_set_channel_type(fluid_synth_t *synth, int chan, int type);
|
||||||
|
|
||||||
|
|
||||||
/* Low level access */
|
/* Low level access */
|
||||||
FLUIDSYNTH_API fluid_preset_t* fluid_synth_get_channel_preset(fluid_synth_t* synth, int chan);
|
FLUIDSYNTH_API fluid_preset_t *fluid_synth_get_channel_preset(fluid_synth_t *synth, int chan);
|
||||||
FLUIDSYNTH_API int fluid_synth_start(fluid_synth_t* synth, unsigned int id,
|
FLUIDSYNTH_API int fluid_synth_start(fluid_synth_t *synth, unsigned int id,
|
||||||
fluid_preset_t* preset, int audio_chan,
|
fluid_preset_t *preset, int audio_chan,
|
||||||
int midi_chan, int key, int vel);
|
int midi_chan, int key, int vel);
|
||||||
FLUIDSYNTH_API int fluid_synth_stop(fluid_synth_t* synth, unsigned int id);
|
FLUIDSYNTH_API int fluid_synth_stop(fluid_synth_t *synth, unsigned int id);
|
||||||
|
|
||||||
|
|
||||||
/* SoundFont management */
|
/* SoundFont management */
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_synth_sfload(fluid_synth_t* synth, const char* filename, int reset_presets);
|
int fluid_synth_sfload(fluid_synth_t *synth, const char *filename, int reset_presets);
|
||||||
FLUIDSYNTH_API int fluid_synth_sfreload(fluid_synth_t* synth, int id);
|
FLUIDSYNTH_API int fluid_synth_sfreload(fluid_synth_t *synth, int id);
|
||||||
FLUIDSYNTH_API int fluid_synth_sfunload(fluid_synth_t* synth, int id, int reset_presets);
|
FLUIDSYNTH_API int fluid_synth_sfunload(fluid_synth_t *synth, int id, int reset_presets);
|
||||||
FLUIDSYNTH_API int fluid_synth_add_sfont(fluid_synth_t* synth, fluid_sfont_t* sfont);
|
FLUIDSYNTH_API int fluid_synth_add_sfont(fluid_synth_t *synth, fluid_sfont_t *sfont);
|
||||||
FLUIDSYNTH_API int fluid_synth_remove_sfont(fluid_synth_t* synth, fluid_sfont_t* sfont);
|
FLUIDSYNTH_API int fluid_synth_remove_sfont(fluid_synth_t *synth, fluid_sfont_t *sfont);
|
||||||
FLUIDSYNTH_API int fluid_synth_sfcount(fluid_synth_t* synth);
|
FLUIDSYNTH_API int fluid_synth_sfcount(fluid_synth_t *synth);
|
||||||
FLUIDSYNTH_API fluid_sfont_t* fluid_synth_get_sfont(fluid_synth_t* synth, unsigned int num);
|
FLUIDSYNTH_API fluid_sfont_t *fluid_synth_get_sfont(fluid_synth_t *synth, unsigned int num);
|
||||||
FLUIDSYNTH_API fluid_sfont_t* fluid_synth_get_sfont_by_id(fluid_synth_t* synth, int id);
|
FLUIDSYNTH_API fluid_sfont_t *fluid_synth_get_sfont_by_id(fluid_synth_t *synth, int id);
|
||||||
FLUIDSYNTH_API fluid_sfont_t *fluid_synth_get_sfont_by_name (fluid_synth_t* synth,
|
FLUIDSYNTH_API fluid_sfont_t *fluid_synth_get_sfont_by_name(fluid_synth_t *synth,
|
||||||
const char *name);
|
const char *name);
|
||||||
FLUIDSYNTH_API int fluid_synth_set_bank_offset(fluid_synth_t* synth, int sfont_id, int offset);
|
FLUIDSYNTH_API int fluid_synth_set_bank_offset(fluid_synth_t *synth, int sfont_id, int offset);
|
||||||
FLUIDSYNTH_API int fluid_synth_get_bank_offset(fluid_synth_t* synth, int sfont_id);
|
FLUIDSYNTH_API int fluid_synth_get_bank_offset(fluid_synth_t *synth, int sfont_id);
|
||||||
|
|
||||||
|
|
||||||
/* Reverb */
|
/* Reverb */
|
||||||
|
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_synth_set_reverb(fluid_synth_t* synth, double roomsize,
|
FLUIDSYNTH_API int fluid_synth_set_reverb(fluid_synth_t *synth, double roomsize,
|
||||||
double damping, double width, double level);
|
double damping, double width, double level);
|
||||||
FLUIDSYNTH_API int fluid_synth_set_reverb_roomsize(fluid_synth_t* synth, double roomsize);
|
FLUIDSYNTH_API int fluid_synth_set_reverb_roomsize(fluid_synth_t *synth, double roomsize);
|
||||||
FLUIDSYNTH_API int fluid_synth_set_reverb_damp(fluid_synth_t* synth, double damping);
|
FLUIDSYNTH_API int fluid_synth_set_reverb_damp(fluid_synth_t *synth, double damping);
|
||||||
FLUIDSYNTH_API int fluid_synth_set_reverb_width(fluid_synth_t* synth, double width);
|
FLUIDSYNTH_API int fluid_synth_set_reverb_width(fluid_synth_t *synth, double width);
|
||||||
FLUIDSYNTH_API int fluid_synth_set_reverb_level(fluid_synth_t* synth, double level);
|
FLUIDSYNTH_API int fluid_synth_set_reverb_level(fluid_synth_t *synth, double level);
|
||||||
|
|
||||||
FLUIDSYNTH_API void fluid_synth_set_reverb_on(fluid_synth_t* synth, int on);
|
FLUIDSYNTH_API void fluid_synth_set_reverb_on(fluid_synth_t *synth, int on);
|
||||||
FLUIDSYNTH_API double fluid_synth_get_reverb_roomsize(fluid_synth_t* synth);
|
FLUIDSYNTH_API double fluid_synth_get_reverb_roomsize(fluid_synth_t *synth);
|
||||||
FLUIDSYNTH_API double fluid_synth_get_reverb_damp(fluid_synth_t* synth);
|
FLUIDSYNTH_API double fluid_synth_get_reverb_damp(fluid_synth_t *synth);
|
||||||
FLUIDSYNTH_API double fluid_synth_get_reverb_level(fluid_synth_t* synth);
|
FLUIDSYNTH_API double fluid_synth_get_reverb_level(fluid_synth_t *synth);
|
||||||
FLUIDSYNTH_API double fluid_synth_get_reverb_width(fluid_synth_t* synth);
|
FLUIDSYNTH_API double fluid_synth_get_reverb_width(fluid_synth_t *synth);
|
||||||
|
|
||||||
|
|
||||||
/* Chorus */
|
/* Chorus */
|
||||||
|
@ -143,52 +143,55 @@ FLUIDSYNTH_API double fluid_synth_get_reverb_width(fluid_synth_t* synth);
|
||||||
/**
|
/**
|
||||||
* Chorus modulation waveform type.
|
* Chorus modulation waveform type.
|
||||||
*/
|
*/
|
||||||
enum fluid_chorus_mod {
|
enum fluid_chorus_mod
|
||||||
|
{
|
||||||
FLUID_CHORUS_MOD_SINE = 0, /**< Sine wave chorus modulation */
|
FLUID_CHORUS_MOD_SINE = 0, /**< Sine wave chorus modulation */
|
||||||
FLUID_CHORUS_MOD_TRIANGLE = 1 /**< Triangle wave chorus modulation */
|
FLUID_CHORUS_MOD_TRIANGLE = 1 /**< Triangle wave chorus modulation */
|
||||||
};
|
};
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_synth_set_chorus(fluid_synth_t* synth, int nr, double level,
|
FLUIDSYNTH_API int fluid_synth_set_chorus(fluid_synth_t *synth, int nr, double level,
|
||||||
double speed, double depth_ms, int type);
|
double speed, double depth_ms, int type);
|
||||||
FLUIDSYNTH_API int fluid_synth_set_chorus_nr(fluid_synth_t* synth, int nr);
|
FLUIDSYNTH_API int fluid_synth_set_chorus_nr(fluid_synth_t *synth, int nr);
|
||||||
FLUIDSYNTH_API int fluid_synth_set_chorus_level(fluid_synth_t* synth, double level);
|
FLUIDSYNTH_API int fluid_synth_set_chorus_level(fluid_synth_t *synth, double level);
|
||||||
FLUIDSYNTH_API int fluid_synth_set_chorus_speed(fluid_synth_t* synth, double speed);
|
FLUIDSYNTH_API int fluid_synth_set_chorus_speed(fluid_synth_t *synth, double speed);
|
||||||
FLUIDSYNTH_API int fluid_synth_set_chorus_depth(fluid_synth_t* synth, double depth_ms);
|
FLUIDSYNTH_API int fluid_synth_set_chorus_depth(fluid_synth_t *synth, double depth_ms);
|
||||||
FLUIDSYNTH_API int fluid_synth_set_chorus_type(fluid_synth_t* synth, int type);
|
FLUIDSYNTH_API int fluid_synth_set_chorus_type(fluid_synth_t *synth, int type);
|
||||||
|
|
||||||
FLUIDSYNTH_API void fluid_synth_set_chorus_on(fluid_synth_t* synth, int on);
|
FLUIDSYNTH_API void fluid_synth_set_chorus_on(fluid_synth_t *synth, int on);
|
||||||
FLUIDSYNTH_API int fluid_synth_get_chorus_nr(fluid_synth_t* synth);
|
FLUIDSYNTH_API int fluid_synth_get_chorus_nr(fluid_synth_t *synth);
|
||||||
FLUIDSYNTH_API double fluid_synth_get_chorus_level(fluid_synth_t* synth);
|
FLUIDSYNTH_API double fluid_synth_get_chorus_level(fluid_synth_t *synth);
|
||||||
FLUIDSYNTH_API double fluid_synth_get_chorus_speed(fluid_synth_t* synth);
|
FLUIDSYNTH_API double fluid_synth_get_chorus_speed(fluid_synth_t *synth);
|
||||||
FLUIDSYNTH_API double fluid_synth_get_chorus_depth(fluid_synth_t* synth);
|
FLUIDSYNTH_API double fluid_synth_get_chorus_depth(fluid_synth_t *synth);
|
||||||
FLUIDSYNTH_API int fluid_synth_get_chorus_type(fluid_synth_t* synth); /* see fluid_chorus_mod */
|
FLUIDSYNTH_API int fluid_synth_get_chorus_type(fluid_synth_t *synth); /* see fluid_chorus_mod */
|
||||||
|
|
||||||
|
|
||||||
/* Audio and MIDI channels */
|
/* Audio and MIDI channels */
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_synth_count_midi_channels(fluid_synth_t* synth);
|
FLUIDSYNTH_API int fluid_synth_count_midi_channels(fluid_synth_t *synth);
|
||||||
FLUIDSYNTH_API int fluid_synth_count_audio_channels(fluid_synth_t* synth);
|
FLUIDSYNTH_API int fluid_synth_count_audio_channels(fluid_synth_t *synth);
|
||||||
FLUIDSYNTH_API int fluid_synth_count_audio_groups(fluid_synth_t* synth);
|
FLUIDSYNTH_API int fluid_synth_count_audio_groups(fluid_synth_t *synth);
|
||||||
FLUIDSYNTH_API int fluid_synth_count_effects_channels(fluid_synth_t* synth);
|
FLUIDSYNTH_API int fluid_synth_count_effects_channels(fluid_synth_t *synth);
|
||||||
|
FLUIDSYNTH_API int fluid_synth_count_effects_groups(fluid_synth_t *synth);
|
||||||
|
|
||||||
|
|
||||||
/* Synthesis parameters */
|
/* Synthesis parameters */
|
||||||
|
|
||||||
FLUIDSYNTH_API void fluid_synth_set_sample_rate(fluid_synth_t* synth, float sample_rate);
|
FLUIDSYNTH_API void fluid_synth_set_sample_rate(fluid_synth_t *synth, float sample_rate);
|
||||||
FLUIDSYNTH_API void fluid_synth_set_gain(fluid_synth_t* synth, float gain);
|
FLUIDSYNTH_API void fluid_synth_set_gain(fluid_synth_t *synth, float gain);
|
||||||
FLUIDSYNTH_API float fluid_synth_get_gain(fluid_synth_t* synth);
|
FLUIDSYNTH_API float fluid_synth_get_gain(fluid_synth_t *synth);
|
||||||
FLUIDSYNTH_API int fluid_synth_set_polyphony(fluid_synth_t* synth, int polyphony);
|
FLUIDSYNTH_API int fluid_synth_set_polyphony(fluid_synth_t *synth, int polyphony);
|
||||||
FLUIDSYNTH_API int fluid_synth_get_polyphony(fluid_synth_t* synth);
|
FLUIDSYNTH_API int fluid_synth_get_polyphony(fluid_synth_t *synth);
|
||||||
FLUIDSYNTH_API int fluid_synth_get_active_voice_count(fluid_synth_t* synth);
|
FLUIDSYNTH_API int fluid_synth_get_active_voice_count(fluid_synth_t *synth);
|
||||||
FLUIDSYNTH_API int fluid_synth_get_internal_bufsize(fluid_synth_t* synth);
|
FLUIDSYNTH_API int fluid_synth_get_internal_bufsize(fluid_synth_t *synth);
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_synth_set_interp_method(fluid_synth_t* synth, int chan, int interp_method);
|
int fluid_synth_set_interp_method(fluid_synth_t *synth, int chan, int interp_method);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Synthesis interpolation method.
|
* Synthesis interpolation method.
|
||||||
*/
|
*/
|
||||||
enum fluid_interp {
|
enum fluid_interp
|
||||||
|
{
|
||||||
FLUID_INTERP_NONE = 0, /**< No interpolation: Fastest, but questionable audio quality */
|
FLUID_INTERP_NONE = 0, /**< No interpolation: Fastest, but questionable audio quality */
|
||||||
FLUID_INTERP_LINEAR = 1, /**< Straight-line interpolation: A bit slower, reasonable audio quality */
|
FLUID_INTERP_LINEAR = 1, /**< Straight-line interpolation: A bit slower, reasonable audio quality */
|
||||||
FLUID_INTERP_4THORDER = 4, /**< Fourth-order interpolation, good quality, the default */
|
FLUID_INTERP_4THORDER = 4, /**< Fourth-order interpolation, good quality, the default */
|
||||||
|
@ -200,37 +203,37 @@ enum fluid_interp {
|
||||||
|
|
||||||
/* Generator interface */
|
/* Generator interface */
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_synth_set_gen (fluid_synth_t* synth, int chan,
|
FLUIDSYNTH_API int fluid_synth_set_gen(fluid_synth_t *synth, int chan,
|
||||||
int param, float value);
|
int param, float value);
|
||||||
FLUIDSYNTH_API float fluid_synth_get_gen(fluid_synth_t* synth, int chan, int param);
|
FLUIDSYNTH_API float fluid_synth_get_gen(fluid_synth_t *synth, int chan, int param);
|
||||||
|
|
||||||
|
|
||||||
/* Tuning */
|
/* Tuning */
|
||||||
|
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_synth_activate_key_tuning(fluid_synth_t* synth, int bank, int prog,
|
int fluid_synth_activate_key_tuning(fluid_synth_t *synth, int bank, int prog,
|
||||||
const char* name, const double* pitch, int apply);
|
const char *name, const double *pitch, int apply);
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_synth_activate_octave_tuning(fluid_synth_t* synth, int bank, int prog,
|
int fluid_synth_activate_octave_tuning(fluid_synth_t *synth, int bank, int prog,
|
||||||
const char* name, const double* pitch, int apply);
|
const char *name, const double *pitch, int apply);
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_synth_tune_notes(fluid_synth_t* synth, int bank, int prog,
|
int fluid_synth_tune_notes(fluid_synth_t *synth, int bank, int prog,
|
||||||
int len, const int *keys, const double* pitch, int apply);
|
int len, const int *keys, const double *pitch, int apply);
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_synth_activate_tuning(fluid_synth_t* synth, int chan, int bank, int prog,
|
int fluid_synth_activate_tuning(fluid_synth_t *synth, int chan, int bank, int prog,
|
||||||
int apply);
|
int apply);
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_synth_deactivate_tuning(fluid_synth_t* synth, int chan, int apply);
|
int fluid_synth_deactivate_tuning(fluid_synth_t *synth, int chan, int apply);
|
||||||
FLUIDSYNTH_API void fluid_synth_tuning_iteration_start(fluid_synth_t* synth);
|
FLUIDSYNTH_API void fluid_synth_tuning_iteration_start(fluid_synth_t *synth);
|
||||||
FLUIDSYNTH_API
|
FLUIDSYNTH_API
|
||||||
int fluid_synth_tuning_iteration_next(fluid_synth_t* synth, int* bank, int* prog);
|
int fluid_synth_tuning_iteration_next(fluid_synth_t *synth, int *bank, int *prog);
|
||||||
FLUIDSYNTH_API int fluid_synth_tuning_dump(fluid_synth_t* synth, int bank, int prog,
|
FLUIDSYNTH_API int fluid_synth_tuning_dump(fluid_synth_t *synth, int bank, int prog,
|
||||||
char* name, int len, double* pitch);
|
char *name, int len, double *pitch);
|
||||||
|
|
||||||
/* Misc */
|
/* Misc */
|
||||||
|
|
||||||
FLUIDSYNTH_API double fluid_synth_get_cpu_load(fluid_synth_t* synth);
|
FLUIDSYNTH_API double fluid_synth_get_cpu_load(fluid_synth_t *synth);
|
||||||
FLUIDSYNTH_API const char* fluid_synth_error(fluid_synth_t* synth);
|
FLUID_DEPRECATED FLUIDSYNTH_API const char *fluid_synth_error(fluid_synth_t *synth);
|
||||||
|
|
||||||
|
|
||||||
/* Default modulators */
|
/* Default modulators */
|
||||||
|
@ -238,13 +241,14 @@ FLUIDSYNTH_API const char* fluid_synth_error(fluid_synth_t* synth);
|
||||||
/**
|
/**
|
||||||
* Enum used with fluid_synth_add_default_mod() to specify how to handle duplicate modulators.
|
* Enum used with fluid_synth_add_default_mod() to specify how to handle duplicate modulators.
|
||||||
*/
|
*/
|
||||||
enum fluid_synth_add_mod {
|
enum fluid_synth_add_mod
|
||||||
|
{
|
||||||
FLUID_SYNTH_OVERWRITE, /**< Overwrite any existing matching modulator */
|
FLUID_SYNTH_OVERWRITE, /**< Overwrite any existing matching modulator */
|
||||||
FLUID_SYNTH_ADD, /**< Add (sum) modulator amounts */
|
FLUID_SYNTH_ADD, /**< Add (sum) modulator amounts */
|
||||||
};
|
};
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_synth_add_default_mod(fluid_synth_t* synth, fluid_mod_t* mod, int mode);
|
FLUIDSYNTH_API int fluid_synth_add_default_mod(fluid_synth_t *synth, const fluid_mod_t *mod, int mode);
|
||||||
FLUIDSYNTH_API int fluid_synth_remove_default_mod(fluid_synth_t* synth, const fluid_mod_t* mod);
|
FLUIDSYNTH_API int fluid_synth_remove_default_mod(fluid_synth_t *synth, const fluid_mod_t *mod);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -255,35 +259,36 @@ FLUIDSYNTH_API int fluid_synth_remove_default_mod(fluid_synth_t* synth, const fl
|
||||||
* any of the functions below to get the audio.
|
* any of the functions below to get the audio.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_synth_write_s16(fluid_synth_t* synth, int len,
|
FLUIDSYNTH_API int fluid_synth_write_s16(fluid_synth_t *synth, int len,
|
||||||
void* lout, int loff, int lincr,
|
void *lout, int loff, int lincr,
|
||||||
void* rout, int roff, int rincr);
|
void *rout, int roff, int rincr);
|
||||||
FLUIDSYNTH_API int fluid_synth_write_float(fluid_synth_t* synth, int len,
|
FLUIDSYNTH_API int fluid_synth_write_float(fluid_synth_t *synth, int len,
|
||||||
void* lout, int loff, int lincr,
|
void *lout, int loff, int lincr,
|
||||||
void* rout, int roff, int rincr);
|
void *rout, int roff, int rincr);
|
||||||
FLUIDSYNTH_API int fluid_synth_nwrite_float(fluid_synth_t* synth, int len,
|
FLUID_DEPRECATED FLUIDSYNTH_API int fluid_synth_nwrite_float(fluid_synth_t *synth, int len,
|
||||||
float** left, float** right,
|
float **left, float **right,
|
||||||
float** fx_left, float** fx_right);
|
float **fx_left, float **fx_right);
|
||||||
FLUIDSYNTH_API int fluid_synth_process(fluid_synth_t* synth, int len,
|
FLUIDSYNTH_API int fluid_synth_process(fluid_synth_t *synth, int len,
|
||||||
int nfx, float* fx[],
|
int nfx, float *fx[],
|
||||||
int nout, float* out[]);
|
int nout, float *out[]);
|
||||||
|
|
||||||
|
|
||||||
/* Synthesizer's interface to handle SoundFont loaders */
|
/* Synthesizer's interface to handle SoundFont loaders */
|
||||||
|
|
||||||
FLUIDSYNTH_API void fluid_synth_add_sfloader(fluid_synth_t* synth, fluid_sfloader_t* loader);
|
FLUIDSYNTH_API void fluid_synth_add_sfloader(fluid_synth_t *synth, fluid_sfloader_t *loader);
|
||||||
FLUIDSYNTH_API fluid_voice_t* fluid_synth_alloc_voice(fluid_synth_t* synth,
|
FLUIDSYNTH_API fluid_voice_t *fluid_synth_alloc_voice(fluid_synth_t *synth,
|
||||||
fluid_sample_t* sample,
|
fluid_sample_t *sample,
|
||||||
int channum, int key, int vel);
|
int channum, int key, int vel);
|
||||||
FLUIDSYNTH_API void fluid_synth_start_voice(fluid_synth_t* synth, fluid_voice_t* voice);
|
FLUIDSYNTH_API void fluid_synth_start_voice(fluid_synth_t *synth, fluid_voice_t *voice);
|
||||||
FLUIDSYNTH_API void fluid_synth_get_voicelist(fluid_synth_t* synth,
|
FLUIDSYNTH_API void fluid_synth_get_voicelist(fluid_synth_t *synth,
|
||||||
fluid_voice_t* buf[], int bufsize, int ID);
|
fluid_voice_t *buf[], int bufsize, int ID);
|
||||||
FLUIDSYNTH_API int fluid_synth_handle_midi_event(void* data, fluid_midi_event_t* event);
|
FLUIDSYNTH_API int fluid_synth_handle_midi_event(void *data, fluid_midi_event_t *event);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies the type of filter to use for the custom IIR filter
|
* Specifies the type of filter to use for the custom IIR filter
|
||||||
*/
|
*/
|
||||||
enum fluid_iir_filter_type {
|
enum fluid_iir_filter_type
|
||||||
|
{
|
||||||
FLUID_IIR_DISABLED = 0, /**< Custom IIR filter is not operating */
|
FLUID_IIR_DISABLED = 0, /**< Custom IIR filter is not operating */
|
||||||
FLUID_IIR_LOWPASS, /**< Custom IIR filter is operating as low-pass filter */
|
FLUID_IIR_LOWPASS, /**< Custom IIR filter is operating as low-pass filter */
|
||||||
FLUID_IIR_HIGHPASS, /**< Custom IIR filter is operating as high-pass filter */
|
FLUID_IIR_HIGHPASS, /**< Custom IIR filter is operating as high-pass filter */
|
||||||
|
@ -293,13 +298,14 @@ enum fluid_iir_filter_type {
|
||||||
/**
|
/**
|
||||||
* Specifies optional settings to use for the custom IIR filter
|
* Specifies optional settings to use for the custom IIR filter
|
||||||
*/
|
*/
|
||||||
enum fluid_iir_filter_flags {
|
enum fluid_iir_filter_flags
|
||||||
|
{
|
||||||
FLUID_IIR_Q_LINEAR = 1 << 0, /**< The Soundfont spec requires the filter Q to be interpreted in dB. If this flag is set the filter Q is instead assumed to be in a linear range */
|
FLUID_IIR_Q_LINEAR = 1 << 0, /**< The Soundfont spec requires the filter Q to be interpreted in dB. If this flag is set the filter Q is instead assumed to be in a linear range */
|
||||||
FLUID_IIR_Q_ZERO_OFF = 1 << 1, /**< If this flag the filter is switched off if Q == 0 (prior to any transformation) */
|
FLUID_IIR_Q_ZERO_OFF = 1 << 1, /**< If this flag the filter is switched off if Q == 0 (prior to any transformation) */
|
||||||
FLUID_IIR_NO_GAIN_AMP = 1 << 2 /**< The Soundfont spec requires to correct the gain of the filter depending on the filter's Q. If this flag is set the filter gain will not be corrected. */
|
FLUID_IIR_NO_GAIN_AMP = 1 << 2 /**< The Soundfont spec requires to correct the gain of the filter depending on the filter's Q. If this flag is set the filter gain will not be corrected. */
|
||||||
};
|
};
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_synth_set_custom_filter(fluid_synth_t*, int type, int flags);
|
FLUIDSYNTH_API int fluid_synth_set_custom_filter(fluid_synth_t *, int type, int flags);
|
||||||
|
|
||||||
|
|
||||||
/* LADSPA */
|
/* LADSPA */
|
||||||
|
@ -338,13 +344,13 @@ enum fluid_basic_channel_modes
|
||||||
FLUID_CHANNEL_MODE_LAST /**< @internal Value defines the count of basic channel modes (#fluid_basic_channel_modes) @warning This symbol is not part of the public API and ABI stability guarantee and may change at any time! */
|
FLUID_CHANNEL_MODE_LAST /**< @internal Value defines the count of basic channel modes (#fluid_basic_channel_modes) @warning This symbol is not part of the public API and ABI stability guarantee and may change at any time! */
|
||||||
};
|
};
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_synth_reset_basic_channel(fluid_synth_t* synth, int chan);
|
FLUIDSYNTH_API int fluid_synth_reset_basic_channel(fluid_synth_t *synth, int chan);
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_synth_get_basic_channel(fluid_synth_t* synth, int chan,
|
FLUIDSYNTH_API int fluid_synth_get_basic_channel(fluid_synth_t *synth, int chan,
|
||||||
int *basic_chan_out,
|
int *basic_chan_out,
|
||||||
int *mode_chan_out,
|
int *mode_chan_out,
|
||||||
int *basic_val_out );
|
int *basic_val_out);
|
||||||
FLUIDSYNTH_API int fluid_synth_set_basic_channel(fluid_synth_t* synth, int chan, int mode, int val);
|
FLUIDSYNTH_API int fluid_synth_set_basic_channel(fluid_synth_t *synth, int chan, int mode, int val);
|
||||||
|
|
||||||
/** Interface to mono legato mode
|
/** Interface to mono legato mode
|
||||||
*
|
*
|
||||||
|
@ -357,8 +363,8 @@ enum fluid_channel_legato_mode
|
||||||
FLUID_CHANNEL_LEGATO_MODE_LAST /**< @internal Value defines the count of legato modes (#fluid_channel_legato_mode) @warning This symbol is not part of the public API and ABI stability guarantee and may change at any time! */
|
FLUID_CHANNEL_LEGATO_MODE_LAST /**< @internal Value defines the count of legato modes (#fluid_channel_legato_mode) @warning This symbol is not part of the public API and ABI stability guarantee and may change at any time! */
|
||||||
};
|
};
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_synth_set_legato_mode(fluid_synth_t* synth, int chan, int legatomode);
|
FLUIDSYNTH_API int fluid_synth_set_legato_mode(fluid_synth_t *synth, int chan, int legatomode);
|
||||||
FLUIDSYNTH_API int fluid_synth_get_legato_mode(fluid_synth_t* synth, int chan, int *legatomode);
|
FLUIDSYNTH_API int fluid_synth_get_legato_mode(fluid_synth_t *synth, int chan, int *legatomode);
|
||||||
|
|
||||||
/** Interface to portamento mode
|
/** Interface to portamento mode
|
||||||
*
|
*
|
||||||
|
@ -372,15 +378,15 @@ enum fluid_channel_portamento_mode
|
||||||
FLUID_CHANNEL_PORTAMENTO_MODE_LAST /**< @internal Value defines the count of portamento modes (#fluid_channel_portamento_mode) @warning This symbol is not part of the public API and ABI stability guarantee and may change at any time! */
|
FLUID_CHANNEL_PORTAMENTO_MODE_LAST /**< @internal Value defines the count of portamento modes (#fluid_channel_portamento_mode) @warning This symbol is not part of the public API and ABI stability guarantee and may change at any time! */
|
||||||
};
|
};
|
||||||
|
|
||||||
FLUIDSYNTH_API int fluid_synth_set_portamento_mode(fluid_synth_t* synth,
|
FLUIDSYNTH_API int fluid_synth_set_portamento_mode(fluid_synth_t *synth,
|
||||||
int chan, int portamentomode);
|
int chan, int portamentomode);
|
||||||
FLUIDSYNTH_API int fluid_synth_get_portamento_mode(fluid_synth_t* synth,
|
FLUIDSYNTH_API int fluid_synth_get_portamento_mode(fluid_synth_t *synth,
|
||||||
int chan, int * portamentomode);
|
int chan, int *portamentomode);
|
||||||
|
|
||||||
/* Interface to breath mode */
|
/* Interface to breath mode */
|
||||||
FLUIDSYNTH_API int fluid_synth_set_breath_mode(fluid_synth_t* synth,
|
FLUIDSYNTH_API int fluid_synth_set_breath_mode(fluid_synth_t *synth,
|
||||||
int chan, int breathmode);
|
int chan, int breathmode);
|
||||||
FLUIDSYNTH_API int fluid_synth_get_breath_mode(fluid_synth_t* synth,
|
FLUIDSYNTH_API int fluid_synth_get_breath_mode(fluid_synth_t *synth,
|
||||||
int chan, int *breathmode);
|
int chan, int *breathmode);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -31,10 +31,10 @@ extern "C" {
|
||||||
* @brief Library version functions and defines
|
* @brief Library version functions and defines
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define FLUIDSYNTH_VERSION "2.0.0" /**< String constant of libfluidsynth version. */
|
#define FLUIDSYNTH_VERSION "2.0.5" /**< String constant of libfluidsynth version. */
|
||||||
#define FLUIDSYNTH_VERSION_MAJOR 2 /**< libfluidsynth major version integer constant. */
|
#define FLUIDSYNTH_VERSION_MAJOR 2 /**< libfluidsynth major version integer constant. */
|
||||||
#define FLUIDSYNTH_VERSION_MINOR 0 /**< libfluidsynth minor version integer constant. */
|
#define FLUIDSYNTH_VERSION_MINOR 0 /**< libfluidsynth minor version integer constant. */
|
||||||
#define FLUIDSYNTH_VERSION_MICRO 0 /**< libfluidsynth micro version integer constant. */
|
#define FLUIDSYNTH_VERSION_MICRO 5 /**< libfluidsynth micro version integer constant. */
|
||||||
|
|
||||||
FLUIDSYNTH_API void fluid_version(int *major, int *minor, int *micro);
|
FLUIDSYNTH_API void fluid_version(int *major, int *minor, int *micro);
|
||||||
FLUIDSYNTH_API char* fluid_version_str(void);
|
FLUIDSYNTH_API char* fluid_version_str(void);
|
||||||
|
|
|
@ -39,29 +39,30 @@ extern "C" {
|
||||||
/**
|
/**
|
||||||
* Enum used with fluid_voice_add_mod() to specify how to handle duplicate modulators.
|
* Enum used with fluid_voice_add_mod() to specify how to handle duplicate modulators.
|
||||||
*/
|
*/
|
||||||
enum fluid_voice_add_mod {
|
enum fluid_voice_add_mod
|
||||||
|
{
|
||||||
FLUID_VOICE_OVERWRITE, /**< Overwrite any existing matching modulator */
|
FLUID_VOICE_OVERWRITE, /**< Overwrite any existing matching modulator */
|
||||||
FLUID_VOICE_ADD, /**< Add (sum) modulator amounts */
|
FLUID_VOICE_ADD, /**< Add (sum) modulator amounts */
|
||||||
FLUID_VOICE_DEFAULT /**< For default modulators only, no need to check for duplicates */
|
FLUID_VOICE_DEFAULT /**< For default modulators only, no need to check for duplicates */
|
||||||
};
|
};
|
||||||
|
|
||||||
FLUIDSYNTH_API void fluid_voice_add_mod(fluid_voice_t* voice, fluid_mod_t* mod, int mode);
|
FLUIDSYNTH_API void fluid_voice_add_mod(fluid_voice_t *voice, fluid_mod_t *mod, int mode);
|
||||||
FLUIDSYNTH_API float fluid_voice_gen_get(fluid_voice_t* voice, int gen);
|
FLUIDSYNTH_API float fluid_voice_gen_get(fluid_voice_t *voice, int gen);
|
||||||
FLUIDSYNTH_API void fluid_voice_gen_set(fluid_voice_t* voice, int gen, float val);
|
FLUIDSYNTH_API void fluid_voice_gen_set(fluid_voice_t *voice, int gen, float val);
|
||||||
FLUIDSYNTH_API void fluid_voice_gen_incr(fluid_voice_t* voice, int gen, float val);
|
FLUIDSYNTH_API void fluid_voice_gen_incr(fluid_voice_t *voice, int gen, float val);
|
||||||
|
|
||||||
FLUIDSYNTH_API unsigned int fluid_voice_get_id(const fluid_voice_t* voice);
|
FLUIDSYNTH_API unsigned int fluid_voice_get_id(const fluid_voice_t *voice);
|
||||||
FLUIDSYNTH_API int fluid_voice_get_channel(const fluid_voice_t* voice);
|
FLUIDSYNTH_API int fluid_voice_get_channel(const fluid_voice_t *voice);
|
||||||
FLUIDSYNTH_API int fluid_voice_get_key(const fluid_voice_t* voice);
|
FLUIDSYNTH_API int fluid_voice_get_key(const fluid_voice_t *voice);
|
||||||
FLUIDSYNTH_API int fluid_voice_get_actual_key(const fluid_voice_t* voice);
|
FLUIDSYNTH_API int fluid_voice_get_actual_key(const fluid_voice_t *voice);
|
||||||
FLUIDSYNTH_API int fluid_voice_get_velocity(const fluid_voice_t* voice);
|
FLUIDSYNTH_API int fluid_voice_get_velocity(const fluid_voice_t *voice);
|
||||||
FLUIDSYNTH_API int fluid_voice_get_actual_velocity(const fluid_voice_t* voice);
|
FLUIDSYNTH_API int fluid_voice_get_actual_velocity(const fluid_voice_t *voice);
|
||||||
FLUIDSYNTH_API int fluid_voice_is_playing(const fluid_voice_t* voice);
|
FLUIDSYNTH_API int fluid_voice_is_playing(const fluid_voice_t *voice);
|
||||||
FLUIDSYNTH_API int fluid_voice_is_on(const fluid_voice_t* voice);
|
FLUIDSYNTH_API int fluid_voice_is_on(const fluid_voice_t *voice);
|
||||||
FLUIDSYNTH_API int fluid_voice_is_sustained(const fluid_voice_t* voice);
|
FLUIDSYNTH_API int fluid_voice_is_sustained(const fluid_voice_t *voice);
|
||||||
FLUIDSYNTH_API int fluid_voice_is_sostenuto(const fluid_voice_t* voice);
|
FLUIDSYNTH_API int fluid_voice_is_sostenuto(const fluid_voice_t *voice);
|
||||||
FLUIDSYNTH_API int fluid_voice_optimize_sample(fluid_sample_t* s);
|
FLUIDSYNTH_API int fluid_voice_optimize_sample(fluid_sample_t *s);
|
||||||
FLUIDSYNTH_API void fluid_voice_update_param(fluid_voice_t* voice, int gen);
|
FLUIDSYNTH_API void fluid_voice_update_param(fluid_voice_t *voice, int gen);
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
Loading…
Reference in New Issue
Block a user