Results 1 to 3 of 3
  1. #1
    LegGodt is offline Member
    Join Date
    Jul 2011
    Posts
    2
    Rep Power
    0

    Default How do I slow down recevier.send?

    Hi guys,

    I've been working on a sysex editor and I hit a wall with sending the message to the MIDI device. Everything else is working so far up to being able to get a file form the MIDI deivce, transfer to hex, save, etc ....

    But I'm using receiver.send() to send the sysex message and it's sending the sysex message to my MIDI hardware device too fast. I've already determine that the line causing the problem is ...

    device_Rec.send(sysexMessage, -1);

    I can send an unedited file to the MIDI device and it works fine, but if the file has one change the MIDI device throw a BUFFER OVERFLOW message as soon as it hits that sysex message being passed. There are 140 sysex messages containing 160 bytes that are begin dumped when I send the full syses dump. The MIDI Device I am using does not allow individual messages to be sent, it has to be the whole thing. Although I don't think that would solve my problem either.

    I've tried thread.sleep() and wait()/notify() before and after the line above, but all that does is slow down the individual messages. As soon as it hits one that has a difference between the sysex file I have saved and what is on the MIDI device is throws that BUFFER OVERFLOW error.

    Anyone have any ideas?

    Thanks!

  2. #2
    LegGodt is offline Member
    Join Date
    Jul 2011
    Posts
    2
    Rep Power
    0

    Default Need to buffer javax.sound.midi Interface Receiver.Send

    Hi guys,

    I've been working on a sysex editor and I hit a wall with sending the message to the MIDI device. Everything else is working so far up to being able to get a file form the MIDI deivce, transfer to hex, save, etc ....

    But I'm using javax.sound.midi receiver.send() to send the sysex message back the the MIDI hardware device and it's sending the sysex message too fast. I've already determine that the line causing the problem is ...

    device_Rec.send(sysexMessage, -1);

    I can send an unedited file to the MIDI device and it works fine, but if the file has one change the MIDI device throw a BUFFER OVERFLOW message as soon as it hits the individual sysex message being passed. There are 140 sysex messages containing 160 bytes that are begin dumped when I send the full sysex dump.

    I've tried thread.sleep() and wait()/notify() before and after the line above, but all that does is slow down the individual sysex messages, pausing between each message of 160 bytes. As soon as it hits one line of bytes that has a difference between the sysex file and what is on the MIDI device is throws that BUFFER OVERFLOW error.

    What I need to do is slow down the transfer of the individual bytes so the hardware device can handle the data transfer when there is a change in the sysex message.

    Anyone have any ideas?

    Thanks!

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,457
    Rep Power
    20

    Default Re: How do I slow down recevier.send?

    Please go through the Forum Rules, particularly the second paragraph.

    I've merged the second thread you started (in New to Java) here. Please don't double post the same question again.

    db
    Last edited by DarrylBurke; 01-12-2013 at 02:43 PM.
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Slow applet
    By robs in forum Java Applets
    Replies: 20
    Last Post: 02-28-2011, 04:15 PM
  2. why is it so slow? need to optimize it?
    By skarosg3 in forum Advanced Java
    Replies: 15
    Last Post: 10-08-2010, 09:54 AM
  3. Replies: 10
    Last Post: 06-06-2010, 07:49 PM
  4. eclipse very slow
    By katie in forum Eclipse
    Replies: 2
    Last Post: 11-05-2007, 11:20 AM
  5. Replies: 1
    Last Post: 07-31-2007, 05:53 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
  •