Class KeyboardRange

java.lang.Object
org.jjazz.instrumentcomponents.keyboard.api.KeyboardRange

public class KeyboardRange extends Object
Define the size (number of keys) of a KeyboardComponent.
Author:
Administrateur
  • Field Details

  • Method Details

    • next

      public KeyboardRange next()
      Get a bigger keyboard, or if too big reset size to the smallest one (3 octaves, keeping approximatively the same center note)
      Returns:
    • getLowestPitch

      public int getLowestPitch()
    • getHighestPitch

      public int getHighestPitch()
    • getNbKeys

      public int getNbKeys()
    • getNbWhiteKeys

      public int getNbWhiteKeys()
    • getCentralC

      public int getCentralC()
      Get the Midi pitch of the central C for this keyboard range.
      Returns:
    • isValid

      public boolean isValid(int pitch)
      Parameters:
      pitch -
      Returns:
      True if pitch is valid for this keyboard range.