Ejemplo n.º 1
0
 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);
   }
 }
Ejemplo n.º 2
0
 private void updateProgram(TGChannel channel) {
   this.updateProgram(channel.getChannelId(), channel.getBank(), channel.getProgram());
 }