Generated with
This document is part of the ebook for O1 (aka CS-A1110 Programming 1), a course at Aalto University.
This document is part of the ebook for O1 (aka CS-A1110 Programming 1), a course at Aalto University.
o1.sound.midi.Music
See theMusic companion object
Represents a piece of music that may consist of multiple Voice s, which in turn consist of MusicElem s 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")
.
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
Attributes
Companion
object
Graph
Reset zoom Hide graph Show graph
Supertypes
Members list
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 .
Attributes
Returns the underlying MIDI sequence.
Returns the underlying MIDI sequence.
Attributes
Returns a string description of the music.
Returns a string description of the music.
Attributes
Definition Classes
whether the Music
object has any MusicElem s at all
whether the Music
object has any MusicElem s at all
Attributes
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.
Attributes