C ABI (language bindings)

Contents

C ABI (language bindings)#

libYSE ships a flat extern "C" API alongside the C++ one, folded into the same shared library by the YSE_BUILD_C_API=ON CMake option (default on). It exists so language bindings — Dart FFI, Python ctypes, etc. — can consume libyse.dll / libyse.so without C++ ABI compatibility.

Single entry point:

#include "yse_c/yse_all.h"

This umbrella header pulls in every subsystem header below.

Conventions#

  • Borrowed singletons (system, listener) are obtained via getters and must not be destroyed by the caller.

  • Owned objects (sound, channel, reverb, patcher, device-setup, …) are created with yse_<type>_create* and released with yse_<type>_destroy. destroy is always safe to call with NULL.

  • Callback typedefs are marked YSE_C_CALLBACK and run on engine-managed threads (often the audio thread). They must not block, allocate, or call back into the engine.

  • All functions return either void, an int (0 = success, non-zero = error code), or an owned/borrowed handle. Pointer parameters are documented as IN / OUT in the header.

Umbrella header#

System and listener#

Typedefs

typedef struct YseSystem YseSystem#
typedef struct YseChannel YseChannel#
typedef struct YseReverb YseReverb#
typedef struct YseDevice YseDevice#
typedef struct YseDeviceSetup YseDeviceSetup#

Functions

YseSystem *yse_system_get(void)#
YseStatus yse_system_init(YseSystem *sys)#
YseStatus yse_system_init_offline(YseSystem *sys)#
void yse_system_render_offline(YseSystem *sys, int blocks)#
void yse_system_update(YseSystem *sys)#
void yse_system_close(YseSystem *sys)#
void yse_system_pause(YseSystem *sys)#
void yse_system_resume(YseSystem *sys)#
int yse_system_missed_callbacks(YseSystem *sys)#
float yse_system_cpu_load(YseSystem *sys)#
double yse_system_get_sample_rate(YseSystem *sys)#
double yse_system_get_active_sample_rate(YseSystem *sys)#
int yse_system_get_active_buffer_size(YseSystem *sys)#
int yse_system_get_active_output_latency(YseSystem *sys)#
void yse_system_sleep(YseSystem *sys, unsigned int ms)#
void yse_system_set_max_sounds(YseSystem *sys, int value)#
int yse_system_get_max_sounds(YseSystem *sys)#
void yse_system_audio_test(YseSystem *sys, int on)#
void yse_system_auto_reconnect(YseSystem *sys, int on, int delay_ms)#
unsigned int yse_system_num_devices(YseSystem *sys)#
YseDevice *yse_system_get_device(YseSystem *sys, unsigned int idx)#
YseStatus yse_system_open_device(YseSystem *sys, const YseDeviceSetup *setup, YseChannelType layout)#
void yse_system_close_current_device(YseSystem *sys)#
size_t yse_system_default_device(YseSystem *sys, char *buf, size_t cap)#
size_t yse_system_default_host(YseSystem *sys, char *buf, size_t cap)#
unsigned int yse_system_num_midi_in_devices(YseSystem *sys)#
unsigned int yse_system_num_midi_out_devices(YseSystem *sys)#
size_t yse_system_midi_in_device_name(YseSystem *sys, unsigned int id, char *buf, size_t cap)#
size_t yse_system_midi_out_device_name(YseSystem *sys, unsigned int id, char *buf, size_t cap)#
YseReverb *yse_system_get_global_reverb(YseSystem *sys)#
void yse_system_underwater_fx(YseSystem *sys, const YseChannel *target)#
void yse_system_set_underwater_depth(YseSystem *sys, float depth)#

Typedefs

typedef struct YseListener YseListener#

Functions

YseListener *yse_listener_get(void)#
void yse_listener_set_pos(YseListener *l, const yse_pos_t *p)#
yse_pos_t yse_listener_get_pos(YseListener *l)#
yse_pos_t yse_listener_get_vel(YseListener *l)#
yse_pos_t yse_listener_get_forward(YseListener *l)#
yse_pos_t yse_listener_get_upward(YseListener *l)#
void yse_listener_set_orient(YseListener *l, const yse_pos_t *forward, const yse_pos_t *up)#

Sound objects, channels, and reverb#

Typedefs

typedef struct YseSound YseSound#
typedef struct YseChannel YseChannel
typedef struct YseDspBuffer YseDspBuffer#
typedef struct YseDspObject YseDspObject#
typedef struct YsePatcher YsePatcher#

Functions

