uk.org.toot.midi.message
Class PitchMsg
java.lang.Object
uk.org.toot.midi.message.MidiMsg
uk.org.toot.midi.message.ShortMsg
uk.org.toot.midi.message.ChannelMsg
uk.org.toot.midi.message.PitchMsg
- Direct Known Subclasses:
- NoteMsg
public class PitchMsg
- extends ChannelMsg
This class provides methods to simplify client handling of pitched messages.
POLY_PRESSURE is accepted since it contains pitch data which also needs to
be e.g. transposed.
Method Summary |
static int |
getPitch(javax.sound.midi.MidiMessage msg)
Get the Pitch byte of the specified MidiMessage. |
static boolean |
isPitch(int status)
|
static boolean |
isPitch(javax.sound.midi.MidiMessage msg)
Determine whether the specified MidiMessage can be handled by this class. |
static javax.sound.midi.MidiMessage |
setPitch(javax.sound.midi.MidiMessage msg,
int pitch)
Set the Pitch byte for the specified MidiMessage. |
static javax.sound.midi.MidiMessage |
transpose(javax.sound.midi.MidiMessage msg,
int semitones)
Transpose the specified MidiMessage by the specified number of semitones. |
Methods inherited from class uk.org.toot.midi.message.ShortMsg |
createShort, createShort, createShort, getData1, getData1and2, getData1and2, getData2, isShort, isShort, setData1, setData2, setMessage, setMessage |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PitchMsg
public PitchMsg()
isPitch
public static boolean isPitch(javax.sound.midi.MidiMessage msg)
- Determine whether the specified MidiMessage can be handled by this class.
isPitch
public static boolean isPitch(int status)
transpose
public static javax.sound.midi.MidiMessage transpose(javax.sound.midi.MidiMessage msg,
int semitones)
throws javax.sound.midi.InvalidMidiDataException
- Transpose the specified MidiMessage by the specified number of semitones.
- Throws:
javax.sound.midi.InvalidMidiDataException
getPitch
public static int getPitch(javax.sound.midi.MidiMessage msg)
- Get the Pitch byte of the specified MidiMessage.
setPitch
public static javax.sound.midi.MidiMessage setPitch(javax.sound.midi.MidiMessage msg,
int pitch)
throws javax.sound.midi.InvalidMidiDataException
- Set the Pitch byte for the specified MidiMessage.
- Throws:
javax.sound.midi.InvalidMidiDataException
Copyright © 2004, 2005, 2006, 2007 Steve Taylor. All Rights Reserved.