KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > sound > midi > ControllerEventListener


1 /*
2  * @(#)ControllerEventListener.java 1.15 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package javax.sound.midi;
9
10 import java.util.EventListener JavaDoc;
11
12
13 /**
14  * The <code>ControllerEventListener</code> interface should be implemented
15  * by classes whose instances need to be notified when a <code>Sequencer</code>
16  * has processed a requested type of MIDI control-change event.
17  * To register a <code>ControllerEventListener</code> object to receive such
18  * notifications, invoke the
19  * {@link Sequencer#addControllerEventListener(ControllerEventListener, int[])
20  * addControllerEventListener} method of <code>Sequencer</code>,
21  * specifying the types of MIDI controllers about which you are interested in
22  * getting control-change notifications.
23  *
24  * @see MidiChannel#controlChange(int, int)
25  *
26  * @version 1.15, 03/12/19
27  * @author Kara Kytle
28  */

29 public interface ControllerEventListener extends EventListener JavaDoc {
30     
31     /**
32      * Invoked when a <code>Sequencer</code> has encountered and processed
33      * a control-change event of interest to this listener. The event passed
34      * in is a <code>ShortMessage</code> whose first data byte indicates
35      * the controller number and whose second data byte is the value to which
36      * the controller was set.
37      *
38      * @param event the control-change event that the sequencer encountered in
39      * the sequence it is processing
40      *
41      * @see Sequencer#addControllerEventListener(ControllerEventListener, int[])
42      * @see MidiChannel#controlChange(int, int)
43      * @see ShortMessage#getData1
44      * @see ShortMessage#getData2
45      */

46     public void controlChange(ShortMessage JavaDoc event);
47 }
48
Popular Tags