O1Library Docs
Fall 2023
Docs API

# Accidental

o1.sound.midi.Accidental
enum Accidental(val shift: Int, val symbol: String)

An adjustment to the frequency of a Pitch: a `Flat`, a `Sharp`, or a `Natural`.

## Parameters

shift

  the shift from the base frequency caused by the accidental (in semitones). A positive number means a higher frequency, a negative number a lower one.

symbol

  a symbol describing the accidental: "#", "♭", or the empty string

## Attributes

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

## Members list

### Type members

#### Enum entries

case Flat extends Accidental

Marks a flat note. Assigning this accidental to a Pitch makes it one semitone lower.

Marks a flat note. Assigning this accidental to a Pitch makes it one semitone lower.

## Attributes

case Natural extends Accidental

Marks an unchanged, natural note (neither Sharp nor Flat).

Marks an unchanged, natural note (neither Sharp nor Flat).

## Attributes

case Sharp extends Accidental

Marks a sharp note. Assigning this accidental to a Pitch makes it one semitone higher.

Marks a sharp note. Assigning this accidental to a Pitch makes it one semitone higher.

## Attributes