Java and Sound, Part 2
Subject:   this example on ubuntu 9.04
Date:   2009-07-27 03:28:24
From:   nickleus
i tried using this on ubuntu and when i play the midi file in totem or play it directly from the java program i just get one note even though i've entered e.g. "C D E"


Full Threads Oldest First

Showing messages 1 through 4 of 4.

  • this example on ubuntu 9.04
    2009-07-27 03:45:36  nickleus [View]

    ok i figured out what i was doing wrong. i had to enter java arguments like this:
    -o /home/nick/Desktop/test2.mid "C D Eb F# G +A Bb"

    and it plays the output AND creates the file. i thought i remember reading that it would do either or, but maybe i am mistaken. thanks for this code =)
    • this example on ubuntu 9.04
      2009-07-27 03:59:22  nickleus [View]

      also, why the use of "else if"s? why wouldn't you let the user define the bpm, instrument AND output file? why only let them define one of them? i would take away the else's in the main method...
      • this example on ubuntu 9.04
        2009-07-27 04:14:15  nickleus [View]

        nerd alert! ok he he, oops, i think maybe the bpm and instrument are irrelevant for the output midi file =)
        • this example on ubuntu 9.04
          2009-07-27 04:19:29  nickleus [View]

          but again, if you only want to hear the output and not save to file then you should remove the else in front of the -t:
          else if (args[a].equals("-t")) {
          like this:
          if (args[a].equals("-t")) {
          so you can effect both the instrument and the bpm. not so nerdy after all eh? =)