Pitch

o1.sound.midi.Pitch
See thePitch companion object
final case class Pitch(name: Char, accidental: Accidental, octave: Option[Int])

A Pitch is a frequency for a note to be played at.

Parameters

name

the name of the corresponding note, which provides the base frequency; one of "cdefgah" or their upper-case equivalents

accidental

an adjustment to the base frequency

octave

the number of the octave relative to DefaultOctave; e.g., -2 means two octaves lower than the default; passing in None has the same effect as passing in zero

Attributes

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

Members list

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

Value members

Concrete methods

override def toString: String

Returns a string description of the pitch.

Returns a string description of the pitch.

Definition Classes
Any