java.lang.Object
eu.bandm.music.applications.harm.Ff

class Ff extends Object
  • Field Details

    • s

      final Map<Integer,String> s
    • RAT_1200

      public static final Rational RAT_1200
    • POSTCOMMA

      protected int POSTCOMMA
      configuration by subclassing parameter
    • map

      protected final SortedMap<Integer,Rational> map
    • doubleValue

      public final double doubleValue
    • ln

      public final double ln
      The factor as natural logarithm.
    • ld

      public final double ld
      The factor as logarithm base 2.
    • hasExactCents

      public final boolean hasExactCents
    • cents

      public final double cents
    • rationalValue

      public final @Opt Rational rationalValue
    • LN_2

      public static final double LN_2
    • LN_HALF_OCT

      public static final double LN_HALF_OCT
    • isM

      public final boolean isM
    • isU

      public final boolean isU
    • goesDown

      public final boolean goesDown
    • octaves

      public final int octaves
    • ONE

      public static final Ff ONE
  • Method Details

    • toShortString

      public static String toShortString(double v, int precision)
    • u

      public Ff u()
    • m

      public Ff m()
    • of

      public static Ff of(Rational rat)
    • bases

      public SortedSet<Integer> bases()
    • getMap

      public SortedMap<Integer,Rational> getMap()
    • getExponent

      public Rational getExponent(int base)
    • with

      public Ff with(int base, int exp)
    • with

      public Ff with(int base, double exp)
    • with

      public Ff with(int base, Rational exp)
    • without

      public Ff without(int base)
    • componentString

      protected String componentString(boolean decimal, String separator, @Opt String replaceNull, boolean suppress2)
      Parameters:
      decimal - whether to show decimal fractions, not "a/b" notation.
      separator - to be used between components
      replaceNull - text to use instead of "0" for an exponent of 2
      suppress2 - wether the exponent of two is treated as being zero
    • power

      int power(int base, int exp)
    • semiSep

      String semiSep(int signum)
    • semiSeparate

      public String semiSeparate()
    • toString

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

      public double getDoubleValue()
    • getRationalValue

      public @Opt Rational getRationalValue()
    • getExactCents

      public @Opt Rational getExactCents()
      Exact cents are only given when no other base than "2" is present.
    • fString

      public String fString(boolean decimal, boolean longFormat)
    • uString

      public @Opt String uString(boolean decimal, boolean longFormat)
      The string ONLY if it is a u-form.
    • cString

      public @Opt String cString(boolean decimal, boolean longFormat)
      The string with suppressed 2-component.
    • fractString

      public String fractString()
    • decString

      public String decString(Function<String,String> wrapRepetition)
    • decString

      public String decString(int precision, Function<String,String> wrapRepetition)
    • centsString

      public String centsString()
    • criticalDiff

      public double criticalDiff()
      The ld difference to the next octave, as used for filtering.
                   ^        
                   |    
                   |  ----\    positive diff 
       octaves     +       >  
                   | -----/    negative diff
                   |
       octaves     +
                   |
                   |
                =======
                   |
                   | -----\    positive diff
                   +       >  
                   | -----/    negative diff
                   |
                   +
                   |
                   |
                   v
        
    • absCriticalDiff

      public double absCriticalDiff()
    • criticalCentsString

      public String criticalCentsString()
    • parseConstructorAndExponents

      public static @Opt Ff parseConstructorAndExponents(String s)
      Must have the form "(u|m|)F(n|) <rat>+".