mm.Player

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

Controls

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

Play state:

You can also seek to a point in the NoteSequence:

0s 0s

SoundFonts

There are several SoundFonts that you can use with the mm.SoundFontPlayer, for more realistic sounding instruments:

Instrument Name License
Piano salamander Audio samples from Salamander Grand Piano
Multi sgm_plus Audio samples from SGM by Shan
Percussion jazz_kit Audio samples from Jazz Kit (EXS) by Lithalean

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: