|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectmidiReference.MidiReference
public class MidiReference
Collection of methods designed to make translating between the language of music to midi values. Contains methods that make note numbers, not names, and frequencies available, as well as simple methods to create scales and chords based on a note.
Method Summary | |
---|---|
java.lang.Object |
clone()
|
int[] |
createChord(int noteNumber,
ChordReference chordRef)
Create a int[] chord using an int note number and a ChordReference using octave 0 |
int[] |
createChord(int note,
ChordReference chordRef,
int octave)
Create a int[] chord using an int note number and ChordReference |
int[] |
createChord(int note,
int[] chordDegrees)
Create a int[] chord using an int note number and int[] chord using octave 0 |
int[] |
createChord(int note,
int[] chordDegrees,
int octave)
Create a int[] chord using an int note number and int[] chord |
int[] |
createChord(NoteReference noteRef,
ChordReference chordRef)
Create a int[] chord using a NoteReference and a ChordReference using octave 0 |
int[] |
createChord(NoteReference noteRef,
ChordReference chordRef,
int octave)
Create a int[] chord using an NoteReference and ChordReference |
int[] |
createChord(NoteReference noteRef,
int[] chordDegrees)
Create a int[] chord using an NoteReference and an int[] chord using octave 0 |
static int[] |
createScale(int[] scaleDegrees,
int noteNumber)
Create a scale type using the int note number and int[] scale degrees provided |
int[] |
createScale(int[] scaleDegrees,
NoteReference baseNote)
Create a scale from a NoteReference and int[] scale degrees |
static int[] |
createScale(ScaleReference baseScale,
NoteReference baseNote)
Create a scale from a NoteReference and a ScaleReference |
static MidiReference |
getMidiReference()
Create a midiReference class. |
float |
getNoteFrequency(int noteNumber)
Get note frequency from midi note number |
float |
getNoteFrequency(java.lang.String noteName)
Get note frequency from note name. |
int |
getNoteFromFrequency(float frequency)
Get approximate midi note number from frequency |
java.lang.Integer |
getNoteFromSamples(java.lang.Integer sampleRate,
float samples)
Get note number from samples |
java.lang.String |
getNoteName(int noteNumber)
Get note name from note number. |
java.lang.String |
getNoteName(int noteNumber,
boolean transformNote)
Get note name from midi note number. |
java.lang.String |
getNoteName(int noteNumber,
boolean transformNote,
boolean stripOctave)
Get note name from midi note number. |
int |
getNoteNumber(java.lang.String noteName)
Get midi note number from note name |
int[] |
getRelatedMode(int[] scaleIn,
ScaleReference scaleRef)
NOT YET IMPLEMENTED |
boolean |
isScale(int[] scale,
int noteNumber)
Check if a note is in a scale |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public java.lang.String getNoteName(int noteNumber)
noteNumber
-
public java.lang.String getNoteName(int noteNumber, boolean transformNote)
noteNumber
- transformNote
-
public java.lang.String getNoteName(int noteNumber, boolean transformNote, boolean stripOctave)
noteNumber
- transformNote
- stripOctave
-
public int getNoteNumber(java.lang.String noteName)
noteName
-
public float getNoteFrequency(int noteNumber)
noteNumber
-
public float getNoteFrequency(java.lang.String noteName)
noteName
-
public int getNoteFromFrequency(float frequency)
frequency
-
public java.lang.Integer getNoteFromSamples(java.lang.Integer sampleRate, float samples)
sampleRate
- (ex: 44100)samples
- (256)
public static int[] createScale(int[] scaleDegrees, int noteNumber)
scaleDegrees
- noteNumber
-
public int[] createScale(int[] scaleDegrees, NoteReference baseNote)
scaleDegrees
- baseNote
-
createScale(int[], int)
public static int[] createScale(ScaleReference baseScale, NoteReference baseNote)
baseScale
- baseNote
-
createScale(int[], int)
public int[] getRelatedMode(int[] scaleIn, ScaleReference scaleRef)
scaleIn
- scaleRef
-
public boolean isScale(int[] scale, int noteNumber)
scale
- noteNumber
-
public int[] createChord(NoteReference noteRef, ChordReference chordRef)
noteRef
- chordRef
-
createChord(int, int[])
public int[] createChord(NoteReference noteRef, ChordReference chordRef, int octave)
noteRef
- chordRef
- octave
-
createChord(int, int[], int)
public int[] createChord(int noteNumber, ChordReference chordRef)
noteNumber
- chordRef
-
createChord(int, int[])
public int[] createChord(int note, ChordReference chordRef, int octave)
note
- chordRef
- octave
-
createChord(int, int[], int)
public int[] createChord(NoteReference noteRef, int[] chordDegrees)
noteRef
- chordDegrees
-
createChord(int, int[])
public int[] createChord(int note, int[] chordDegrees)
note
- chordDegrees
-
createChord(int, int[], int)
public int[] createChord(int note, int[] chordDegrees, int octave)
note
- chordDegrees
- octave
-
createChord(int, int[], int)
public static MidiReference getMidiReference()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |