An mm.Player is a class that playes NoteSequences. Below you can play the same melody using each of the available players


You can start, stop, pause and unpause a Player:

Play state:

Unquantized NoteSequences

Base player
SoundFont player

Quantized NoteSequences

Base player (with or without click)
SoundFont player

Quantized Drum NoteSequences

Base player (with or without click)
SoundFont player

Changing the tempo

You can update the tempo at which a mm.Player is playing a NoteSequence by calling setTempo(). To see this, start one of the melodies below, and adjust the tempo slider.

Tempo: 120

NoteSequences with velocities

They work!

SoundFont player
Base player (with or without click)
Drum player (with or without click)

Controlling the attack or release of a note

Using the SoundFont player, you can control the timing of the attack or the release of a key. This is useful if you need real-time note playing, rather than of a predetermined NoteSequence.

Using WebMIDI

If you want to use a connected MIDI output, you can use a MIDIPlayer to output to it:

MIDI Outputs: