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.

Variable Index

 o CLUSTER
All notes in one octave.
 o NARROW
All notes in two octaves.
 o WIDE
All notes in more then two octaves.

Constructor Index

 o Chord(Scale)
Creates new Chord with scale.
 o Chord(Scale, int, int)
Creates new Chord with scale, degree and situation.
 o Chord(int, Scale, int, int)
Creates new Chord with channel, scale, degree and situation.

Method Index

All methods from Channelable are implemented, but not listed here!
 o degree()
Returns current degree.
 o notes(int, int)
Returns MIDIContainer with notes.
 o notes(int, int, int, int)
Returns MIDIContainer with notes.
 o notes(int, int, int, int, int, int, int)
Returns MIDIContainer with notes.
 o pitch(int)
Returns pitch of numbered note in Chord.
 o pitch(int, int)
Returns pitch of numbered note in Chord at certain octave.
 o scale()
Returns current Scale.
 o setDegree(int)
Sets degree.
 o setScale(Scale)
Sets Scale.
 o setSituation(int)
Sets situation.
 o situation()
Returns current situation.

Constructors

 o Chord
 public Chord(Scale scale)
Creates a new NARROW-typed Chord.

Parameters:
scale - any Scale with octave() = 7.
 o 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.
 o 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.

Methods

 o scale
 public Scale scale()
Returns the current Scale.

Returns:
a Scale.
 o setScale
 public void setScale(Scale scale)
Sets the Scale.

Parameters:
scale - any Scale (octave() = 7).
 o situation
 public int situation()
Returns the current situation.

Returns:
CLUSTER, NARROW or WIDE.
 o setSituation
 public void setSituation(int situation)
Sets the situation.

Parameters:
situation - CLUSTER, NARROW or WIDE.
 o degree
 public int degree()
Returns the current degree.

Returns:
an int between 0 and scale().octave()-1.
 o setDegree
 public void setDegree(int degree)
Sets the degree.

Parameters:
degree - an int between 0 and scale().octave()-1 (I...VII).
 o 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.
 o 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.
 o 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.
 o 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.
 o 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