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

    Default Get MIDI Song Title


    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?



  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power


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