Class Midi.Sequence

A timed collection of MIDI events. The collection is indexed and can be iterated:

seq <- Midi.Sequence()
// [add some events]
seq[0] // the first Midi.Event
foreach(event in seq) {
// event.message, event.measure
}

Constructors

Sequence()

Methods

add(Midi.Message message, float measure) add a Midi.Message to this pattern.
add(Midi.Note message, float measure) add a Midi.Note to this pattern.
add(Midi.Pattern pattern, float measure) add the events from a Midi.Pattern to this sequence.
add(Midi.Sequence pattern, float measure) add the events from another Midi.Sequence to this sequence.
filter(function filter) filter the events in this sequence to create a new Midi.Sequence
len() the number of MIDI events in this sequence
pattern() create and return a new Midi.Pattern from the Midi.NoteOn and Midi.NoteOff events in this sequence.

Constructor Documentation


Sequence()

Method Documentation


void add(Midi.Message message, float measure)

Add a Midi.Message to this pattern.

Parameters


void add(Midi.Note message, float measure)

Add a Midi.Note to this pattern.

Parameters


void add(Midi.Pattern pattern, float measure)

Add the events from a Midi.Pattern to this sequence.

Parameters


void add(Midi.Sequence pattern, float measure)

Add the events from another Midi.Sequence to this sequence.

Parameters


Midi.Sequence filter(function filter)

Filter the events in this sequence to create a new Midi.Sequence

Parameters

Returns


integer len()

The number of MIDI events in this sequence

Returns


Midi.Pattern pattern()

Create and return a new Midi.Pattern from the Midi.NoteOn and Midi.NoteOff events in this sequence.

Returns



Creative Commons Logo This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.