/tg/ Station 13 - Modules - TypesVar Details - Proc Details

looping_sound

A datum for sounds that need to loop, with a high amount of configurability.

Vars

chanceChance per loop to play a mid_sound.
cut_listIf we're using cut_mid, this is the list we cut from
directIf true, plays directly to provided atoms instead of from them.
each_onceIf we should always play each sound once per loop of all sounds. Weights here only really effect order, and could be disgarded
end_sound(soundfile) The sound played after the main loop has concluded.
end_volumeOverride for volume of end sound.
extra_rangeThe extra range of the sound in tiles, defaults to 0.
falloff_distanceThe falloff distance of the sound,
falloff_exponentHow much the sound will be affected by falloff per tile.
ignore_wallsAre we ignoring walls? Defaults to TRUE.
loop_startedHas the looping started yet?
max_loopsThe max amount of loops to run for.
mid_lengthThe length of time to wait between playing mid_sounds.
mid_length_varyAmount of time to add/take away from the mid length, randomly
mid_sounds(list or soundfile) Since this can be either a list or a single soundfile you can have random sounds. May contain further lists but must contain a soundfile at the end.
parentThe source of the sound, or the recipient of the sound.
pressure_affectedAre the sounds affected by pressure? Defaults to TRUE.
skip_starting_soundsDo we skip the starting sounds?
start_lengthHow long to wait before starting the main loop after playing start_sound.
start_sound(soundfile) Played before starting the mid_sounds loop.
start_volumeOverride for volume of start sound.
timer_idThe ID of the timer that's used to loop the sounds.
use_reverbAre the sounds subject to reverb? Defaults to TRUE.
varyWhether or not the sounds will vary in pitch when played.
volumeSound output volume.

Procs

get_soundReturns the sound we should now be playing.
handle_parent_delA simple proc to handle the deletion of the parent, so that it does not force it to hard-delete.
is_activeA simple proc that lets us know whether the sounds are currently active or not.
on_startA proc that's there to handle delaying the main sounds if there's a start_sound, and simply starting the sound loop in general.
on_stopSimple proc that's executed when the looping sound is stopped, so that the end_sound can be played, if there's one.
playThe proc that handles actually playing the sound.
set_parentA simple proc to change who our parent is set to, also handling registering and unregistering the QDELETING signals on the parent.
sound_loopA simple proc handling the looping of the sound itself.
startThe proc to actually kickstart the whole sound sequence. This is what you should call to start the looping_sound.
start_sound_loopThe proc that handles starting the actual core sound loop.
stopThe proc to call to stop the sound loop.

Var Details

chance

Chance per loop to play a mid_sound.

cut_list

If we're using cut_mid, this is the list we cut from

direct

If true, plays directly to provided atoms instead of from them.

each_once

If we should always play each sound once per loop of all sounds. Weights here only really effect order, and could be disgarded

end_sound

(soundfile) The sound played after the main loop has concluded.

end_volume

Override for volume of end sound.

extra_range

The extra range of the sound in tiles, defaults to 0.

falloff_distance

The falloff distance of the sound,

falloff_exponent

How much the sound will be affected by falloff per tile.

ignore_walls

Are we ignoring walls? Defaults to TRUE.

loop_started

Has the looping started yet?

max_loops

The max amount of loops to run for.

mid_length

The length of time to wait between playing mid_sounds.

mid_length_vary

Amount of time to add/take away from the mid length, randomly

mid_sounds

(list or soundfile) Since this can be either a list or a single soundfile you can have random sounds. May contain further lists but must contain a soundfile at the end.

parent

The source of the sound, or the recipient of the sound.

pressure_affected

Are the sounds affected by pressure? Defaults to TRUE.

skip_starting_sounds

Do we skip the starting sounds?

start_length

How long to wait before starting the main loop after playing start_sound.

start_sound

(soundfile) Played before starting the mid_sounds loop.

start_volume

Override for volume of start sound.

timer_id

The ID of the timer that's used to loop the sounds.

use_reverb

Are the sounds subject to reverb? Defaults to TRUE.

vary

Whether or not the sounds will vary in pitch when played.

volume

Sound output volume.

Proc Details

get_sound

Returns the sound we should now be playing.

handle_parent_del

A simple proc to handle the deletion of the parent, so that it does not force it to hard-delete.

is_active

A simple proc that lets us know whether the sounds are currently active or not.

on_start

A proc that's there to handle delaying the main sounds if there's a start_sound, and simply starting the sound loop in general.

on_stop

Simple proc that's executed when the looping sound is stopped, so that the end_sound can be played, if there's one.

play

The proc that handles actually playing the sound.

Arguments:

set_parent

A simple proc to change who our parent is set to, also handling registering and unregistering the QDELETING signals on the parent.

sound_loop

A simple proc handling the looping of the sound itself.

Arguments:

start

The proc to actually kickstart the whole sound sequence. This is what you should call to start the looping_sound.

Arguments:

start_sound_loop

The proc that handles starting the actual core sound loop.

stop

The proc to call to stop the sound loop.

Arguments: