PopochiuIAudio

Inherits: Node

Description

Provides access to the game's PopochiuAudioCues through the singleton A (for example: A.sfx_woosh.play()).

Use this interface to play sound effects and music.

Capabilities include:

  • Playing sound effects and music.

  • Convert semitone values to pitch multipliers for audio playback.

Use examples:

func _on_click() -> void:
    await A.sfx_tv_on.play()
    await E.queue([
        A.mx_toon_town.queue_play(),
        A.vo_scream.queue_play(true), # Wait for the audio to finish
        A.sfx_boing.queue_play(),
    ])
    A.mx_house.play()

Properties

Type Name Default
Variant twelfth_root_of_two pow(2, (1.0 / 12))

Methods

Return Type Method
bool is_playing_cue(cue_name: String)
float semitone_to_pitch(pitch: float)

Property Descriptions

twelfth_root_of_two

var twelfth_root_of_two = pow(2, (1.0 / 12))

Conversion factor from pitch semitone values to the multiplier required by pitch_scale on AudioStreamPlayer and AudioStreamPlayer2D.


Method Descriptions

is_playing_cue

func is_playing_cue(cue_name: String) -> bool

Returns true if the PopochiuAudioCue identified by cue_name is currently playing.


semitone_to_pitch

func semitone_to_pitch(pitch: float) -> float

Converts a semitone offset (pitch) to the corresponding multiplier needed by AudioStreamPlayer.pitch_scale or AudioStreamPlayer2D.pitch_scale.