Record Class Humanizer.Config

java.lang.Object
java.lang.Record
org.jjazz.humanizer.api.Humanizer.Config
Record Components:
timingRandomness - [0;1.0] Amount of randomness to notes start time, and possibly their duration
timingBias - [-0.5;0.5] Shift to notes start time
velocityRandomness - [0-1.0] Amount of randomness to notes velocity
Enclosing class:
Humanizer

public static record Humanizer.Config(float timingRandomness, float timingBias, float velocityRandomness) extends Record
A humanization user configuration.
  • Constructor Details

    • Config

      public Config()
    • Config

      public Config(float timingRandomness, float timingBias, float velocityRandomness)
      Creates an instance of a Config record class.
      Parameters:
      timingRandomness - the value for the timingRandomness record component
      timingBias - the value for the timingBias record component
      velocityRandomness - the value for the velocityRandomness record component
  • Method Details

    • setTimingRandomness

      public Humanizer.Config setTimingRandomness(float newValue)
    • setTimingBias

      public Humanizer.Config setTimingBias(float newValue)
    • setVelocityRandomness

      public Humanizer.Config setVelocityRandomness(float newValue)
    • toSaveString

      public String toSaveString()
    • loadFromString

      public static Humanizer.Config loadFromString(String str)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • timingRandomness

      public float timingRandomness()
      Returns the value of the timingRandomness record component.
      Returns:
      the value of the timingRandomness record component
    • timingBias

      public float timingBias()
      Returns the value of the timingBias record component.
      Returns:
      the value of the timingBias record component
    • velocityRandomness

      public float velocityRandomness()
      Returns the value of the velocityRandomness record component.
      Returns:
      the value of the velocityRandomness record component