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

« back to all changes in this revision

Viewing changes to TuxGuitar-fluidsynth/src/org/herac/tuxguitar/player/impl/midiport/fluidsynth/MidiOutImpl.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.midiport.fluidsynth;
 
2
 
 
3
import org.herac.tuxguitar.player.base.MidiControllers;
 
4
import org.herac.tuxguitar.player.base.MidiOut;
 
5
 
 
6
public class MidiOutImpl implements MidiOut{
 
7
        
 
8
        private MidiSynth synth;
 
9
        
 
10
        public MidiOutImpl(MidiSynth synth){
 
11
                this.synth = synth;
 
12
        }
 
13
        
 
14
        public void sendSystemReset() {
 
15
                this.synth.sendSystemReset();
 
16
        }
 
17
        
 
18
        public void sendNoteOn(int channel, int key, int velocity) {
 
19
                this.synth.sendNoteOn(channel, key, velocity);
 
20
        }
 
21
        
 
22
        public void sendNoteOff(int channel, int key, int velocity) {
 
23
                this.synth.sendNoteOff(channel, key, velocity);
 
24
        }
 
25
        
 
26
        public void sendControlChange(int channel, int controller, int value) {
 
27
                this.synth.sendControlChange(channel, controller, value);
 
28
        }
 
29
        
 
30
        public void sendProgramChange(int channel, int value) {
 
31
                this.synth.sendProgramChange(channel, value);
 
32
        }
 
33
        
 
34
        public void sendPitchBend(int channel, int value) {
 
35
                this.synth.sendPitchBend(channel, value);
 
36
        }
 
37
        
 
38
        public void sendAllNotesOff() {
 
39
                for(int i = 0; i < 16; i ++){
 
40
                        this.sendControlChange(i,MidiControllers.ALL_NOTES_OFF,0);
 
41
                }
 
42
        }
 
43
}