YseSound *yse_sound_create(void)#
void yse_sound_destroy(YseSound *s)#
YseStatus yse_sound_load_file(YseSound *s, const char *filename, YseChannel *ch, int loop, float volume, int streaming)#
YseStatus yse_sound_load_buffer(YseSound *s, YseDspBuffer *buf, YseChannel *ch, int loop, float volume)#
YseStatus yse_sound_load_patcher(YseSound *s, YsePatcher *patch, YseChannel *ch, float volume)#
int yse_sound_is_valid(YseSound *s)#
int yse_sound_is_ready(YseSound *s)#
int yse_sound_is_streaming(YseSound *s)#
void yse_sound_play(YseSound *s)#
void yse_sound_pause(YseSound *s)#
void yse_sound_stop(YseSound *s)#
void yse_sound_toggle(YseSound *s)#
void yse_sound_restart(YseSound *s)#
int yse_sound_is_playing(YseSound *s)#
int yse_sound_is_paused(YseSound *s)#
int yse_sound_is_stopped(YseSound *s)#
void yse_sound_set_pos(YseSound *s, const yse_pos_t *p)#
yse_pos_t yse_sound_get_pos(YseSound *s)#
void yse_sound_set_volume(YseSound *s, float v, unsigned int fade_ms)#
float yse_sound_get_volume(YseSound *s)#
void yse_sound_set_speed(YseSound *s, float v)#
float yse_sound_get_speed(YseSound *s)#
void yse_sound_set_size(YseSound *s, float v)#
float yse_sound_get_size(YseSound *s)#
void yse_sound_set_spread(YseSound *s, float v)#
float yse_sound_get_spread(YseSound *s)#
void yse_sound_set_looping(YseSound *s, int v)#
int yse_sound_get_looping(YseSound *s)#
void yse_sound_set_relative(YseSound *s, int v)#
int yse_sound_get_relative(YseSound *s)#
void yse_sound_set_doppler(YseSound *s, int v)#
int yse_sound_get_doppler(YseSound *s)#
void yse_sound_set_pan2d(YseSound *s, int v)#
int yse_sound_get_pan2d(YseSound *s)#
void yse_sound_set_occlusion(YseSound *s, int v)#
int yse_sound_get_occlusion(YseSound *s)#
void yse_sound_fade_and_stop(YseSound *s, unsigned int time_ms)#
void yse_sound_set_time(YseSound *s, float samples)#
float yse_sound_get_time(YseSound *s)#
unsigned int yse_sound_length(YseSound *s)#
void yse_sound_move_to(YseSound *s, YseChannel *target)#
void yse_sound_set_dsp(YseSound *s, YseDspObject *dsp)#
YseDspObject *yse_sound_get_dsp(YseSound *s)#

Typedefs

typedef struct YseChannel YseChannel

Functions

YseChannel *yse_channel_master(void)#
YseChannel *yse_channel_fx(void)#
YseChannel *yse_channel_music(void)#
YseChannel *yse_channel_ambient(void)#
YseChannel *yse_channel_voice(void)#
YseChannel *yse_channel_gui(void)#
YseChannel *yse_channel_create(const char *name, YseChannel *parent)#
void yse_channel_destroy(YseChannel *ch)#
void yse_channel_set_volume(YseChannel *ch, float value)#
float yse_channel_get_volume(YseChannel *ch)#
void yse_channel_move_to(YseChannel *ch, YseChannel *parent)#
void yse_channel_attach_reverb(YseChannel *ch)#
void yse_channel_set_virtual(YseChannel *ch, int value)#
int yse_channel_get_virtual(YseChannel *ch)#
int yse_channel_is_valid(YseChannel *ch)#
const char *yse_channel_get_name(YseChannel *ch)#
int yse_channel_get_num_outputs(YseChannel *ch)#
float yse_channel_get_peak_linear_pre(YseChannel *ch)#
float yse_channel_get_peak_linear_post(YseChannel *ch)#
float yse_channel_get_peak_db_pre(YseChannel *ch)#
float yse_channel_get_peak_db_post(YseChannel *ch)#
float yse_channel_get_peak_linear_pre_output(YseChannel *ch, int output_idx)#
float yse_channel_get_peak_linear_post_output(YseChannel *ch, int output_idx)#
float yse_channel_get_peak_db_pre_output(YseChannel *ch, int output_idx)#
float yse_channel_get_peak_db_post_output(YseChannel *ch, int output_idx)#

Typedefs

typedef struct YseReverb YseReverb

Functions

YseReverb *yse_reverb_create(void)#
void yse_reverb_destroy(YseReverb *rev)#
int yse_reverb_is_valid(YseReverb *rev)#
void yse_reverb_set_position(YseReverb *rev, const yse_pos_t *p)#
yse_pos_t yse_reverb_get_position(YseReverb *rev)#
void yse_reverb_set_size(YseReverb *rev, float v)#
float yse_reverb_get_size(YseReverb *rev)#
void yse_reverb_set_roll_off(YseReverb *rev, float v)#
float yse_reverb_get_roll_off(YseReverb *rev)#
void yse_reverb_set_active(YseReverb *rev, int on)#
int yse_reverb_get_active(YseReverb *rev)#
void yse_reverb_set_room_size(YseReverb *rev, float v)#
float yse_reverb_get_room_size(YseReverb *rev)#
void yse_reverb_set_damping(YseReverb *rev, float v)#
float yse_reverb_get_damping(YseReverb *rev)#
void yse_reverb_set_dry_wet_balance(YseReverb *rev, float dry, float wet)#
float yse_reverb_get_dry(YseReverb *rev)#
float yse_reverb_get_wet(YseReverb *rev)#
void yse_reverb_set_modulation(YseReverb *rev, float frequency, float width)#
float yse_reverb_get_modulation_frequency(YseReverb *rev)#
float yse_reverb_get_modulation_width(YseReverb *rev)#
void yse_reverb_set_reflection(YseReverb *rev, int reflection, int time, float gain)#
int yse_reverb_get_reflection_time(YseReverb *rev, int reflection)#
float yse_reverb_get_reflection_gain(YseReverb *rev, int reflection)#
void yse_reverb_set_preset(YseReverb *rev, YseReverbPreset preset)#

Audio device#

Typedefs

typedef struct YseDevice YseDevice
typedef struct YseDeviceSetup YseDeviceSetup

Functions

size_t yse_device_get_name(YseDevice *dev, char *buf, size_t cap)#
size_t yse_device_get_type_name(YseDevice *dev, char *buf, size_t cap)#
unsigned int yse_device_num_output_channels(YseDevice *dev)#
size_t yse_device_get_output_channel_name(YseDevice *dev, unsigned int idx, char *buf, size_t cap)#
unsigned int yse_device_num_input_channels(YseDevice *dev)#
size_t yse_device_get_input_channel_name(YseDevice *dev, unsigned int idx, char *buf, size_t cap)#
unsigned int yse_device_num_sample_rates(YseDevice *dev)#
double yse_device_get_sample_rate(YseDevice *dev, unsigned int idx)#
unsigned int yse_device_num_buffer_sizes(YseDevice *dev)#
int yse_device_get_buffer_size(YseDevice *dev, unsigned int idx)#
int yse_device_default_buffer_size(YseDevice *dev)#
int yse_device_output_latency(YseDevice *dev)#
int yse_device_input_latency(YseDevice *dev)#
int yse_device_get_id(YseDevice *dev)#
YseDeviceSetup *yse_device_setup_create(void)#
void yse_device_setup_destroy(YseDeviceSetup *setup)#
void yse_device_setup_set_input(YseDeviceSetup *setup, const YseDevice *dev)#
void yse_device_setup_set_output(YseDeviceSetup *setup, const YseDevice *dev)#
void yse_device_setup_set_sample_rate(YseDeviceSetup *setup, double value)#
void yse_device_setup_set_buffer_size(YseDeviceSetup *setup, int value)#

DSP and patcher#

Typedefs

typedef struct YseDspBuffer YseDspBuffer

Functions

YseDspBuffer *yse_dsp_buffer_create(unsigned int length, unsigned int overflow)#
YseDspBuffer *yse_dsp_drawable_buffer_create(unsigned int length, unsigned int overflow)#
YseDspBuffer *yse_dsp_file_buffer_create(unsigned int length, unsigned int overflow)#
YseDspBuffer *yse_dsp_wavetable_create(unsigned int length)#
void yse_dsp_buffer_destroy(YseDspBuffer *buf)#
unsigned int yse_dsp_buffer_length(YseDspBuffer *buf)#
unsigned int yse_dsp_buffer_length_ms(YseDspBuffer *buf)#
float yse_dsp_buffer_length_sec(YseDspBuffer *buf)#
int yse_dsp_buffer_is_silent(YseDspBuffer *buf)#
float yse_dsp_buffer_max_value(YseDspBuffer *buf)#
float yse_dsp_buffer_get_back(YseDspBuffer *buf)#
float yse_dsp_buffer_sample_rate_adjustment(YseDspBuffer *buf)#
void yse_dsp_buffer_set_sample_rate_adjustment(YseDspBuffer *buf, float v)#
void yse_dsp_buffer_resize(YseDspBuffer *buf, unsigned int length, float value)#
unsigned int yse_dsp_buffer_read(YseDspBuffer *buf, unsigned int offset, float *out, unsigned int count)#
unsigned int yse_dsp_buffer_write(YseDspBuffer *buf, unsigned int offset, const float *in, unsigned int count)#
void yse_dsp_buffer_fill(YseDspBuffer *buf, float value)#
void yse_dsp_buffer_add_scalar(YseDspBuffer *buf, float value)#
void yse_dsp_buffer_mul_scalar(YseDspBuffer *buf, float value)#
YseStatus yse_dsp_buffer_draw_line(YseDspBuffer *buf, unsigned int start, unsigned int stop, float start_value, float stop_value)#
YseStatus yse_dsp_buffer_draw_flat(YseDspBuffer *buf, unsigned int start, unsigned int stop, float value)#
YseStatus yse_dsp_buffer_load_file(YseDspBuffer *buf, const char *filename, unsigned int channel)#
YseStatus yse_dsp_buffer_save_file(YseDspBuffer *buf, const char *filename)#
YseStatus yse_dsp_wavetable_create_saw(YseDspBuffer *buf, int harmonics, int length)#
YseStatus yse_dsp_wavetable_create_square(YseDspBuffer *buf, int harmonics, int length)#
YseStatus yse_dsp_wavetable_create_triangle(YseDspBuffer *buf, int harmonics, int length)#

Typedefs

typedef struct YseDspObject YseDspObject

Functions

YseDspObject *yse_dsp_lowpass_create(void)#
YseDspObject *yse_dsp_highpass_create(void)#
YseDspObject *yse_dsp_bandpass_create(void)#
YseDspObject *yse_dsp_sweep_create(YseDspSweepShape shape)#
YseDspObject *yse_dsp_basic_delay_create(void)#
YseDspObject *yse_dsp_lowpass_delay_create(void)#
YseDspObject *yse_dsp_highpass_delay_create(void)#
YseDspObject *yse_dsp_phaser_create(void)#
YseDspObject *yse_dsp_ring_modulator_create(void)#
YseDspObject *yse_dsp_difference_create(void)#
YseDspObject *yse_dsp_granulator_create(unsigned int pool_size, unsigned int max_grains)#
void yse_dsp_object_destroy(YseDspObject *obj)#
void yse_dsp_object_set_bypass(YseDspObject *obj, int on)#
int yse_dsp_object_get_bypass(YseDspObject *obj)#
void yse_dsp_object_set_impact(YseDspObject *obj, float value)#
float yse_dsp_object_get_impact(YseDspObject *obj)#
void yse_dsp_object_set_lfo_type(YseDspObject *obj, YseLfoType type)#
YseLfoType yse_dsp_object_get_lfo_type(YseDspObject *obj)#
void yse_dsp_object_set_lfo_frequency(YseDspObject *obj, float value)#
float yse_dsp_object_get_lfo_frequency(YseDspObject *obj)#
void yse_dsp_object_link(YseDspObject *head, YseDspObject *next)#
void yse_dsp_lowpass_set_frequency(YseDspObject *obj, float hz)#
float yse_dsp_lowpass_get_frequency(YseDspObject *obj)#
void yse_dsp_highpass_set_frequency(YseDspObject *obj, float hz)#
float yse_dsp_highpass_get_frequency(YseDspObject *obj)#
void yse_dsp_bandpass_set_frequency(YseDspObject *obj, float hz)#
float yse_dsp_bandpass_get_frequency(YseDspObject *obj)#
void yse_dsp_bandpass_set_q(YseDspObject *obj, float q)#
float yse_dsp_bandpass_get_q(YseDspObject *obj)#
void yse_dsp_sweep_set_speed(YseDspObject *obj, float hz)#
float yse_dsp_sweep_get_speed(YseDspObject *obj)#
void yse_dsp_sweep_set_depth(YseDspObject *obj, int v0_to_100)#
int yse_dsp_sweep_get_depth(YseDspObject *obj)#
void yse_dsp_sweep_set_frequency(YseDspObject *obj, int v0_to_100)#
int yse_dsp_sweep_get_frequency(YseDspObject *obj)#
void yse_dsp_basic_delay_set_tap(YseDspObject *obj, YseDspDelayTap tap, float time_ms, float gain)#
float yse_dsp_basic_delay_get_time(YseDspObject *obj, YseDspDelayTap tap)#
float yse_dsp_basic_delay_get_gain(YseDspObject *obj, YseDspDelayTap tap)#
void yse_dsp_lowpass_delay_set_frequency(YseDspObject *obj, float hz)#
float yse_dsp_lowpass_delay_get_frequency(YseDspObject *obj)#
void yse_dsp_highpass_delay_set_frequency(YseDspObject *obj, float hz)#
float yse_dsp_highpass_delay_get_frequency(YseDspObject *obj)#
void yse_dsp_phaser_set_frequency(YseDspObject *obj, float hz)#
float yse_dsp_phaser_get_frequency(YseDspObject *obj)#
void yse_dsp_phaser_set_range(YseDspObject *obj, float value)#
float yse_dsp_phaser_get_range(YseDspObject *obj)#
void yse_dsp_ring_modulator_set_frequency(YseDspObject *obj, float hz)#
float yse_dsp_ring_modulator_get_frequency(YseDspObject *obj)#
void yse_dsp_difference_set_frequency(YseDspObject *obj, float hz)#
float yse_dsp_difference_get_frequency(YseDspObject *obj)#
void yse_dsp_difference_set_amplitude(YseDspObject *obj, float value)#
float yse_dsp_difference_get_amplitude(YseDspObject *obj)#
void yse_dsp_granulator_set_grain_frequency(YseDspObject *obj, unsigned int per_second)#
unsigned int yse_dsp_granulator_get_grain_frequency(YseDspObject *obj)#
void yse_dsp_granulator_set_grain_length(YseDspObject *obj, unsigned int samples, unsigned int random_samples)#
unsigned int yse_dsp_granulator_get_grain_length(YseDspObject *obj)#
void yse_dsp_granulator_set_grain_transpose(YseDspObject *obj, float pitch, float random)#
float yse_dsp_granulator_get_grain_transpose(YseDspObject *obj)#
void yse_dsp_granulator_set_gain(YseDspObject *obj, float value)#
float yse_dsp_granulator_get_gain(YseDspObject *obj)#

Typedefs

typedef struct YsePatcher YsePatcher
typedef struct YsePHandle YsePHandle#

Functions

YsePatcher *yse_patcher_create(void)#
void yse_patcher_destroy(YsePatcher *p)#
void yse_patcher_init(YsePatcher *p, int main_outputs)#
YsePHandle *yse_patcher_create_object(YsePatcher *p, const char *type, const char *args)#
void yse_patcher_delete_object(YsePatcher *p, YsePHandle *obj)#
void yse_patcher_clear(YsePatcher *p)#
void yse_patcher_connect(YsePatcher *p, YsePHandle *from, int outlet, YsePHandle *to, int inlet)#
void yse_patcher_disconnect(YsePatcher *p, YsePHandle *from, int outlet, YsePHandle *to, int inlet)#
int yse_patcher_is_valid_object(const char *type)#
size_t yse_patcher_dump_json(YsePatcher *p, char *buf, size_t cap)#
void yse_patcher_parse_json(YsePatcher *p, const char *content)#
unsigned int yse_patcher_objects(YsePatcher *p)#
YsePHandle *yse_patcher_get_handle_from_list(YsePatcher *p, unsigned int idx)#
YsePHandle *yse_patcher_get_handle_from_id(YsePatcher *p, unsigned int id)#
int yse_patcher_pass_bang(YsePatcher *p, const char *to)#
int yse_patcher_pass_int(YsePatcher *p, int value, const char *to)#
int yse_patcher_pass_float(YsePatcher *p, float value, const char *to)#
int yse_patcher_pass_string(YsePatcher *p, const char *value, const char *to)#
size_t yse_phandle_get_type(YsePHandle *h, char *buf, size_t cap)#
size_t yse_phandle_get_name(YsePHandle *h, char *buf, size_t cap)#
size_t yse_phandle_get_params(YsePHandle *h, char *buf, size_t cap)#
size_t yse_phandle_get_gui_value(YsePHandle *h, char *buf, size_t cap)#
size_t yse_phandle_get_gui_property(YsePHandle *h, const char *key, char *buf, size_t cap)#
void yse_phandle_set_gui_property(YsePHandle *h, const char *key, const char *value)#
void yse_phandle_set_bang(YsePHandle *h, unsigned int inlet)#
void yse_phandle_set_int(YsePHandle *h, unsigned int inlet, int value)#
void yse_phandle_set_float(YsePHandle *h, unsigned int inlet, float value)#
void yse_phandle_set_list(YsePHandle *h, unsigned int inlet, const char *value)#
void yse_phandle_set_params(YsePHandle *h, const char *args)#
int yse_phandle_get_inputs(YsePHandle *h)#
int yse_phandle_get_outputs(YsePHandle *h)#
int yse_phandle_is_dsp_input(YsePHandle *h, unsigned int inlet)#
YseOutType yse_phandle_output_data_type(YsePHandle *h, unsigned int pin)#
unsigned int yse_phandle_get_id(YsePHandle *h)#
unsigned int yse_phandle_get_connections(YsePHandle *h, unsigned int outlet)#
unsigned int yse_phandle_get_connection_target(YsePHandle *h, unsigned int outlet, unsigned int connection)#
unsigned int yse_phandle_get_connection_target_inlet(YsePHandle *h, unsigned int outlet, unsigned int connection)#
int yse_patcher_get_type_count(void)#
const char *yse_patcher_get_type_name(int index)#
const char *yse_patcher_get_type_description(const char *type_name)#
YsePCategory yse_patcher_get_type_category(const char *type_name)#
int yse_patcher_get_type_is_dsp(const char *type_name)#
int yse_patcher_get_inlet_count(const char *type_name)#
void yse_patcher_get_inlet_info(const char *type_name, int idx, const char **label, const char **doc, const char **range, unsigned int *accepts_bitmask)#
int yse_patcher_get_outlet_count(const char *type_name)#
void yse_patcher_get_outlet_info(const char *type_name, int idx, const char **label, const char **doc, const char **range, YseOutType *type)#
int yse_patcher_get_param_count(const char *type_name)#
void yse_patcher_get_param_info(const char *type_name, int idx, const char **name, const char **doc, const char **default_value, const char **range)#
char *yse_patcher_get_metadata_json(void)#
void yse_free_string(char *s)#

MIDI and music#

Typedefs

typedef struct YseMidiFile YseMidiFile#
typedef struct YseMidiOut YseMidiOut#
typedef struct YseMidiIn YseMidiIn#
typedef struct YseMidiNote YseMidiNote#
typedef void (*YseMidiInRawCallback)(double timestamp_sec, unsigned char *bytes, size_t len, void *user_data)#
typedef void (*YseMidiInParsedCallback)(double timestamp_sec, unsigned char status, unsigned char channel, unsigned char data1, unsigned char data2, void *user_data)#

Functions

YseMidiFile *yse_midi_file_create(void)#
void yse_midi_file_destroy(YseMidiFile *f)#
YseStatus yse_midi_file_load(YseMidiFile *f, const char *filename)#
void yse_midi_file_play(YseMidiFile *f)#
void yse_midi_file_pause(YseMidiFile *f)#
void yse_midi_file_stop(YseMidiFile *f)#
YseMidiOut *yse_midi_out_create(void)#
void yse_midi_out_destroy(YseMidiOut *m)#
void yse_midi_out_open(YseMidiOut *m, unsigned int port)#
void yse_midi_out_note_on(YseMidiOut *m, int channel, int pitch, int velocity)#
void yse_midi_out_note_off(YseMidiOut *m, int channel, int pitch, int velocity)#
void yse_midi_out_poly_pressure(YseMidiOut *m, int channel, int pitch, int value)#
void yse_midi_out_channel_pressure(YseMidiOut *m, int channel, int value)#
void yse_midi_out_program_change(YseMidiOut *m, int channel, int value)#
void yse_midi_out_control_change(YseMidiOut *m, int channel, int controller, int value)#
void yse_midi_out_all_notes_off_channel(YseMidiOut *m, int channel)#
void yse_midi_out_all_notes_off(YseMidiOut *m)#
void yse_midi_out_reset_channel(YseMidiOut *m, int channel)#
void yse_midi_out_reset(YseMidiOut *m)#
void yse_midi_out_local_control(YseMidiOut *m, int on)#
void yse_midi_out_omni(YseMidiOut *m, int on)#
void yse_midi_out_poly(YseMidiOut *m, int on)#
void yse_midi_out_raw3(YseMidiOut *m, unsigned char a, unsigned char b, unsigned char c)#
YseMidiIn *yse_midi_in_create(void)#
void yse_midi_in_destroy(YseMidiIn *m)#
void yse_midi_in_open(YseMidiIn *m, unsigned int port)#
void yse_midi_in_close(YseMidiIn *m)#
int yse_midi_in_is_open(YseMidiIn *m)#
void yse_midi_in_set_raw_callback(YseMidiIn *m, YseMidiInRawCallback cb, void *user_data)#
void yse_midi_in_set_parsed_callback(YseMidiIn *m, YseMidiInParsedCallback cb, void *user_data)#
void yse_midi_in_free_message(unsigned char *bytes)#
YseMidiNote *yse_midi_note_create(unsigned char note, unsigned int velocity)#
void yse_midi_note_destroy(YseMidiNote *n)#
void yse_midi_note_set_note(YseMidiNote *n, unsigned char note)#
unsigned char yse_midi_note_get_note(YseMidiNote *n)#
void yse_midi_note_set_velocity(YseMidiNote *n, unsigned char velocity)#
unsigned char yse_midi_note_get_velocity(YseMidiNote *n)#

Typedefs

typedef struct YseNote YseNote#
typedef struct YsePNote YsePNote#
typedef struct YseScale YseScale#
typedef struct YseMotif YseMotif#
typedef struct YsePlayer YsePlayer#

Functions

YseNote *yse_note_create(float pitch, float volume, float length, int channel)#
void yse_note_destroy(YseNote *n)#
void yse_note_set(YseNote *n, float pitch, float volume, float length, int channel)#
void yse_note_set_pitch(YseNote *n, float pitch)#
void yse_note_set_volume(YseNote *n, float volume)#
void yse_note_set_length(YseNote *n, float length)#
void yse_note_set_channel(YseNote *n, int channel)#
float yse_note_get_pitch(YseNote *n)#
float yse_note_get_volume(YseNote *n)#
float yse_note_get_length(YseNote *n)#
int yse_note_get_channel(YseNote *n)#
YsePNote *yse_pnote_create(float position, float pitch, float volume, float length, int channel)#
void yse_pnote_destroy(YsePNote *n)#
void yse_pnote_set_position(YsePNote *n, float position)#
float yse_pnote_get_position(YsePNote *n)#
void yse_pnote_set_pitch(YsePNote *n, float pitch)#
void yse_pnote_set_volume(YsePNote *n, float volume)#
void yse_pnote_set_length(YsePNote *n, float length)#
float yse_pnote_get_pitch(YsePNote *n)#
float yse_pnote_get_volume(YsePNote *n)#
float yse_pnote_get_length(YsePNote *n)#
YseScale *yse_scale_create(void)#
void yse_scale_destroy(YseScale *s)#
void yse_scale_add(YseScale *s, float pitch, float octave_step)#
void yse_scale_remove(YseScale *s, float pitch, float octave_step)#
int yse_scale_has(YseScale *s, float pitch)#
float yse_scale_nearest(YseScale *s, float pitch)#
unsigned int yse_scale_size(YseScale *s)#
void yse_scale_clear(YseScale *s)#
YseMotif *yse_motif_create(void)#
void yse_motif_destroy(YseMotif *m)#
void yse_motif_add(YseMotif *m, YsePNote *note)#
void yse_motif_clear(YseMotif *m)#
void yse_motif_set_length(YseMotif *m, float length)#
void yse_motif_set_length_auto(YseMotif *m)#
void yse_motif_transpose(YseMotif *m, float pitch)#
void yse_motif_set_first_pitch(YseMotif *m, YseScale *valid_pitches)#
float yse_motif_get_length(YseMotif *m)#
int yse_motif_empty(YseMotif *m)#
unsigned int yse_motif_size(YseMotif *m)#
YsePlayer *yse_player_create(void)#
void yse_player_destroy(YsePlayer *p)#
void yse_player_play(YsePlayer *p)#
void yse_player_stop(YsePlayer *p)#
int yse_player_is_playing(YsePlayer *p)#
void yse_player_set_minimum_pitch(YsePlayer *p, float target, float fade_time)#
void yse_player_set_maximum_pitch(YsePlayer *p, float target, float fade_time)#
void yse_player_set_minimum_velocity(YsePlayer *p, float target, float fade_time)#
void yse_player_set_maximum_velocity(YsePlayer *p, float target, float fade_time)#
void yse_player_set_minimum_gap(YsePlayer *p, float target, float fade_time)#
void yse_player_set_maximum_gap(YsePlayer *p, float target, float fade_time)#
void yse_player_set_minimum_length(YsePlayer *p, float target, float fade_time)#
void yse_player_set_maximum_length(YsePlayer *p, float target, float fade_time)#
void yse_player_set_voices(YsePlayer *p, unsigned int target, float fade_time)#
void yse_player_set_scale(YsePlayer *p, YseScale *scale, float fade_time)#
void yse_player_add_motif(YsePlayer *p, YseMotif *motif, unsigned int weight)#
void yse_player_remove_motif(YsePlayer *p, YseMotif *motif)#
void yse_player_adjust_motif_weight(YsePlayer *p, YseMotif *motif, unsigned int weight)#
void yse_player_play_partial_motifs(YsePlayer *p, float target, float fade_time)#
void yse_player_play_motifs(YsePlayer *p, float target, float fade_time)#
void yse_player_fit_motifs_to_scale(YsePlayer *p, float target, float fade_time)#

Logging and buffer I/O#

Typedefs

typedef struct YseLog YseLog#
typedef void (*YseLogCallback)(char *msg, void *user_data)#

Functions

YseLog *yse_log_get(void)#
void yse_log_send_message(YseLog *log, const char *msg)#
void yse_log_set_level(YseLog *log, YseErrorLevel level)#
YseErrorLevel yse_log_get_level(YseLog *log)#
void yse_log_set_logfile(YseLog *log, const char *path)#
size_t yse_log_get_logfile(YseLog *log, char *buf, size_t cap)#
void yse_log_set_callback(YseLog *log, YseLogCallback cb, void *user_data)#
void yse_log_free_message(char *msg)#

Typedefs

typedef struct YseBufferIO YseBufferIO#

Functions

YseBufferIO *yse_buffer_io_create(int store_copy)#
void yse_buffer_io_destroy(YseBufferIO *io)#
void yse_buffer_io_set_active(YseBufferIO *io, int on)#
int yse_buffer_io_get_active(YseBufferIO *io)#
int yse_buffer_io_name_exists(YseBufferIO *io, const char *id)#
int yse_buffer_io_add(YseBufferIO *io, const char *id, char *buffer, int length)#
int yse_buffer_io_remove_by_name(YseBufferIO *io, const char *id)#

Common types and enums#

Defines

YSE_C_API#
YSE_C_CALLBACK#

Typedefs

typedef enum YseStatus YseStatus
typedef struct yse_pos_t yse_pos_t#

Enums

enum YseStatus#

Values:

enumerator YSE_OK#
enumerator YSE_ERR_GENERIC#
enumerator YSE_ERR_NOT_INITIALIZED#
enumerator YSE_ERR_INVALID_HANDLE#
enumerator YSE_ERR_INVALID_ARGUMENT#
enumerator YSE_ERR_FILE_NOT_FOUND#
enumerator YSE_ERR_AUDIO_DEVICE#
enumerator YSE_ERR_MIDI#
enumerator YSE_ERR_EXCEPTION#

Functions

const char *yse_version(void)#
const char *yse_last_error(void)#
void yse_clear_last_error(void)#
struct yse_pos_t

Public Members

float x#
float y#
float z#

Typedefs

typedef enum YseChannelType YseChannelType
typedef enum YseErrorLevel YseErrorLevel
typedef enum YseOutType YseOutType
typedef enum YseLfoType YseLfoType
typedef enum YseDspSweepShape YseDspSweepShape
typedef enum YseDspDelayTap YseDspDelayTap
typedef enum YsePCategory YsePCategory
typedef enum YseInletAccepts YseInletAccepts
typedef enum YseReverbPreset YseReverbPreset

Enums

enum YseChannelType#

Values:

enumerator YSE_CT_AUTO#
enumerator YSE_CT_MONO#
enumerator YSE_CT_STEREO#
enumerator YSE_CT_QUAD#
enumerator YSE_CT_51#
enumerator YSE_CT_51SIDE#
enumerator YSE_CT_61#
enumerator YSE_CT_71#
enumerator YSE_CT_CUSTOM#
enum YseErrorLevel#

Values:

enumerator YSE_EL_NONE#
enumerator YSE_EL_ERROR#
enumerator YSE_EL_WARNING#
enumerator YSE_EL_DEBUG#
enum YseOutType#

Values:

enumerator YSE_OUT_INVALID#
enumerator YSE_OUT_BANG#
enumerator YSE_OUT_FLOAT#
enumerator YSE_OUT_INT#
enumerator YSE_OUT_BUFFER#
enumerator YSE_OUT_LIST#
enumerator YSE_OUT_ANY#
enum YseLfoType#

Values:

enumerator YSE_LFO_NONE#
enumerator YSE_LFO_SAW#
enumerator YSE_LFO_SAW_REVERSED#
enumerator YSE_LFO_TRIANGLE#
enumerator YSE_LFO_SINE#
enumerator YSE_LFO_SQUARE#
enumerator YSE_LFO_RANDOM#
enum YseDspSweepShape#

Values:

enumerator YSE_SWEEP_TRIANGLE#
enumerator YSE_SWEEP_SAW#
enumerator YSE_SWEEP_SQUARE#
enum YseDspDelayTap#

Values:

enumerator YSE_DELAY_TAP_FIRST#
enumerator YSE_DELAY_TAP_SECOND#
enumerator YSE_DELAY_TAP_THIRD#
enum YsePCategory#

Values:

enumerator YSE_PCAT_UNSET#
enumerator YSE_PCAT_OSC#
enumerator YSE_PCAT_FILTER#
enumerator YSE_PCAT_MATH#
enumerator YSE_PCAT_GENERIC#
enumerator YSE_PCAT_GUI#
enumerator YSE_PCAT_TIME#
enumerator YSE_PCAT_MIDI#
enum YseInletAccepts#

Values:

enumerator YSE_IN_ACCEPTS_BUFFER#
enumerator YSE_IN_ACCEPTS_FLOAT#
enumerator YSE_IN_ACCEPTS_INT#
enumerator YSE_IN_ACCEPTS_BANG#
enumerator YSE_IN_ACCEPTS_LIST#
enum YseReverbPreset#

Values:

enumerator YSE_REVERB_OFF#
enumerator YSE_REVERB_GENERIC#
enumerator YSE_REVERB_PADDED#
enumerator YSE_REVERB_ROOM#
enumerator YSE_REVERB_BATHROOM#
enumerator YSE_REVERB_STONEROOM#
enumerator YSE_REVERB_LARGEROOM#
enumerator YSE_REVERB_HALL#
enumerator YSE_REVERB_CAVE#
enumerator YSE_REVERB_SEWERPIPE#
enumerator YSE_REVERB_UNDERWATER#