Previous Next Package
Class MIDIComposeUtil.Chord
java.lang.Object
|
+----MIDIComposeUtil.Chord
- public class Chord
- extends Object
- implements Channelable
Chord helps you to put the right chord-Notes to your MIDI-file.
-
CLUSTER
- All notes in one octave.
-
NARROW
- All notes in two octaves.
-
WIDE
- All notes in more then two octaves.
-
Chord(Scale)
- Creates new Chord with scale.
-
Chord(Scale, int, int)
- Creates new Chord with scale, degree and situation.
-
Chord(int, Scale, int, int)
- Creates new Chord with channel, scale, degree and situation.
All methods from Channelable are implemented, but not listed here!
-
degree()
- Returns current degree.
-
notes(int, int)
- Returns MIDIContainer with notes.
-
notes(int, int, int, int)
- Returns MIDIContainer with notes.
-
notes(int, int, int, int, int, int, int)
- Returns MIDIContainer with notes.
-
pitch(int)
- Returns pitch of numbered note in Chord.
-
pitch(int, int)
- Returns pitch of numbered note in Chord at certain octave.
-
scale()
- Returns current Scale.
-
setDegree(int)
- Sets degree.
-
setScale(Scale)
- Sets Scale.
-
setSituation(int)
- Sets situation.
-
situation()
- Returns current situation.
Chord
public Chord(Scale scale)
- Creates a new NARROW-typed Chord.
- Parameters:
- scale - any Scale with octave() = 7.
Chord
public Chord(Scale scale,
int degree,
int situation)
- Creates a new Chord.
- Parameters:
- scale - any Scale with octave() = 7.
- degree - any int between 0 and 6 (I....VII).
- situation - CLUSTER, NARROW or WIDE.
Chord
public Chord(int channel,
Scale scale,
int degree,
int situation)
- Creates a new Chord.
- Parameters:
- channel - any int between 0 and 15 (CHAN_1...CHAN_16).
- scale - any Scale with octave() = 7.
- degree - any int between 0 and 6 (I....VII).
- situation - CLUSTER, NARROW or WIDE.
scale
public Scale scale()
- Returns the current Scale.
- Returns:
- a Scale.
setScale
public void setScale(Scale scale)
- Sets the Scale.
- Parameters:
- scale - any Scale (octave() = 7).
situation
public int situation()
- Returns the current situation.
- Returns:
- CLUSTER, NARROW or WIDE.
setSituation
public void setSituation(int situation)
- Sets the situation.
- Parameters:
- situation - CLUSTER, NARROW or WIDE.
degree
public int degree()
- Returns the current degree.
- Returns:
- an int between 0 and scale().octave()-1.
setDegree
public void setDegree(int degree)
- Sets the degree.
- Parameters:
- degree - an int between 0 and scale().octave()-1 (I...VII).
pitch
public int pitch(int number)
- Returns the MIDI-pitch for numbered note in Chord at 4th octave as root-octave.
- Parameters:
- number - any int between 0 and 5 (depending on Chord).
- Returns:
- an int between 0 and 127.
pitch
public int pitch(int number,
int octave)
- Returns the MIDI-pitch for numbered note in Chord at certain root-octave.
- Parameters:
- number - any int between 0 and 5 (depending on Chord).
- octave - any int between 2 and 8.
- Returns:
- an int between 0 and 127.
notes
public MIDIContainer notes(int length,
int degree)
- Returns Notes in a MIDIContainer that represent the Chord.
- Parameters:
- length - any int (>= 0).
- degree - I, II, ... VII (depending on Scale-type).
- Returns:
- a MIDIContainer.
notes
public MIDIContainer notes(int length,
int degree,
int octave,
int number)
- Returns Notes in a MIDIContainer that represent the Chord.
- Parameters:
- length - any int (>= 0).
- degree - I, II, ... VII (depending on Scale-type).
- octave - any int between 2 and 8 (default 4).
- number - number of Notes in MIDIContainer (default 3).
- Returns:
- a MIDIContainer.
notes
public MIDIContainer notes(int deltaTime,
int channel,
int length,
int degree,
int octave,
int number,
int velocity)
- Returns Notes in a MIDIContainer that represent the Chord.
- Parameters:
- deltaTime - any int (>= 0).
- channel - any int between 0 and 15 (CHAN_1...CHAN_16).
- length - any int (>= 0).
- degree - I, II, ... VII (depending on Scale-type).
- octave - any int between 2 and 8 (default 4).
- number - number of Notes in MIDIContainer (default 3).
- velocity - velocity of Notes in MIDIContainer (default MEDIUM).
- Returns:
- a MIDIContainer.
Previous Next Package