Results 1 to 3 of 3
  1. #1
    finndesolace is offline Member
    Join Date
    Mar 2015
    Posts
    2
    Rep Power
    0

    Default Java real-time midi

    I'm busy writing a schoolproject, sending and receiving midi messages to and from a syntheziser through a saffire focusrite audio interface connected through usb on my computer (Win7). (this is different from what i read in a topic where examples were given: help with Java real-time midi
    in the sence that i want to receive feedback from the syntheziser through the midi in (transmitter))
    I'd be helpful if you'd be willing to take a look. I'm quite new to all of it.


    When checking midi devices, i get 2 instances of my saffire focusrite. One with a transmitter and one with a receiver.

    If i then put the receiver on the transmitter and send a sysex identify request. I get this error(if i don't set the receiver on the transmitter, i don't get it):
    Exception in thread "Java Sound MidiInDevice Thread" java.lang.IllegalStateException: Receiver is not open
    at com.sun.media.sound.AbstractMidiDevice$AbstractRec eiver.send(Unknown Source)
    at com.sun.media.sound.AbstractMidiDevice$Transmitter List.sendMessage(Unknown Source)
    at com.sun.media.sound.MidiInDevice.callbackLongMessa ge(Unknown Source)
    at com.sun.media.sound.MidiInDevice.nGetMessages(Nati ve Method)
    at com.sun.media.sound.MidiInDevice.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)


    This is the output during my test procedure:
    IDI devices:
    Max receivers:0
    obtained as inputDevice
    Max transmitters:-1
    Open receivers:
    No default receiver

    Open transmitters:

    Default transmitter: com.sun.media.sound.MidiInDevice$MidiInTransmitter @e253f1

    Open transmitters now:
    com.sun.media.sound.MidiInDevice$MidiInTransmitter @e253f1
    Max receivers:-1
    obtained as outputDevice
    Max transmitters:0
    Open receivers:

    Default receiver: com.sun.media.sound.MidiOutDevice$MidiOutReceiver@ 9e54c2

    Open receivers now:
    com.sun.media.sound.MidiOutDevice$MidiOutReceiver@ 9e54c2

    Open transmitters:
    No default transmitter
    Default system sequencer is Real Time Sequencer
    Default system synthesizer is Gervill


    Thanks in advance for the feedback.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    12,059
    Rep Power
    26

    Default Re: Java real-time midi

    Removed from http://www.java-forums.org/new-java/...time-midi.html

    When you have a question, start a new thread -- they're free.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    finndesolace is offline Member
    Join Date
    Mar 2015
    Posts
    2
    Rep Power
    0

    Default Re: Java real-time midi

    Quote Originally Posted by DarrylBurke View Post
    Removed from http://www.java-forums.org/new-java/...time-midi.html

    When you have a question, start a new thread -- they're free.

    db

    Thx. On other forums they're not free :p

    To stay on topic:

    I've tested with both roland UM ONE MKIII and focusrite saffire pro.

    I figured out that actually when wanting to output "midi input" to console, you need a different receiver to couple to the transmitter (input port)
    That receiver will be evoked whenever a midievent is received. That receiver is most likely to be a custom implementation.

    The dumpreceiver example on the jsresources.org site is helpful for this.


    Now at the moment i get the right feedback, using my focussrite.
    But not when using the roland UM ONE MKIII.

    I've also noticed that the communication with the roland UM ONE MKIIIn is much faster.
    I've noticed that while i was coupling the output receiver to the input transmitter of the focusrite... i got an error saying receiver is not open.
    But with the roland i didn't got that.
    Meaning that the receiver is being "released" faster. Could be that the buffer is too small for the roland, or that it handles these calls differently. Meaning that it breaks off a current send, in order to reuse the same receiver for the transmitter.

    There's no built in option in the driver's gui on the roland to set the buffer.
    Another explanation could be that the receiver, offered by the roland driver towards the midisystem doesn't make a specific implementation of the send method for sysex. And thus my receiver doesn't recognize it as a sysex instance. Which seems rather unliky as i think the output from the midi interface seen as input to my receiver should read the same bytes as with the focusrite.

    Any ideas or experience or advice is welcome on that issue.

Similar Threads

  1. help with Java real-time midi
    By mike1127 in forum New To Java
    Replies: 6
    Last Post: 03-12-2013, 01:31 AM
  2. JAVA real-time RTSJ or C++
    By yoshi in forum Forum Lobby
    Replies: 1
    Last Post: 05-09-2012, 07:38 PM
  3. How real-time is java?
    By StateMachine in forum New To Java
    Replies: 12
    Last Post: 12-27-2011, 04:41 PM
  4. Java real time plotting with visualvm
    By gianadoume in forum Java 2D
    Replies: 0
    Last Post: 02-04-2011, 11:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •