agenda

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 13 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnlistedLanguage = errors.New("label is in a language that is not specified in the agenda's list of supported languages")

ErrUnlistedLanguage is returned when an agenda contains a label in a language it doesn't support.

Functions

This section is empty.

Types

type Agenda

type Agenda struct {

	// Title is the title of the performance
	Title string `json:"title" yaml:"title"`

	// Formats defines the set of audio file formats to be supported.  This is optional and if not specified, "webm" will be assumed.
	Formats []string `json:"formats" yaml:"formats"`

	// Cues describe specific points in time in a performance
	Cues []*Cue `json:"cues" yaml:"cues"`

	// Rooms describe virtual rooms in which audio may be played
	Rooms []*Room `json:"rooms" yaml:"rooms"`

	// Announcements describe broadcast messages which will be played across any
	// number of rooms
	Announcements []*Announcement `json:"announcements" yaml:"announcements"`

	// PerformanceURL is the URL to which clients should be redirected when the
	// performance is about to start.  Generally, it will be of the form:
	// `https://yourserver.com/live`, as `live` is the path at which Audimance's
	// live interface may be found.
	//
	// This setting is optional but recommended.
	PerformanceURL string `json:"performanceURL" yaml:"performanceURL"`

	// MediaBaseURL string `json:"mediaBaseURL" yaml:"mediaBaseURL"`
	// The default is simply `/media/`, but this can be set to whatever roomTracks
	// URL your media should be sourced from.
	MediaBaseURL string `json:"mediaBaseURL" yaml:"mediaBaseURL"`

	// RemoteMedia indicates that the media files are not stored on the same
	// server, and so not validation should be performed, and no modifications
	// of the prefix be made.  This is not recommended.
	RemoteMedia bool `json:"remoteMedia" yaml:"remoteMedia"`

	// BCP 47 tags. First entry is the default language.
	Languages []string `json:"languages" yaml:"languages"`
}

Agenda describes the order of service and details of a performance

func Load added in v1.2.0

func Load(filename string) (*Agenda, error)

Load reads an agenda from a YAML file.

func New

func New(src io.Reader) (*Agenda, error)

New reads an agenda from a YAML stream reader.

func (*Agenda) AllTracks

func (a *Agenda) AllTracks() (out []*Track)

AllTracks returns the list of all tracks for all rooms and announcements so that they may be prefetched.

func (*Agenda) Localized added in v1.2.0

func (a *Agenda) Localized(lang string) *Agenda

Localized returns a copy of the agenda with each source and point of interest labeled in the specified language.

type Announcement

type Announcement struct {
	Track `json:"track" yaml:"track"`

	// Name is the unique, human-friendly name for this announcement
	Name string `json:"name" yaml:"name"`

	// ExcludeRooms is the list of room names in which this announcement should
	// NOT be played
	ExcludeRooms []string `json:"excludeRooms" yaml:"excludeRooms"`
}

Announcement is a set of audio tracks to be played to many rooms at a given cue

type AutoTracks added in v1.0.8

type AutoTracks struct {
	// Prefix defines a prefix which should be added to each auto-generated audio filename.
	// Note that this does NOT presume a directory separation between the prefix and the filename.
	// That is, a prefix of "alpha/beta" and a cue name of "gamma" would result in a file name "alpha/betagamma.webm".
	Prefix string `json:"prefix" yaml:"prefix"`

	// IgnoreMissing indicates that any tracks which do not exist should simply be ignored.
	IgnoreMissing bool `json:"ignoreMissing" yaml:"ignoreMissing"`

	// IgnoreCues provides a list of cues for which no track should be bound.
	IgnoreCues []string
}

AutoTracks defines a method by which cue-track mappings may be autogenerated.

type Cue

type Cue struct {

	// ID is the generated unique identifier
	ID string `json:"id" yaml:"-"`

	// Name is the unique, human-friendly name for this cue
	Name string `json:"name" yaml:"name"`

	// Notes is a free-form notes field.
	// This is optional and only displayed in the administrative console.
	Notes string `json:"notes" yaml:"notes"`

	// QLabID is the unique identifier for this cue in QLab (informational only;
	// not used by Audimance)
	QLabID string `json:"qlabID" yaml:"qlabID"`

	// Data is the expected data to be received on the QLab port to indicate
	// when this cue should be fired
	Data string `json:"data" yaml:"data"`

	// PerformanceRedirect indicates that when this cue is received, clients
	// should be transferred to the live PerformanceURL
	PerformanceRedirect bool `json:"performanceRedirect" yaml:"performanceRedirect"`

	// ReferenceSeconds is a reference count of the number of seconds the cue
	// should last before the next one.  This is informational only and will be
	// displayed in the administrative control panel if supplied.
	ReferenceSeconds int64 `json:"referenceSeconds" yaml:"referenceSeconds"`
}

Cue describes a specific point in time, with respect to the performance timeline

func (*Cue) FormattedReferenceTime

func (c *Cue) FormattedReferenceTime() string

FormattedReferenceTime returns the human-readable format of the cue's ReferenceSeconds, if there is one

type Dimensions added in v0.5.0

type Dimensions struct {
	// Width is the left-to-right dimension.
	Width float64 `json:"width" yaml:"width"`

	// Height is the up-to-down dimension (the height of a room).
	Height float64 `json:"height" yaml:"height"`

	// Depth is the forward-to-backward dimension.
	Depth float64 `json:"depth" yaml:"depth"`
}

Dimensions describe the dimensions of a space.

type Point

type Point struct {
	X float64 `json:"x" yaml:"x"`
	Y float64 `json:"y" yaml:"y"`
	Z float64 `json:"z" yaml:"z"`
}

Point is a 3-dimensional point in space

type PointOfInterest added in v1.0.8

type PointOfInterest struct {
	// ID is the generated unique identifier
	ID string `json:"id" yaml:"-"`

	// Name is the unique, human-friendly name for this source
	Name string `json:"name" yaml:"name"`

	// Labels contains display text in each supported language, keyed by language code.
	Labels map[string]string `json:"-" yaml:"labels"`

	// Label is the display text in the language the agenda was localized to, or the name if there is no label.
	Label string `json:"label" yaml:"-"`

	// Location indicates a specific 3-dimensional coordinate in the room from
	// which the audio of this source emanates
	Location Point `json:"location" yaml:"location"`
}

PointOfInterest describes a point of interest.

type Room

type Room struct {

	// ID is the generated unique identifier
	ID string `json:"id" yaml:"-"`

	// Name is the unique, human-friendly name for this room
	Name string `json:"name" yaml:"name"`

	// LabelText indicates the textual label to be displayed in the menu for
	// users to select this room
	LabelText string `json:"labelText" yaml:"labelText"`

	// Sources describes the set of locations and audio files which will be
	// played.
	Sources []*Source `json:"sources" yaml:"sources"`

	// PointsOfInterest are non-source points in the room which are made available as targets to screen accessibility tooling.
	PointsOfInterest []*PointOfInterest `json:"pointsOfInterest" yaml:"pointsOfInterest"`

	// RoomTracks is a list of audio tracks to be played in a room, sourced from
	// everywhere.  This is generally exclusive with Sources.
	RoomTracks []*Track `json:"roomTracks" yaml:"roomTracks"`

	// Surfaces describes the surfaces of the room.
	// Valid surface types are:  'brick-bare', 'curtain-heavy', 'marble', 'glass-thin', 'grass', and 'transparent'
	// The default is that every surface is 'grass'.
	Surfaces Surfaces `json:"surfaces" yaml:"surfaces"`

	// Dimensions describes the dimensions of the room, in meters.
	// The default is 100x100x100.
	Dimensions Dimensions `json:"dimensions" yaml:"dimensions"`
}

Room describes a virtual room in which audio may be played

func (*Room) AllTracks

func (r *Room) AllTracks() (out []*Track)

AllTracks returns the list of all tracks for the room so that they may be preloaded.

type Source

type Source struct {
	PointOfInterest `json:",inline" yaml:",inline"`

	// AutoTracks defines a pattern by which cue-track mappings are generated.
	// NOTE: either RoomTracks or AutoTracks should be defined, but not both.
	AutoTracks *AutoTracks `json:"autoTracks" yaml:"autoTracks"`

	// Tracks is the list of audio tracks which should be played upon reaching a
	// particular cue
	Tracks []*Track `json:"tracks" yaml:"tracks"`
}

Source describes a unique audio sequence and location

type Surfaces added in v0.5.0

type Surfaces struct {
	Left  string `json:"left" yaml:"left"`
	Right string `json:"right" yaml:"right"`
	Front string `json:"front" yaml:"front"`
	Back  string `json:"back" yaml:"back"`
	Down  string `json:"down" yaml:"down"`
	Up    string `json:"up" yaml:"up"`
}

Surfaces describe the surface material of a room. Valid surface types are: 'brick-bare', 'curtain-heavy', 'marble', 'glass-thin', 'grass', and 'transparent' The default is that every surface is 'grass'.

type Track

type Track struct {

	// ID is the generated unique identifier
	ID string `json:"id" yaml:"-"`

	// LoadCue indicates the cue at which the track should be loaded.  This will generally be the cue immediately preceding the Cue
	LoadCue string `json:"loadCue" yaml:"loadCue"`

	// LoadWindow indicates the amount of time (in seconds) to allow for the
	// random loading of the audio.  Tracks are loaded at random times between
	// LoadCue's trigger and LoadWindow's duration therefrom to prevent a
	// thundering herd.
	LoadWindow float64 `json:"loadWindow" yaml:"loadWindow"`

	// Cue is the unique identifier of the cue at which this track should be
	// played
	Cue string `json:"cue" yaml:"cue"`

	// KillCue indicates the cue at which the track should be killed whether it has finished or not
	KillCue string `json:"killCue" yaml:"killCue"`

	// AudioFilePrefix is the path/name prefix of the audio file locations,
	// relative to the mediaBaseURL.  The file extension will
	// be calculated based on the supplied format list of the agenda.
	AudioFilePrefix string `json:"audioFilePrefix" yaml:"audioFilePrefix"`

	// AudioFiles is the user-supplied location of the audio file, relative to
	// the filesystem `media/` directory.  Generally, this will be populated
	// automatically by the combination of AudioFilePrefix and the top-level
	// Formats list.
	AudioFiles []string `json:"audioFiles" yaml:"audioFiles"`

	// Repeat indicates whether the PlaySet should be repeated after it is
	// completed.  This will cause the PlaySet to be continually played.
	Repeat bool `json:"repeat" yaml:"repeat"`
}

Track represents a single set of potentially-cued audio files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL