Creates a new MIDI sequencer for playing back MIDI files.
The synthesizer instance to play back to.
Optional configuration for the sequencer.
The sequencer's event handler. It allows setting up custom event listeners for the sequencer.
Indicates whether the sequencer has finished playing a sequence.
OptionalmidiThe data of the current sequence. Undefined if the data is currently loading or if no song is playing.
The BasicMIDI.embeddedSoundBank and BasicMIDI.timeline properties and MIDITrack.events in the tracks are all empty to avoid copying the entire file between threads.
The data of all the sequences, stored like the Sequencer.midiData property, but for all songs. Allows creating playlists with the decoded titles and metadata.
ReadonlysynthThe synthesizer attached to this sequencer.
A smoothed version of Sequencer.currentTime.
Use for visualization as it's not affected by the AudioContext stutter.
The current song's tempo in BPM.
The current playback time of the song in seconds.
Seeks to the specified time.
The new time in seconds.
The current song's length, in seconds. 0 if no track is currently loaded.
Enables or disables sending MIDI messages to the attached MIDI ports.
Enables or disables sending MIDI messages to the attached MIDI ports.
The new value for this parameter.
The number of loops remaining until the loop is disabled.
The number of loops remaining until the loop is disabled.
Set to Infinity to loop forever.
It will automatically decrease by one every loop.
Set to 0 to disable loops.
The new loop count.
True if paused or stopped (including before the first Sequencer.play call and after the song ends), false if playing.
Controls how fast the song plays (1 is normal, 0.5 is half speed, etc.).
Controls how fast the song plays (1 is normal, 0.5 is half speed, etc.).
The new playback rate.
The shuffled song indexes, pointing to songs in Sequencer.songListData. This is used when Sequencer.shuffleSongs is enabled.
Controls if the sequencer should shuffle the songs in the song list. If true, the sequencer will play the songs in a random order.
Songs are shuffled on a Sequencer.loadNewSongList call.
Controls if the sequencer should shuffle the songs in the song list. If true, the sequencer will play the songs in a random order.
Songs are shuffled on a Sequencer.loadNewSongList call.
The new value for this parameter.
Indicates if the sequencer should skip to the first note-on event when the time is set before it.
Indicates if the sequencer should skip to the first note-on event when the time is set before it.
The new value for this parameter.
The number of songs in the playlist.
The current song number in the playlist. If shuffle mode is enabled, this is the index of the shuffled song list.
Sets the current song number in the playlist. If shuffle mode is enabled, this is the index of the shuffled song list.
The new song index to set.
Connects a given MIDI output port and plays the sequence to it.
The output to connect.
The channel offset of this output for multi-port files. For example 0 means the first port, 16 means the second port and so on.
Disconnects a given MIDI output port from the sequencer.
The output to disconnect.
Loads a new song list. Note that this does not start playing the songs automatically.
The MIDI files to play.
Pauses the playback of the sequence.
Starts playing or resumes the sequence.
The sequencer plays MIDI sequences using a WorkletSynthesizer or WorkerSynthesizer.