Liquidsoap 0.9.2 : Language reference

Liquidsoap scripting language reference

Categories

The Source / ... categories contain all functions that return sources. The Input functions are those which build elementary sources (playing files, synthesizing sound, etc.). The Output functions are those which take a source and register it for being streamed to the outside (file, soundcard, audio server, etc.). The Visualization functions are experimental ones that let you visualize in real-time some aspects of the audio stream. The Sound Processing functions are those which basically work on the source as a continuous audio stream. They would typically be mixers of streams, audio effects or analysis. Finally, Track Processing functions are basically all others, often having a behaviour that depends on or affects the extra information that liquidsoap puts in streams: track limits and metadata.

Source / Input

blank
(?id:string, ?duration:float)->source

Produce silence.

dolebrai
()->source

Relay the audio stream of Dolebraï, a libre music netradio running liquidsoap.

fail
()->source

Creates a source that fails to produce anything.

in
()->source

Create a source from the first available input driver in this list: portaudio, alsa, oss, blank

input.alsa
(?id:string, ?bufferize:bool, ?device:string)
 ->source

Stream from an ALSA input device.

input.external
(?id:string, ?buffer:float, ?max:float,
 ?channels:int, ?samplerate:int, ?restart:bool,
 ?restart_on_error:bool, string)->source

Stream data from an external application.

input.harbor
(?id:string, ?buffer:float, ?max:float,
 ?on_connect:(([(string*string)])->unit),
 ?on_disconnect:(()->unit), ?user:string,
 ?password:string, ?auth:((string, string)->bool),
 ?dumpfile:string, ?logfile:string, ?debug:bool,
 string)->source

Retrieves the given http stream from the harbor.

input.http
(?id:string, ?autostart:bool, ?bind_address:string,
 ?buffer:float, ?timeout:float,
 ?new_track_on_metadata:bool, ?force_mime:string,
 ?playlist_mode:string, ?poll_delay:float,
 ?max:float, ?logfile:string, ?debug:bool,
 ?user_agent:string, string)->source

Forwards the given http stream. The relay can be paused/resumed using the start/stop telnet commands.

input.jack
(?id:string, ?buffer_size:int, ?server:string)
 ->source

Get stream from jack.

input.jack.legacy
(?id:string, ?ports:[string], ?synchronize:bool)
 ->source

WARNING: This is DEPRECATED!

Deprecated jack input.

input.lastfm
(?id:string, ?autostart:bool, ?buffer:float,
 ?bind_address:string, ?timeout:float,
 ?poll_delay:float, ?submit:bool,
 ?submit_host:string, ?submit_port:int,
 ?new_track_on_metadata:bool, ?debug:bool,
 ?max:float, ?user_agent:string, string)->source

Forwards the given lastfm stream. The relay can be paused/resumed using the start/stop telnet commands.

input.marshal
(?id:string, ?reopen:bool, string)->source

WARNING: This is only EXPERIMENTAL!

Get a stream from a pipe using marshaling.

input.mplayer
(?id:string, ?restart:bool, ?restart_on_error:bool,
 ?buffer:float, ?max:float, string)->source

Stream data from mplayer

input.oss
(?id:string, ?device:string)->source

Stream from an OSS input device.

input.portaudio
(?id:string, ?buflen:int)->source

Stream from a portaudio input device.

input.pulseaudio
(?id:string, ?client:string, ?device:string)
 ->source

Stream from a portaudio input device.

input.v4l
(?id:string, ?device:string)->source

Stream from a V4L (= video 4 linux) input device, such as a webcam.

mksafe
(source)->source

Turn a source into an infaillible source. by adding blank when the source is not available.

noise
(?id:string, ?duration:float)->source

Generate white noise.

playlist
(?id:string, ?length:float, ?default_duration:float,
 ?conservative:bool, ?timeout:float, ?mode:string,
 ?reload:int, ?reload_mode:string,
 ?mime_type:string, ?prefix:string, ?timeout:float,
 string)->source

Loop on a playlist of URIs.

playlist.once
(?random:bool, ?on_done:(()->unit), string)->source

Custom playlist source written using the script language. Will read directory or playlist, play all files and stop

playlist.safe
(?id:string, ?mode:string, ?reload:int,
 ?reload_mode:string, ?mime_type:string,
 ?prefix:string, ?timeout:float, string)->source

Loop on a playlist of local files, and never fail. In order to do so, it has to check every file at the loading, so the streamer startup may take a few seconds. To avoid this, use a standard playlist, and put only a few local files in a default safe_playlist in order to ensure the liveness of the streamer.

request.dynamic
(?id:string, (()->request), ?length:float,
 ?default_duration:float, ?conservative:bool,
 ?timeout:float)->source

Play request dynamically created by a given function.

request.equeue
(?id:string, ?length:float, ?default_duration:float,
 ?conservative:bool, ?timeout:float)->source

Receive URIs from users, and play them. Insertion and deletion possible at any position.

request.queue
(?id:string, ?queue:[request], ?interactive:bool,
 ?length:float, ?default_duration:float,
 ?conservative:bool, ?timeout:float)->source

Receive URIs from users, and play them.

saw
(?id:string, ?duration:float, ?float)->source

Generate a saw wave.

sine
(?id:string, ?duration:float, ?float)->source

Generate a sine wave.

single
(?id:string, string, ?length:float,
 ?default_duration:float, ?conservative:bool,
 ?timeout:float)->source

Loop on a request. It never fails if the request is static, meaning that it can be fetched once. Typically, http, ftp, say requests are static, and time is not.

square
(?id:string, ?duration:float, ?float)->source

Generate a square wave.

video.image
(?id:string, ?width:int, ?height:int, ?x:int,
 ?y:int, ?alpha:int, ?duration:float, string)
 ->source

Display a static image.

video.noise
(?id:string, ?duration:float)->source

Generate white noise.

Source / MIDI Processing

midi.merge_all
(?id:string, ?track_out:int, source)->source

Merge all MIDI tracks in one.

midi.remove
(?id:string, [int], source)->source

Remove MIDI tracks.

Source / Output

out
(source)->source

Output a stream using the 'output.prefered' operator. The input source does not need to be infallible, blank will just be played during failures.

output.alsa
(?id:string, ?bufferize:bool, ?device:string,
 source)->source

Output the source's stream to an ALSA output device.

output.ao
(?id:string, ?fallible:bool, ?on_start:(()->unit),
 ?on_stop:(()->unit), ?start:bool, ?driver:string,
 ?buffer_size:int, ?options:[(string*string)],
 source)->source

Output stream to local sound card using libao.

output.aplay
(?id:string, ?device:string, ?fallible:bool,
 ?on_start:(()->unit), ?on_stop:(()->unit),
 ?restart_on_crash:bool, source)->source

Output the stream using aplay. Using this turns “root.sync” to false since aplay will do the synchronisation

output.dummy
(?id:string, ?fallible:bool, ?autostart:bool,
 ?on_start:(()->unit), ?on_stop:(()->unit), source)
 ->source

Dummy output for debugging purposes.

output.file.aac
(?id:string, ?fallible:bool, ?on_start:(()->unit),
 ?on_stop:(()->unit), ?start:bool, ?bandwidth:int,
 ?bitrate:int, ?quality:int, string, source)
 ->source

Output the source's stream as an AAC file.

output.file.aacplus
(?id:string, ?samplerate:int, ?bitrate:int,
 ?append:bool, ?perm:int, ?dir_perm:int,
 ?reopen_delay:float, ?reopen_on_metadata:bool,
 ?reopen_when:(()->bool), string, ?fallible:bool,
 ?on_start:(()->unit), ?on_stop:(()->unit),
 ?start:bool, source)->source

Output the source's stream as an AAC+ file.

output.file.dirac
(?id:string, ?quality:int, ?vorbis_quality:float,
 ?skeleton:bool, ?append:bool, ?perm:int,
 ?dir_perm:int, ?reopen_delay:float,
 ?reopen_on_metadata:bool, ?reopen_when:(()->bool),
 string, ?fallible:bool, ?on_start:(()->unit),
 ?on_stop:(()->unit), ?start:bool, source)->source

Output the source's stream as an ogg/theora file.

output.file.external
(?id:string, ~process:(([(string*string)])->string),
 ?samplerate:int, ?header:bool,
 ?restart_on_crash:bool, ?restart_on_new_track:bool,
 ?restart_encoder_delay:int, ?fallible:bool,
 ?on_start:(()->unit), ?on_stop:(()->unit),
 ?start:bool, ?append:bool, ?perm:int,
 ?dir_perm:int, ?reopen_delay:float,
 ?reopen_on_metadata:bool, ?reopen_when:(()->bool),
 string, source)->source

Output the source's stream as a file, using an external encoding process.

output.file.mp3
(?id:string, ?samplerate:int, ?bitrate:int,
 ?quality:int, ?stereo:bool, ?append:bool,
 ?perm:int, ?dir_perm:int, ?reopen_delay:float,
 ?reopen_on_metadata:bool, ?reopen_when:(()->bool),
 string, ?fallible:bool, ?on_start:(()->unit),
 ?on_stop:(()->unit), ?start:bool, source)->source

Output the source's stream as an MP3 file.

output.file.speex
(?id:string, ?samplerate:int, ?bitrate:int,
 ?quality:int, ?mode:string, ?stereo:bool,
 ?vbr:bool, ?frames_per_packet:int, ?complexity:int,
 ?abr:int, ?skeleton:bool, ?append:bool, ?perm:int,
 ?dir_perm:int, ?reopen_delay:float,
 ?reopen_on_metadata:bool, ?reopen_when:(()->bool),
 string, ?fallible:bool, ?on_start:(()->unit),
 ?on_stop:(()->unit), ?start:bool, source)->source

Output the source stream as an Ogg speex file.

output.file.theora
(?id:string, ?quality:int, ?vorbis_quality:float,
 ?skeleton:bool, ?append:bool, ?perm:int,
 ?dir_perm:int, ?reopen_delay:float,
 ?reopen_on_metadata:bool, ?reopen_when:(()->bool),
 string, ?fallible:bool, ?on_start:(()->unit),
 ?on_stop:(()->unit), ?start:bool, source)->source

Output the source's stream as an ogg/theora file.

output.file.vorbis
(?id:string, ?samplerate:int, ?stereo:bool,
 ?skeleton:bool, ?start:bool, ?quality:float,
 ?append:bool, ?perm:int, ?dir_perm:int,
 ?reopen_delay:float, ?reopen_on_metadata:bool,
 ?reopen_when:(()->bool), string, ?fallible:bool,
 ?on_start:(()->unit), ?on_stop:(()->unit),
 ?start:bool, source)->source

Output the source stream as an Ogg Vorbis file in Variable BitRate mode.

output.file.vorbis.abr
(?id:string, ?samplerate:int, ?stereo:bool,
 ?skeleton:bool, ?append:bool, ?perm:int,
 ?dir_perm:int, ?reopen_delay:float,
 ?reopen_on_metadata:bool, ?reopen_when:(()->bool),
 string, ?fallible:bool, ?on_start:(()->unit),
 ?on_stop:(()->unit), ?start:bool, ?bitrate:int,
 ?min_bitrate:int, ?max_bitrate:int, source)
 ->source

Output the source stream as an Ogg Vorbis file in Average BitRate mode.

output.file.vorbis.cbr
(?id:string, ?samplerate:int, ?stereo:bool,
 ?skeleton:bool, ?start:bool, ?bitrate:int,
 ?append:bool, ?perm:int, ?dir_perm:int,
 ?reopen_delay:float, ?reopen_on_metadata:bool,
 ?reopen_when:(()->bool), string, ?fallible:bool,
 ?on_start:(()->unit), ?on_stop:(()->unit),
 ?start:bool, source)->source

Output the source stream as an Ogg Vorbis file in Constant BitRate mode.

output.file.wav
(?id:string, ?append:bool, ?perm:int, ?dir_perm:int,
 ?reopen_delay:float, ?reopen_on_metadata:bool,
 ?reopen_when:(()->bool), string, ?fallible:bool,
 ?on_start:(()->unit), ?on_stop:(()->unit),
 ?start:bool, source)->source

Output the source's stream to a WAV file.

output.icecast.aacplus
(?id:string, ?restart:bool, ?restart_delay:int,
 ?mount:string, ?name:string, ?protocol:string,
 ?host:string, ?port:int, ?user:string,
 ?password:string, ?genre:string, ?url:string,
 ?description:string, ?public:bool,
 ?headers:[(string*string)], ?format:string,
 ?dumpfile:string, ?fallible:bool,
 ?on_start:(()->unit), ?on_stop:(()->unit),
 ?start:bool, ?samplerate:int, ?bitrate:int, source)
 ->source

Output the source's stream to an icecast2-compatible server in AAC+ format.

output.icecast.aacplusenc
(?id:string, ?start:bool, ?restart:bool,
 ?restart_delay:int, ?host:string, ?port:int,
 ?user:string, ?password:string, ?genre:string,
 ?url:string, ?description:string, ?public:bool,
 ?dumpfile:string, ?mount:string, ?name:string,
 ?protocol:string, ?aacplusenc:string, ?bitrate:int,
 ?fallible:bool, ?on_start:(()->unit),
 ?on_stop:(()->unit), ?restart_on_crash:bool,
 ?restart_on_new_track:bool,
 ?restart_encoder_delay:int,
 ?headers:[(string*string)], source)->source

Output to icecast using the aacplusenc command line encoder.

output.icecast.external
(?id:string, ?restart:bool, ?restart_delay:int,
 ?mount:string, ?name:string, ?protocol:string,
 ?host:string, ?port:int, ?user:string,
 ?password:string, ?genre:string, ?url:string,
 ?description:string, ?public:bool,
 ?headers:[(string*string)], ?format:string,
 ?dumpfile:string,
 ~process:(([(string*string)])->string),
 ?samplerate:int, ?header:bool,
 ?restart_on_crash:bool, ?restart_on_new_track:bool,
 ?restart_encoder_delay:int, ?fallible:bool,
 ?on_start:(()->unit), ?on_stop:(()->unit),
 ?start:bool, ?bitrate:int, ?quality:float,
 ?channels:int, ?icy_metadata:bool, source)->source

Output the source's stream to an Icecast2 compatible server using an external encoder.

output.icecast.flac
(?id:string, ?start:bool, ?restart:bool,
 ?restart_delay:int, ?host:string, ?port:int,
 ?user:string, ?password:string, ?genre:string,
 ?url:string, ?description:string, ?public:bool,
 ?dumpfile:string, ?mount:string, ?name:string,
 ?protocol:string, ?flac:string, ?quality:int,
 ?restart_on_crash:bool, ?restart_on_new_track:bool,
 ?restart_encoder_delay:int, ?fallible:bool,
 ?on_start:(()->unit), ?on_stop:(()->unit), source)
 ->source

Output to icecast using the flac command line encoder.

output.icecast.lame
(?id:string, ?start:bool, ?restart:bool,
 ?restart_delay:int, ?host:string, ?port:int,
 ?user:string, ?password:string, ?genre:string,
 ?url:string, ?description:string, ?public:bool,
 ?dumpfile:string, ?mount:string, ?name:string,
 ?protocol:string, ?lame:string, ?bitrate:int,
 ?swap:bool, ?fallible:bool, ?on_start:(()->unit),
 ?on_stop:(()->unit), ?restart_on_crash:bool,
 ?restart_on_new_track:bool,
 ?restart_encoder_delay:int,
 ?headers:[(string*string)], source)->source

Output to icecast using the lame command line encoder.

output.icecast.mp3
(?id:string, ?restart:bool, ?restart_delay:int,
 ?mount:string, ?name:string, ?protocol:string,
 ?host:string, ?port:int, ?user:string,
 ?password:string, ?genre:string, ?url:string,
 ?description:string, ?public:bool,
 ?headers:[(string*string)], ?format:string,
 ?dumpfile:string, ?fallible:bool,
 ?on_start:(()->unit), ?on_stop:(()->unit),
 ?start:bool, ?samplerate:int, ?bitrate:int,
 ?quality:int, ?stereo:bool, source)->source

Output the source's stream to an icecast2-compatible server in MP3 format.

output.icecast.speex
(?id:string, ?samplerate:int, ?bitrate:int,
 ?quality:int, ?mode:string, ?stereo:bool,
 ?vbr:bool, ?frames_per_packet:int, ?complexity:int,
 ?abr:int, ?skeleton:bool, ?restart:bool,
 ?restart_delay:int, ?mount:string, ?name:string,
 ?protocol:string, ?host:string, ?port:int,
 ?user:string, ?password:string, ?genre:string,
 ?url:string, ?description:string, ?public:bool,
 ?headers:[(string*string)], ?format:string,
 ?dumpfile:string, ?fallible:bool,
 ?on_start:(()->unit), ?on_stop:(()->unit),
 ?start:bool, source)->source

Output the source stream as an Ogg Speex stream to an Icecast-compatible server.

output.icecast.theora
(?id:string, ?quality:int, ?vorbis_quality:float,
 ?skeleton:bool, ?restart:bool, ?restart_delay:int,
 ?mount:string, ?name:string, ?protocol:string,
 ?host:string, ?port:int, ?user:string,
 ?password:string, ?genre:string, ?url:string,
 ?description:string, ?public:bool,
 ?headers:[(string*string)], ?format:string,
 ?dumpfile:string, ?fallible:bool,
 ?on_start:(()->unit), ?on_stop:(()->unit),
 ?start:bool, source)->source

Output the source stream as an Ogg Theora stream to an Icecast-compatible.

output.icecast.vorbis
(?id:string, ?samplerate:int, ?stereo:bool,
 ?skeleton:bool, ?restart:bool, ?restart_delay:int,
 ?mount:string, ?name:string, ?protocol:string,
 ?host:string, ?port:int, ?user:string,
 ?password:string, ?genre:string, ?url:string,
 ?description:string, ?public:bool,
 ?headers:[(string*string)], ?format:string,
 ?dumpfile:string, ?fallible:bool,
 ?on_start:(()->unit), ?on_stop:(()->unit),
 ?start:bool, source, ?quality:float)->source

Output the source stream as an Ogg Vorbis stream to an Icecast-compatible server in Variable BitRate mode.

output.icecast.vorbis.abr
(?id:string, ?samplerate:int, ?stereo:bool,
 ?skeleton:bool, ?restart:bool, ?restart_delay:int,
 ?mount:string, ?name:string, ?protocol:string,
 ?host:string, ?port:int, ?user:string,
 ?password:string, ?genre:string, ?url:string,
 ?description:string, ?public:bool,
 ?headers:[(string*string)], ?format:string,
 ?dumpfile:string, ?fallible:bool,
 ?on_start:(()->unit), ?on_stop:(()->unit),
 ?start:bool, source, ?bitrate:int,
 ?min_bitrate:int, ?max_bitrate:int)->source

Output the source stream as an Ogg Vorbis stream to an Icecast-compatible server in Average BitRate mode.

output.icecast.vorbis.cbr
(?id:string, ?samplerate:int, ?stereo:bool,
 ?skeleton:bool, ?restart:bool, ?restart_delay:int,
 ?mount:string, ?name:string, ?protocol:string,
 ?host:string, ?port:int, ?user:string,
 ?password:string, ?genre:string, ?url:string,
 ?description:string, ?public:bool,
 ?headers:[(string*string)], ?format:string,
 ?dumpfile:string, ?fallible:bool,
 ?on_start:(()->unit), ?on_stop:(()->unit),
 ?start:bool, source, ?bitrate:int)->source

Output the source stream as an Ogg Vorbis stream to an Icecast-compatible server in Constant BitRate mode.

output.jack
(?id:string, ?fallible:bool, ?on_start:(()->unit),
 ?on_stop:(()->unit), ?start:bool, ?buffer_size:int,
 ?server:string, source)->source

Output stream to jack.

output.jack.legacy
(?id:string, ?ports:[string], ?synchronize:bool,
 source)->source

WARNING: This is DEPRECATED!

Deprecated jack output.

output.marshal
(?id:string, ?reopen:bool, string, source)->source

WARNING: This is only EXPERIMENTAL!

Output the source's stream to a pipe using marshaling.

output.oss
(?id:string, ?device:string, source)->source

Output the source's stream to an OSS output device.

output.pipe.external
(?id:string, ?start:bool,
 ~process:(([(string*string)])->string),
 ?samplerate:int, ?header:bool,
 ?restart_on_crash:bool, ?restart_on_new_track:bool,
 ?restart_encoder_delay:int, ?fallible:bool,
 ?on_start:(()->unit), ?on_stop:(()->unit),
 ?start:bool, source)->source

Output the source's stream to an external process.

output.portaudio
(?id:string, ?buflen:int, source)->source

Output the source's stream to a portaudio output device.

output.prefered
(?id:string, source)->source

Output to local audio card using the first available driver in this list: ao, pulseaudio, alsa, oss, dummy

output.pulseaudio
(?id:string, ?client:string, ?device:string, source)
 ->source

Output the source's stream to a portaudio output device.

output.shoutcast.aacplus
(?id:string, ?start:bool, ?restart:bool,
 ?restart_delay:int, ?host:string, ?port:int,
 ?user:string, ?password:string, ?genre:string,
 ?url:string, ?description:string, ?public:bool,
 ?dumpfile:string, ?name:string, ?aim:string,
 ?icq:string, ?irc:string, ?icy_reset:bool,
 ?bitrate:int, ?samplerate:int, ?fallible:bool,
 ?on_start:(()->unit), ?on_stop:(()->unit),
 ?format:string, source)->source

Output to shoutcast using the AAC+ format.

output.shoutcast.aacplusenc
(?id:string, ?start:bool, ?restart:bool,
 ?restart_delay:int, ?host:string, ?port:int,
 ?user:string, ?password:string, ?genre:string,
 ?url:string, ?description:string, ?public:bool,
 ?fallible:bool, ?on_start:(()->unit),
 ?on_stop:(()->unit), ?dumpfile:string,
 ?name:string, ?icy_reset:bool, ?aim:string,
 ?icq:string, ?irc:string, ?aacplusenc:string,
 ?restart_on_crash:bool, ?restart_on_new_track:bool,
 ?restart_encoder_delay:int, ?bitrate:int, source)
 ->source

Output to shoutcast using the aacplusenc encoder.

output.shoutcast.lame
(?id:string, ?start:bool, ?restart:bool,
 ?restart_delay:int, ?host:string, ?port:int,
 ?user:string, ?password:string, ?genre:string,
 ?url:string, ?description:string, ?public:bool,
 ?dumpfile:string, ?name:string, ?icy_reset:bool,
 ?lame:string, ?aim:string, ?icq:string,
 ?irc:string, ?fallible:bool, ?on_start:(()->unit),
 ?on_stop:(()->unit), ?restart_on_crash:bool,
 ?restart_on_new_track:bool,
 ?restart_encoder_delay:int, ?bitrate:int, source)
 ->source

Output to shoutcast using the lame encoder.

output.shoutcast.mp3
(?id:string, ?start:bool, ?restart:bool,
 ?restart_delay:int, ?host:string, ?port:int,
 ?user:string, ?password:string, ?genre:string,
 ?url:string, ?description:string, ?public:bool,
 ?dumpfile:string, ?name:string, ?aim:string,
 ?icq:string, ?irc:string, ?icy_reset:bool,
 ?bitrate:int, ?samplerate:int, ?stereo:bool,
 ?fallible:bool, ?on_start:(()->unit),
 ?on_stop:(()->unit), source)->source

Output to shoutcast using the MP3 format.

Source / Sound Processing

accelerate
(?id:string, float, ?before:float, ?after:float,
 source)->source

WARNING: This is only EXPERIMENTAL!

Accelerates a stream, possibly only the middle of the tracks. Useful for testing transitions.

add
(?id:string, ?normalize:bool, ?weights:[int],
 [source])->source

Mix sources, with optional normalization. Only relay metadata from the first source that is effectively summed.

amplify
(?id:string, 'a, ?override:string,
 source)->source where 'a is either float or ()
 ->float

Multiply the amplitude of the signal.

bpm
(?id:string, ?every:int, source)->source

WARNING: This is only EXPERIMENTAL!

Detect the BPM.

clip
(?id:string, ?min:float, ?max:float, source)
 ->source

Clip sound.

comb
(?id:string, ?delay:float, ?feedback:'a,
 source)->source where 'a is either float or ()
 ->float

Comb filter.

compand
(?id:string, ?mu:float, source)->source

Compand the signal

compress
(?id:string, ?ratio:float, ?attack:'a, ?release:'b,
 ?threshold:'c, ?knee:'d, ?rms_window:float,
 ?gain:'e, ?debug:bool, source)->source where 'a,
 'b, 'c, 'd, 'e is either float or ()->float

Compress the signal.

compress.exponential
(?id:string, ?mu:float, source)->source

Exponential compressor.

cross
(?id:string, ?duration:float, ?override:string,
 ?inhibit:float, ?minimum:float, ?conservative:bool,
 ((source, source)->source), source)->source

Generic cross operator, allowing the composition of the N last seconds of a track with the beginning of the next track.

echo
(?id:string, ?delay:float, ?feedback:'a,
 source)->source where 'a is either float or ()
 ->float

Add echo.

fade.final
(?id:string, ?duration:float, ?type:string, source)
 ->source

Fade a stream to silence.

fade.in
(?id:string, ?override:string, ?duration:float,
 ?type:string, source)->source

Fade the beginning of tracks. Metadata 'liq_fade_in' can be used to set the duration for a specific track (float in seconds).

fade.initial
(?id:string, ?duration:float, ?type:string, source)
 ->source

Fade the beginning of a stream.

fade.out
(?id:string, ?override:string, ?duration:float,
 ?type:string, source)->source

Fade the end of tracks. Metadata 'liq_fade_out' can be used to set the duration for a specific track (float in seconds).

filter
(?id:string, ~freq:'a, ?q:'b, ~mode:string,
 ?wetness:'c, source)->source where 'a, 'b,
 'c is either float or ()->float

Perform several kinds of filtering on the signal

filter.fir
(?id:string, ~frequency:float, ~beta:float,
 ?coeffs:int, ?debug:bool, source)->source

Low-pass FIR filter.

filter.iir.butterworth.bandpass
(?id:string, ~frequency1:float, ~frequency2:float,
 ?order:int, ?debug:bool, source)->source

IIR filter

filter.iir.butterworth.bandstop
(?id:string, ~frequency1:float, ~frequency2:float,
 ?order:int, ?debug:bool, source)->source

IIR filter

filter.iir.butterworth.high
(?id:string, ~frequency:float, ?order:int,
 ?debug:bool, source)->source

IIR filter

filter.iir.butterworth.low
(?id:string, ~frequency:float, ?order:int,
 ?debug:bool, source)->source

IIR filter

filter.iir.eq.allpass
(?id:string, ~frequency:float, ?bandwidth:float,
 ?debug:bool, source)->source

All pass biquad filter.

filter.iir.eq.bandpass
(?id:string, ~frequency:float, ?q:float,
 ?debug:bool, source)->source

Band pass biquad filter.

filter.iir.eq.high
(?id:string, ~frequency:float, ?q:float,
 ?debug:bool, source)->source

High pass biquad filter.

filter.iir.eq.highshelf
(?id:string, ~frequency:float, ?slope:float,
 ?debug:bool, source)->source

High shelf biquad filter.

filter.iir.eq.low
(?id:string, ~frequency:float, ?q:float,
 ?debug:bool, source)->source

Low pass biquad filter.

filter.iir.eq.lowshelf
(?id:string, ~frequency:float, ?slope:float,
 ?debug:bool, source)->source

Low shelf biquad filter.

filter.iir.eq.notch
(?id:string, ~frequency:float, ?q:float,
 ?debug:bool, source)->source

Band pass biquad filter.

filter.iir.eq.peak
(?id:string, ~frequency:float, ?q:float,
 ?gain:float, ?debug:bool, source)->source

Peak EQ biquad filter.

filter.iir.resonator.allpass
(?id:string, ~frequency:float, ?q:float,
 ?debug:bool, source)->source

IIR filter

filter.iir.resonator.bandpass
(?id:string, ~frequency:float, ?q:float,
 ?debug:bool, source)->source

IIR filter

filter.iir.resonator.bandstop
(?id:string, ~frequency:float, ?q:float,
 ?debug:bool, source)->source

IIR filter

flanger
(?id:string, ?delay:float, ?freq:'a, ?feedback:'b,
 ?phase:'c, source)->source where 'a, 'b,
 'c is either float or ()->float

Flanger effect.

helium
(source)->source

Increases the pitch, making voices sound like on helium.

insert_metadata
(?id:string, source)->source

Interactively insert metadata using the command ID.insert key1="val1",key2="val2",....

lag
(?id:string, float, source)->source

Add a constant delay to a stream, filling with blank when not available. This operator should be used just before the final output.

limit
(?id:string, ?ratio:float, ?attack:'a, ?release:'b,
 ?threshold:'c, ?knee:'d, ?rms_window:float,
 ?gain:'e, ?debug:bool, source)->source where 'a,
 'b, 'c, 'd, 'e is either float or ()->float

Limit the signal.

mean
(?id:string, ?channels:[int], source)->source

Compute the mean of a list of audio channels and use it for all of them.

mic_filter
(source)->source

Remove low frequencies often produced by microphones.

mix
(?id:string, [source])->source

Mixing table controllable via the telnet interface.

normalize
(?id:string, ?target:'a, ?window:float, ?k_up:'b,
 ?k_down:'c, ?threshold:'d, ?gain_min:'e,
 ?gain_max:'f, ?debug:bool,
 source)->source where 'a, 'b, 'c, 'd, 'e,
 'f is either float or ()->float

Normalize the signal. Dynamic normalization of the signal is sometimes the only option, and can make a listening experience much nicer. However, its dynamic aspect implies some limitations which can go as far as creating saturation in some extreme cases. If possible, consider using some track-based normalization techniques such as those based on replay gain. See the documentation for more details.

nrj
(source)->source

Compress and normalize, producing a more uniform and “full” sound.

resample
(?id:string, ~ratio:'a,
 source)->source where 'a is either float or ()
 ->float

Resample source's sound using a resampling factor

sky
(source)->source

Multiband-compression.

smart_cross
(?id:string, ?duration:float, ?inhibit:float,
 ?minimum:float, ?width:float, ?conservative:bool,
 ((float, float, [(string*string)],
 [(string*string)], source, source)->source),
 source)->source

Cross operator, allowing the composition of the N last seconds of a track with the beginning of the next track, using a transition function depending on the relative power of the signal before and after the end of track.

soundtouch
(?id:string, ?rate:'a, ?tempo:'b, ?pitch:'c,
 source)->source where 'a, 'b,
 'c is either float or ()->float

WARNING: This is only EXPERIMENTAL!

Change the rate, the tempo or the pitch of the sound.

stereo.ms.decode
(?id:string, ?width:float, source)->source

Decode mid+side stereo (M/S) to left+right stereo.

stereo.ms.encode
(?id:string, source)->source

Encode left+right stereo to mid+side stereo (M/S).

stereo.pan
(?id:string, ?pan:'a, ?field:'b,
 source)->source where 'a, 'b is either float or ()
 ->float

Pan a stereo sound.

substract
(?id:string, source, source)->source

Compute the difference y-x of two sources y and x.

swap
(?id:string, ?chan1:int, ?chan2:int, source)
 ->source

swap two channels

Source / Sound Synthesis

synth.all.hammond
(?id:string, ?attack:float, ?decay:float,
 ?sustain:float, ?release:float, source)->source

Hammond synthsizer. It creates one synthesizer for each channel.

synth.all.saw
(?id:string, ?attack:float, ?decay:float,
 ?sustain:float, ?release:float, source)->source

Saw synthesizer. It creates one synthesizer for each channel.

synth.all.sine
(?id:string, ?attack:float, ?decay:float,
 ?sustain:float, ?release:float, source)->source

Sine synthesizer. It creates one synthesizer for each channel.

synth.all.square
(?id:string, ?attack:float, ?decay:float,
 ?sustain:float, ?release:float, source)->source

Square synthesizer. It creates one synthesizer for each channel.

synth.hammond
(?id:string, ?channel:int, ?volume:float,
 ?attack:float, ?decay:float, ?sustain:float,
 ?release:float, source)->source

Hammond synthsizer.

synth.saw
(?id:string, ?channel:int, ?volume:float,
 ?attack:float, ?decay:float, ?sustain:float,
 ?release:float, source)->source

Saw synthesizer.

synth.sine
(?id:string, ?channel:int, ?volume:float,
 ?attack:float, ?decay:float, ?sustain:float,
 ?release:float, source)->source

Sine synthesizer.

synth.square
(?id:string, ?channel:int, ?volume:float,
 ?attack:float, ?decay:float, ?sustain:float,
 ?release:float, source)->source

Square synthesizer.

Source / Track Processing

append
(?id:string, ?merge:bool, ?insert_missing:bool,
 source, (([(string*string)])->source))->source

Append an extra track to every track. Set the metadata 'liq_append' to 'false' to inhibit appending on one track.

at
((()->bool), source)->source

Restrict a source to play only when a predicate is true.

clear_metadata
(source)->source

Removes all metadata coming from a source

crossfade
(~start_next:float, ~fade_in:float, ~fade_out:float,
 source)->source

Simple crossfade.

delay
(?id:string, float, source)->source

Prevents the child from being ready again too fast after a end of track

eat_blank
(?id:string, ?at_beginning:bool, ?threshold:float,
 ?length:float, source)->source

Eat blanks, i.e., drop the contents of the stream until it is not blank anymore.

fallback
(?id:string, ?track_sensitive:bool,
 ?replay_metadata:bool, ?before:float,
 ?transitions:[(source, source)->source], [source])
 ->source

At the beginning of each track, select the first ready child.

fallback.skip
(~input:source, source)->source

Special track insensitive fallback that always skip current song before switching.

map_metadata
(?id:string,
 (([(string*string)])->[(string*string)]),
 ?update:bool, ?strip:bool, ?insert_missing:bool,
 source)->source

Rewrite metadata on the fly using a function.

on_blank
(?id:string, (()->unit), ?on_noise:(()->unit),
 ?threshold:float, ?length:float, source)->source

Calls a given handler when detecting a blank.

on_end
(?id:string, ?delay:float, ((float,
 [(string*string)])->unit), source)->source

Call a given handler when there is less than a given amount of time remaining before then end of track.

on_metadata
(?id:string, (([(string*string)])->unit), source)
 ->source

Call a given handler on metadata packets.

on_track
(?id:string, (([(string*string)])->unit), source)
 ->source

Call a given handler on new tracks.

once
(source)->source

Creates a source that plays only one track of the input source.

prepend
(?id:string, ?merge:bool, source,
 (([(string*string)])->source))->source

Prepend an extra track before every track. Set the metadata 'liq_prepend' to 'false' to inhibit prepending on one track.

random
(?id:string, ?track_sensitive:bool,
 ?replay_metadata:bool, ?before:float,
 ?transitions:[(source, source)->source],
 ?weights:[int], [source])->source

At the beginning of every track, select a random ready child.

rewrite_metadata
([(string*string)], ?insert_missing:bool,
 ?update:bool, ?strip:bool, source)->source

Rewrite metadata on the fly using a list of (target,rules).

rotate
(?id:string, ?track_sensitive:bool,
 ?replay_metadata:bool, ?before:float,
 ?transitions:[(source, source)->source],
 ?weights:[int], [source])->source

Rotate between the sources.

say_metadata
(source, ?pattern:string)->source

Append speech-synthesized tracks reading the metadata.

sequence
(?id:string, ?merge:bool, [source])->source

Play only one track of every successive source, except for the last one which is played as much as available.

skip_blank
(?id:string, ?threshold:float, ?length:float,
 source)->source

Skip track when detecting a blank.

smart_crossfade
(?start_next:float, ?fade_in:float, ?fade_out:float,
 ?default:((source, source)->source), ?high:float,
 ?medium:float, ?margin:float, ?width:float,
 ?conservative:bool, source)->source

Crossfade between tracks, taking the respective volume levels into account in the choice of the transition.

smooth_add
(?delay:float, ?p:float, ~normal:source,
 ~special:source)->source

Mixes two streams, with faded transitions between the state when only the normal stream is available and when the special stream gets added on top of it.

store_metadata
(?id:string, ?size:int, source)->source

Keep track of the last N metadata packets in the stream, and make the history available via a server command.

strip_blank
(?id:string, ?threshold:float, ?length:float,
 source)->source

Make the source unavailable when it is streaming blank.

switch
(?id:string, ?track_sensitive:bool,
 ?replay_metadata:bool, ?before:float,
 ?transitions:[(source, source)->source],
 ?single:[bool], [((()->bool)*source)])->source

At the beginning of a track, select the first source whose predicate is true.

Source / Video Processing

video.fade.final
(?id:string, ?duration:float, ?transition:string,
 ?type:string, source)->source

Fade a stream to black.

video.fade.in
(?id:string, ?override:string, ?duration:float,
 ?transition:string, ?type:string, source)->source

Fade the beginning of tracks. Metadata 'liq_video_fade_in' can be used to set the duration for a specific track (float in seconds).

video.fade.initial
(?id:string, ?duration:float, ?transition:string,
 ?type:string, source)->source

Fade the beginning of a stream.

video.fade.out
(?id:string, ?override:string, ?duration:float,
 ?transition:string, ?type:string, source)->source

Fade the end of tracks. Metadata 'liq_video_fade_out' can be used to set the duration for a specific track (float in seconds).

video.fill
(?id:string, ?color:int, source)->source

Fill frame with a color.

video.greyscale
(?id:string, source)->source

Convert video to greyscale.

video.invert
(?id:string, source)->source

Invert video.

video.lomo
(?id:string, source)->source

Emulate the “Lomo effect”.

video.opacity
(?id:string, float, source)->source

Scale opacity of video.

video.opacity.blur
(?id:string, source)->source

Blur opacity of video.

video.rotate
(?id:string, ?angle:float, ?speed:float, source)
 ->source

Rotate video.

video.scale
(?id:string, ?coef:float, ?coef_x:float,
 ?coef_y:float, ?offset_x:int, ?offset_y:int,
 source)->source

Scale and translate video.

video.sepia
(?id:string, source)->source

Convert video to sepia.

video.tile
(?id:string, ?normalize:bool, ?weights:[int],
 ?proportional:bool, [source])->source

Tile sources (same as add but produces tiles of videos).

video.transparent
(?id:string, ?precision:float, ?color:int, source)
 ->source

Set a color to be transparent.

Source / Visualization

video.volume
(?id:string, source)->source

Graphical visualization of the sound.

visu.glvolume
(?id:string, source)->source

Graphical visualization of the volume using openGL.

vumeter
(?id:string, ?scroll:bool, source)->source

VU meter (display the volume).

Bool

!=
('a, 'a)->bool where 'a is an orderable type

Comparison of comparable values.

<
('a, 'a)->bool where 'a is an orderable type

Comparison of comparable values.

<=
('a, 'a)->bool where 'a is an orderable type

Comparison of comparable values.

==
('a, 'a)->bool where 'a is an orderable type

Comparison of comparable values.

>
('a, 'a)->bool where 'a is an orderable type

Comparison of comparable values.

>=
('a, 'a)->bool where 'a is an orderable type

Comparison of comparable values.

and
(bool, bool)->bool

Return the conjunction of its arguments

not
(bool)->bool

Returns the negation of its argument.

or
(bool, bool)->bool

Return the disjunction of its arguments

random.bool
()->bool

Generate a random value.

Control

add_timeout
(?fast:bool, float, (()->float))->unit

Call a function in N seconds. If the result of the function is a positive or null integer, the task will be scheduled after this amount of time (in seconds.)

ignore
('a)->unit

Convert anything to unit, preventing warnings.

Deprecated

request
(string)->request

Backward compatible function for request.create().

Interaction

audioscrobbler.nowplaying
(~user:string, ~password:string, ?host:string,
 ?port:int, ?length:bool, [(string*string)])->unit

Submit a now playing song using the audioscrobbler protocol.

audioscrobbler.submit
(?source:string, ~user:string, ~password:string,
 ?host:string, ?port:int, ?length:bool,
 [(string*string)])->unit

Submit a played song using the audioscrobbler protocol.

audioscrobbler.submit.full
(~user:string, ~password:string, ?host:string,
 ?port:int, ?source:string, ?length:bool,
 ?delay:float, ?force:bool, source)->source

Submit songs using audioscrobbler, respecting the full protocol: First signal song as now playing when starting, and then submit song when it ends.

interactive.float
(string, float)->()->float

Read a float from an interactive input.

interactive.string
(string, string)->()->string

Read a string from an interactive input.

lastfm.nowplaying
(~user:string, ~password:string, ?length:bool,
 [(string*string)])->unit

Submit metadata to lastfm.fm using the audioscrobbler protocol (nowplaying mode).

lastfm.submit
(~user:string, ~password:string, ?source:string,
 ?length:bool, [(string*string)])->unit

Submit metadata to lastfm.fm using the audioscrobbler protocol.

lastfm.submit.full
(~user:string, ~password:string, ?source:string,
 ?length:bool, ?delay:float, ?force:bool, source)
 ->source

Submit songs to lastfm using audioscrobbler, respecting the full protocol: First signal song as now playing when starting, and then submit song when it ends.

librefm.nowplaying
(~user:string, ~password:string, ?length:bool,
 [(string*string)])->unit

Submit metadata to libre.fm using the audioscrobbler protocol (nowplaying mode).

librefm.submit
(~user:string, ~password:string, ?source:string,
 ?length:bool, [(string*string)])->unit

Submit metadata to libre.fm using the audioscrobbler protocol.

librefm.submit.full
(~user:string, ~password:string, ?source:string,
 ?length:bool, ?delay:float, ?force:bool, source)
 ->source

Submit songs to librefm using audioscrobbler, respecting the full protocol: First signal song as now playing when starting, and then submit song when it ends.

print
(?newline:bool, 'a)->unit

Print on standard output.

Liquidsoap

add_decoder
(string, ((string)->string))->unit

Register an external file decoder. The encoder should output in WAV format to his standard output (stdout).

add_metadata_resolver
(string, ((~format:string,
 string)->[(string*string)]))->unit

Register an external file metadata decoder.

add_protocol
(?temporary:bool, string, ((string,
 float)->[string]))->unit

Register a new protocol.

configure.libdir
string

Liquidsoap's library directory.

configure.logdir
string

Liquidsoap's logging directory.

configure.rundir
string

Liquidsoap's PID file directory.

enable_faad
()->unit

Enable faad decoding (needs faad binary in path)

enable_gstreamer
(?debug:bool)->unit

Enable gstreamer decoder (needs gst-launch binary in path)

enable_mplayer
(?debug:bool)->unit

Enable mplayer decoder (needs mplayer binary in path)

enable_replaygain_metadata
(?extract_replaygain:string)->unit

Enable replay gain metadata resolver. This resolver will process any file decoded by liquidsoap and add a replay_gain metadata when this value could be computed. For a finer-grained replay gain processing, use the replay_gain protocol.

execute
(string, ?string)->[string]

WARNING: This is DEPRECATED!

Execute a liquidsoap server command. This operator is deprecated, in favor of 'server.execute'.

file.duration
(string)->float

Compute the duration in seconds of audio data contained in a file. The computation may be expensive. Returns -1. if computation failed, typically if the file was not recognized as valid audio.

file.mime
(string)->string

Get the MIME type of a file, according to libmagic.

get
(~default:'a, string)
 ->'a where 'a is bool, int, float, string or [string]

Get a setting's value.

liquidsoap.version
string

Liquidsoap version string.

playlist.parse
(string)->[([(string*string)]*string)]

Try to parse a local playlist. Return a list of (metadata,URI) items, where metadata is a list of (key,value) bindings.

request.create
(?indicators:[string], ?persistent:bool,
 ?audio:bool, string)->request

Create a request. Creation may fail if there is no available RID, which cannot be detected currently: in that case one will obtain a request that will fail to be resolved.

request.destroy
(?force:bool, request)->unit

Destroying a request causes any temporary associated file to be deleted, and releases its RID. Persistent requests resist to destroying, unless forced.

request.filename
(request)->string

Return a valid local filename if the request is ready, and the empty string otherwise.

request.ready
(request)->bool

Check if a request is ready, i.e. is associated to a valid local file. Unless the initial URI was such a file, a request has to be resolved before being ready.

request.resolve
(?timeout:float, request)->bool

Resolve a request, i.e. attempt to get a valid local file. The operation can take some time. Return true if the resolving was successful, false otherwise (timeout or invalid URI).

server.execute
(string, ?string)->[string]

Execute a liquidsoap server command.

set
(string, 'a)
 ->unit where 'a is bool, int, float, string or [string]

Change some setting. Use liquidsoap --conf-descr and liquidsoap --conf-descr-key KEY on the command-line to get some information about available settings.

shutdown
()->unit

Shutdown the application.

source.id
(source)->string

Get one source's identifier.

source.skip
(source)->unit

Skip to the next track.

List

_[_]
(string, [(string*string)])->string

l[k] returns the first v such that (k,v) is in the list l.

fst
(('a*'b))->'a

Get the first component of a pair.

list.append
(['a], ['a])->['a]

Catenate two lists.

list.assoc
(string, [(string*string)])->string

Alias for the l[k] notation.

list.fold
((('a, 'b)->'a), 'a, ['b])->'a

Fold a function on every element of a list.

list.hd
([string])->string

Return the head (first element) of a list, or “” if the list is empty.

list.iter
((('a)->unit), ['a])->unit

Call a function on every element of a list.

list.length
(['a])->int

Get the length of a list, i.e. its number of elements.

list.map
((('a)->'b), ['a])->['b]

Map a function on every element of a list.

list.mem
('a, ['a])->bool where 'a is an orderable type

Check if an element belongs to a list.

list.mem_assoc
(string, [(string*string)])->bool

list.mem_assoc(key,l) returns true if l contains a pair (key,value)

list.nth
(['a], int)->'a

Get the n-th element of a list.

list.remove
('a, ['a])->['a]

Remove a value from a list.

list.remove_assoc
(string, [(string*string)])->[(string*string)]

Remove a pair from an associative list

list.rev
(['a])->['a]

Revert list order.

list.sort
((('a, 'a)->int), ['a])->['a]

Sort a list according to a comparison function.

list.tl
(['a])->['a]

Return the list without its first element.

snd
(('a*'b))->'b

Get the second component of a pair.

Math

*
('a, 'a)->'a where 'a is a number type

Multiplication of numbers.

+
('a, 'a)->'a where 'a is a number type

Addition of numbers.

-
('a, 'a)->'a where 'a is a number type

Substraction of numbers.

/
('a, 'a)->'a where 'a is a number type

Division of numbers.

abs
('a)->'a where 'a is a number type

Absolute value.

bool_of_float
(float)->bool

Convert a float to a bool.

bool_of_int
(int)->bool

Convert an int to a bool.

dB_of_lin
(float)->float

Convert linear scale into decibels.

float_of_int
(int)->float

Convert an int to a float.

int_of_float
(float)->int

Convert a float to a int.

lin_of_dB
(float)->float

Convert decibels into linear scale.

pow
('a, 'a)->'a where 'a is a number type

Exponentiation of numbers.

random.float
(?min:float, ?max:float)->float

Generate a random value.

~-
('a)->'a where 'a is a number type

Returns the opposite of its argument.

String

%
(string, [(string*string)])->string

pattern % [...,(k,v),...] changes in the pattern occurences of: - $(k) into v; - $(if $(k2),"a","b") into “a” if k2 is found in the list, “b” otherwise.

^
(string, string)->string

Concatenate strings.

bool_of_string
(?default:bool, string)->bool

Convert a string to a bool.

float_of_string
(?default:float, string)->float

Convert a string to a float.

int_of_string
(?default:int, string)->int

Convert a string to a int.

lastfm.uri
(?user:string, ?password:string, ?discovery:bool,
 ?string)->string

Utility to compose last.fm URIs.

quote
(string)->string

Escape shell metacharacters.

string.capitalize
(?capitalize:bool, ?space_sensitive:bool, string)
 ->string

Return a string with the first character set to upper case (capitalize), or to lower case (uncapitalize).

string.case
(?lower:bool, string)->string

Convert a string to lower or upper case.

string.concat
(?separator:string, [string])->string

Concatenate strings.

string.extract
(~pattern:string, string)->[(string*string)]

Extract substrings from a string. Perl compatible regular expressions are recognized. Hence, special characters should be escaped. Returns a list of (index,value). If the list does not have a pair associated to some index, it means that the corresponding pattern was not found.

string.match
(~pattern:string, string)->bool

Match a string with an expression. Perl compatible regular expressions are recognized. Hence, special characters should be escaped.

string.ref
(string)->((()->string)*((string)->unit))

Returns a pair (get,set) where get is a function of type unit -> string, to get current value, and set a function of type string -> unit, to set a new value. This is a workaround, and it shall be removed when variable references are implemented.

string.replace
(~pattern:string, ((string)->string), string)
 ->string

Replace substrings in a string. Will replace all substrings matched in the pattern by the string returned by the replace function.

string.split
(~separator:string, string)->[string]

Split a string at 'separator'. Perl compatible regular expressions are recognized. Hence, special characters should be escaped.

string_of
('a)->string

Return the representation of a value.

System

argv
(?default:string, int)->string

Get command-line parameters.

basename
(string)->string

Get the base name of a path. Implemented using the corresponding shell command.

dirname
(string)->string

Get the directory name of a path. Implemented using the corresponding shell command.

exec_at
(?freq:float, ~pred:(()->bool), (()->unit))->unit

Execute a given action when a predicate is true. This will be run in background.

get_process_lines
(string)->[string]

Perform a shell call and return the list of its output lines.

get_process_output
(string)->string

Perform a shell call and return its output.

getopt
(?default:string, string)->string

Parse command line options: getopt("-o") returns “1” if “-o” was passed without any parameter, “0” otherwise. getopt(default="X","-o") returns “Y” if “-o Y” was passed, “X” otherwise. The result is removed from the list of arguments, affecting subsequent calls to argv() and getopt().

getpid
()->int

Get the process' pid.

log
(?label:string, ?level:int, string)->unit

Log a message.

on_shutdown
((()->unit))->unit

Register a function to be called when Liquidsoap shuts down.

read
(?hide:bool)->string

Read some value from standard input (console).

server.register
(?namespace:string, ?description:string,
 ?usage:string, string, ((string)->string))->unit

Register a command. You can then execute this function through the server, either telnet or socket.

system
(string)->unit

Shell command call. Set verbose to true to log process' output and errors.

test_process
(string)->bool

Return true if process exited with 0 code. Command should return quickly.

Uncategorized

replaygain_protocol
(string, 'a)->[string]

Register the replaygain protocol