Class Note

java.lang.Object
org.episteme.social.arts.music.Note
All Implemented Interfaces:
Serializable

public class Note extends Object implements Serializable
Represents a musical note with microtonal and dynamic properties.
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Field Details

    • MIDDLE_C

      public static final Note MIDDLE_C
    • A440

      public static final Note A440
  • Constructor Details

    • Note

      public Note(Pitch pitch, int octave, Duration duration, int cents, double velocity)
    • Note

      public Note(Pitch pitch, int octave, Duration duration)
    • Note

      public Note(Pitch pitch, int octave)
    • Note

      public Note(Pitch pitch, Duration duration)
  • Method Details

    • getPitch

      public Pitch getPitch()
    • getOctave

      public int getOctave()
    • getDuration

      public Duration getDuration()
    • getCents

      public int getCents()
    • getVelocity

      public double getVelocity()
    • getFrequency

      public Quantity<Frequency> getFrequency()
      Returns frequency as a Real-based Quantity. f = 440 * 2^((n - 69 + cents/100) / 12)
    • getMidiNote

      public int getMidiNote()
    • getNotation

      public String getNotation()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • fromMidi

      public static Note fromMidi(int midiNote, double durationValue)
    • rest

      public static Note rest(Duration duration)
    • setTrait

      public void setTrait(String key, Object value)
    • getTrait

      public Object getTrait(String key)
    • setDynamics

      public void setDynamics(Dynamics dynamics)