Package zzub :: Class Player
[hide private]
[frames] | no frames]

Class Player

source code

object --+
         |
        Player

Player Methods

Instance Methods [hide private]
 
__init__(self, handle)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__hash__(self)
hash(x)
source code
 
__eq__(self, other) source code
 
__ne__(self, other) source code
 
destroy(self)
Destroy a player instance and all its resources.
source code
 
add_plugin_path(self, path)
Adds a directory that will be scanned for plugins upon initialization.
source code
 
blacklist_plugin(self, uri)
Blacklist plugin.
source code
 
initialize(self, samplesPerSecond)
Inititializes the player.
source code
 
load_bmx(self, datastream, maxLen, flags, x, y)
Loads a BMX from memory or file.
source code
 
save_bmx(self, plugins, num_plugins, save_waves, datastream)
Saves a BMX to memory or file.
source code
 
load_ccm(self, fileName)
Load a project in CCM file format from disk.
source code
 
save_ccm(self, fileName)
Save current project in the CCM file format to disk.
source code
 
get_state(self)
Returns one of the values in the state enumeration.
source code
 
set_state(self, state)
Set player state.
source code
 
get_bpm(self) source code
 
get_tpb(self) source code
 
set_bpm(self, bpm) source code
 
set_tpb(self, tpb) source code
 
get_pluginloader_count(self)
Returns number of plugin loaders.
source code
 
get_pluginloader(self, index)
Returns a zzub_pluginloader_t handle by index.
source code
 
get_pluginloader_by_name(self, name)
Finds a zzub_pluginloader_t handle by uri.
source code
 
get_pluginloader_list(self) source code
 
get_plugin_count(self)
Returns number of plugins in the current song.
source code
 
get_plugin_by_name(self, name)
Returns the plugin object given the plugins name.
source code
 
get_plugin_by_id(self, id)
Returns the plugin object given the plugin id.
source code
 
get_plugin(self, index)
Returns the plugin object given the plugins index in the graph.
source code
 
get_plugin_list(self) source code
 
work_stereo(self) source code
 
clear(self) source code
 
get_position(self) source code
 
set_position(self, pos) source code
 
get_loop_start(self) source code
 
get_loop_end(self) source code
 
set_loop_start(self, v) source code
 
set_loop_end(self, v) source code
 
get_loop(self) source code
 
set_loop(self, begin, end) source code
 
get_song_start(self) source code
 
get_song_end(self) source code
 
set_song_start(self, v) source code
 
set_song_end(self, v) source code
 
set_loop_enabled(self, enable) source code
 
get_loop_enabled(self) source code
 
get_sequence_track_count(self) source code
 
get_sequence(self, index) source code
 
get_sequence_list(self) source code
 
get_wave_count(self) source code
 
get_wave(self, index) source code
 
get_wave_list(self) source code
 
get_next_event(self)
Returns a pointer to the next event or zero.
source code
 
set_callback(self, callback, tag)
Sets a function that receives events.
source code
 
handle_events(self)
Process player events.
source code
 
set_event_queue_state(self, enable) source code
 
get_midimapping(self, index) source code
 
get_midimapping_count(self) source code
 
get_midimapping_list(self) source code
 
get_automation(self) source code
 
set_automation(self, enable) source code
 
get_midi_transport(self) source code
 
set_midi_transport(self, enable) source code
 
get_infotext(self) source code
 
set_infotext(self, text) source code
 
set_midi_plugin(self, 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").
source code
 
get_midi_plugin(self) source code
 
get_new_plugin_name(self, uri, maxLen=1024)
Generates a new plugin name that can be used in a call to create_plugin().
source code
 
reset_keyjazz(self) source code
 
create_plugin(self, input, dataSize, instanceName, loader, flags=0)
Create a new plugin
source code
 
create_sequence(self, plugin, type) source code
 
flush(self, redo_event, undo_event)
Write changes made to the graph since zzub_player_begin().
source code
 
undo(self)
Rolls back all editing operations one step.
source code
 
redo(self)
Redoes all editing operations since last call to zzub_player_history_commit().
source code
 
history_commit(self, description)
Commits the last operations to the undo buffer and marks a new undo step.
source code
 
history_get_uncomitted_operations(self)
Returns the count of uncomitted operations.
source code
 
history_flush_last(self)
Causes the last operations to not appear in the undo buffer.
source code
 
history_flush(self)
Clears the undo buffer and frees all associated resources.
source code
 
history_get_size(self)
Returns the size of the undo buffer.
source code
 
history_get_position(self)
Returns the current position in the undo buffer.
source code
 
history_get_description(self, position)
Returns the description of an operation in the undo buffer.
source code
 
set_host_info(self, id, version, host_ptr)
Set versioned, host-specific data.
source code

Inherited from object: __delattr__, __getattribute__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Methods [hide private]
 
_new_from_handle(cls, handle) source code
Static Methods [hide private]
 
create()
Create a player instance.
source code
 
add_midimapping(plugin, group, track, param, channel, controller) source code
 
remove_midimapping(plugin, group, track, param) source code
 
get_currently_playing_pattern(plugin)
Retreive the currently playing pattern and row for a plugin.
source code
 
get_currently_playing_pattern_row(plugin, pattern)
Retreive the currently playing row for a plugin and a pattern.
source code
Class Variables [hide private]
  _as_parameter_ = None
  _hash = 0
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, handle)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

__hash__(self)
(Hashing function)

source code 

hash(x)

Overrides: object.__hash__
(inherited documentation)

add_plugin_path(self, path)

source code 

Adds a directory that will be scanned for plugins upon initialization. The path *must* be terminated with an ending (back)slash.

initialize(self, samplesPerSecond)

source code 

Inititializes the player. initialize() must be called only after the audio driver, plugin directories and optional blacklists are set up.

load_bmx(self, datastream, maxLen, flags, x, y)

source code 

Loads a BMX from memory or file.

Load warnings and error messages are placed in the messages string.

save_bmx(self, plugins, num_plugins, save_waves, datastream)

source code 

Saves a BMX to memory or file.

plugins is an array of ints containing the plugin ids to save in the song. If plugins is NULL, everything in the running graph is saved. Optionally without waves, when save_waves is zero.

set_state(self, state)

source code 

Set player state. Takes one of the values in the state enumeration as parameter.

get_plugin_by_id(self, id)

source code 

Returns the plugin object given the plugin id. See also zzub_plugin_get_id().

get_next_event(self)

source code 

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.

handle_events(self)

source code 

Process player events. Intended to be called by the host in a timer or on idle processing to receive events about parameter changes etc.

flush(self, redo_event, undo_event)

source code 

Write changes made to the graph since zzub_player_begin().

When redo_event and/or undo_event are NULL, zzub will invoke the callback for every editing operation. If a custom event is specified, the callback is invoked only once with either redo_event or undo_event as its parameter.

undo(self)

source code 

Rolls back all editing operations one step. Each step is defined with a call to zzub_player_history_commit().

set_host_info(self, id, version, host_ptr)

source code 

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.