java.lang.Object
dev.kosmx.playerAnim.core.data.opennbs.format.Layer.Note
Enclosing class:
Layer

public class Layer.Note extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    byte
    The instrument of the note block.
    byte
    The key of the note block, from 0-87, where 0 is A0 and 87 is C8.
    byte
    The stereo position of the note block, from 0-200.
    short
    The fine pitch of the note block, from -32,768 to 32,767 cents (but the max in Note Block Studio is limited to -1200 and +1200).
    final int
    Where is that note exactly.
    byte
    The velocity/volume of the note block, from 0% to 100%.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Note(int tick)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    float
     
    float
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • instrument

      public byte instrument
      The instrument of the note block. This is 0-15, or higher if the song uses custom instruments. 0 = Piano (Air) 1 = Double Bass (Wood) 2 = Bass Drum (Stone) 3 = Snare Drum (Sand) 4 = Click (Glass) 5 = Guitar (Wool) 6 = Flute (Clay) 7 = Bell (Block of Gold) 8 = Chime (Packed Ice) 9 = Xylophone (Bone Block) 10 = Iron Xylophone (Iron Block) 11 = Cow Bell (Soul Sand) 12 = Didgeridoo (Pumpkin) 13 = Bit (Block of Emerald) 14 = Banjo (Hay) 15 = Pling (Glowstone)
    • key

      public byte key
      The key of the note block, from 0-87, where 0 is A0 and 87 is C8. 33-57 is within the 2-octave limit.
    • velocity

      public byte velocity
      The velocity/volume of the note block, from 0% to 100%.
    • panning

      public byte panning
      The stereo position of the note block, from 0-200. 100 is center panning.
    • pitch

      public short pitch
      The fine pitch of the note block, from -32,768 to 32,767 cents (but the max in Note Block Studio is limited to -1200 and +1200). 0 is no fine-tuning. ±100 cents is a single semitone difference. After reading this, we go back to step 2.
    • tick

      public final int tick
      Where is that note exactly. to be able to search without replaying the whole binary.
  • Constructor Details

    • Note

      public Note(int tick)
  • Method Details

    • getPitch

      public float getPitch()
      Returns:
      sound's pitch as a float
    • getVolume

      public float getVolume()
      Returns:
      sound value in percents (including the channels volume)