AgsAudio.Wave

g AgsAudio.Wave AgsAudio.Wave GObject.Object GObject.Object GObject.Object->AgsAudio.Wave

Subclasses:None

Methods

Inherited:GObject.Object (37)
Structs:GObject.ObjectClass (5)
class add (wave, new_wave)
class find_near_timestamp (wave, line, timestamp)
class new (audio, line)
class sort_func (a, b)
  add_all_to_selection ()
  add_buffer (buffer, use_selection_list)
  add_region_to_selection (x0, x1, replace_current_selection)
  copy_selection ()
  cut_selection ()
  find_point (x, use_selection_list)
  find_region (x0, x1, use_selection_list)
  free_selection ()
  get_audio ()
  get_buffer ()
  get_buffer_size ()
  get_format ()
  get_line ()
  get_samplerate ()
  get_selection ()
  get_timestamp ()
  insert_from_clipboard (wave_node, reset_x_offset, x_offset, delay, attack)
  insert_from_clipboard_extended (wave_node, reset_x_offset, x_offset, delay, attack, match_line, do_replace)
  is_buffer_selected (buffer)
  remove_buffer (buffer, use_selection_list)
  remove_region_from_selection (x0, x1)
  set_audio (audio)
  set_buffer (buffer)
  set_buffer_size (buffer_size)
  set_flags (flags)
  set_format (format)
  set_line (line)
  set_samplerate (samplerate)
  set_timestamp (timestamp)
  test_flags (flags)
  unset_flags (flags)

Virtual Methods

Inherited:GObject.Object (7)

Properties

Name Type Flags Short Description
audio AgsAudio.Audio r/w The audio of wave
buffer int r/w The buffer of wave
buffer-size int r/w The buffer size of audio buffer
format int r/w The format of audio buffer
line int r/w The numerical line of wave
samplerate int r/w The samplerate of audio buffer
timestamp Ags.Timestamp r/w The timestamp of pattern

Signals

Inherited:GObject.Object (1)

Fields

Inherited:GObject.Object (1)
Name Type Access Description
audio GObject.Object r  
buffer [object] r  
buffer_size int r  
duration int r  
flags int r  
format int r  
gobject GObject.Object r  
line int r  
obj_mutex GLib.RecMutex r  
samplerate int r  
selection [object] r  
timestamp Ags.Timestamp r  

Class Details

class AgsAudio.Wave(**kwargs)
Bases:GObject.Object
Abstract:No
Structure:AgsAudio.WaveClass
classmethod add(wave, new_wave)
Parameters:
Returns:

the new beginning of wave

Return type:

[AgsAudio.Wave]

Add new_wave sorted to wave

New in version 3.0.0.

classmethod find_near_timestamp(wave, line, timestamp)
Parameters:
Returns:

Next matching GLib.List-struct or None if not found

Return type:

[AgsAudio.Wave]

Retrieve appropriate wave for timestamp.

New in version 3.0.0.

classmethod new(audio, line)
Parameters:
Returns:

a new AgsAudio.Wave

Return type:

AgsAudio.Wave

Creates a new instance of AgsAudio.Wave.

New in version 3.0.0.

classmethod sort_func(a, b)
Parameters:
Returns:

0 if equal, -1 if smaller and 1 if bigger timestamp

Return type:

int

Compare a and b.

New in version 3.0.0.

add_all_to_selection()

Select all buffer to selection.

New in version 3.0.0.

add_buffer(buffer, use_selection_list)
Parameters:

Add buffer to self.

New in version 3.0.0.

add_region_to_selection(x0, x1, replace_current_selection)
Parameters:
  • x0 (int) – x start offset
  • x1 (int) – x end offset
  • replace_current_selection (bool) – if True selection is replaced

Add buffer within region to selection.

New in version 3.0.0.

copy_selection()
Returns:the selection as XML.
Return type:libxml2.Node

Copy selection to clipboard.

New in version 3.0.0.

cut_selection()
Returns:the selection as libxml2.Node
Return type:libxml2.Node

Cut selection to clipboard.

New in version 3.0.0.

find_point(x, use_selection_list)
Parameters:
  • x (int) – offset
  • use_selection_list (bool) – if True selection is searched
Returns:

the matching buffer as AgsAudio.Buffer.

Return type:

AgsAudio.Buffer

Find buffers by offset.

New in version 3.0.0.

find_region(x0, x1, use_selection_list)
Parameters:
  • x0 (int) – x start offset
  • x1 (int) – x end offset
  • use_selection_list (bool) – if True selection is searched
Returns:

the matching buffers as GLib.List.

Return type:

[AgsAudio.Buffer]

Find buffers by offset and region.

New in version 3.0.0.

free_selection()

Clear selection.

New in version 3.0.0.

get_audio()
Returns:the AgsAudio.Audio
Return type:GObject.Object

Get audio.

New in version 3.1.0.

get_buffer()
Returns:the GLib.List-struct containig AgsAudio.Buffer
Return type:[AgsAudio.Buffer]

Get buffer.

New in version 3.1.0.

get_buffer_size()
Returns:the buffer size
Return type:int

Gets buffer size.

New in version 3.1.0.

get_format()
Returns:the format
Return type:int

Gets format.

New in version 3.1.0.

get_line()
Returns:the line
Return type:int

Gets line.

New in version 3.1.0.

get_samplerate()
Returns:the samplerate
Return type:int

Gets samplerate.

New in version 3.1.0.

get_selection()
Returns:the selection.
Return type:[AgsAudio.Buffer]

Retrieve selection.

New in version 3.0.0.

get_timestamp()
Returns:the Ags.Timestamp
Return type:Ags.Timestamp

Get timestamp.

New in version 3.1.0.

insert_from_clipboard(wave_node, reset_x_offset, x_offset, delay, attack)
Parameters:
  • wave_node (libxml2.Node) – the clipboard XML data
  • reset_x_offset (bool) – if True x_offset used as cursor
  • x_offset (int) – region start cursor offset
  • delay (float) – the delay to be used
  • attack (int) – the attack to be used

Paste previously copied buffers.

New in version 3.0.0.

insert_from_clipboard_extended(wave_node, reset_x_offset, x_offset, delay, attack, match_line, do_replace)
Parameters:
  • wave_node (libxml2.Node) – the clipboard XML data
  • reset_x_offset (bool) – if True x_offset used as cursor
  • x_offset (int) – region start cursor offset
  • delay (float) – the delay to be used
  • attack (int) – the attack to be used
  • match_line (bool) – only paste if channel matches
  • do_replace (bool) – if True current data is replaced, otherwise additive mixing is performed

Paste previously copied buffers.

New in version 3.0.0.

is_buffer_selected(buffer)
Parameters:buffer (AgsAudio.Buffer) – the AgsAudio.Buffer to check for
Returns:True if selected otherwise False
Return type:bool

Check selection for buffer.

New in version 3.0.0.

remove_buffer(buffer, use_selection_list)
Parameters:

Removes buffer from self.

New in version 3.0.0.

remove_region_from_selection(x0, x1)
Parameters:
  • x0 (int) – x start offset
  • x1 (int) – x end offset

Remove buffers within region of selection.

New in version 3.0.0.

set_audio(audio)
Parameters:audio (GObject.Object) – the AgsAudio.Audio

Set audio.

New in version 3.1.0.

set_buffer(buffer)
Parameters:buffer ([AgsAudio.Buffer]) – the GLib.List-struct containing AgsAudio.Buffer

Set buffer by replacing existing.

New in version 3.1.0.

set_buffer_size(buffer_size)
Parameters:buffer_size (int) – the buffer size

Set buffer size.

New in version 3.0.0.

set_flags(flags)
Parameters:flags (int) – the flags

Set flags on self.

New in version 3.0.0.

set_format(format)
Parameters:format (int) – the format

Set format.

New in version 3.0.0.

set_line(line)
Parameters:line (int) – the line

Sets line.

New in version 3.1.0.

set_samplerate(samplerate)
Parameters:samplerate (int) – the samplerate

Set samplerate.

New in version 3.0.0.

set_timestamp(timestamp)
Parameters:timestamp (Ags.Timestamp) – the Ags.Timestamp

Set timestamp.

New in version 3.1.0.

test_flags(flags)
Parameters:flags (int) – the flags
Returns:True if flags are set, else False
Return type:bool

Test flags to be set on self.

New in version 3.0.0.

unset_flags(flags)
Parameters:flags (int) – the flags

Unset flags on self.

New in version 3.0.0.

Property Details

AgsAudio.Wave.props.audio
Name:audio
Type:AgsAudio.Audio
Default Value:None
Flags:READABLE, WRITABLE

The assigned AgsAudio.Audio

New in version 3.0.0.

AgsAudio.Wave.props.buffer
Name:buffer
Type:int
Default Value:None
Flags:READABLE, WRITABLE

The assigned AgsAudio.Buffer

New in version 3.0.0.

AgsAudio.Wave.props.buffer_size
Name:buffer-size
Type:int
Default Value:1024
Flags:READABLE, WRITABLE

The audio buffer’s buffer size.

New in version 3.0.0.

AgsAudio.Wave.props.format
Name:format
Type:int
Default Value:16
Flags:READABLE, WRITABLE

The audio buffer’s format.

New in version 3.0.0.

AgsAudio.Wave.props.line
Name:line
Type:int
Default Value:0
Flags:READABLE, WRITABLE

The wave’s line.

New in version 3.0.0.

AgsAudio.Wave.props.samplerate
Name:samplerate
Type:int
Default Value:48000
Flags:READABLE, WRITABLE

The audio buffer’s samplerate.

New in version 3.0.0.

AgsAudio.Wave.props.timestamp
Name:timestamp
Type:Ags.Timestamp
Default Value:None
Flags:READABLE, WRITABLE

The pattern’s timestamp.

New in version 3.0.0.