• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

MIDI help

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey guys, I have a question about sending and receiving MIDI messages...
How?
I have tried many different variations of code but get nothing...
I would be greatful if someone could point me in the right direction.

Cheers,
winn_man
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sending from where and sending to where?
 
Tom Winn
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Send midi out of a port, and receive through a port, the midi device is just a simple midi analyser.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What doesn't work?
 
Tom Winn
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I keep getting MidiUnavailableException.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kinda hard to help.
 
Tom Winn
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Lines 65 and 67 produce the errors
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Stack trace might be helpful.
 
Tom Winn
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do I get one of those, I've only really been programming in java for about a week!!! I'm using netbeans.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's the thing that gives you the exception you posted above, but with the rest of the information.

(Also note that the exception documentation may provide you with a clue as to what's going wrong.)
 
Tom Winn
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
debug:
Exception in thread "Thread-3" java.lang.RuntimeException: Uncompilable source code - unreported exception javax.sound.midi.InvalidMidiDataException; must be caught or declared to be thrown
at MidiIOEvent.run(MidiIOEvent.java:72)
at java.lang.Thread.run(Thread.java:619)
BUILD SUCCESSFUL (total time: 9 seconds)

Is what I get from the output window, with the task window show:

unreported exception javax.sound.midi.InvalidMidiDataException; must be caught or declared to be thrown | MidiIOEvent.java | line 72 |
unreported exception javax.sound.midi.InvalidMidiUnavailableException; must be caught or declared to be thrown | MidiIOEvent.java | line 74 |


 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's a compilation error: fix your Java first, then deal with the MIDI. Check out Java exception handling in whatever resource you're using to learn Java, or search the web.
 
Tom Winn
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The program works fine with out the midi code in, I've played around displaying the values from the textfields on the console output.

But thanks for the help... Will have to try and find a source that shows how to send midi.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're not understanding what I said: this has nothing to do with MIDI yet; your code isn't compiling because of Java errors. The message explains what's missing--you're neither catching, nor throwing, a checked exception.
 
Rob Spoor
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are running this from an IDE, right? David is right; always make sure that all (and I really mean all) compiler errors are gone before you run your application.
 
Tom Winn
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah, running it from the IDE... I honestly don't know how to fix this, I have been searching for a while and drawn up nothing... But I will keep searching till I can get an answer.
 
Tom Winn
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Think i might have found the answer, try and catch!!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic