Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8609421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:52:37+00:00 2026-06-12T03:52:37+00:00

I am trying to parse the input from a midi device connected to my

  • 0

I am trying to parse the input from a midi device connected to my laptop. So I want to locate the device, connect to it and receive the input from it.

I started with select midi device in java, but I am having some trouble getting my way around this one.
I considered jFugue that offers a way to access the java sound API but since I don’t have their book, there was no resource.
Also, jMusic offers some functionality but it’s mostly for midi file IO and not a midi device IO.
So a do you know of any practical tutorial on the subject(probably using directly the Java sound API).

As always,
any help more than appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T03:52:38+00:00Added an answer on June 12, 2026 at 3:52 am

    Have look at Java Sound tutorial: http://docs.oracle.com/javase/tutorial/sound/accessing-MIDI.html It contains nice explanation of Java MIDI API and also contains example source code on how to enumerate devices.

    There is following sample source code:

    // Obtain information about all the installed synthesizers.
    Vector synthInfos;
    MidiDevice device;
    MidiDevice.Info[] infos = MidiSystem.getMidiDeviceInfo();
    for (int i = 0; i < infos.length; i++) {
      try {
        device = MidiSystem.getMidiDevice(infos[i]);
      } catch (MidiUnavailableException e) {
          // Handle or throw exception...
      }
      if (device instanceof Synthesizer) {
        synthInfos.add(infos[i]);
      }
    }
    // Now, display strings from synthInfos list in GUI. 
    

    When you acquire MIDI device, you can (in previous source code)

    • get device name by calling infos[i].getName
    • get device vendor by calling infos[i].getVendor()
    • check if this is input or output device (if one “physical” device offers input and output ports, they will be seen as two devices in Java, one for input, second for output) by calling device.getMaxReceivers() and device.getMaxTransmitters().

    For more details, see API docs:
    – http://docs.oracle.com/javase/1.5.0/docs/api/javax/sound/midi/MidiDevice.html
    – http://docs.oracle.com/javase/1.5.0/docs/api/javax/sound/midi/MidiDevice.Info.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to extract all input elements from a form. When I parse the
I want to create a dynamic select input (dropdown menu) from JSON. I have
I'm trying to parse a URI from user input. I'm assuming some users won't
Trying to parse an SQL string and pull out the parameters. Ex: select *
I'm trying to parse a int from a String array element. Here is my
I have to parse an input string in python and extract certain parts from
I am trying to parse a RSS2.0 feed, obtained from a remote server, on
I'm trying to get some data from a file, then parse it and pass
I am trying to parse XML from a .NET WCF Webservice using NSXML Parser.
I'm trying to get a line as input from the command line. My problem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.