Java MidiChannel setPitchBend() method with example

javax.sound.midi.MidiChannel.setPitchBend() method Changes the pitch offset for all notes on this channel. This affects all currently sounding notes as well as subsequent ones. (For pitch bend to cease, the value needs to be reset to the center position.)

The MIDI specification stipulates that pitch bend be a 14-bit value, where zero is maximum downward bend, 16383 is maximum upward bend, and 8192 is the center (no pitch bend). The actual amount of pitch change is not specified; it can be changed by a pitch-bend sensitivity setting. However, the General MIDI specification says that the default range should be two semitones up and down from center. It is possible that the underlying synthesizer does not support this MIDI message. In order to verify that setPitchBend was successful, use getPitchBend.

MidiChannel setPitchBend() method Signature

void setPitchBend(int bend)

Parameters:

bend – the amount of pitch change, as a nonnegative 14-bit value (8192 = no bend)

See Also:

getPitchBend()

javax.sound.midi.MidiChannel.setPitchBend() method Implementation

void setPitchBend(int bend){
}

MidiChannel setPitchBend() method Example

package com.ehowtonow.javax.sound.midi.midichannel;

public class SetPitchBendMethodExample {

	public static void main(String[] args) {

	}

}

Output


Ask your questions in eHowToNow Forum

Post your technical, non-technical doubts, questions in our site. Get answer as soon as possible, meanwhile you can help others by answering, unanswered questions.
To Ask new Question : Ask Question
Check our existing discussions : Questions & Answers

  1. Java RSAKey getModulus() method with example
  2. Java OffsetDateTime withDayOfMonth() method with example
  3. Java LocalObject _get_policy() method with example
  4. Java Rectangle2D hashCode() method with example
  5. Java ContentHandlerFactory createContentHandler() method with example
  6. Java – RowSorterEvent.Type Class
  7. Java BaseStream iterator() method with example
  8. Java HTMLEditorKit clone() method with example
  9. Java – ValueHandler Interface
  10. Java MultiFileChooserUI uninstallUI() method with example
  11. Java XMLInputFactory createXMLStreamReader() method with example 1
  12. Java InetAddress getCanonicalHostName() method with example
  13. Java MetalBorders.ScrollPaneBorder paintBorder() method with example
  14. Java JPopupMenu getInvoker() method with example
  15. Java JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem getAccessibleRole() method with example

Be the first to comment