cacophony
    Preparing search index...

    Class Group

    The base interface for any sound-producing entity, including individual sounds, groups, and playbacks. BaseSound

    Implements

    Index
    loopCount: LoopCount = 0
    sounds: Sound[] = []
    • get isPlaying(): boolean

      A boolean indicating whether any of the sounds in the group are currently playing.

      Returns boolean

      True if any sound is playing, false otherwise.

    • get playbackRate(): number

      Returns number

    • set playbackRate(rate: number): void

      Parameters

      • rate: number

      Returns void

    • Plays the sounds in the group in a specific order.

      Parameters

      • shouldLoop: boolean = true

        Indicates whether the sounds should be played in a loop.

      • Optionaloptions: PlayOptions

        Options for configuring fade behavior.

      Returns Playback | undefined

      The playback object representing the first sound being played, or undefined if the group is empty.

    • Plays a random sound from the group.

      Parameters

      • Optionaloptions: PlayOptions

        Options for configuring fade behavior.

      Returns Playback | undefined

      The playback object representing the played sound, or undefined if the group is empty.

    • Prepares the sounds in the group for playback in a specific order.

      Parameters

      • shouldLoop: boolean = true

        Indicates whether the sounds should be prepared for looping.

      Returns Playback | undefined

      The playback object representing the first sound being prepared, or undefined if the group is empty.

    • Prepares a random sound from the group for playback.

      Returns Playback | undefined

      The playback object representing the prepared sound, or undefined if the group is empty.

    • Returns a random sound from the group.

      Returns Sound

      Error if the group is empty.

    • Restarts ordered playback from the first sound in the group.

      Returns void

    • Routes every sound in this group to the specified Bus (or back to master). Fans the call out to every member; see Sound.routeTo for full semantics. With a sendGain, adds a per-sound send instead of redirecting primary routing.

      Parameters

      • target: string | Bus
      • OptionalsendGain: number

      Returns void