EventListPlayer:
Filter:
Mx/Classes (extension) | Libraries > crucial > Players | Streams-Patterns-Events > Patterns

EventListPlayer
ExtensionExtension

plays lists of Events using the \beat parameter

Description

Patterns play sequential streams of Events. EventListPlayer takes a different approach by instead taking a list of Event objects and playing each one at the time indicated in the Event's \beat param.

The Events do not need to be sorted and multiple events can play at the same \beat.

This is useful when you have a sequence or array of things you would like to play and it doesn't make sense to translate this into the delta based timing model of a Pbind.

Class Methods

.new

(describe method here)

Arguments:

events

list of Event objects

spec

Output spec of the events. Usually this is \audio

postFilter

An optional dictionary or Event that will be used to filter the output of the stream.

protoEvent

An optional Event that will be copied into each Event in the stream. This is to avoid excessive duplication if all events have a param that is the same. It can also be used for dynamic settings like \bus. It is also useful in that it is saved with the EventListPlayer and each event is saved so it makes for a much more efficient compile string.

Returns:

am EventListPlayer

Instance Methods

.beat

get current beat while playing

Returns:

Float

.addEvent

add a new Event. this can be done while playing

Arguments:

ev

an Event

Returns:

this

.guiClass

EventListPlayerGui

Returns:

EventListPlayerGui

.removeEvent

remove an event by supplying the event to be matched. can be done while playing

Arguments:

ev

the Event

.storeArgs

(describe method here)

Returns:

(describe returnvalue here)

.prSched

(describe method here)

Arguments:

beat

(describe argument here)

Returns:

(describe returnvalue here)

.setEventBeat

set the beat for the event at the given index. This is better than directly manipulating the event in that it will correctly resched events if youa re currently playing.

Arguments:

i

index

beat

Float

.playEvent

play an Event on the fly. Doesn't matter if the event is scheduled, in the list or not on the list. It is used for auditioning sounds. When using the gui you can double click on an event to make it play. protoEvent and postFilter will be processed as well.

Arguments:

event

an Event

inval

optional Event that will be copied into the Event. (non-destructive)

.stopToBundle

private

Arguments:

b

(describe argument here)

Returns:

(describe returnvalue here)

.beatDuration

total beatDuration is the last beat of any event in the list. Does not take into account \duration of that event.

Returns:

float

.schedFromNow

private

Returns:

(describe returnvalue here)

.schedNext

private

Arguments:

newEi

(describe argument here)

Returns:

(describe returnvalue here)

.findNextAfter

private

Arguments:

beat

(describe argument here)

Returns:

(describe returnvalue here)

.getEventBeat

get the beat for an event in the list at index i

Arguments:

i

integer

Returns:

float

.gotoBeat

while playing, relocate to a beat

Arguments:

beat

float

atBeat

(describe argument here)

bundle

(describe argument here)

Returns:

(describe returnvalue here)

.playEventAt

play an event by index

Arguments:

i

integer

inval

optional post filter event

.initElp

private

Returns:

(describe returnvalue here)

.spawnToBundle

private

Arguments:

bundle

(describe argument here)

Returns:

(describe returnvalue here)

.events

get or set the list of events

Arguments:

evs

list of Event

Returns:

(describe returnvalue here)

.sorted

the list of events

Returns:

(describe returnvalue here)

Examples

The gui requires the crucialviews quark for the UserViewObjectsManager. This enables selecting events, option-drag to copy, "delete" to delete, move events around.

If used inside an Mx you can open the timeline view and zoom and click in the timeline to relocate.