Liking cljdoc? Tell your friends :D

alda.sound


*play-opts*clj

source

create-sequence!clj

(create-sequence! score & [event-set])
source

determine-audio-typesclj

(determine-audio-types {:keys [instruments] :as score})
source

earliest-offsetclj

(earliest-offset event-set)
source

export!clj

(export! score output-filename)

Exports an Alda score to a MIDI file.

Exports an Alda score to a MIDI file.
sourceraw docstring

new-audio-contextclj

(new-audio-context)
source

play!clj

(play! score & args)

Plays an Alda score, optionally from given start/end marks determined by play-opts.

Optionally takes as a second argument a set of events to play (which could be pre-filtered, e.g. for playing only a portion of the score).

In either case, the offsets of the events to be played are shifted back such that the earliest event's offset is 0 -- this is so that playback will start immediately.

Returns a result map containing the following values:

:score The full score being played.

:stop! A function that, when called mid-playback, will stop any further events from playing.

:wait A function that will sleep for the duration of the score. This is useful if you want to playback asynchronously, perform some actions, then wait until playback is complete before proceeding.

Plays an Alda score, optionally from given start/end marks determined by
*play-opts*.

Optionally takes as a second argument a set of events to play (which could
be pre-filtered, e.g. for playing only a portion of the score).

In either case, the offsets of the events to be played are shifted back such
that the earliest event's offset is 0 -- this is so that playback will start
immediately.

Returns a result map containing the following values:

  :score    The full score being played.

  :stop!    A function that, when called mid-playback, will stop any further
            events from playing.

  :wait     A function that will sleep for the duration of the score. This is
            useful if you want to playback asynchronously, perform some
            actions, then wait until playback is complete before proceeding.
sourceraw docstring

set-up!clj

(set-up! score)
(set-up! {:keys [audio-context] :as score} audio-type)

Does any necessary setup for one or more audio types. e.g. for MIDI, create and open a MIDI synth.

Does any necessary setup for one or more audio types.
e.g. for MIDI, create and open a MIDI synth.
sourceraw docstring

set-up-audio-type!cljmultimethod

source

set-up?clj

(set-up? {:keys [audio-context] :as score} audio-type)
source

shift-eventsclj

(shift-events events offset cut-off)
source

start-finish-timesclj

(start-finish-times {:keys [from to]} markers)
source

stop-playback!clj

(stop-playback! {:keys [audio-context] :as score})
(stop-playback! {:keys [audio-context] :as score} audio-type)

Stop playback, but leave the score in a state where playback can be resumed.

Stop playback, but leave the score in a state where playback can be resumed.
sourceraw docstring

stop-playback-for-audio-type!cljmultimethod

source

tear-down!clj

(tear-down! {:keys [audio-context] :as score})
(tear-down! {:keys [audio-context] :as score} audio-type)

Completely clean up after a score.

Playback may not necessarily be resumed after doing this.

Completely clean up after a score.

Playback may not necessarily be resumed after doing this.
sourceraw docstring

tear-down-audio-type!cljmultimethod

source

with-play-optscljmacro

(with-play-opts opts & body)

Apply opts as overrides to play-opts when executing body

Apply `opts` as overrides to *play-opts* when executing `body`
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close