zzub.h File Reference

#include "zzub/types.h"

Classes

struct  zzub_event_data_all
struct  zzub_event_data_new_plugin
struct  zzub_event_data_delete_plugin
struct  zzub_event_data_connect
struct  zzub_event_data_plugin_changed
struct  zzub_event_data_set_tracks
struct  zzub_event_data_set_sequence_tracks
struct  zzub_event_data_set_sequence_event
struct  zzub_event_data_new_pattern
struct  zzub_event_data_delete_pattern
struct  zzub_event_data_edit_pattern
struct  zzub_event_data_pattern_insert_rows
struct  zzub_event_data_pattern_remove_rows
struct  zzub_event_data_pattern_changed
struct  zzub_event_data_midi_message
struct  zzub_event_data_change_parameter
struct  zzub_event_data_player_state_changed
struct  zzub_event_data_vu
struct  zzub_event_data_serialize
struct  zzub_event_data_unknown
struct  zzub_event_data_osc_message
struct  zzub_event_data_change_wave
struct  zzub_event_data_delete_wave
struct  zzub_event_data_allocate_wavelevel
struct  zzub_event_data_custom
struct  zzub_event_data

Defines

#define __ZZUB_H

Typedefs

typedef struct zzub_event_data zzub_event_data_t
typedef struct zzub_event_data_all zzub_event_data_all_t
typedef struct
zzub_event_data_new_plugin 
zzub_event_data_new_plugin_t
typedef struct
zzub_event_data_delete_plugin 
zzub_event_data_delete_plugin_t
typedef struct
zzub_event_data_connect 
zzub_event_data_connect_t
typedef struct
zzub_event_data_plugin_changed 
zzub_event_data_plugin_changed_t
typedef struct
zzub_event_data_set_tracks 
zzub_event_data_set_tracks_t
typedef struct
zzub_event_data_set_sequence_tracks 
zzub_event_data_set_sequence_tracks_t
typedef struct
zzub_event_data_set_sequence_event 
zzub_event_data_set_sequence_event_t
typedef struct
zzub_event_data_new_pattern 
zzub_event_data_new_pattern_t
typedef struct
zzub_event_data_delete_pattern 
zzub_event_data_delete_pattern_t
typedef struct
zzub_event_data_edit_pattern 
zzub_event_data_edit_pattern_t
typedef struct
zzub_event_data_pattern_insert_rows 
zzub_event_data_pattern_insert_rows_t
typedef struct
zzub_event_data_pattern_remove_rows 
zzub_event_data_pattern_remove_rows_t
typedef struct
zzub_event_data_pattern_changed 
zzub_event_data_pattern_changed_t
typedef struct
zzub_event_data_midi_message 
zzub_event_data_midi_message_t
typedef struct
zzub_event_data_change_parameter 
zzub_event_data_change_parameter_t
typedef struct
zzub_event_data_player_state_changed 
zzub_event_data_player_state_changed_t
typedef struct zzub_event_data_vu zzub_event_data_vu_t
typedef struct
zzub_event_data_serialize 
zzub_event_data_serialize_t
typedef struct
zzub_event_data_unknown 
zzub_event_data_unknown_t
typedef struct
zzub_event_data_osc_message 
zzub_event_data_osc_message_t
typedef struct
zzub_event_data_change_wave 
zzub_event_data_change_wave_t
typedef struct
zzub_event_data_delete_wave 
zzub_event_data_delete_wave_t
typedef struct
zzub_event_data_allocate_wavelevel 
zzub_event_data_allocate_wavelevel_t
typedef struct
zzub_event_data_custom 
zzub_event_data_custom_t
typedef struct _zzub_audiodriver zzub_audiodriver_t
 Audio Driver Methods Configure and create an audio driver instance.
typedef struct _zzub_mididriver zzub_mididriver_t
 MIDI Driver Methods Open midi devices.
typedef struct
_zzub_plugincollection 
zzub_plugincollection_t
 Plugin Collection Methods For enumerating and configuring plugin collections.
typedef struct _zzub_input zzub_input_t
typedef struct _zzub_output zzub_output_t
typedef struct _zzub_archive zzub_archive_t
typedef struct _zzub_midimapping zzub_midimapping_t
 MIDI Mapping Methods.
typedef struct _zzub_pattern zzub_pattern_t
 Offline pattern methods These functions are meant to help editing patterns. Note you cannot retreive a direct zzub_pattern_t object for a "live pattern". You can however, use zzub_plugin_get_pattern to retreive copies of live patterns, and then call zzub_plugin_update_pattern to write the changed pattern back to the engine. Alternately, zzub_plugin_get_pattern_value/zzub_plugin_set_pattern_value can also be used to edit single values in live patterns.
typedef struct _zzub_parameter zzub_parameter_t
 Parameter methods Retreive more details from zzub_parameter_t objects.
typedef struct _zzub_attribute zzub_attribute_t
 Attribute methods Retreive more details from zzub_attribute_t objects.
typedef struct _zzub_pluginloader zzub_pluginloader_t
 Plugin loading methods Retreive more details from zzub_pluginloader_t objects.
typedef struct _zzub_plugin zzub_plugin_t
 Plugin methods Retreive more details about plugins.
typedef struct _zzub_sequence zzub_sequence_t
 Sequencer methods.
typedef struct _zzub_wavelevel zzub_wavelevel_t
 Wavelevel.
typedef struct _zzub_envelope zzub_envelope_t
 Envelopes.
typedef struct _zzub_wave zzub_wave_t
 Wave table.
typedef struct _zzub_recorder zzub_recorder_t
 Memory and file streams - load/save from/to file/clipboard Create file or memory data streams for use by e.g zzub_wavetable_load_sample() and zzub_player_load_bmx()/zzub_player_save_bmx().
typedef struct _zzub_player zzub_player_t
 Player Methods.

Enumerations

enum  { zzub_version, zzub_buffer_size }
enum  zzub_event_type {
  zzub_event_type_pre_flag, zzub_event_type_double_click, zzub_event_type_new_plugin, zzub_event_type_delete_plugin,
  zzub_event_type_pre_delete_plugin, zzub_event_type_disconnect, zzub_event_type_connect, zzub_event_type_plugin_changed,
  zzub_event_type_parameter_changed, zzub_event_type_set_tracks, zzub_event_type_set_sequence_tracks, zzub_event_type_set_sequence_event,
  zzub_event_type_new_pattern, zzub_event_type_delete_pattern, zzub_event_type_pre_delete_pattern, zzub_event_type_edit_pattern,
  zzub_event_type_pattern_changed, zzub_event_type_pattern_insert_rows, zzub_event_type_pattern_remove_rows, zzub_event_type_sequencer_add_track,
  zzub_event_type_sequencer_remove_track, zzub_event_type_sequencer_changed, zzub_event_type_pre_disconnect, zzub_event_type_pre_connect,
  zzub_event_type_post_connect, zzub_event_type_pre_set_tracks, zzub_event_type_post_set_tracks, zzub_event_type_envelope_changed,
  zzub_event_type_slices_changed, zzub_event_type_wave_changed, zzub_event_type_delete_wave, zzub_event_type_load_progress,
  zzub_event_type_midi_control, zzub_event_type_wave_allocated, zzub_event_type_player_state_changed, zzub_event_type_osc_message,
  zzub_event_type_vu, zzub_event_type_custom, zzub_event_type_all
}
enum  zzub_player_state { zzub_player_state_playing, zzub_player_state_stopped, zzub_player_state_muted, zzub_player_state_released }
enum  zzub_parameter_type { zzub_parameter_type_note, zzub_parameter_type_switch, zzub_parameter_type_byte, zzub_parameter_type_word }
enum  zzub_wave_buffer_type { zzub_wave_buffer_type_si16, zzub_wave_buffer_type_f32, zzub_wave_buffer_type_si32, zzub_wave_buffer_type_si24 }
enum  zzub_oscillator_type {
  zzub_oscillator_type_sine, zzub_oscillator_type_sawtooth, zzub_oscillator_type_pulse, zzub_oscillator_type_triangle,
  zzub_oscillator_type_noise, zzub_oscillator_type_sawtooth_303
}
enum  zzub_note_value {
  zzub_note_value_none, zzub_note_value_off, zzub_note_value_min, zzub_note_value_max,
  zzub_note_value_c4
}
enum  zzub_switch_value { zzub_switch_value_none, zzub_switch_value_off, zzub_switch_value_on }
enum  zzub_wavetable_index_value { zzub_wavetable_index_value_none, zzub_wavetable_index_value_min, zzub_wavetable_index_value_max }
enum  zzub_parameter_flag { zzub_parameter_flag_wavetable_index, zzub_parameter_flag_state, zzub_parameter_flag_event_on_edit }
enum  zzub_plugin_flag {
  zzub_plugin_flag_mono_to_stereo, zzub_plugin_flag_plays_waves, zzub_plugin_flag_uses_lib_interface, zzub_plugin_flag_uses_instruments,
  zzub_plugin_flag_does_input_mixing, zzub_plugin_flag_no_output, zzub_plugin_flag_control_plugin, zzub_plugin_flag_auxiliary,
  zzub_plugin_flag_is_root, zzub_plugin_flag_has_audio_input, zzub_plugin_flag_has_audio_output, zzub_plugin_flag_has_event_input,
  zzub_plugin_flag_has_event_output, zzub_plugin_flag_offline, zzub_plugin_flag_stream, zzub_plugin_flag_import,
  zzub_plugin_flag_has_midi_input, zzub_plugin_flag_has_midi_output, zzub_plugin_flag_no_undo, zzub_plugin_flag_no_save
}
enum  zzub_state_flag { zzub_state_flag_playing, zzub_state_flag_recording }
enum  zzub_wave_flag {
  zzub_wave_flag_loop, zzub_wave_flag_extended, zzub_wave_flag_stereo, zzub_wave_flag_pingpong,
  zzub_wave_flag_envelope
}
enum  zzub_envelope_flag { zzub_envelope_flag_sustain, zzub_envelope_flag_loop }
enum  zzub_process_mode { zzub_process_mode_no_io, zzub_process_mode_read, zzub_process_mode_write, zzub_process_mode_read_write }
enum  zzub_connection_type { zzub_connection_type_audio, zzub_connection_type_event, zzub_connection_type_midi }
enum  zzub_parameter_group { zzub_parameter_group_connection, zzub_parameter_group_global, zzub_parameter_group_track }
enum  zzub_sequence_type { zzub_sequence_type_pattern, zzub_sequence_type_wave, zzub_sequence_type_automation }

Functions

zzub_audiodriver_tzzub_audiodriver_create_portaudio (zzub_player_t *player)
 Audio Driver Methods Configure and create an audio driver instance.
zzub_audiodriver_tzzub_audiodriver_create_rtaudio (zzub_player_t *player)
 Create an audio driver that uses the RtAudio API.
zzub_audiodriver_tzzub_audiodriver_create_silent (zzub_player_t *player, const char *name, int out_channels, int in_channels, int *supported_rates, int num_rates)
 Create a silent, non-processing audio driver that has one device with the specified properties.
zzub_audiodriver_tzzub_audiodriver_create (zzub_player_t *player)
 Creates the preferred audio driver.
int zzub_audiodriver_get_count (zzub_audiodriver_t *audiodriver)
 Get number of detected input and output audio devices.
int zzub_audiodriver_get_name (zzub_audiodriver_t *audiodriver, int index, char *name, int max_len)
 Get name of specified audio device.
int zzub_audiodriver_get_supported_samplerates (zzub_audiodriver_t *audiodriver, int index, int *result, int maxrates)
int zzub_audiodriver_get_supported_output_channels (zzub_audiodriver_t *audiodriver, int index)
int zzub_audiodriver_get_supported_input_channels (zzub_audiodriver_t *audiodriver, int index)
int zzub_audiodriver_create_device (zzub_audiodriver_t *audiodriver, int input_index, int output_index)
 Create specified audio device.
void zzub_audiodriver_enable (zzub_audiodriver_t *audiodriver, int state)
 Enable or disable current audio driver.
int zzub_audiodriver_get_enabled (zzub_audiodriver_t *audiodriver)
 Returns whether current audio driver is enabled or disabled.
void zzub_audiodriver_destroy (zzub_audiodriver_t *audiodriver)
 Disassociate audio driver and player.
void zzub_audiodriver_destroy_device (zzub_audiodriver_t *audiodriver)
 De-allocate the current device.
void zzub_audiodriver_set_samplerate (zzub_audiodriver_t *audiodriver, unsigned int samplerate)
 Set audio driver sample rate.
unsigned int zzub_audiodriver_get_samplerate (zzub_audiodriver_t *audiodriver)
 Retreive audio driver sample rate.
void zzub_audiodriver_set_buffersize (zzub_audiodriver_t *audiodriver, unsigned int buffersize)
unsigned int zzub_audiodriver_get_buffersize (zzub_audiodriver_t *audiodriver)
double zzub_audiodriver_get_cpu_load (zzub_audiodriver_t *audiodriver)
int zzub_audiodriver_is_output (zzub_audiodriver_t *audiodriver, int index)
int zzub_audiodriver_is_input (zzub_audiodriver_t *audiodriver, int index)
int zzub_audiodriver_get_master_channel (zzub_audiodriver_t *audiodriver)
void zzub_audiodriver_set_master_channel (zzub_audiodriver_t *audiodriver, int index)
int zzub_mididriver_get_count (zzub_player_t *player)
 MIDI Driver Methods Open midi devices.
const char * zzub_mididriver_get_name (zzub_player_t *player, int index)
int zzub_mididriver_is_input (zzub_player_t *player, int index)
int zzub_mididriver_is_output (zzub_player_t *player, int index)
int zzub_mididriver_open (zzub_player_t *player, int index)
int zzub_mididriver_close_all (zzub_player_t *player)
zzub_plugincollection_tzzub_plugincollection_get_by_uri (zzub_player_t *player, const char *uri)
 Plugin Collection Methods For enumerating and configuring plugin collections.
void zzub_plugincollection_configure (zzub_plugincollection_t *plugincollection, const char *key, const char *value)
zzub_input_tzzub_input_open_file (const char *filename)
 Create an input stream that reads from a file.
void zzub_input_destroy (zzub_input_t *input)
 Closes an input stream created with zzub_create_output_XXX.
void zzub_input_read (zzub_input_t *input, char *buffer, int bytes)
int zzub_input_size (zzub_input_t *input)
int zzub_input_position (zzub_input_t *input)
void zzub_input_seek (zzub_input_t *input, int pos, int mode)
zzub_output_tzzub_output_create_file (const char *filename)
 Create an output stream that writes to a file.
void zzub_output_destroy (zzub_output_t *output)
 Closes an output stream created with zzub_create_output_XXX.
void zzub_output_write (zzub_output_t *output, const char *buffer, int bytes)
int zzub_output_position (zzub_output_t *output)
void zzub_output_seek (zzub_output_t *output, int pos, int mode)
zzub_archive_tzzub_archive_create_memory ()
 Create an in-memory archive of keyed input and output streams.
zzub_output_tzzub_archive_get_output (zzub_archive_t *archive, const char *path)
 Returns an output stream object for writing.
zzub_input_tzzub_archive_get_input (zzub_archive_t *archive, const char *path)
 Returns an input stream object for reading.
void zzub_archive_destroy (zzub_archive_t *archive)
int zzub_midimapping_get_plugin (zzub_midimapping_t *midimapping)
 MIDI Mapping Methods.
int zzub_midimapping_get_group (zzub_midimapping_t *midimapping)
int zzub_midimapping_get_track (zzub_midimapping_t *midimapping)
int zzub_midimapping_get_column (zzub_midimapping_t *midimapping)
int zzub_midimapping_get_channel (zzub_midimapping_t *midimapping)
int zzub_midimapping_get_controller (zzub_midimapping_t *midimapping)
void zzub_pattern_destroy (zzub_pattern_t *pattern)
 Offline pattern methods These functions are meant to help editing patterns. Note you cannot retreive a direct zzub_pattern_t object for a "live pattern". You can however, use zzub_plugin_get_pattern to retreive copies of live patterns, and then call zzub_plugin_update_pattern to write the changed pattern back to the engine. Alternately, zzub_plugin_get_pattern_value/zzub_plugin_set_pattern_value can also be used to edit single values in live patterns.
void zzub_pattern_get_name (zzub_pattern_t *pattern, char *name, int maxLen)
void zzub_pattern_set_name (zzub_pattern_t *pattern, const char *name)
int zzub_pattern_get_row_count (zzub_pattern_t *pattern)
int zzub_pattern_get_group_count (zzub_pattern_t *pattern)
int zzub_pattern_get_track_count (zzub_pattern_t *pattern, int group)
int zzub_pattern_get_column_count (zzub_pattern_t *pattern, int group, int track)
int zzub_pattern_get_value (zzub_pattern_t *pattern, int row, int group, int track, int column)
void zzub_pattern_set_value (zzub_pattern_t *pattern, int row, int group, int track, int column, int value)
void zzub_pattern_interpolate (zzub_pattern_t *pattern)
int zzub_parameter_get_type (zzub_parameter_t *parameter)
 Parameter methods Retreive more details from zzub_parameter_t objects.
