Liking cljdoc? Tell your friends :D

chronoid.core


*audio-context*cljs

source

*clocks*cljs

source

callback-at-time!cljs

(callback-at-time! clock f deadline & {:as opts})

Schedules f to run before deadline. Returns the event.

opts may contain :tolerance-early and :tolerance-late for optionally overriding the clock's timing window for events.

Schedules `f` to run before `deadline`. Returns the event.

`opts` may contain :tolerance-early and :tolerance-late for optionally
overriding the clock's timing window for events.
sourceraw docstring

clear!cljs

(clear! {:keys [clock-id] :as event})

Unschedules an event by removing it from its clock's event queue.

Unschedules an event by removing it from its clock's event queue.
sourceraw docstring

clockcljs

(clock & {:as attrs})
source

current-timecljs

(current-time clock)

Returns the current time of a clock's audio context, in milliseconds.

Returns the current time of a clock's audio context, in milliseconds.
sourceraw docstring

default-optionscljs

source

repeat!cljs

(repeat! {:keys [deadline] :as event} time)

Sets the event to repeat every time milliseconds

Sets the event to repeat every `time` milliseconds 
sourceraw docstring

set-timeout!cljs

(set-timeout! clock f delay & {:as opts})

Schedules f after delay milliseconds. Returns the event.

opts may contain :tolerance-early and :tolerance-late for optionally overriding the clock's timing window for events.

Schedules `f` after `delay` milliseconds. Returns the event.

`opts` may contain :tolerance-early and :tolerance-late for optionally
overriding the clock's timing window for events.
sourceraw docstring

start!cljs

(start! clock)

Remove all scheduled events and start the clock.

Remove all scheduled events and start the clock.
sourceraw docstring

stop!cljs

(stop! clock)

Stops the clock.

Stops the clock.
sourceraw docstring

time-stretch!cljs

(time-stretch! e ratio)
(time-stretch! e time-reference ratio)

Reschedules events according to a time-reference and a ratio. If the event is a repeating event, adjusts its repeat-time accordingly.

The first argument can be either a single event or a list of events. Returns the rescheduled event, or a list of rescheduled events, depending on the input type.

e.g. (time-stretch! e (current-time clock) 0.5) ^-- makes an event e occur twice as soon as it would otherwise

If time-reference is omitted, the default value is the current time of the event's clock.

Reschedules events according to a `time-reference` and a `ratio`.
If the event is a repeating event, adjusts its repeat-time accordingly.

The first argument can be either a single event or a list of events.
Returns the rescheduled event, or a list of rescheduled events, depending
on the input type.

e.g.
(time-stretch! e (current-time clock) 0.5)
^-- makes an event `e` occur twice as soon as it would otherwise

If `time-reference` is omitted, the default value is the current time of the
event's clock.
sourceraw docstring

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

× close