1
package org.herac.tuxguitar.song.models.effects;
3
import org.herac.tuxguitar.song.factory.TGFactory;
5
public abstract class TGEffectHarmonic {
6
public static final String KEY_NATURAL = "N.H";
8
public static final String KEY_ARTIFICIAL = "A.H";
10
public static final String KEY_TAPPED = "T.H";
12
public static final String KEY_PINCH = "P.H";
14
public static final String KEY_SEMI = "S.H";
16
public static final int TYPE_NATURAL = 1;
18
public static final int TYPE_ARTIFICIAL = 2;
20
public static final int TYPE_TAPPED = 3;
22
public static final int TYPE_PINCH = 4;
24
public static final int TYPE_SEMI = 5;
26
public static final int MIN_ARTIFICIAL_OFFSET = -24;
28
public static final int MAX_ARTIFICIAL_OFFSET = 24;
30
public static final int MAX_TAPPED_OFFSET = 24;
32
public static final int NATURAL_FREQUENCIES[][] = {
33
{12, 12}, //AH12 (+12 frets)
34
{9 , 28}, //AH9 (+28 frets)
35
{5 , 24}, //AH5 (+24 frets)
36
{7 , 19}, //AH7 (+19 frets)
37
{4 , 28}, //AH4 (+28 frets)
38
{3 , 31} //AH3 (+31 frets)
45
public TGEffectHarmonic(){
50
public int getData() {
54
public void setData(int data) {
58
public int getType() {
62
public void setType(int type) {
66
public boolean isNatural(){
67
return (this.type == TYPE_NATURAL);
70
public boolean isArtificial(){
71
return (this.type == TYPE_ARTIFICIAL);
74
public boolean isTapped(){
75
return (this.type == TYPE_TAPPED);
78
public boolean isPinch(){
79
return (this.type == TYPE_PINCH);
82
public boolean isSemi(){
83
return (this.type == TYPE_SEMI);
86
public TGEffectHarmonic clone(TGFactory factory){
87
TGEffectHarmonic effect = factory.newEffectHarmonic();
88
effect.setType(getType());
89
effect.setData(getData());