public void playBeat(TGTrack track, final List notes) { TGChannel tgChannel = this.songManager.getChannel(track.getChannelId()); if (tgChannel != null) { int channelId = tgChannel.getChannelId(); int bank = tgChannel.getBank(); int program = tgChannel.getProgram(); int volume = (int) ((this.getVolume() / 10.00) * tgChannel.getVolume()); int balance = tgChannel.getBalance(); int chorus = tgChannel.getChorus(); int reverb = tgChannel.getReverb(); int phaser = tgChannel.getPhaser(); int tremolo = tgChannel.getTremolo(); int size = notes.size(); int[][] beat = new int[size][2]; for (int i = 0; i < size; i++) { TGNote note = (TGNote) notes.get(i); beat[i][0] = track.getOffset() + (note.getValue() + ((TGString) track.getStrings().get(note.getString() - 1)).getValue()); beat[i][1] = note.getVelocity(); } playBeat(channelId, bank, program, volume, balance, chorus, reverb, phaser, tremolo, beat); } }
private void updateController(TGChannel channel) { int volume = (int) ((this.getVolume() / 10.00) * channel.getVolume()); int balance = channel.getBalance(); int chorus = channel.getChorus(); int reverb = channel.getReverb(); int phaser = channel.getPhaser(); int tremolo = channel.getTremolo(); updateController(channel.getChannelId(), volume, balance, chorus, reverb, phaser, tremolo, 127); }