const char * zzub_parameter_get_name (zzub_parameter_t *parameter)
const char * zzub_parameter_get_description (zzub_parameter_t *parameter)
int zzub_parameter_get_value_min (zzub_parameter_t *parameter)
int zzub_parameter_get_value_max (zzub_parameter_t *parameter)
int zzub_parameter_get_value_none (zzub_parameter_t *parameter)
int zzub_parameter_get_value_default (zzub_parameter_t *parameter)
int zzub_parameter_get_flags (zzub_parameter_t *parameter)
 A parameter flag is combined by zero or more values in the zzub_parameter_flag enumeration.
const char * zzub_attribute_get_name (zzub_attribute_t *attribute)
 Attribute methods Retreive more details from zzub_attribute_t objects.
int zzub_attribute_get_value_min (zzub_attribute_t *attribute)
int zzub_attribute_get_value_max (zzub_attribute_t *attribute)
int zzub_attribute_get_value_default (zzub_attribute_t *attribute)
const char * zzub_pluginloader_get_name (zzub_pluginloader_t *pluginloader)
 Plugin loading methods Retreive more details from zzub_pluginloader_t objects.
const char * zzub_pluginloader_get_short_name (zzub_pluginloader_t *pluginloader)
int zzub_pluginloader_get_parameter_count (zzub_pluginloader_t *pluginloader, int group)
zzub_parameter_tzzub_pluginloader_get_parameter (zzub_pluginloader_t *pluginloader, int group, int index)
 Returns the parameter for a group and column. See also zzub_plugin_get_parameter() which also returns parameters in group 0.
int zzub_pluginloader_get_attribute_count (zzub_pluginloader_t *pluginloader)
zzub_attribute_tzzub_pluginloader_get_attribute (zzub_pluginloader_t *pluginloader, int index)
const char * zzub_pluginloader_get_loader_name (zzub_pluginloader_t *pluginloader)
int zzub_pluginloader_get_flags (zzub_pluginloader_t *pluginloader)
 Returns the flags for this plugin loader. Combined by zero or more values in the zzub_plugin_flag enumeration.
const char * zzub_pluginloader_get_uri (zzub_pluginloader_t *pluginloader)
const char * zzub_pluginloader_get_author (zzub_pluginloader_t *pluginloader)
int zzub_pluginloader_get_instrument_list (zzub_pluginloader_t *pluginloader, char *result, int maxbytes)
int zzub_pluginloader_get_tracks_min (zzub_pluginloader_t *pluginloader)
int zzub_pluginloader_get_tracks_max (zzub_pluginloader_t *pluginloader)
int zzub_pluginloader_get_stream_format_count (zzub_pluginloader_t *pluginloader)
 Returns the number of supported stream formats. Used with plugins flagged zzub_plugin_flag_stream.
const char * zzub_pluginloader_get_stream_format_ext (zzub_pluginloader_t *pluginloader, int index)
 Returns a supported stream file format extension stream. Used with plugins flagged zzub_plugin_flag_stream.
int zzub_plugin_destroy (zzub_plugin_t *plugin)
 Plugin methods Retreive more details about plugins.
int zzub_plugin_load (zzub_plugin_t *plugin, zzub_input_t *input)
 Load plugin state.
int zzub_plugin_save (zzub_plugin_t *plugin, zzub_output_t *ouput)
 Save plugin state.
int zzub_plugin_set_name (zzub_plugin_t *plugin, const char *name)
 Renames a plugin. Should fail and return -1 if the name already exists.
int zzub_plugin_get_name (zzub_plugin_t *plugin, char *name, int maxlen)
 Retreive the name of a plugin.
int zzub_plugin_get_id (zzub_plugin_t *plugin)
 Retreive the unique per-session id of a plugin. See also zzub_player_get_plugin_by_id().
void zzub_plugin_get_position (zzub_plugin_t *plugin, float *x, float *y)
 Returns the screen position coordinates for the plugin. Values are expected to be in the range -1..1.
void zzub_plugin_set_position (zzub_plugin_t *plugin, float x, float y)
 Sets the plugin screen position. Values are expected to be in the range -1..1.
void zzub_plugin_set_position_direct (zzub_plugin_t *plugin, float x, float y)
 Sets the plugin screen position. Values are expected to be in the range -1..1. This method is not undoable.
int zzub_plugin_get_flags (zzub_plugin_t *plugin)
 Returns flags for this plugin. Shorthand for using zzub_pluginloader_get_flags(). Combined by zero or more values in the zzub_plugin_flag enumeration.
int zzub_plugin_get_track_count (zzub_plugin_t *plugin)
 Returns the number of tracks.
void zzub_plugin_set_track_count (zzub_plugin_t *plugin, int count)
 Sets the number of tracks. Will call plugin::set_track_count() from the player thread.
int zzub_plugin_get_group_track_count (zzub_plugin_t *plugin, int group)
 Returns the number of tracks for one of ParameterGroup.
int zzub_plugin_get_mute (zzub_plugin_t *plugin)
 Returns 1 if plugin is muted, otherwise 0.
void zzub_plugin_set_mute (zzub_plugin_t *plugin, int muted)
 Set whether plugin is muted. 1 for muted, 0 for normal. A muted machine does not produce any sound.
int zzub_plugin_get_bypass (zzub_plugin_t *plugin)
 Returns 1 if plugin is bypassed, otherwise 0.
void zzub_plugin_configure (zzub_plugin_t *plugin, const char *key, const char *value)
 Configure a plugin option. this is e.g. used by the recorder plugin to specify a file path to write to.
void zzub_plugin_set_bypass (zzub_plugin_t *plugin, int muted)
 Set whether plugin is bypassed. 1 for bypass, 0 for normal. Bypass causes no processing to occur in the given machine.
int zzub_plugin_get_commands (zzub_plugin_t *plugin, char *commands, int maxlen)
 Returns a string of \\ -separated command strings.
int zzub_plugin_get_sub_commands (zzub_plugin_t *plugin, int i, char *commands, int maxlen)
 When a plugin command string starts with the char '\', it has subcommands. Unexpectedly, zzub_plugin_get_sub_commands returns a \\ -separated string (like get_commands). Some plugins need to be ticked before calling get_sub_commands.
void zzub_plugin_command (zzub_plugin_t *plugin, int i)
 Invoke a command on the plugin.
zzub_pluginloader_tzzub_plugin_get_pluginloader (zzub_plugin_t *plugin)
 Returns the pluginloader used to create this plugin.
int zzub_plugin_get_midi_output_device_count (zzub_plugin_t *plugin)
const char * zzub_plugin_get_midi_output_device (zzub_plugin_t *plugin, int index)
int zzub_plugin_get_envelope_count (zzub_plugin_t *plugin)
int zzub_plugin_get_envelope_flags (zzub_plugin_t *plugin, int index)
const char * zzub_plugin_get_envelope_name (zzub_plugin_t *plugin, int index)
void zzub_plugin_set_stream_source (zzub_plugin_t *plugin, const char *resource)
int zzub_plugin_set_instrument (zzub_plugin_t *plugin, const char *name)
 Sets the plugin instrument (d'oh!).
zzub_pattern_tzzub_plugin_create_range_pattern (zzub_player_t *player, int columns, int rows)
 Creates a non-playable pattern with given columns and rows in group 0, track 0. All values are set to 0 by default.
zzub_pattern_tzzub_plugin_create_pattern (zzub_plugin_t *plugin, int rows)
 Creates a pattern compatible with given plugin. The pattern becomes incompatible if the plugin has tracks or incoming connections added.
int zzub_plugin_get_pattern_count (zzub_plugin_t *plugin)
 Returns how many patterns are associated with the plugin.
void zzub_plugin_add_pattern (zzub_plugin_t *plugin, zzub_pattern_t *pattern)
 Adds a pattern at the end of the plugins list of patterns.
void zzub_plugin_remove_pattern (zzub_plugin_t *plugin, int pattern)
 Remove the pattern from the plugin.
void zzub_plugin_move_pattern (zzub_plugin_t *plugin, int index, int newIndex)
 Change the order of patterns.
void zzub_plugin_update_pattern (zzub_plugin_t *plugin, int index, zzub_pattern_t *pattern)
 Replaces pattern contents.
zzub_pattern_tzzub_plugin_get_pattern (zzub_plugin_t *plugin, int index)
 Returns a copy of the requested pattern. Callers must destroy the pattern returned from get_pattern.
int zzub_plugin_get_pattern_by_name (zzub_plugin_t *plugin, const char *name)
 Returns the index of the pattern with the given name.
const char * zzub_plugin_get_pattern_name (zzub_plugin_t *plugin, int index)
 Returns the name of given pattern.
void zzub_plugin_set_pattern_name (zzub_plugin_t *plugin, int index, const char *name)
 Updates the name of the pattern.
int zzub_plugin_get_pattern_length (zzub_plugin_t *plugin, int index)
 Returns the length of the pattern.
void zzub_plugin_set_pattern_length (zzub_plugin_t *plugin, int index, int rows)
 Updates the number of rows in the pattern.
int zzub_plugin_get_pattern_value (zzub_plugin_t *plugin, int pattern, int group, int track, int column, int row)
 Returns a value from the requested pattern.
void zzub_plugin_set_pattern_value (zzub_plugin_t *plugin, int pattern, int group, int track, int column, int row, int value)
 Sets a value in a pattern.
void zzub_plugin_get_new_pattern_name (zzub_plugin_t *plugin, char *name, int maxLen)
int zzub_plugin_linear_to_pattern (zzub_plugin_t *plugin, int index, int *group, int *track, int *column)
int zzub_plugin_pattern_to_linear (zzub_plugin_t *plugin, int group, int track, int column, int *index)
int zzub_plugin_get_pattern_column_count (zzub_plugin_t *plugin)
void zzub_plugin_insert_pattern_rows (zzub_plugin_t *plugin, int pattern, const int *column_indices, int num_indices, int start, int rows)
 Inserts rows in a pattern. column_indices has a total length of 3 * num_indices, where each index is a triple of group, track and column.
void zzub_plugin_remove_pattern_rows (zzub_plugin_t *plugin, int pattern, const int *column_indices, int num_indices, int start, int rows)
 Removes rows in a pattern. column_indices has a total length of 3 * num_indices, where each index is a triple of group, track and column.
int zzub_plugin_describe_value (zzub_plugin_t *plugin, int group, int column, int value, char *name, int maxlen)
 Copies columns from an offline pattern to a live pattern. Source and target columns are set up in the mappings array, which has 6 ints for each mapping: group, track and column for source and target plugins. Creates a textual description of the given value. The return value is the number of characters in the output string.
int zzub_plugin_get_parameter_value (zzub_plugin_t *plugin, int group, int track, int column)
 Returns the last written value of the requested parameter.
void zzub_plugin_set_parameter_value (zzub_plugin_t *plugin, int group, int track, int column, int value, int record)
 Sets the value of a plugin parameter. The method will wait for the player thread to pick up the modified value and call process_events().
void zzub_plugin_set_parameter_value_direct (zzub_plugin_t *plugin, int group, int track, int column, int value, int record)
 Sets the value of a plugin parameter. Unlike zzub_plugin_set_parameter_value(), this method returns immediately. The parameter will be changed later when the player thread notices the modified value. Is also not undoable.
int zzub_plugin_get_parameter_count (zzub_plugin_t *plugin, int group, int track)
zzub_parameter_tzzub_plugin_get_parameter (zzub_plugin_t *plugin, int group, int track, int column)
int zzub_plugin_get_input_connection_count (zzub_plugin_t *plugin)
 Returns the number of input connections for given plugin.
int zzub_plugin_get_input_connection_by_type (zzub_plugin_t *plugin, zzub_plugin_t *from_plugin, int type)
 Returns the input connection index for given plugin and connection type.
int zzub_plugin_get_input_connection_type (zzub_plugin_t *plugin, int index)
 Returns the connection type for given plugin and connection index.
zzub_plugin_tzzub_plugin_get_input_connection_plugin (zzub_plugin_t *plugin, int index)
 Returns the plugin index for given plugin and connection index.
int zzub_plugin_get_output_connection_count (zzub_plugin_t *plugin)
 Returns the number of output connections for given plugin.
int zzub_plugin_get_output_connection_by_type (zzub_plugin_t *plugin, zzub_plugin_t *from_plugin, int type)
 Returns the output connection index for given plugin and connection type.
int zzub_plugin_get_output_connection_type (zzub_plugin_t *plugin, int index)
 Returns the connection type for given plugin and connection index.
zzub_plugin_tzzub_plugin_get_output_connection_plugin (zzub_plugin_t *plugin, int index)
 Returns the plugin index for given plugin and connection index.
int zzub_plugin_add_input (zzub_plugin_t *plugin, zzub_plugin_t *from_plugin, int type)
 Connect two plugins.
void zzub_plugin_delete_input (zzub_plugin_t *plugin, zzub_plugin_t *from_plugin, int type)
 Disconnect two plugins.
int zzub_plugin_get_mixbuffer (zzub_plugin_t *plugin, float *leftbuffer, float *rightbuffer, int *size, long long *samplepos)
 Copies the given plugins work buffer.
void zzub_plugin_get_last_peak (zzub_plugin_t *plugin, float *maxL, float *maxR)
double zzub_plugin_get_last_worktime (zzub_plugin_t *plugin)
double zzub_plugin_get_last_cpu_load (zzub_plugin_t *plugin)
int zzub_plugin_get_last_midi_result (zzub_plugin_t *plugin)
int zzub_plugin_get_last_audio_result (zzub_plugin_t *plugin)
int zzub_plugin_invoke_event (zzub_plugin_t *plugin, zzub_event_data_t *data, int immediate)
void zzub_plugin_tick (zzub_plugin_t *plugin)
int zzub_plugin_get_attribute_value (zzub_plugin_t *plugin, int index)
void zzub_plugin_set_attribute_value (zzub_plugin_t *plugin, int index, int value)
void zzub_plugin_play_midi_note (zzub_plugin_t *plugin, int note, int prevNote, int velocity)
void zzub_plugin_play_pattern_row_ref (zzub_plugin_t *plugin, int pattern, int row)
void zzub_plugin_play_pattern_row (zzub_plugin_t *plugin, zzub_pattern_t *pattern, int row)
int zzub_plugin_set_midi_connection_device (zzub_plugin_t *plugin, zzub_plugin_t *from_plugin, const char *name)
void zzub_plugin_add_event_connection_binding (zzub_plugin_t *plugin, zzub_plugin_t *from_plugin, int sourceparam, int targetgroup, int targettrack, int targetparam)
void zzub_sequence_destroy (zzub_sequence_t *sequence)
 Sequencer methods.
void zzub_sequence_move (zzub_sequence_t *sequence, int newIndex)
int zzub_sequence_insert_events (zzub_sequence_t *sequence, int start, int ticks)
int zzub_sequence_remove_events (zzub_sequence_t *sequence, int start, int ticks)
void zzub_sequence_set_event (zzub_sequence_t *sequence, int pos, int value)
zzub_plugin_tzzub_sequence_get_plugin (zzub_sequence_t *sequence)
int zzub_sequence_get_event_at (zzub_sequence_t *sequence, int pos)
int zzub_sequence_get_event_count (zzub_sequence_t *sequence)
int zzub_sequence_get_event (zzub_sequence_t *sequence, int index, int *pos, int *value)
int zzub_sequence_get_type (zzub_sequence_t *sequence)
zzub_wave_tzzub_wavelevel_get_wave (zzub_wavelevel_t *wavelevel)
 Wavelevel.
int zzub_wavelevel_clear (zzub_wavelevel_t *wavelevel)
int zzub_wavelevel_get_sample_count (zzub_wavelevel_t *wavelevel)
void zzub_wavelevel_set_sample_count (zzub_wavelevel_t *wavelevel, int count)
int zzub_wavelevel_get_root_note (zzub_wavelevel_t *wavelevel)
void zzub_wavelevel_set_root_note (zzub_wavelevel_t *wavelevel, int note)
int zzub_wavelevel_get_samples_per_second (zzub_wavelevel_t *wavelevel)
void zzub_wavelevel_set_samples_per_second (zzub_wavelevel_t *wavelevel, int sps)
int zzub_wavelevel_get_loop_start (zzub_wavelevel_t *wavelevel)
void zzub_wavelevel_set_loop_start (zzub_wavelevel_t *wavelevel, int pos)
int zzub_wavelevel_get_loop_end (zzub_wavelevel_t *wavelevel)
void zzub_wavelevel_set_loop_end (zzub_wavelevel_t *wavelevel, int pos)
int zzub_wavelevel_get_format (zzub_wavelevel_t *wavelevel)
void zzub_wavelevel_remove_sample_range (zzub_wavelevel_t *wavelevel, int start, int end)
void zzub_wavelevel_get_samples_digest (zzub_wavelevel_t *wavelevel, int channel, int start, int end, float *mindigest, float *maxdigest, float *ampdigest, int digestsize)
unsigned short zzub_envelope_get_attack (zzub_envelope_t *envelope)
 Envelopes.
unsigned short zzub_envelope_get_decay (zzub_envelope_t *envelope)
unsigned short zzub_envelope_get_sustain (zzub_envelope_t *envelope)
unsigned short zzub_envelope_get_release (zzub_envelope_t *envelope)
void zzub_envelope_set_attack (zzub_envelope_t *envelope, unsigned short attack)
void zzub_envelope_set_decay (zzub_envelope_t *envelope, unsigned short decay)
void zzub_envelope_set_sustain (zzub_envelope_t *envelope, unsigned short sustain)
void zzub_envelope_set_release (zzub_envelope_t *envelope, unsigned short release)
char zzub_envelope_get_subdivision (zzub_envelope_t *envelope)
void zzub_envelope_set_subdivision (zzub_envelope_t *envelope, char subdiv)
char zzub_envelope_get_flags (zzub_envelope_t *envelope)
void zzub_envelope_set_flags (zzub_envelope_t *envelope, char flags)
int zzub_envelope_is_enabled (zzub_envelope_t *envelope)
void zzub_envelope_enable (zzub_envelope_t *envelope, int enable)
int zzub_envelope_get_point_count (zzub_envelope_t *envelope)
void zzub_envelope_get_point (zzub_envelope_t *envelope, int index, unsigned short *x, unsigned short *y, char *flags)
void zzub_envelope_set_point (zzub_envelope_t *envelope, int index, unsigned short x, unsigned short y, char flags)
void zzub_envelope_insert_point (zzub_envelope_t *envelope, int index)
void zzub_envelope_delete_point (zzub_envelope_t *envelope, int index)
int zzub_wave_get_index (zzub_wave_t *wave)
 Wave table.
int zzub_wave_load_sample (zzub_wave_t *wave, int level, int offset, int clear, const char *path, zzub_input_t *datastream)
int zzub_wave_save_sample (zzub_wave_t *wave, int level, zzub_output_t *datastream)
int zzub_wave_save_sample_range (zzub_wave_t *wave, int level, zzub_output_t *datastream, int start, int end)
int zzub_wave_clear (zzub_wave_t *wave)
const char * zzub_wave_get_name (zzub_wave_t *wave)
void zzub_wave_set_name (zzub_wave_t *wave, const char *name)
const char * zzub_wave_get_path (zzub_wave_t *wave)
void zzub_wave_set_path (zzub_wave_t *wave, const char *path)
int zzub_wave_get_flags (zzub_wave_t *wave)
void zzub_wave_set_flags (zzub_wave_t *wave, int flags)
float zzub_wave_get_volume (zzub_wave_t *wave)
void zzub_wave_set_volume (zzub_wave_t *wave, float volume)
int zzub_wave_get_envelope_count (zzub_wave_t *wave)
void zzub_wave_set_envelope_count (zzub_wave_t *wave, int count)
zzub_envelope_tzzub_wave_get_envelope (zzub_wave_t *wave, int index)
void zzub_wave_set_envelope (zzub_wave_t *wave, int index, zzub_envelope_t *env)
int zzub_wave_get_level_count (zzub_wave_t *wave)
zzub_wavelevel_tzzub_wave_get_level (zzub_wave_t *wave, int index)
zzub_player_tzzub_player_create ()
 Memory and file streams - load/save from/to file/clipboard Create file or memory data streams for use by e.g zzub_wavetable_load_sample() and zzub_player_load_bmx()/zzub_player_save_bmx().
void zzub_player_destroy (zzub_player_t *player)
 Destroy a player instance and all its resources.
void zzub_player_add_plugin_path (zzub_player_t *player, const char *path)
 Adds a directory that will be scanned for plugins upon initialization. The path *must* be terminated with an ending (back)slash.
void zzub_player_blacklist_plugin (zzub_player_t *player, const char *uri)
 Blacklist plugin.
int zzub_player_initialize (zzub_player_t *player, int samplesPerSecond)
 Inititializes the player. initialize() must be called only after the audio driver, plugin directories and optional blacklists are set up.
int zzub_player_load_bmx (zzub_player_t *player, zzub_input_t *datastream, char *messages, int maxLen, int flags, float x, float y)
 Loads a BMX from memory or file.
int zzub_player_save_bmx (zzub_player_t *player, const zzub_plugin_t **plugins, int num_plugins, int save_waves, zzub_output_t *datastream)
 Saves a BMX to memory or file.
int zzub_player_load_ccm (zzub_player_t *player, const char *fileName)
 Load a project in CCM file format from disk.
int zzub_player_save_ccm (zzub_player_t *player, const char *fileName)
 Save current project in the CCM file format to disk.
int zzub_player_get_state (zzub_player_t *player)
 Returns one of the values in the state enumeration.
void zzub_player_set_state (zzub_player_t *player, int state)
 Set player state. Takes one of the values in the state enumeration as parameter.
void zzub_player_set_position (zzub_player_t *player, int tick)
float zzub_player_get_bpm (zzub_player_t *player)
int zzub_player_get_tpb (zzub_player_t *player)
void zzub_player_set_bpm (zzub_player_t *player, float bpm)
void zzub_player_set_tpb (zzub_player_t *player, int tpb)
int zzub_player_get_pluginloader_count (zzub_player_t *player)
 Returns number of plugin loaders.
zzub_pluginloader_tzzub_player_get_pluginloader (zzub_player_t *player, int index)
 Returns a zzub_pluginloader_t handle by index.
zzub_pluginloader_tzzub_player_get_pluginloader_by_name (zzub_player_t *player, const char *name)
 Finds a zzub_pluginloader_t handle by uri.
int zzub_player_get_plugin_count (zzub_player_t *player)
 Returns number of plugins in the current song.
zzub_midimapping_tzzub_player_add_midimapping (zzub_plugin_t *plugin, int group, int track, int param, int channel, int controller)
int zzub_player_remove_midimapping (zzub_plugin_t *plugin, int group, int track, int param)
zzub_plugin_tzzub_player_get_plugin_by_name (zzub_player_t *player, const char *name)
 Returns the plugin object given the plugins name.
zzub_plugin_tzzub_player_get_plugin_by_id (zzub_player_t *player, int id)
 Returns the plugin object given the plugin id. See also zzub_plugin_get_id().
zzub_plugin_tzzub_player_get_plugin (zzub_player_t *player, int index)
 Returns the plugin object given the plugins index in the graph.
const float ** zzub_player_work_stereo (zzub_player_t *player, int *numSamples)
void zzub_player_clear (zzub_player_t *player)
int zzub_player_get_position (zzub_player_t *player)
int zzub_player_get_loop_start (zzub_player_t *player)
int zzub_player_get_loop_end (zzub_player_t *player)
void zzub_player_set_loop_start (zzub_player_t *player, int v)
void zzub_player_set_loop_end (zzub_player_t *player, int v)
void zzub_player_get_loop (zzub_player_t *player, int *begin, int *end)
void zzub_player_set_loop (zzub_player_t *player, int begin, int end)
int zzub_player_get_song_start (zzub_player_t *player)
int zzub_player_get_song_end (zzub_player_t *player)
void zzub_player_set_song_start (zzub_player_t *player, int v)
void zzub_player_set_song_end (zzub_player_t *player, int v)
void zzub_player_set_loop_enabled (zzub_player_t *player, int enable)
int zzub_player_get_loop_enabled (zzub_player_t *player)
int zzub_player_get_sequence_track_count (zzub_player_t *player)
zzub_sequence_tzzub_player_get_sequence (zzub_player_t *player, int index)
int zzub_player_get_currently_playing_pattern (zzub_plugin_t *plugin, int *pattern, int *row)
 Retreive the currently playing pattern and row for a plugin.
int zzub_player_get_currently_playing_pattern_row (zzub_plugin_t *plugin, int pattern, int *row)
 Retreive the currently playing row for a plugin and a pattern.
int zzub_player_get_wave_count (zzub_player_t *player)
zzub_wave_tzzub_player_get_wave (zzub_player_t *player, int index)
zzub_event_data_tzzub_player_get_next_event (zzub_player_t *player)
 Returns a pointer to the next event or zero. Intended to replace the set_callback/handle_events combo. Call this periodically in a timer or on idle processing. When calling, call get_next_event until a NULL pointer occurs. After the call, all previously returned pointers are invalid.
void zzub_player_set_callback (zzub_player_t *player, zzub_callback_t callback, void *tag)
 Sets a function that receives events.
void zzub_player_handle_events (zzub_player_t *player)
 Process player events. Intended to be called by the host in a timer or on idle processing to receive events about parameter changes etc.
void zzub_player_set_event_queue_state (zzub_player_t *player, int enable)
zzub_midimapping_tzzub_player_get_midimapping (zzub_player_t *player, int index)
int zzub_player_get_midimapping_count (zzub_player_t *player)
int zzub_player_get_automation (zzub_player_t *player)
void zzub_player_set_automation (zzub_player_t *player, int enable)
int zzub_player_get_midi_transport (zzub_player_t *player)
void zzub_player_set_midi_transport (zzub_player_t *player, int enable)
const char * zzub_player_get_infotext (zzub_player_t *player)
void zzub_player_set_infotext (zzub_player_t *player, const char *text)
void zzub_player_set_midi_plugin (zzub_player_t *player, zzub_plugin_t *plugin)
 Sets the plugin to receive MIDI data if the plugin's internal MIDI channel is set to the special channel 17 ("Play if selected").
zzub_plugin_tzzub_player_get_midi_plugin (zzub_player_t *player)
void zzub_player_get_new_plugin_name (zzub_player_t *player, const char *uri, char *name, int maxLen)
 Generates a new plugin name that can be used in a call to create_plugin().
void zzub_player_reset_keyjazz (zzub_player_t *player)
zzub_plugin_tzzub_player_create_plugin (zzub_player_t *player, zzub_input_t *input, int dataSize, const char *instanceName, zzub_pluginloader_t *loader, int flags)
 Create a new plugin.
zzub_sequence_tzzub_player_create_sequence (zzub_player_t *player, zzub_plugin_t *plugin, int type)
void zzub_player_flush (zzub_player_t *player, zzub_event_data_t *redo_event, zzub_event_data_t *undo_event)
 Write changes made to the graph since zzub_player_begin().
void zzub_player_undo (zzub_player_t *player)
 Rolls back all editing operations one step. Each step is defined with a call to zzub_player_history_commit().
void zzub_player_redo (zzub_player_t *player)
 Redoes all editing operations since last call to zzub_player_history_commit().
void zzub_player_history_commit (zzub_player_t *player, const char *description)
 Commits the last operations to the undo buffer and marks a new undo step.
int zzub_player_history_get_uncomitted_operations (zzub_player_t *player)
 Returns the count of uncomitted operations.
void zzub_player_history_flush_last (zzub_player_t *player)
 Causes the last operations to not appear in the undo buffer.
void zzub_player_history_flush (zzub_player_t *player)
 Clears the undo buffer and frees all associated resources.
int zzub_player_history_get_size (zzub_player_t *player)
 Returns the size of the undo buffer.
int zzub_player_history_get_position (zzub_player_t *player)
 Returns the current position in the undo buffer.
const char * zzub_player_history_get_description (zzub_player_t *player, int position)
 Returns the description of an operation in the undo buffer.
void zzub_player_set_host_info (zzub_player_t *player, int id, int version, void *host_ptr)
 Set versioned, host-specific data. Plugins can retreive a pointer to this information with _host->get_host_info(). Use and/or dependence on the host's version is regarded as bad practise and should not be used in new code.

Variables

int typedef(* zzub_callback_t )(zzub_player_t *player, zzub_plugin_t *plugin, zzub_event_data_t *data, void *tag)
void typedef(* zzub_mix_callback_t )(float *left, float *right, int size, void *tag)

Generated on Thu Jul 30 05:09:25 2009 for libzzub by  doxygen 1.5.9