MIDlet unable to play midi file with mmAPI

hi , i am currently developing a J2ME game application for my school project .
I learn stuffs about MIDlet about 2 months and i trying to use this mmAPI to play some *.mid file on my midlet, i use SunJava Wireless Toolkit build and run my midlet but the sound just wont appear ,although no error appear.
Did i place the file in wrong or i use the code wrongly.
below is my code
try {
   Player p = Manager.createPlayer
     ("firstlove.mid");
   p.setLoopCount(5);
   p.start();
catch(IOException ioe) {
catch(MediaException e) {
}the firstlove.mid is place in the folder "src" and folder "res" but it just wont play .
src contain my midlet java file and res contains most of my images , i not sure really how do i make it play song on this folder , i dont really want to put the url as C:/blahblah/firstlove.mid cause it not really flexible.
prefer using url like firstlove.mid and placing the media file at the correct folder.
anyone can tell me whats went wrong?
I run this midlet at Default Color Phone of SunJava Wireless Toolkit 2.5.2 for CLDC

You will probably have more succes on a suited answer at one of the forums targeted on Java ME : http://forum.java.sun.com/category.jspa?categoryID=23
Although I know nothing about Java ME API, but it makes sense to me that this file should be available in the classpath of running environment.

Similar Messages

  • Problem playing .mid file with QT Player on an external MIDI instrument

    Hello,
    I am trying to play a .mid file with QT Player (so I can play it from various softwares as Keynote) and send it out on an attached MIDI device (thru M-audio or Tascam interface). Unfortunatelly, I can only choose "QuickTime Instruments" from the pop-up menu in QT Advanced Preferences. I tried with several configs (G4, G5), several MIDI interfaces, and last flavor of both Panther and Tiger with QT 7.0.4. I configured MIDI setups normally and I can play on exernal instruments from Logic or other sequencers.
    Any idea why I cannot see my devices from QT directly ? Thanks,
    M

    Hello,
    I have tried with a Tascam US-428 with 10.3.9 and QT 6 (latest) and 7.0.4 hooked to a Akai S3000. I also tried on a G5 with a MOTU interface (all last software versions). At home, I have tried with my Ti550 running 10.3.9, QT 6 (latest) 7.0.1 and 7.0.4 and also with my Sawtooth (10.4.5, QT 7.0.4), both with a M-audio Uno interface hooked to a E-mu Proteus expander.
    All configurations behave the same. They are working fine with various sequencers (Logic, PT, some freewares) but interfaces never show up in the advanced preferences of QT.

  • Playing midi file with vista & xtreme mu

    I should be able to double click on a midi file, see it load a player, and play the file back using any soundfonts that have been installed in the banks.
    Everything comes out on the default bank.
    When I click, which player should load?
    Anything else that I should do to get this working?

    This is not a live web site, so no url yet, however I can zip the page and files up and email that to you if that is ok with you!?

  • Power PC G5 Unable to Play .MOV File with Avid DNxHD Codec

    Our client is sending us .mov Quicktimes with Avid DNxHD Codec.
    It wouldn't play on our Macbook Pros, but no problem, I downloaded the codec and it ran fine afterwards.
    Not having the same luck with our Power Mac G5 Workstation.
    It runs on Mac OS Leopard 10.5.8.
    Downloaded the codec for Leopard from this link:
    http://avid.custkb.com/avid/app/selfservice/search.jsp?DocId=263545
    Nothing changed.
    I play the file and all I see is black as the timeline runs.
    How should I fix this issue?

    The Power Mac G5 does not have an Intel Processor like the newer macs do. Could that be root of issue?
    It is a definite possibility. The link you posted indicated the Mac v2.1 component was compatible with OS 10.5.5 and later which would normally imply QT 7 with or without Intel CPU. However, the editing software applications do seem to restrict their use to "Intel only" Mac systems. For instance, Pro Tools v8.3 and higher are listed as "Intel Only" software. Did try the v2.01 QT codec component or look for anything older?

  • Unable to play AVI files with Quicktime

    I installed Perian and the xvid codec but still cannot play all AVI videos in QT. Not really a problem since I have VLC. However it would be nice to be able to play AVI files in QT as well

    AVI container can accept a real mess of codecs, not all of which are provided in Perian.  Use a utility such as
    Media Info - http://mediainfo.sourceforge.net - to get details of codecs used in multimedia
    to see which video codec is used and compare it with the list on Perian's web site.

  • What plugin do I need to play midi files in Safari 7.0

    I just upgraded to Maverick and Safari 7.0, and now when I click on midi file links at a website that I have long used, I get an error message saying I am missing a required plugin.  What plugin is necessary to play midi files with Safari?

    http://get.adobe.com/flashplayer/?promoid=BUIGP

  • I can't play midi files.

    Hi,
    I have the latest version of iTunes and Quicktime but I can't play midi files with Quicktime anymore. I have to remove iTunes to be able to play them. Does anyone know how to fix this so I can have iTunes and play midis too? They used to play on my computer so I don't know what's going on.
    Thanks!

    Do you have QuickTimeMusic.qtx and QuickTimeMusicalInstruments.qtx (and their resource directory) in your Program Files\QuickTime\QTSystem directory?
    And you may need to remove some codec packs include QuickTime support.
    And why you have to use QuickTime synthesizer for MIDI files? It uses obsolete technology and a small soundfont (from about 1997) and without proper support for Yamaha XG MIDI files?

  • Can I play MIDI files on a Disklavier with iTunes?

    I have the Yamaha USB-MIDI driver installed on my PowerMac G4 which I have been using to play piano MIDI files on my Yamaha Disklavier using the shareare program QMidi.
    Is it possible to play these MIDI files through the MIDI-USB connection to my Disklavier using iTunes?
    Right now iTunes appears to play these files with the Quicktime music synthesizer and the synthesized piano plays through the speakers. If this is the case, can the Quicktime plug-in be configured to pass the MIDI data to the Yamaha MIDI-USB driver rather than using the synthesizer?
    PowerMac G4   Mac OS X (10.4.5)   iTunes 6.0.4

    See "More like this" in the sidebar at right.

  • I'm trying to play MIDI files in Quicktime. It works buy the volume is very low, even with both Quicktime and computer volume on max. What can I do?

    I'm trying to play MIDI files in Quicktime. It works buy the volume is very low, even with both Quicktime and computer volume on max. What can I do?

    I'm having the same issue.  After opening Audio Midi Setup in Utilities I noticed that the master volume slider of the Built-In Output is very low.  I am not able to slide to get any more level out of the system.
    Can you adjust the master volume on your system?

  • Flash CS5 unable to play .FLV files on Macbook Pro

    I have a colleague who is trying to put together a Flash package for me  on her macbook pro.  It needs to play an flv file. She is unable to play  flv files on her computer either in Flash or using the Adobe Media  Player. I have no problem playing the same files on my macbook pro,  we're both running the latest OS and have version 1.8 of Adobe Media  Player.
    She went to the Adobe site to download the latest version of Adobe  Media Player, hoping that might include whatever component is missing on  her system. Because of Adobe's decision not to distribute AMP that  didn't help.  She has Flash Professional CS5 11.0.2 on her system.  When  she imports an flv video into a Flash project and tries to play it she  gets an error message saying it can't stream the video. Note that the  video is on her hard drive, it is NOT on the internet so no streaming  should be required.
    The actual error message is: "the video player is in the connection  error state. It enters this state when a video stream attempted to load  but was unsuccessful. There are two possible reasons for the error: no  connection to the server or the stream was not found."
    Since it's a file on her hard drive, and she has loaded the file  into the Adobe development environment successfully, the one thing we  know for certain is that neither of these reasons is correct. Something  is obviously missing on her system, what is it and what can we do to fix  it?

    I'm getting error too (Error #2044: Unhandled NetStatusEvent:. level=error, code=NetStream.Play.StreamNotFound). I'm getting this with CS5. This file was previously made in CS4 and never got this error.
    Everything (fla and flv too) is on external hard disk.
    As this work requires to be exported to mov, I've found out that everything needs to be on the mac (don't know for pc), like on desktop.
    So, let me wrap up disadvantages I got with Flash CS5:
    - TextField.embedFont makes the font disappear in CS5, so I can't use it, so I can't "play" with text in a comfortable way (in CS4, with embedFont = true, I was able to rotate and stuff). Now I have to make a bitmap out of it. It means 3 lines of code and a new variable, instead of just an easy one.
    - I have to rebuild my entire source path structure for AS classes, as my old one (that took me years of effort to be reasonable and used to work just fine in CS4).
    - I have to move stuff from my hard drive to the desktop, to make flv be played and to make a mov out of my animation.
    CS5 is making my job harder and making me lose a lot of time to find out errors that have no good reason to exist (it was not error. just "place CS5 doesn't like").

  • Itunes 10.7 not playing MIDI files

    ITunes 10.7 is not playing midi files (.mid).  I often play MIDI files and convert them to MP3 files using iTunes. Has Apple stopped supporting playing and converting MIDI files in iTunes? 
    When I try to open a MIDI file in Quicktime 10.2, it also does not play MIDI files. I do get a message that Quicktime 7 is required to play midi files.
    I sure hope this is changed in future updates of  iTiunes and Quicktime.
    Tom R.

    I don't think this is the complete picture...  I have tried importing midi files into iTunes 10.7 on three different computers, and it worked on one, not the other two.  The differentiating factor? Seems to be the operating system:  it worked on the one with Snow Leopard but not on the ones with Mountain Lion.  I don't have a computer with Lion to test on, unfortunately.  This might be an actual bug, or temporary omission, from the build for Mountain Lion.  Worth filing a bug report, anyway - since it's free and the more people report it the higher priority we might hope it gets?  http://bugreport.apple.com/

  • This html code only plays midi file in IE, not Safari - why?

    <html>
    <title>New York</title>
    <bgsound src="http://home.earthlink.net/~maugustine2/daydream/bachair.mid" loop="0">
    <body bgcolor="#CCCC98">
    </html>
    With this code, the midi file: bachair.mid will only play with IE 5.2/mac, not Safari 2.0.1 / 10.4.2
    Safari will play the midi file with a direct link: http://home.earthlink.net/~maugustine2/daydream/bachair.mid - so it's not a problem with safari midi functions, only this code.
    The page containing this code is at: http://home.earthlink.net/~maugustine2/daydream/DDhead.htm
    Again - IE 5.2/mac plays the midi file with this code and Safari doesn't. Any help is very appreciated! I'm sure it's something very simple.
    Mark

    Thanks for the hint, I found this code - both lines will play the file in Safari - but they also make IE play the file twice! (with an echo). Safari seems to need both to play anything - IE plays it with either one! Any further ideas much appreciated! btw - I am >not< using this to play music on a home page - only a specific goofy little subpage - shouldn't be bothersome for anyone!
    bgsound src="http://home.earthlink.net/~maugustine2/daydream/bachair.mid"
    embed src="http://home.earthlink.net/~maugustine2/daydream/bachair.mid" hidden="TRUE" autostart="TRUE" loop="0"
    /embed

  • Run midi file with IE 5.0 or 6.0

    I write an applet that play "sound.midi" and bundle it in a jar file.The jar file contains
    SoundApplet.class
    SimpleThread.class
    test.mid
    I can listen to the midi by appletviewer but it doesn't work with IE 5.0 or 6.0.
    What should I do?(I think the last version of java 2 doesn't support midi files so I want to include jre with my jar file but I don't know how)
    Thank you.

    I used htmlconverter as you say to automatically install plug in 1.3... but my program doesn't paly midi file.
    I looked at a sample(from sun's sound tutorial ) and it play midi file both in appletviewer and IE.I think there is some problem with my code!
    import java.util.*;
    import java.applet.*;
    import java.net.*;
    import javax.swing.*;
    public class SoundApplet extends Applet{
    SimpleThread st;
    public void init(){
    st=new SimpleThread("Thread 1",this);
    public void start(){
    st.start();
    import java.util.*;
    import java.applet.*;
    import java.net.*;
    import javax.swing.*;
    public class SimpleThread extends Thread{
    AudioClip audioClip;
    URL url;
    public SimpleThread(String str,Applet applet){
    super(str);
    try{
    url = new URL(applet.getCodeBase(),"romance.mid");
    }catch(Exception e){
    System.out.println("Error 1");
    try{
    audioClip = applet.getAudioClip(url);
    }catch(Exception e){
    System.out.println("Error 2");
    public void run(){
    audioClip.loop();
    javac SoundApplet.java
    jar -cvf SoundApplet.class SimpleThread.class romance.mid
    appletviewer webpage.html (it correctly worked)
    but it doesn't work with IE ( webpage.html )
    Really thank you for your help.

  • How to get QuickTime Plugin to play .mid files?

    I have quicktime Plugin installed. It works for playing video files but I can't get it to play .mid files in browser. Firefox asks me to download the file first, even though through options -> application types, I have set it to use the QuickTime plugin.
    I have firefox 22 and quicktime 7.7.4

    Also through MIME settings in QuickTime I have set QuickTime to be associated with .mid and .midi files.

  • Unable to play .mkv files

    I used to be able to play .mkv files with VLC Player just fine before. After I started using Boot Camp with Windows XP, I am unable to play such files because I get an error message saying this computer is too slow to process the video. I'm trying to play 720p movies, but haven't been able to on a 2.2 Ghz MBP with 2 Gigs of ram. So, if anyone has a solution, please post! Thank you!

    Any other video works. I tried launching vlc with --no-video and then sound channel works. Both totem and vlc gives Segmentation Fault in terminal.
    I remember when I installed vlc, it asked whether I will use gstreamer or phonon, I did choose gstreamer. Now I tried reinstalling vlc and it didn't ask for that anymore.
    Ok, I tried opening other mkv files and they worked (I don't know why all the time I thought that the file is 100% ok, apparently it wasn't). But that file was similar to any other files (just a new episode of one TV show).
    P.S. I noticed that I can open that file with Windows and there are audio bugs, but It shows video well... Ahhh, the most important is that video codecs are fine on my arch, so let it be so!
    A strange bug, but if it's like that only with one wrong file, then it's ok. Sorry about bothering you here about my strange file

Maybe you are looking for

  • I recently upgraded my computer from windows vista to windows 7 ultimate and now i have to delete all the data in my iphone?

    i have an iphone 3gs. i recently uprgaded my computer which ment it went from windows vista to windows 7 ultimate.I want to add new music from my computer to my iphone but it says i have to restore it and loose my itunes content. If i do that will i

  • OS X Open Directory / Active Directory

    I followed the direction provided by the "MacTroll White Paper" on AD/OD integration (http://www.afp548.com/filemgmt_data/files/AD-OD-2.1.pdf) which is linked to from various places on Apple's website). I can now manage Macintosh client preferences w

  • PSI, Outstanding Commitments

    Hello I'm working on this projects issue and wondering if someone could provide a solution to this: PO 489483 contains lines for Project FE2013-0046 Task 4.20.43.02.02. PO Line 1 has quantity ordered = 45 PO Line 2 has quantity ordered = 5 Receipt 19

  • I can't open emails from my hotmail inbox

    I have read similar posts about problems with hotmail etc, but none specific. I can get in, open my inbox etc, but I cannot open an email, they are there, I can hover over the message but when I click nothing.... Actually on further probing I can't d

  • Installing Bootcamp update AFTER Windows 7?

    Hep! I successfully installed Windows 7 32 bit (upgraded from Vista) on my iMac a few months ago, obviously without full Bootcamp functionality but it works fine for my purposes. I thought I would be able to simply load Bootcamp 3.0/3.1 when they cam