net.beadsproject.beads.data
Class Pitch

java.lang.Object
  extended by net.beadsproject.beads.data.Pitch

public abstract class Pitch
extends java.lang.Object

A set of static fields and utility methods associated with pitch.

Author:
ollie

Field Summary
static int[] circleOfFifths
          The circle of fifths relative to root.
static int[] dorian
          The dorian scale relative to root.
static float LOG2
          The constant log(2) = 0.6931472.
static int[] major
          The major scale relative to root.
static int[] minor
          The minor scale relative to root.
 
Constructor Summary
Pitch()
           
 
Method Summary
static float ftom(float frequency)
          Convert frequency to MIDI note number.
static float mtof(float midi)
          Convert MIDI note number to frequency.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG2

public static final float LOG2
The constant log(2) = 0.6931472.

See Also:
Constant Field Values

dorian

public static final int[] dorian
The dorian scale relative to root.


major

public static final int[] major
The major scale relative to root.


minor

public static final int[] minor
The minor scale relative to root.


circleOfFifths

public static final int[] circleOfFifths
The circle of fifths relative to root.

Constructor Detail

Pitch

public Pitch()
Method Detail

ftom

public static final float ftom(float frequency)
Convert frequency to MIDI note number.

Parameters:
frequency - the required frequency.
Returns:
the resulting MIDI note number.

mtof

public static final float mtof(float midi)
Convert MIDI note number to frequency.

Parameters:
midi - the required MIDI note number.
Returns:
the resulting frequency.