Results 1 to 2 of 2
  1. #1
    mcindafizzy is offline Member
    Join Date
    Jan 2011
    Posts
    1
    Rep Power
    0

    Default Get MIDI Song Title

    Greetings,

    I am working on a Java MIDI visualizer and I currently would like to pull the title from a sequence, but I can't seem to find any method in the API between the Sequence, Sequencer, or anything else that will return the title to me.

    Anyone know how to get a hold of this information?

    Thanks.

    Matt

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    I'm not familiar with Java's midi capabilities, but one thing that looks promising in the API is that MidiSystem has a static method, getMidiFileFormat that extracts the MidiFileFormat from a Midi File, and MidiFileFormat has a getProperty method that takes a String and returns an Object, including a String object, the title of the file, if you pass the String "title" into this method. So in other words, what if you try something like so...


    Java Code:
    // assuming myMidiFile is the midi file of interest,...
    String title = MidiSystem.getMidiFileFormat(myMidiFile).getProperty("title").toString();
    System.out.println("Midi title is: " + title);

Similar Threads

  1. MIDI to PCM
    By Ben Wheatley in forum Advanced Java
    Replies: 1
    Last Post: 08-05-2009, 06:58 PM
  2. set * at tab title
    By keffie91 in forum Advanced Java
    Replies: 7
    Last Post: 10-06-2008, 08:21 PM
  3. midi bytes
    By willemjav in forum Advanced Java
    Replies: 77
    Last Post: 07-29-2008, 04:10 PM
  4. help with midi files
    By leonard in forum New To Java
    Replies: 1
    Last Post: 08-06-2007, 05:40 PM
  5. Load song according to its Genre
    By ahlai in forum AWT / Swing
    Replies: 1
    Last Post: 07-24-2007, 03:57 AM

Posting Permissions

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