Voice

o1.sound.midi.Voice
final case class Voice(notes: Seq[MusicElem], isPercussion: Boolean)

Represents a single voice within a piece of Music. A voice consists of MusicElems, primarily notes, in order.

Parameters

notes

the notes (and possible other MusicElems) that compose this voice

isPercussion

whether the notes should not be interpresed as regular notes but as the special sounds defined for the MIDI standard’s percussion channel

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Keywords
  • no keywords
  • lazy
  • override
Inherited Not inherited
  • Not inherited
  • Product

Value members

Concrete methods

override def toString: String

Returns a string description of the music.

Returns a string description of the music.

Definition Classes
Any

Concrete fields

lazy val length: Int

the total length (duration) of all the notes in the voice

the total length (duration) of all the notes in the voice

lazy val nonEmpty: Boolean

whether the voice has any MusicElems at all

whether the voice has any MusicElems at all