Class Note


  • public class Note
    extends java.lang.Object
    The Note object.
    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Ilge Akkaya
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (ilgea)
    • Constructor Summary

      Constructors 
      Constructor Description
      Note​(java.lang.String name)
      Constructs a Note object.
      Note​(java.lang.String name, double duration)
      Constructs a Note object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getCompleteIndex()
      Return the absolute MIDI key index of the note.
      double getDuration()
      Return the note duration.
      int getKeyIndex()
      Return the relative MIDI key index in base 12.
      java.lang.String getName()
      Return the name of Note object.
      boolean isRest()
      Returns true if the note is a rest.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Note

        public Note​(java.lang.String name)
        Constructs a Note object.
        Parameters:
        name - Note name
      • Note

        public Note​(java.lang.String name,
                    double duration)
        Constructs a Note object.
        Parameters:
        name - Note name
        duration - Note duration
    • Method Detail

      • getDuration

        public double getDuration()
        Return the note duration.
        Returns:
        a double indicating the note duration
      • getName

        public java.lang.String getName()
        Return the name of Note object.
        Returns:
        the name
      • getCompleteIndex

        public int getCompleteIndex()
        Return the absolute MIDI key index of the note.
        Returns:
        MIDI key index
      • getKeyIndex

        public int getKeyIndex()
        Return the relative MIDI key index in base 12.
        Returns:
        the relative key index
      • isRest

        public boolean isRest()
        Returns true if the note is a rest.
        Returns:
        true if note is a rest