Determines if the given ShortMessage is a MIDI Pitch Bend message - Java javax.sound.midi

Java examples for javax.sound.midi:MidiMessage

Description

Determines if the given ShortMessage is a MIDI Pitch Bend message

Demo Code


//package com.java2s;

import javax.sound.midi.ShortMessage;

public class Main {
    /**/*from w  w w.j a  v  a2s .  com*/
     * Determines if the given ShortMessage is a MIDI Pitch Bend message
     * @param sm the ShortMessage to check
     * @return <tt>true</tt> if the ShortMessage is a MIDI Pitch Bend message
     */
    public static boolean isPitchBend(ShortMessage sm) {
        return sm.getCommand() == ShortMessage.PITCH_BEND;
    }
}

Related Tutorials