Represents a piece of music that may consist of multiple Voices, which in turn consist of MusicElems such as notes.
Instead of using the constructor, you can use the companion object to construct a
Music
object from a string: e.g., Music("cdefg&>gfedc")
.
- Value parameters:
- tempoSetting
a tempo setting (in beats per minute) for the music, if there is one
- voices
the voices that, played simultaneously, make up the piece of music; no more than
MaxVoices
plus a possible percussion track
- Companion:
- object
Value members
Concrete methods
Plays this music using the MIDI synthesizer. This is equivalent to calling
o1.sound.midi.play
. Students have access
to the same functionality via the play
method in the top-level package o1.
Plays this music using the MIDI synthesizer. This is equivalent to calling
o1.sound.midi.play
. Students have access
to the same functionality via the play
method in the top-level package o1.
Inherited methods
Concrete fields
The tempo of the music in beats per minute. This equals tempoSetting
or DefaultTempo
, if that’s not set.
The tempo of the music in beats per minute. This equals tempoSetting
or DefaultTempo
, if that’s not set.