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

« back to all changes in this revision

Viewing changes to TuxGuitar/src/org/herac/tuxguitar/player/impl/sequencer/MidiSequenceHandlerImpl.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.player.impl.sequencer;
 
2
 
 
3
import org.herac.tuxguitar.player.base.MidiSequenceHandler;
 
4
import org.herac.tuxguitar.song.models.TGTimeSignature;
 
5
 
 
6
public class MidiSequenceHandlerImpl extends MidiSequenceHandler{
 
7
        
 
8
        private MidiSequencerImpl seq;
 
9
        
 
10
        public MidiSequenceHandlerImpl(MidiSequencerImpl seq,int tracks) {
 
11
                super(tracks);
 
12
                this.seq = seq;
 
13
                this.seq.getMidiTrackController().init(getTracks());
 
14
        }
 
15
        
 
16
        public void addControlChange(long tick,int track,int channel, int controller, int value) {
 
17
                this.seq.addEvent(MidiEvent.controlChange(tick, track, channel, controller, value));
 
18
        }
 
19
        
 
20
        public void addNoteOff(long tick,int track,int channel, int note, int velocity) {
 
21
                this.seq.addEvent(MidiEvent.noteOff(tick, track, channel, note, velocity));
 
22
        }
 
23
        
 
24
        public void addNoteOn(long tick,int track,int channel, int note, int velocity) {
 
25
                this.seq.addEvent(MidiEvent.noteOn(tick, track, channel, note, velocity));
 
26
        }
 
27
        
 
28
        public void addPitchBend(long tick,int track,int channel, int value) {
 
29
                this.seq.addEvent(MidiEvent.pitchBend(tick, track, channel, value));
 
30
        }
 
31
        
 
32
        public void addProgramChange(long tick,int track,int channel, int instrument) {
 
33
                this.seq.addEvent(MidiEvent.programChange(tick, track, channel, instrument));
 
34
        }
 
35
        
 
36
        public void addTempoInUSQ(long tick,int track,int usq) {
 
37
                this.seq.addEvent(MidiEvent.tempoInUSQ(tick, usq));
 
38
        }
 
39
        
 
40
        public void addTimeSignature(long tick,int track,TGTimeSignature ts) {
 
41
                //not implemented
 
42
        }
 
43
        
 
44
        public void notifyFinish(){
 
45
                //not implemented
 
46
        }
 
47
}