An mm.Player
is a class that plays 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:You can also seek to a point in the NoteSequence:
0s 0sThere 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 |
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.
They work!
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.
If you want to use a connected MIDI output, you can use a MIDIPlayer
to output to it: