|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectComposite
org.herac.tuxguitar.gui.editors.chord.ChordRecognizer
public class ChordRecognizer
Nested Class Summary | |
---|---|
protected class |
ChordRecognizer.Proposal
|
Field Summary | |
---|---|
protected static int |
ADDCHK_INDEX
|
protected static int |
ALTERATION_INDEX
|
protected static int |
BASS_INDEX
|
protected static int |
CHORD_INDEX
|
protected static int |
I11_INDEX
|
protected static int |
I5_INDEX
|
protected static int |
I9_INDEX
|
protected static int |
PLUSMINUS_INDEX
|
protected static int |
TONIC_INDEX
|
Constructor Summary | |
---|---|
ChordRecognizer(ChordDialog dialog,
Composite parent,
int style)
|
Method Summary | |
---|---|
protected void |
addProposal(int[] params,
java.lang.String name)
|
protected void |
clearProposals()
|
protected int |
getAddNote(int type,
int selectionIndex)
Return required interval in semitones for add type and +- modificator |
protected java.lang.String |
getChordName(int[] param,
boolean sharp)
Assembles chord name according to ChordNamingConvention |
protected ChordDialog |
getDialog()
|
protected List |
getProposalList()
|
void |
init()
|
protected boolean |
isValidProcess(long processId)
|
GridData |
makeGridData()
|
protected int[] |
makeProposals(long processId,
TGChord chord,
boolean sharp)
Fills the component's list with alternative names |
void |
recognize(TGChord chord,
boolean redecorate,
boolean setChordName)
- Recognizes the chord string - Fills the component's list with alternative names - Sets all the ChordSelector fields into recognized chord (tonic, bass, chord, alterations) - Makes the alternatives and puts them into ChordList - Writes the chord formula into appropriate label |
protected void |
redecorate(int[] params)
adjusts widgets on the Recognizer combo |
void |
shellsort(java.util.List a,
int sortIndex)
Shellsort, using a sequence suggested by Gonnet. |
protected void |
showChord(int index)
sets the current chord to be selected proposal |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int TONIC_INDEX
protected static final int CHORD_INDEX
protected static final int ALTERATION_INDEX
protected static final int PLUSMINUS_INDEX
protected static final int BASS_INDEX
protected static final int ADDCHK_INDEX
protected static final int I5_INDEX
protected static final int I9_INDEX
protected static final int I11_INDEX
Constructor Detail |
---|
public ChordRecognizer(ChordDialog dialog, Composite parent, int style)
Method Detail |
---|
public GridData makeGridData()
public void init()
protected void showChord(int index)
public void recognize(TGChord chord, boolean redecorate, boolean setChordName)
chord
- chord structure (frets, strings)redecorate
- is the Chord Editor in editing mode, or it is just changed by ChordSelectorprotected int[] makeProposals(long processId, TGChord chord, boolean sharp)
chord
- TGChord to be recognized
protected void redecorate(int[] params)
protected java.lang.String getChordName(int[] param, boolean sharp)
protected int getAddNote(int type, int selectionIndex)
type
- 0=add9, 1=add11, 2=add13selectionIndex
- 0=usual, 1="+", 2="-"public void shellsort(java.util.List a, int sortIndex)
a
- List of Proposals, unsortedsortIndex
- 1 to sort by don'tHaveGrade, 2 to sort by unusualGradeprotected void addProposal(int[] params, java.lang.String name)
protected void clearProposals()
protected ChordDialog getDialog()
protected List getProposalList()
protected boolean isValidProcess(long processId)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |