Class MusicReceiver


  • public class MusicReceiver
    extends java.lang.Object
    Represents a device that can receive music that is sent to it. For example, you can connect your external MIDI keyboard, then use this class to send music from your JFugue program to the device.
    • Constructor Summary

      Constructors 
      Constructor Description
      MusicReceiver​(javax.sound.midi.MidiDevice device)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.sound.midi.Receiver getReceiver()  
      void sendSequence​(javax.sound.midi.Sequence sequence)
      Send the given sequence to the MIDI device - use this to send MIDI files to your keyboard!
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MusicReceiver

        public MusicReceiver​(javax.sound.midi.MidiDevice device)
    • Method Detail

      • sendSequence

        public void sendSequence​(javax.sound.midi.Sequence sequence)
                          throws javax.sound.midi.MidiUnavailableException
        Send the given sequence to the MIDI device - use this to send MIDI files to your keyboard!
        Parameters:
        sequence - The sequence to send to the MIDI device
        Throws:
        javax.sound.midi.MidiUnavailableException
      • getReceiver

        public javax.sound.midi.Receiver getReceiver()