1
package org.herac.tuxguitar.song.models;
3
public class SongChannel {
4
public static final short DEFAULT_PERCUSION_CHANNEL = 9;
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;
15
private short channel;
16
private short effectChannel;
17
private short instrument;
19
private short balance;
23
private short tremolo;
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;
32
this.balance = balance;
36
this.tremolo = tremolo;
41
public SongChannel(short channel,short effectChannel, short instrument){
55
public short getBalance() {
59
public void setBalance(short balance) {
60
this.balance = balance;
63
public short getChannel() {
67
public void setChannel(short channel) {
68
this.channel = channel;
71
public short getEffectChannel() {
75
public void setEffectChannel(short effectChannel) {
76
this.effectChannel = effectChannel;
79
public short getChorus() {
83
public void setChorus(short chorus) {
87
public short getInstrument() {
91
public void setInstrument(short instrument) {
92
this.instrument = instrument;
95
public short getPhaser() {
99
public void setPhaser(short phaser) {
100
this.phaser = phaser;
103
public short getReverb() {
107
public void setReverb(short reverb) {
108
this.reverb = reverb;
111
public short getTremolo() {
115
public void setTremolo(short tremolo) {
116
this.tremolo = tremolo;
119
public short getVolume() {
123
public void setVolume(short volume) {
124
this.volume = volume;
127
public boolean isMute() {
131
public void setMute(boolean mute) {
135
public boolean isSolo() {
139
public void setSolo(boolean solo) {
143
public boolean isPercusionChannel(){
144
return (this.getChannel() == DEFAULT_PERCUSION_CHANNEL);
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);
151
public Object clone(){
152
return new SongChannel(channel,effectChannel,instrument,volume,balance,chorus,reverb,phaser,tremolo,solo,mute);