O1Library Docs
Fall 2026
Docs API

# Chord

o1.sound.midi.Chord
See the Chord companion object
final case class Chord(notes: Seq[MusicElem]) extends MusicElem

Each instance of this class represents a combination of simultaneous Notes or other MusicElems.

## Parameters

notes

  the `MusicElem`s that play simultanously in this chord

## Attributes

Companion
  object
Graph
Supertypes
  trait Serializable
  trait Product
  trait Equals
  trait MusicElem
  class Object
  trait Matchable
  class Any
  Show all

## Members list

### Value members

#### Concrete methods

override def toString: String

Returns a string description of the note.

Returns a string description of the note.

## Attributes

Definition Classes
  Any

#### Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

## Attributes

Inherited from:
  Product

def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

## Attributes

Returns

  in the default implementation, an `Iterator[Any]`

Inherited from:
  Product

#### Concrete fields

lazy val length: Int

the duration of the chord: how long it takes to play its longest element

the duration of the chord: how long it takes to play its longest element

## Attributes