~ubuntu-branches/ubuntu/oneiric/tuxguitar/oneiric

« back to all changes in this revision

Viewing changes to src/org/herac/tuxguitar/song/models/SongChannel.java

  • Committer: Bazaar Package Importer
  • Author(s): Philippe Coval
  • Date: 2008-06-19 00:30:30 UTC
  • mto: (5.1.2 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20080619003030-h719szrhsngou7c6
Tags: upstream-1.0
ImportĀ upstreamĀ versionĀ 1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
package org.herac.tuxguitar.song.models;
2
 
 
3
 
public class SongChannel {
4
 
        public static final short DEFAULT_PERCUSION_CHANNEL = 9;
5
 
        
6
 
        private static final short DEFAULT_VOLUME = 127;
7
 
        private static final short DEFAULT_BALANCE = 64;
8
 
        private static final short DEFAULT_CHORUS = 0;
9
 
        private static final short DEFAULT_REVERB = 0;
10
 
        private static final short DEFAULT_PHASER = 0;
11
 
        private static final short DEFAULT_TREMOLO = 0;
12
 
        private static final boolean DEFAULT_SOLO = false;
13
 
        private static final boolean DEFAULT_MUTE = false;
14
 
        
15
 
    private short channel;
16
 
    private short effectChannel;
17
 
    private short instrument;
18
 
    private short volume;
19
 
    private short balance;
20
 
    private short chorus;
21
 
    private short reverb;
22
 
    private short phaser;
23
 
    private short tremolo;
24
 
    private boolean solo;
25
 
    private boolean mute;
26
 
    
27
 
        public SongChannel(short channel,short effectChannel, short instrument, short volume, short balance, short chorus, short reverb, short phaser, short tremolo,boolean solo,boolean mute) {               
28
 
                this.channel = channel;
29
 
                this.effectChannel = effectChannel;
30
 
                this.instrument = instrument;
31
 
                this.volume = volume;
32
 
                this.balance = balance;
33
 
                this.chorus = chorus;
34
 
                this.reverb = reverb;
35
 
                this.phaser = phaser;
36
 
                this.tremolo = tremolo;
37
 
                this.solo = solo;
38
 
                this.mute = mute;
39
 
        }
40
 
 
41
 
        public SongChannel(short channel,short effectChannel, short instrument){
42
 
                this(channel,
43
 
                         effectChannel,
44
 
                         instrument,
45
 
                         DEFAULT_VOLUME,
46
 
                         DEFAULT_BALANCE,
47
 
                         DEFAULT_CHORUS,
48
 
                         DEFAULT_REVERB,
49
 
                         DEFAULT_PHASER,
50
 
                         DEFAULT_TREMOLO,
51
 
                         DEFAULT_SOLO,
52
 
                         DEFAULT_MUTE);
53
 
        }
54
 
 
55
 
        public short getBalance() {
56
 
                return balance;
57
 
        }
58
 
 
59
 
        public void setBalance(short balance) {
60
 
                this.balance = balance;
61
 
        }
62
 
 
63
 
        public short getChannel() {
64
 
                return channel;
65
 
        }
66
 
 
67
 
        public void setChannel(short channel) {
68
 
                this.channel = channel;
69
 
        }
70
 
 
71
 
        public short getEffectChannel() {
72
 
                return effectChannel;
73
 
        }
74
 
 
75
 
        public void setEffectChannel(short effectChannel) {
76
 
                this.effectChannel = effectChannel;
77
 
        }
78
 
 
79
 
        public short getChorus() {
80
 
                return chorus;
81
 
        }
82
 
 
83
 
        public void setChorus(short chorus) {
84
 
                this.chorus = chorus;
85
 
        }
86
 
 
87
 
        public short getInstrument() {
88
 
                return instrument;
89
 
        }
90
 
 
91
 
        public void setInstrument(short instrument) {
92
 
                this.instrument = instrument;
93
 
        }
94
 
 
95
 
        public short getPhaser() {
96
 
                return phaser;
97
 
        }
98
 
 
99
 
        public void setPhaser(short phaser) {
100
 
                this.phaser = phaser;
101
 
        }
102
 
 
103
 
        public short getReverb() {
104
 
                return reverb;
105
 
        }
106
 
 
107
 
        public void setReverb(short reverb) {
108
 
                this.reverb = reverb;
109
 
        }
110
 
 
111
 
        public short getTremolo() {
112
 
                return tremolo;
113
 
        }
114
 
 
115
 
        public void setTremolo(short tremolo) {
116
 
                this.tremolo = tremolo;
117
 
        }
118
 
 
119
 
        public short getVolume() {
120
 
                return volume;
121
 
        }
122
 
 
123
 
        public void setVolume(short volume) {
124
 
                this.volume = volume;
125
 
        }
126
 
 
127
 
        public boolean isMute() {
128
 
                return mute;
129
 
        }
130
 
 
131
 
        public void setMute(boolean mute) {
132
 
                this.mute = mute;
133
 
        }
134
 
 
135
 
        public boolean isSolo() {
136
 
                return solo;
137
 
        }
138
 
 
139
 
        public void setSolo(boolean solo) {
140
 
                this.solo = solo;
141
 
        }
142
 
 
143
 
        public boolean isPercusionChannel(){
144
 
        return (this.getChannel() == DEFAULT_PERCUSION_CHANNEL);
145
 
    }
146
 
        
147
 
    public static SongChannel getDefaultPercusionChannel(){
148
 
        return new SongChannel(DEFAULT_PERCUSION_CHANNEL,DEFAULT_PERCUSION_CHANNEL,(short)0,(short)100,(short)0,(short)0,(short)0,(short)0,(short)0,false,false);
149
 
    }
150
 
    
151
 
    public Object clone(){
152
 
        return new SongChannel(channel,effectChannel,instrument,volume,balance,chorus,reverb,phaser,tremolo,solo,mute);
153
 
    }
154
 
 
155
 
}