Sound presets and the player of the machine that runs the gateway.
A preset gives one value to each slot. The slots are the cues:
finish a turn completed, input a run waits for the answer of the person, error a turn failed or stopped.
The sound_presets setting holds {"active" name "custom" [preset ...]}.
A custom preset is {"name" text "slots" {slot value}}. A slot value is
empty for no sound, the id of a built-in preset for the sound of that preset,
or the path of a sound file on this machine. A built-in preset plays its own
sound for each slot.
The built-in presets are CC0 sounds from Kenney Interface Sounds, in
resources/vis-sounds/<preset>/<slot>.wav. A player program of the platform
plays the file: afplay on macOS, pw-play, paplay or aplay on Linux,
and PowerShell Media.SoundPlayer on Windows (WAV files only). One sound
plays at a time: a request while a sound plays makes no sound.
This namespace reads no setting. Callers give it the preset value.
Sound presets and the player of the machine that runs the gateway.
A preset gives one value to each slot. The slots are the cues:
finish a turn completed,
input a run waits for the answer of the person,
error a turn failed or stopped.
The `sound_presets` setting holds `{"active" name "custom" [preset ...]}`.
A custom preset is `{"name" text "slots" {slot value}}`. A slot value is
empty for no sound, the id of a built-in preset for the sound of that preset,
or the path of a sound file on this machine. A built-in preset plays its own
sound for each slot.
The built-in presets are CC0 sounds from Kenney Interface Sounds, in
`resources/vis-sounds/<preset>/<slot>.wav`. A player program of the platform
plays the file: `afplay` on macOS, `pw-play`, `paplay` or `aplay` on Linux,
and PowerShell `Media.SoundPlayer` on Windows (WAV files only). One sound
plays at a time: a request while a sound plays makes no sound.
This namespace reads no setting. Callers give it the preset value.The built-in presets, in display order. Each has one bundled file per slot.
The built-in presets, in display order. Each has one bundled file per slot.
(cue-file presets cue)The file that cue plays under the sound_presets value presets, or nil.
An active name that no preset carries falls back to the default preset.
The file that `cue` plays under the `sound_presets` value `presets`, or nil. An active name that no preset carries falls back to the default preset.
The value of a machine without its own presets.
The value of a machine without its own presets.
The static data of the presets editor of the sound_presets setting.
The static data of the presets editor of the `sound_presets` setting.
(file-problem value)Nil when each path in the sound_presets value value names a file on this
machine, else a message. Settings check this only when a person writes.
Nil when each path in the `sound_presets` value `value` names a file on this machine, else a message. Settings check this only when a person writes.
The most custom presets that the setting keeps.
The most custom presets that the setting keeps.
(play-file! file)Play file now. Returns true when a player starts, and false when file is
nil, a sound plays already or this machine has no player.
Play `file` now. Returns true when a player starts, and false when `file` is nil, a sound plays already or this machine has no player.
(player-command path)The command that plays path on this platform, or nil when no player exists.
The command that plays `path` on this platform, or nil when no player exists.
(preview! slot value)Play slot value value in slot slot, before the person saves it. Returns
true when a player starts. Throws with a message for an unknown slot or a
path that is not a file.
Play slot value `value` in slot `slot`, before the person saves it. Returns true when a player starts. Throws with a message for an unknown slot or a path that is not a file.
(problem value)Nil when value has the shape of a sound_presets value, else a message for the
person. It reads no file, so a saved value stays valid after a sound file moves.
Nil when `value` has the shape of a `sound_presets` value, else a message for the person. It reads no file, so a saved value stays valid after a sound file moves.
(slot-file slot value)The file that slot value value plays in slot slot, or nil for no sound.
Throws when value names a path that is not a file.
The file that slot value `value` plays in slot `slot`, or nil for no sound. Throws when `value` names a path that is not a file.
The slots of a sound preset, in display order.
The slots of a sound preset, in display order.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |