Phantom Reboot with Java MIDI

I have a Java Program that "Processes" MIDI data being input from an external music keyboard (connected to computer with MusicMan USB Midi cable)
When I start up the program the 1st time -> Everything runs fine.
BUT when I close the program and re-open it -> After a few minutes, the computer will reboot!
Do you know why this is? I've tried everything.
**NOTE** It only happens when the Yamaha Keyboard has been connected to the computer via the USB port. I can open and close the program an infinite amount of times if the keyboard is not connected to the computer.

can you please elaborate what you mean? do you know much about MIDI processing? What hardware do the javax.sound.midi.* classes use?

Similar Messages

  • Need help with Java MIDI and VST info

    I am currently a college student for programming and I know programming very well, but for this current task, I am completely stuck. This is not a school project or work, just a personal project I'm working on at the moment to learn more about Java.
    What I am trying to create is a VST (Virtual Studio Synthesizer) using Java for use in music programs such as FL Studio, Sonar, Ableton, and so on. I did alot of Googling and found the following program:
    [http://jvaptools.sourceforge.net/index.html]
    I got it working, but it's not quite what I am looking for (it's more like an on-site editor that you enter code into and then run it). I want to create a VST from scratch and learn what each thing means in the program. I've done some research on MIDI input and output and found the following in the Java documentation:
    [http://java.sun.com/javase/6/docs/api/javax/sound/midi/MidiDevice.html]
    I figured I'm on track of what I'm looking for, but the problem is that the Java documentation simply sucks. It has no examples of code, how the functions work, and how I'm suppose to use them.
    First off, I want to start with the extreme bare basics. Is it even possible to do a VST in JUST Java? I've seen and used examples of obtaining data from a MIDI file and playing it, but that's not what I'm trying to do. Second, how would I take MIDI data from a music program running the VST and enter the data into a text box? Once I'm able to do that, I should be able to work with the data to produce audio output.
    My program I am attempting to make is a guitar synthesizer that I can run in music programs as a VST. If anyone around here knows anything about MIDI and VST plugins, please, post some example code and help point me in the right direction to creating something. I'm not looking to use other people's programs or code, I want to make something myself from scratch but I don't know where to start!

    Programming guide
    [http://java.sun.com/j2se/1.5.0/docs/guide/sound/programmer_guide/contents.html]
    Examples...
    [http://www.jsresources.org/examples/]

  • Solved: INTERNAL_ERROR when creating container with Java on Vista

    I don't know what the root cause is, but I've got a solid test case.
    If I maintain a reference to the Environment used to create my XmlManager, then openContainer will barf up a mysterious INTERNAL_ERROR. Setting my reference to the Environment to null eliminates the problem.
    I'm using 2.3.10 on Vista with java 1.6. Netbeans 6.0 beta 1
    the error:
    com.sleepycat.dbxml.XmlException: Uncaught exception from C++ API, errcode = INTERNAL_ERROR
    at com.sleepycat.dbxml.dbxml_javaJNI.XmlManager_openContainer__SWIG_2(Native Method)
    at com.sleepycat.dbxml.XmlManager.openContainer(XmlManager.java:525)
    at com.sleepycat.dbxml.XmlManager.openContainer(XmlManager.java:190)
    at restlet.Main.main(Main.java:105)

    Oops, haha. I guess rebooting made this go away (!?); I can't repro today.
    Here's the test case anyway.
    import com.sleepycat.db.DatabaseException;
    import com.sleepycat.db.Environment;
    import com.sleepycat.db.EnvironmentConfig;
    import com.sleepycat.dbxml.XmlContainer;
    import com.sleepycat.dbxml.XmlContainerConfig;
    import com.sleepycat.dbxml.XmlException;
    import com.sleepycat.dbxml.XmlManager;
    import com.sleepycat.dbxml.XmlManagerConfig;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    public class Test {
    public static void main(String[] args) {
    Environment myEnv = null;
    XmlManager xmlManager = null;
    XmlContainer myContainer = null;
    File envHome = new File("C:/testEnv");
    String theContainer = "container.dbxml";
    try {
    EnvironmentConfig envConf = new EnvironmentConfig();
    myEnv = new Environment(envHome, envConf);
    XmlManagerConfig xmlManagerConfig = new XmlManagerConfig();
    xmlManager = new XmlManager(myEnv, xmlManagerConfig);
    // myEnv = null; // omit for error
    XmlContainerConfig xmlCC = new XmlContainerConfig();
    myContainer = xmlManager.openContainer(theContainer, xmlCC); // error here
    myContainer.close();
    xmlManager.close();
    } catch (XmlException xml) {
    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, xml);
    } catch (DatabaseException ex) {
    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
    } catch (FileNotFoundException fnfe) {
    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, fnfe);
    } finally {
    try {
    if (myContainer != null) {
    myContainer.close();
    if (xmlManager != null) {
    xmlManager.close();
    if (myEnv != null) {
    myEnv.close();
    } catch (DatabaseException ex) {
    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, "eject!", ex);
    }

  • Connecting A Keyboard With a MIDI Cable

    I have connected my keyboard to my laptop with a MIDI cable, and the sustain pedal makes a noise throught the computer whenever I push it down. What to do?

    I don't know much about sequencers. But maybe a concept from the "raw audio" world would help. Riven's comment in this thread is what is most pertinent:
    http://www.java-gaming.org/topics/reliable-sound-playing/26104/view.html
    How are MIDI sounds launched? Are you doing them singly? Or can they be placed in the context of a running sequence, running timeline? If the latter can be done, then you have a better chance of accuracy.
    There's also a link, in that thread, to a good article about timing issues for audio, in my first post there.
    It might be helpful to enqueue the MIDI events as they arrive, with a timestamp, and use the timestamps when calculating when to feed them to the Sequencer. But as I said, I could be way off, as I haven't worked with MIDI in Java yet, and don't know if that even fits the model of how things are done.
    But it's not like you've gotten a lot of help here from anyone else, yet...
    You might try StackOverflow forums.

  • Need help: computer reboots whenever java is initiated.

    Recently received a used computer with xp installed.
    Every time I initiate something to do with java the computer restarts.
    For Instance:
    in control panel - clicking on the java console.
    online - using online storage service "adrive.com" to upload files.
    installing - running the java installer for jedit.
    Each one of these things causes a reboot.
    I've deleted and reinstalled the latest java runtime environment, ran virus/spyware scans, deleted everything from the computer I don't need, and cleaned the registry, but nothing has solved the problem.
    Searched for a solution on google and troubleshooting guides, but the terms: java, reboot, xp, etc; are all so common that the results don't come anywhere close to the answer I need.

    Wouldn't you know it. After spending all this time searching for an answer, almost immediately after I posted this I found the answer here on this forum:
    http://forums.sun.com/thread.jspa?forumID=32&threadID=689707
    Thanks to: Caffeine0001
    For those who want to know: All I did was update my -Display Adapter- driver through -Device Manager- and ran windows update. Windows update probably had nothing to do with the fix, but it updated .NET to 3.5 and updated IE to version 8.
    Good To Go!

  • Executing a file with Java?

    Hi,
    I wanted to know how I could execute a file with java. Here are a couple scenarios - let's say I am developing an anti-spyware utility and I wanted to first write a batch file, and then create it in a folder, then run it when they click "Run". Then afterwards I want to shutdown their computer.
    My Mindset:
    - FileWriter to create the .bat and write the Batch commands.
    - Execute the batch file.
    - Execute the shutdown.exe file to reboot their PC.
    So my simple question is, how can I execute a file?
    Thanks!
    -Josh

    Well here is the code I have:
                try
                    Runtime.getRuntime().exec("cmd.exe /c test.bat");
                catch(IOException e1)
                    //NOTHING
                }Now my cmd.exe is obviously in my Windows System32 folder, and my "test.bat" file is in my C:\ root directory. So I am wondering why that wont execute. I tried a fer other things too like:
    Runtime.getRuntime().exec("cmd.exe  c:\test.bat");that didn't work either, because you can't have a "\" in a string...
    So how can I get this thing to execute the batch file?

  • XSLT Mapping with Java class not working in Integration Repository

    Hi,
    I have an XSLT mapping program with Java enhancement and I was able to successfully tested it in Stylus Studio. However, when I imported the Java class and the xslt program in Enterprise Service Builder and tested it, my program does not compile.
    Here is the error message: "Transformer Configuration Exception occurred when loading XSLT mapping_temp.xsl; details: Could not compile stylesheet".
    My java program is in a zip file containing SOAPHeaderHandler.java and SOAPHeaderhandler.class. My Java has a package com.nga.xslt.
    Here is the declaration of my Java class in the XSLT: xmlns:javamap="java:com.nga.xslt.SOAPHeaderHandler"
    It seems that it could not read the java class. Can you please advice what is wrong?

    Hi ,
    select XMLTOOLKIT option in Operation mapping and execute it.
    I am not sure we can call java program in XSLT Program,but alternative is copy the code and use it in XSLT mapping it self,that means your XSLT program will become with JAVA extensions.
    then in Operation mapping level select SAPXMLTOOL kit option and execute it. i hope it will work. if it is not working then you have deploy some JAXP files on server,because the way execution of XSLT Mpaping program got changed,like when eve you executing XSLT with extnasions( if you are not using XMLTOOL kit option) then you have to use latest version of JAXP.JDK files.
    Regards,
    Raj

  • Sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loop

    sir i have given lot of effort but i am not able to solve my problem either with notifiers or with occurence fn,probably i do not know how to use these synchronisation tools.

    sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loopHi Sam,
    I want to pass along a couple of tips that will get you more and better response on this list.
    1) There is an un-written rule that says more "stars" is better than just one star. Giving a one star rating will probably eliminate that responder from individuals that are willing to anser your question.
    2) If someone gives you an answer that meets your needs, reply to that answer and say that it worked.
    3) If someone suggests that you look at an example, DO IT! LV comes with a wonderful set of examples that demonstate almost all of the core functionality of LV. Familiarity with all of the LV examples will get you through about 80% of the Certified LabVIEW Developer exam.
    4) If you have a question first search the examples for something tha
    t may help you. If you can not find an example that is exactly what you want, find one that is close and post a question along the lines of "I want to do something similar to example X, how can I modify it to do Y".
    5) Some of the greatest LabVIEW minds offer there services and advice for free on this exchange. If you treat them good, they can get you through almost every challenge that can be encountered in LV.
    6) If English is not your native language, post your question in the language you favor. There is probably someone around that can help. "We're big, we're bad, we're international!"
    Trying to help,
    Welcome to the forum!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Problem with java installation on Linux

    HI ,
    I am trying to install jdk on Linux..I am new to java and Linux both. I am trying to download the file for the linux installation onto my home PC(windows XP) and then ftp it to my Linux machine. I need to do this because I have a remote login to my Linux machine( a server at school). However when I try to download file my IE jsut crashes. I can see the page for accepting the Agreement but when I click on Accept the next page just stops responding.
    Could someone explain why this is happening.
    thanks,
    G.

    The problem doesn't have to do anything with Java or Linux as far as i can see. It's more likely a problem with Windows XP and IE. Be assured that normally downloading the Linux JDK in windows is not a problem.

  • I have a problem with Imac mid 2010 graphics card (ATI Radeon 5670 512MB)

    I have a problem with Imac mid 2010 graphics card (ATI Radeon 5670 512MB). When I play video formats like xvid, mkv, avi iMac freezes and emits horrible sound,in service said the problem is not overheating. Not a problem with memory or hard disk because I placed second correct parts.The same problem is with OSX 10.6.8 and 10.8.4 and other players.Apple hardware test found no problem and tech tool pro found no fault.
    After five days of testing in the service they can not  found fault and it was decided to change the graphics card.
    New graphics have been tested for two days but it is not reproduced divx ... but their test software which did not find any fault on the old graphics...
    Do I have the right to complain if repair does not fix the problem because I use non apple softwere and video formats.

    You could look at the System Profile for the info it presents for the card.  But why wouldn't you think it's not up to date if you have the latest install (according to your sig above)?
    What program are you trying to run?  Is there anything in the system log? 
    I think it's the program that's having the problem and not anything with your video software.

  • Problem with Java and Windows (Mainly Vista and UAC)

    Hi all,
    I am having a problem with a program that I've devoloped. The program itself is packaged as a jar and I plan to deploy it across multiple platforms eventually however right now i am only concerned about windows based systems. I have made an installer for a windows baised systems using NSIS to install the software files. I made the installer as I need several java packages to be installed so the program would work (JAI, J3D, JAI ImageIO) and I also require the program to have fileassociations on windows.
    I know that this is not what java is about, however the majority of the users will be on windows baised systems so I've decided that OS specific installers is the best option.
    During the process I have noticed that there are several key problem with java for this type of application!
    The first issue that I have come across is getting file associations to work on java. As a .jar is not an excutable it is not possible to directly associate a filetype with it in java so to overcome this I currently run the program from a .bat files and also the program requires large memory so this also allows me to run the program with -xmx. The batch file that I use is :
    <code>
    cd PATH TO PROGRAM
    start javaw -Dsun.java2d.noddraw=true -Xmn100M -Xms500M -Xmx1000M -jar "PATH TO PROGRAM\program.jar" %1 -vram 134217728
    pause;
    </code>
    Ok so all this appears to work fine and allows windows to have file associations and start the program and thats all works perfectly but this is a non-ideal solution. Has anyone got any advice on improving this?
    The next problem that I have appears to be a problem with Vista and UAC (user access control). When a user installs the program and installs the program into the program files directory I found that the program did not work and kept saying that I did not have access to the files in the current directory. This is a problem as I read and write settings files during program execution.
    On a Vista system UAC prevents file write operations into the Program Files directory unless the program has requested elevated status even if the user is a full administrator. The probem is that there appears to be no real way to achieve this under java that I'm aware of...
    Has anyone else had this probem and has a suitable solution?
    Any advice on these issues would realy be appricated.
    Regards
    Joey

    Ok so i've kinda found a solution, its not ideal but its very good. I found this program called Elevate
    A link to the site I got it was
    http://www.wintellect.com/cs/blogs/jrobbins/archive/2007/03/27/elevate-a-process-at-the-command-line-in-vista.aspx
    This program allows you start java with a UAC dialog for high access using
    Elevate java -jar myjar.jar
    This then allows you to have full access using java... I guess it could be dangerous but it does the job.

  • Problem with java and flex web service

    Hi,
    I have a basic web service written in java using jax ws 2.1
    ri. I need to call it from Flex using the WebService class
    Annotations for the java web method :
    @WebMethod
    public void Login(
    @WebParam(name="server") String serverURL,
    @WebParam(name=AUTHENTICATE_HEADER,header=true,mode=WebParam.Mode.INOUTHolder<Authenticate Header>
    authHeader)
    When I try and call the service from Flex , it can't find the
    login method and attempts to call it fail. If I set the web service
    to RPC based using @SOAPBinding , the method is found but then
    there are issues with the authentication header.
    What do I need to do to get flex web services communicating
    succesfully with java ?
    Are there are any known compatibility issues ? Or guidelines
    for going about this ?
    Any help would be appreciated

    well Shay,
    i've used JDev's tools to developer and to deploy the web service: the war and ear files are automatically generates you to the end of the process.
    I have included all the files java and the compiled classes, but I do not have files jar.
    But don't works: if i create only one java class with all code inside then it works fine!!
    Daniele

  • Problem with java and yahoo games

    hello everyone,
    i have a mac 10.6.8 with java SE 6 1.6.0_33-603-424 and i have problems with yahoo games.... anyone can help me please, i have a mac 10.6.8 with java SE 6 1.6.0_33-603-424 and i have problems with yahoo games.... anyone can help me please

    So here is what comes to pass.
    Recall this started as a Lion Safari/5+ environment that SU took to version 6.
    Two weeks ago I just updated Flash Player. Today I fire up Java Preferences and I am told that I need to download Java. Did so, intentionally hit the "factory reset" button and then installed the Flash Player from teh Adobe site. The most recent install suggests automatic update but I choose "ask first."
    Restart Safari and we seem to be in order
    Thanks

  • Problem with java and pogo games

    i use mozilla and now with the problems with java and hackers cannot play my pogo games,what can i do? i disabled my java i tried java 6 doesnt work or is not safe,what is a safe way to play games on pogo that use java?

    Oracle has released a Java 7 Update 11 to address security vulnerabilities and you should update to that version.
    *https://support.mozilla.org/kb/how-to-use-java-if-its-been-blocked
    See also:
    *http://kb.mozillazine.org/Java#Windows_installation_issues
    You can find the latest Java version on the Oracle website.
    See Java Platform > Java SE 7U11 and Java 6U38 (Download JRE)
    *http://www.oracle.com/technetwork/java/javase/downloads/index.html

  • Problem with java swing button and loop

    Problem with java swing button and loop
    I�m using VAJ 4.0. and I�m doing normal GUI application. I have next problem.
    I have in the same class two jswing buttons named start (ivjGStart) and stop (ivjGStop) and private static int field named Status where initial value is 0. This buttons should work something like this:
    When I click on start button it must do next:
    Start button must set disenabled and Stop button must set enabled and selected. Field status is set to 1, because this is a condition in next procedure in some loop. And then procedure named IzvajajNeprekinjeno() is invoked.
    And when I click on stop button it must do next:
    Start button must set enabled and selected and Stop button must set disenabled.
    Field status is set to 0.
    This works everything fine without loop �do .. while� inside the procedure IzvajajNeprekinjeno(). But when used this loop the start button all the time stay (like) pressed. And this means that a can�t stop my loop.
    There is java code, so you can get better picture:
    /** start button */
    public void gStart_ActionEvents() {
    try {
    ivjGStart.setEnabled(false);
    ivjGStop.setEnabled(true);
    ivjGStop.setSelected(true);
    getJTextPane1().setText("Program is running ...");
    Status = 1;
    } catch (Exception e) {}
    /** stop button */
    public void gStop_ActionEvents() {
    try {
    ivjGStart.setEnabled(true);
    ivjGStart.setSelected(true);
    ivjGStop.setEnabled(false);
    getJTextPane1().setText("Program is NOT running ...");
    Status = 0;
    } catch (Exception e) {
    /** procedure IzvajajNeprekinjeno() */
    public void IzvajajNeprekinjeno() {  //RunLoop
    try {
    int zamik = 2000; //delay
    do {
    Thread.sleep(zamik);
    PreberiDat(); //procedure
    } while (Status == 1);
    } catch (Exception e) {
    So, I'm asking what I have to do, that start button will not all the time stay pressed? Or some other aspect of solving this problem.
    Any help will be appreciated.
    Best regards,
    Tomi

    This is a multi thread problem. When you start the gui, it is running in one thread. Lets call that GUI_Thread so we know what we are talking about.
    Since java is task-based this will happen if you do like this:
    1. Button "Start" is pressed. Thread running: GUI_Thread
    2. Event gStart_ActionEvents() called. Thread running: GUI_Thread
    3. Method IzvajajNeprekinjeno() called. Thread running: GUI_Thread
    4. Sleep in method IzvajajNeprekinjeno() on thread GUI_Thread
    5. Call PreberiDat(). Thread running: GUI_Thread
    6. Check status. If == 1, go tho 4. Thread running: GUI_Thread.
    Since the method IzvajajNeprekinjeno() (what does that mean?) and the GUI is running in the same thread and the event that the Start button has thrown isn't done yet, the program will go on in the IzvajajNeprekinjeno() method forever and never let you press the Stop-button.
    What you have to do is do put either the GUI in a thread of its own or start a new thread that will do the task of the IzvajajNeprekinjeno() method.
    http://java.sun.com/docs/books/tutorial/uiswing/index.html
    This tutorial explains how to build a multi threaded gui.
    /Lime

Maybe you are looking for

  • Maximum No of Items in FI Reached

    Hi Frnds,   WHen i am trying to do post Goods issue i am getting an error saying that Maximum no of Items in FI Reached.   if i do delivery split will it help me or is there any other solutions for this. Regards Rakesh

  • Custome Tcode is not working in QA system but working in DEV system

    Hello, We have copied QM11 tacode to ZQM11. We found this ZQM11 tcode is not working in QA system, but properly working in DEV system. When we are execute this tcode from QA system with all required input, it says "No objects could be selected that m

  • Everything disappeared on my macbook

    I constantly had notifications that my disk is full, so i deleted loads of documents, and than one day he just shut down, and when I started it, it showed no icons or dock, It just opens Safari, and I can use internet. But nothing else and I can't ac

  • Sending Email. Urgent

    Hi all,   i am planning to send an email from abap To [email protected] Subject: Mail from ABAP text: example mail  from an abap program <b>How to aproach that? Give me a Clear Idea. which function modules to use? which Structures to Use?</b>

  • Help connecting external HDD to AT300 tablet.

    I want to know if and how it would be possible to connect an external HDD to a AT300 tablet.  Both the tablet and the HDD have micro usb ports, but I can not locate a micro to micro cable online.  Am I completly wrong about this even being possible?