afterglow.web.routes.show-control

build-sync-select

(build-sync-select page-id)

Creates the list needed by the template which renders the HTML interface allowing the user to link to one of the currently available sources of metronome synchronization, with the current selection, if any, properly identified.

clients

Tracks the active show interface pages, and any pending interface updates for each.

cue-view

(cue-view show left bottom width height holding snapshot)

Returns a nested structure of rows of cue information starting at the specified origin, with the specified width and height. Ideal for looping over and rendering in textual form, such as in a HTML table. Each cell contains a tuple of cue and effect, the cue assigned to that grid location, and the currently-running effect, if any, launched from that cue. Cells which do not have associated cues still be assigned a unique cue ID (identifying page-relative coordinates, with zero at the lower left) so they can be updated if a cue is created for that slot while the page is still up.

effect-save-button-changes

(effect-save-button-changes page-id current)

Returns the changes which need to be sent to a page to update its effect save/clear button states since it was last rendered, and updates the record.

effect-save-button-states

(effect-save-button-states show current)

Returns a set describing all effects which should have a save or clear button visible based on the state of their cue variables. Set elements are a tuple of the effect ID and either :save or :clear, depending on which button should be visible.

effect-time-formatter

The format to use when showing the time an effect was started. See the clj-time documentation if you want details of how to set up a different format string.

get-ui-updates

(get-ui-updates id)

Route which delivers any changes which need to be applied to a show web interface to reflect differences in the current show state compared to when it was last updated.

hundredths

(hundredths n)

Given a value from 0 to 1, return it as a rounded number of hundredths, except return 99 when it would round to 100, since it has to tie in with a whole value that we cannot easily increment. Used to provide information about the fractional beat and second at which an effect was started in the web interface.

load-update

(load-update page-id)

If the show is running and we haven’t sent a load update in the last half second, send one.

macro-record-file

metronome-bpm-delta-for-event

(metronome-bpm-delta-for-event page-info kind)

If the UI event name submitted by a show page corresponds to a metronome bpm shift, and the metronome is not synced, return the appropriate bpm adjustment.

metronome-changes

(metronome-changes page-id snapshot)

Return the list of changes that should be applied to the show metronome section since the last time it was updated.

metronome-delta-for-event

(metronome-delta-for-event page-info kind)

If the UI event name submitted by a show page corresponds to a metronome shift, return the appropriate number of milliseconds.

metronome-states

(metronome-states show last-states snap)

Gather details about the current state of the main show metronome.

post-ui-event

(post-ui-event id kind req)

Route which reports a user interaction with the show web interface.

show-page

(show-page show-id)

Renders the web interface for interacting with the specified show.

status-update

(status-update page-id)

If the running or error status of the show has changed, send an update about it.

sync-menu-changes

(sync-menu-changes page-id)

Return any changes that should be applied to the menu of available metronome sync options since the last time it was updated.

update-known-controllers

(update-known-controllers page-id)

Makes sure the cached page information contains list of the currently-registered physical grid controllers associated with a page’s show, assigning each a unique id number, so they can be selected in the user interface for scrolling or linking to. If this list changed, return the new list so it can be sent as an update to the page.

update-known-midi-sync-sources

(update-known-midi-sync-sources page-id)

Scans for sources of MIDI clock pulses, and updates the cached page information to contain current list, assigning each a unique id number, so they can be selected in the sync interface.