Ags.Soundcard¶
- Implementations:
None
Methods¶
Virtual Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
None
Signals¶
Name |
Short Description |
---|---|
The |
|
The |
|
The |
Fields¶
None
Class Details¶
- class Ags.Soundcard¶
- Bases:
- Structure:
- classmethod helper_config_get_buffer_size(config)¶
- Parameters:
config (
Ags.Config
) – theAgs.Config
- Returns:
the buffer size
- Return type:
Get buffer size.
New in version 3.0.0.
- classmethod helper_config_get_cache_buffer_size(config)¶
- Parameters:
config (
Ags.Config
) – theAgs.Config
- Returns:
the cache buffer size
- Return type:
Get cache buffer size.
New in version 6.10.4.
- classmethod helper_config_get_dsp_channels(config)¶
- Parameters:
config (
Ags.Config
) – theAgs.Config
- Returns:
the count of dsp channels
- Return type:
Get dsp channels count.
New in version 3.0.0.
- classmethod helper_config_get_format(config)¶
- Parameters:
config (
Ags.Config
) – theAgs.Config
- Returns:
the format
- Return type:
Get format as
Ags.SoundcardFormat
-enum.New in version 3.0.0.
- classmethod helper_config_get_pcm_channels(config)¶
- Parameters:
config (
Ags.Config
) – theAgs.Config
- Returns:
the count of pcm channels
- Return type:
Get pcm channels count.
New in version 3.0.0.
- classmethod helper_config_get_samplerate(config)¶
- Parameters:
config (
Ags.Config
) – theAgs.Config
- Returns:
the samplerate
- Return type:
Get samplerate.
New in version 3.0.0.
- classmethod helper_config_get_use_cache(config)¶
- Parameters:
config (
Ags.Config
) – theAgs.Config
- Returns:
- Return type:
Get use cache.
New in version 6.10.4.
- get_absolute_delay()¶
- Returns:
delay
- Return type:
Get current playback delay.
New in version 3.0.0.
- get_buffer()¶
-
Get current playback buffer.
New in version 3.0.0.
- get_capability()¶
- Returns:
the capablities flags
- Return type:
Retrieve
Ags.SoundcardCapability
-enum information.New in version 3.0.0.
- get_delay_counter()¶
- Returns:
offset
- Return type:
Get current playback note offset.
New in version 3.0.0.
- get_delay_factor()¶
- Returns:
delay factor
- Return type:
Get current playback delay factor.
New in version 3.0.0.
- get_loop()¶
- Returns:
- loop_left:
return location of loop position’s region
- loop_right:
return location of loop position’s region
- do_loop:
return location of do loop
- Return type:
Get loop parameters of self.
New in version 3.0.0.
- get_loop_offset()¶
- Returns:
offset
- Return type:
Get current playback loop offset.
New in version 3.0.0.
- get_next_buffer()¶
-
Get future playback buffer.
New in version 3.0.0.
- get_note_256th_attack(note_256th_attack_lower, note_256th_attack_upper)¶
- Parameters:
Get current playback note 256th attack.
New in version 6.2.2.
- get_note_256th_attack_at_position(note_256th_attack_position)¶
-
Get current playback note 256th attack position within 16 times
Ags.SOUNDCARD_DEFAULT_PERIOD
.New in version 6.2.2.
- get_note_256th_attack_of_16th_pulse()¶
- Returns:
the note 256th attack of 16th pulse
- Return type:
Get note 256th attack of current 16th pulse.
New in version 6.3.0.
- get_note_256th_attack_of_16th_pulse_position()¶
- Returns:
the note 256th attack position of 16th pulse
- Return type:
Get note 256th attack position of current 16th pulse.
New in version 6.3.0.
- get_note_256th_attack_position(note_256th_attack_position_lower, note_256th_attack_position_upper)¶
- Parameters:
Get current playback note 256th attack position within 16 times
Ags.SOUNDCARD_DEFAULT_PERIOD
.New in version 6.2.2.
- get_note_256th_offset(note_256th_offset_lower, note_256th_offset_upper)¶
- Parameters:
Get current playback note 256th offset.
New in version 6.1.0.
- get_note_offset()¶
- Returns:
the current note offset
- Return type:
Get current playback note offset.
New in version 3.0.0.
- get_note_offset_absolute()¶
- Returns:
offset
- Return type:
Get current playback note offset.
New in version 3.0.0.
- get_presets()¶
- Returns:
- channels:
the audio channels
- rate:
the samplerate
- buffer_size:
the buffer size
- format:
the format
- Return type:
(channels:
int
, rate:int
, buffer_size:int
, format:Ags.SoundcardFormat
)
Get presets.
New in version 3.0.0.
- get_prev_buffer()¶
-
Get future playback buffer.
New in version 3.0.0.
- get_start_note_offset()¶
- Returns:
the start note offset
- Return type:
Get start playback note offset.
New in version 3.0.0.
- get_sub_block_count()¶
- Returns:
the sub block count
- Return type:
Get sub block count.
New in version 3.0.0.
- get_uptime()¶
- Returns:
playback time as string
- Return type:
Get playback time as string.
New in version 3.0.0.
- is_available()¶
-
Get available.
New in version 3.0.0.
- is_playing()¶
-
Get playing.
New in version 3.0.0.
- is_recording()¶
-
Get recording.
New in version 3.0.0.
- is_starting()¶
-
Get starting.
New in version 3.0.0.
- list_cards()¶
- Returns:
- card_id:
a list containing card ids
- card_name:
a list containing card names
- Return type:
Retrieve card_id and card_name as a list of strings.
New in version 3.0.0.
- lock_buffer(buffer)¶
-
Lock buffer.
New in version 3.0.0.
- offset_changed(note_offset)¶
- Parameters:
note_offset (
int
) – the current note offset
Callback when counter expires minor note offset.
New in version 3.0.0.
- pcm_info(card_id)¶
- Parameters:
card_id (
str
) – the selected soundcard by its string identifier- Raises:
- Returns:
- channels_min:
min channels supported
- channels_max:
max channels supported
- rate_min:
min samplerate supported
- rate_max:
max samplerate supported
- buffer_size_min:
min buffer size supported by soundcard
- buffer_size_max:
max buffer size supported by soundcard
- Return type:
(channels_min:
int
, channels_max:int
, rate_min:int
, rate_max:int
, buffer_size_min:int
, buffer_size_max:int
)
Retrieve detailed information of card_id soundcard.
New in version 3.0.0.
- play()¶
- Raises:
Plays the current buffer of soundcard.
New in version 3.0.0.
- play_init()¶
- Raises:
Initializes the soundcard for playback.
New in version 3.0.0.
- record()¶
- Raises:
Records the current buffer of soundcard.
New in version 3.0.0.
- record_init()¶
- Raises:
Initializes the soundcard for recordback.
New in version 3.0.0.
- set_bpm(bpm)¶
- Parameters:
bpm (
float
) – the bpm to set
Set current playback bpm.
New in version 3.0.0.
- set_delay_factor(delay_factor)¶
- Parameters:
delay_factor (
float
) – the delay factor to set
Set current playback delay factor.
New in version 3.0.0.
- set_device(card_id)¶
- Parameters:
card_id (
str
) – the device to set
Set device.
New in version 3.0.0.
- set_loop(loop_left, loop_right, do_loop)¶
- Parameters:
Set loop parameters of self.
New in version 3.0.0.
- set_note_offset(note_offset)¶
- Parameters:
note_offset (
int
) – the note offset to set
Set current playback note offset.
New in version 3.0.0.
- set_note_offset_absolute(note_offset)¶
- Parameters:
note_offset (
int
) – the note offset to set
Set current playback note offset.
New in version 3.0.0.
- set_presets(channels, rate, buffer_size, format)¶
- Parameters:
channels (
int
) – the audio channelsrate (
int
) – the sampleratebuffer_size (
int
) – the buffer sizeformat (
Ags.SoundcardFormat
) – the format
Set presets.
New in version 3.0.0.
- set_start_note_offset(start_note_offset)¶
- Parameters:
start_note_offset (
int
) – the start note offset to set
Set start playback note offset.
New in version 3.0.0.
- stop()¶
Stops the soundcard from playing to it.
New in version 3.0.0.
- tic()¶
Every call to play may generate a tic.
New in version 3.0.0.
- trylock_sub_block(buffer, sub_block)¶
- Parameters:
- Returns:
- Return type:
Trylock sub block.
New in version 3.0.0.
- unlock_buffer(buffer)¶
-
Unlock buffer.
New in version 3.0.0.
- unlock_sub_block(buffer, sub_block)¶
-
Unlock sub block.
New in version 3.0.0.
- do_get_absolute_delay() virtual¶
- Returns:
delay
- Return type:
Get current playback delay.
New in version 3.0.0.
- do_get_attack() virtual¶
- Returns:
attack
- Return type:
Get current playback attack.
New in version 3.0.0.
- do_get_bpm() virtual¶
- Returns:
bpm
- Return type:
Get current playback bpm.
New in version 3.0.0.
- do_get_buffer() virtual¶
-
Get current playback buffer.
New in version 3.0.0.
- do_get_capability() virtual¶
- Returns:
the capablities flags
- Return type:
Retrieve
Ags.SoundcardCapability
-enum information.New in version 3.0.0.
- do_get_delay() virtual¶
- Returns:
delay
- Return type:
Get current playback delay.
New in version 3.0.0.
- do_get_delay_counter() virtual¶
- Returns:
offset
- Return type:
Get current playback note offset.
New in version 3.0.0.
- do_get_delay_factor() virtual¶
- Returns:
delay factor
- Return type:
Get current playback delay factor.
New in version 3.0.0.
- do_get_device() virtual¶
- Returns:
the device’s identifier
- Return type:
Get device.
New in version 3.0.0.
- do_get_loop() virtual¶
- Returns:
- loop_left:
return location of loop position’s region
- loop_right:
return location of loop position’s region
- do_loop:
return location of do loop
- Return type:
Get loop parameters of soundcard.
New in version 3.0.0.
- do_get_loop_offset() virtual¶
- Returns:
offset
- Return type:
Get current playback loop offset.
New in version 3.0.0.
- do_get_next_buffer() virtual¶
-
Get future playback buffer.
New in version 3.0.0.
- do_get_note_256th_attack(note_256th_attack_lower, note_256th_attack_upper) virtual¶
- Parameters:
Get current playback note 256th attack.
New in version 6.2.2.
- do_get_note_256th_attack_at_position(note_256th_attack_position) virtual¶
-
Get current playback note 256th attack position within 16 times
Ags.SOUNDCARD_DEFAULT_PERIOD
.New in version 6.2.2.
- do_get_note_256th_attack_of_16th_pulse() virtual¶
- Returns:
the note 256th attack of 16th pulse
- Return type:
Get note 256th attack of current 16th pulse.
New in version 6.3.0.
- do_get_note_256th_attack_of_16th_pulse_position() virtual¶
- Returns:
the note 256th attack position of 16th pulse
- Return type:
Get note 256th attack position of current 16th pulse.
New in version 6.3.0.
- do_get_note_256th_attack_position(note_256th_attack_position_lower, note_256th_attack_position_upper) virtual¶
- Parameters:
Get current playback note 256th attack position within 16 times
Ags.SOUNDCARD_DEFAULT_PERIOD
.New in version 6.2.2.
- do_get_note_256th_offset(note_256th_offset_lower, note_256th_offset_upper) virtual¶
- Parameters:
Get current playback note 256th offset.
New in version 6.1.0.
- do_get_note_offset() virtual¶
- Returns:
the current note offset
- Return type:
Get current playback note offset.
New in version 3.0.0.
- do_get_note_offset_absolute() virtual¶
- Returns:
offset
- Return type:
Get current playback note offset.
New in version 3.0.0.
- do_get_presets() virtual¶
- Returns:
- channels:
the audio channels
- rate:
the samplerate
- buffer_size:
the buffer size
- format:
the format
- Return type:
(channels:
int
, rate:int
, buffer_size:int
, format:Ags.SoundcardFormat
)
Get presets.
New in version 3.0.0.
- do_get_prev_buffer() virtual¶
-
Get future playback buffer.
New in version 3.0.0.
- do_get_start_note_offset() virtual¶
- Returns:
the start note offset
- Return type:
Get start playback note offset.
New in version 3.0.0.
- do_get_sub_block_count() virtual¶
- Returns:
the sub block count
- Return type:
Get sub block count.
New in version 3.0.0.
- do_get_uptime() virtual¶
- Returns:
playback time as string
- Return type:
Get playback time as string.
New in version 3.0.0.
- do_is_available() virtual¶
-
Get available.
New in version 3.0.0.
- do_is_playing() virtual¶
-
Get playing.
New in version 3.0.0.
- do_is_recording() virtual¶
-
Get recording.
New in version 3.0.0.
- do_is_starting() virtual¶
-
Get starting.
New in version 3.0.0.
- do_list_cards() virtual¶
- Returns:
- card_id:
a list containing card ids
- card_name:
a list containing card names
- Return type:
Retrieve card_id and card_name as a list of strings.
New in version 3.0.0.
- do_lock_buffer(buffer) virtual¶
-
Lock buffer.
New in version 3.0.0.
- do_offset_changed(note_offset) virtual¶
- Parameters:
note_offset (
int
) – the current note offset
Callback when counter expires minor note offset.
New in version 3.0.0.
- do_pcm_info(card_id) virtual¶
- Parameters:
card_id (
str
) – the selected soundcard by its string identifier- Returns:
- channels_min:
min channels supported
- channels_max:
max channels supported
- rate_min:
min samplerate supported
- rate_max:
max samplerate supported
- buffer_size_min:
min buffer size supported by soundcard
- buffer_size_max:
max buffer size supported by soundcard
- Return type:
(channels_min:
int
, channels_max:int
, rate_min:int
, rate_max:int
, buffer_size_min:int
, buffer_size_max:int
)
Retrieve detailed information of card_id soundcard.
New in version 3.0.0.
- do_play() virtual¶
Plays the current buffer of soundcard.
New in version 3.0.0.
- do_play_init() virtual¶
Initializes the soundcard for playback.
New in version 3.0.0.
- do_record() virtual¶
Records the current buffer of soundcard.
New in version 3.0.0.
- do_record_init() virtual¶
Initializes the soundcard for recordback.
New in version 3.0.0.
- do_set_bpm(bpm) virtual¶
- Parameters:
bpm (
float
) – the bpm to set
Set current playback bpm.
New in version 3.0.0.
- do_set_delay_factor(delay_factor) virtual¶
- Parameters:
delay_factor (
float
) – the delay factor to set
Set current playback delay factor.
New in version 3.0.0.
- do_set_device(card_id) virtual¶
- Parameters:
card_id (
str
) – the device to set
Set device.
New in version 3.0.0.
- do_set_loop(loop_left, loop_right, do_loop) virtual¶
- Parameters:
Set loop parameters of soundcard.
New in version 3.0.0.
- do_set_note_offset(note_offset) virtual¶
- Parameters:
note_offset (
int
) – the note offset to set
Set current playback note offset.
New in version 3.0.0.
- do_set_note_offset_absolute(note_offset) virtual¶
- Parameters:
note_offset (
int
) – the note offset to set
Set current playback note offset.
New in version 3.0.0.
- do_set_presets(channels, rate, buffer_size, format) virtual¶
- Parameters:
channels (
int
) – the audio channelsrate (
int
) – the sampleratebuffer_size (
int
) – the buffer sizeformat (
Ags.SoundcardFormat
) – the format
Set presets.
New in version 3.0.0.
- do_set_start_note_offset(start_note_offset) virtual¶
- Parameters:
start_note_offset (
int
) – the start note offset to set
Set start playback note offset.
New in version 3.0.0.
- do_stop() virtual¶
Stops the soundcard from playing to it.
New in version 3.0.0.
- do_tic() virtual¶
Every call to play may generate a tic.
New in version 3.0.0.
- do_trylock_sub_block(buffer, sub_block) virtual¶
- Parameters:
- Returns:
- Return type:
Trylock sub block.
New in version 3.0.0.
- do_unlock_buffer(buffer) virtual¶
-
Unlock buffer.
New in version 3.0.0.
Signal Details¶
- Ags.Soundcard.signals.offset_changed(soundcard, note_offset)¶
- Signal Name:
offset-changed
- Flags:
- Parameters:
soundcard (
Ags.Soundcard
) – The object which received the signalnote_offset (
int
) – new notation offset
The
::offset-changed
signal notifies about changed position within notation.New in version 3.0.0.
- Ags.Soundcard.signals.stop(soundcard)¶
- Signal Name:
stop
- Flags:
- Parameters:
soundcard (
Ags.Soundcard
) – The object which received the signal
The
::stop
signal is emitted every stop of the soundcard. This notifies about a newly played buffer.New in version 3.0.0.
- Ags.Soundcard.signals.tic(soundcard)¶
- Signal Name:
tic
- Flags:
- Parameters:
soundcard (
Ags.Soundcard
) – The object which received the signal
The
::tic
signal is emitted every tic of the soundcard. This notifies about a newly played buffer.New in version 3.0.0.