Read sound file from disk in Java

Write a simple application that reads a sound file from disk (use a Clip). Play the sound backwards by arranging the byte arrays/frames in the reverse order.
Please I need an explanation of every step.
Get some Duke Dollars for your help.

Hi,
When execute this code, I see this: "[Ljava.io.File;@111f71".   
How I can see the name of the File, and How I can run a program with one by one from the files reader in a parameter ???
  Thank's.
   Hervey P.                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • How to connect read sound file from chart to Moving STFT PtByPt

    Hi!
    I got a

    Hi sean1985,
    The Sound File Read Simple.vi returns the data as an array of waveforms, while the STFT Spectrogram PtByPt.vi accepts a single waveform.  In order to pass the data from Sound File Read Simple.vi to STFT Spectrogram PtByPt.vi, you will need to index into the array and pass each individual waveform to STFT Spectrogram PtByPt.vi from the array of waveforms that is generated by Sound File Read Simple.vi.
    Thanks,
    Jonathan C
    Staff Application Engineering Specialist | CTD | CLA
    National Instruments

  • Reading Spool files from AS400 through JAVA Applications

    Hi,
    i am trying to read spool fiels through my java application with the help of jt400.jar files,which is developed by IBM.When i try to display the content of the spool file the result is look like this and give some ideas to come out from these
    problems.
    thanks in advance
    selvin
    --- 4- 4++++�+-+@z 4++-_��++_� 4+3@+@+@_���������@M_�����?�] 4+
    s+-�+@z 4+@@@@� � 4+__++@+-@z 4+___ 4+++++++ 4+s--�+@z 4+z_a_�a___� � 4+:-
    ?��@z 4+B__a_�a___� 4+s�+++@z 4+|��z_�z_� � 4+:-�?���@z 4+C__� 4+G` 4+I___ �� 4+
    -�?��� 4+-�?��� 4+B���?�@+�M�] 4+T@@���?� 4+j���?�@_?��� � 4+@+��� 4+@+?�� 4
    B��@����� 4+T+�?����� 4+k��@_�?��� � 4+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~~~~~~~~ � 4+__� 4+
    ---++ 4+B@@@@_ 4+Q@@@@@@@@@@_ 4+j@@@@@@@@@@@@@@@@@@K__ � � 4+___ 4+
    ---_++++--+ 4+B@@@@_ 4+Q@@@@@_�k___ 4+j@@@@@@@@@@@@_�k_�_K__ � � 4+___ 4+
    ---++++� 4+B@@@@� 4+Q@@@@@�k___ 4+j@@@@@@@@@@@@__k___K__ � � 4+___ 4+
    ----- 4+B@@@@_ 4+Q@@@@@@@@@@_ 4+j@@@@@@@@@@@@@@@@@@K__ � � 4+@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ � 4+'�+--@��-+@z 4+C@@@@_ 4+R@@@@@�_k___ 4+
    k@@@@@@@@@@@@��k��_K__ � 4+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    If you were expecting the spool file to be translated to ASCII with carriage returns, line feeds, and form feeds, here is the magical piece of code:
    SpooledFile splf = new SpooledFile(sys, splfName, splfNum, jobName, jobUser, jobNum);
    PrintParameterList pl = new PrintParameterList();
    pl.setParameter(SpooledFile.ATTR_MFGTYPE, "*WSCST");
    pl.setParameter(SpooledFile.ATTR_WORKSTATION_CUST_OBJECT, "/QSYS.LIB/QWPDEFAULT.WSCST");
    InputStream in = splf.getTransformedInputStream(pl);
    For reasons not immediately clear to me, the first character in the file appears to be a null byte (hex 0). I also believe that CRs and LFs only appear as needed to return to the beginning of the line (CR) and the feed one line (LF). It is permissible for example to have <data><CR><LF><LF><LF> (i.e. feed three lines). I also assume that <data><CR><data><CR><LF> would result in overprinting (missing line feed). I have even seen <data><CR><CR>, and I assume the second CR should be ignored.
    I have not exhaustively tested these scenarios, but from some of the problems we've had, the above description seems like a reasonable way to think about the data stream

  • Cannot seem to read properties file from JSP

    Hi all,
    In an ISA 4.0 application I want to read a properties file from a JSP to decide whether or not to execute some specific JavaScript code. I want the properties file because in it I can easily configure this externally. I put my properties file in /WEB-INF/classes.
    I develop on an environment using Tomcat where this works fine. On an acceptance machine using the SAP J2EE engine however this won't work, to my surprise. Can anyone give me a suggestion on why my properties file is not read?
    Here's the Java scriptlet code:
    UserSessionData userSessionData = UserSessionData.getUserSessionData(session);
    // theme will be something like "themes/zester":
    String theme = (String) userSessionData.getAttribute(Constants.THEME_KEY);
    boolean showScript = false;
    int slashIndex = theme.indexOf('/');
    String themeKey = null;
    // get the "zester"-like part from the theme:
    if(theme != null && slashIndex > -1) {
      themeKey = theme.substring(slashIndex + 1);
    Properties props = new Properties();
    InputStream is = application.getResourceAsStream("/WEB-INF/classes/script.properties");
    if(is != null) {
      props.load(is);
      is.close();
      Enumeration keysEnum = scriptProps.propertyNames();
      while (themeKey != null && keysEnum.hasMoreElements()) {
       if(theme.toUpperCase().endsWith((String) keysEnum.nextElement())) {
        showScript = true;
        break;
       showScript = false;

    Hi Kishor,
    Thank you for taking the time!
    I agree, this issue may have to do with the deployment. There is however a remark in the <a href="http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletContext.html">ServletContext</a>  interface documentation on methods <a href="http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletContext.html#getResource(java.lang.String)">getResource()</a> and <a href="http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletContext.html#getResourceAsStream(java.lang.String)">getResourceAsStream()</a> that may also be of interest here:
    "The servlet container must implement the URL handlers and URLConnection objects that are necessary to access the resource."
    Is this remark of relevance to the subject, or is this thought too far fetched? Mind you, the documentation also states that "This method allows the servlet container to make a resource available to servlets from any source. Resources can be located on a local or remote file system, in a database, or in a .war file". It should, therefore, be possible to read a file from disk???
    Cheers,
    Peter-Jan Bosch

  • Reading files from folder in java

    Hi ..I am new to java ..can you help me ..how to read the files from folder(containing 10 java files) and store in a array..
    Thanks

    use the java.io package, more specifically java.io.File. You can construct a new File by passing in a String version of the pathname, and then store that into your array.

  • Start a sound file from pdf

    Using an iPad, is it possible to play a sound file from a link on a pdf page? If so, is it also possible to stop the file playing when that pdf page is exited?
    Or should I be trying to do this with some other application?
    Any suggestions gratefully received.
    John

    Hi!!
    I guess I had more or less the same problem. Actually, if you want to specify the jar's classpath, you have to put it in the manifest file, or not use the -jar option. Take a look at:
    http://forum.java.sun.com/thread.jsp?forum=22&thread=546391&tstart=0&trange=15
    Once you have the command line, you can use Runtime.exec(...) to run your program.
    I hope it helps...

  • Cannot delete file from disk after emailling that file like attachment

    After i send some file from disk in Mail like attachment i cannot delete that file from disk unless i quit Mail. Like Mail is still using a file. Of course, that mail is in Sent mail, not in outbox.

    This deeper than that. I created another account on the same iMac and it works in Harmony with my other devices and Documents in the cloud. I can only imagine the icloud account is somehow corrupted (I am on my macbook not iMac at the moment). There have been no updates to the Calendar, Contacts or Documents since early January on that account. I have spent 1hr on the phone with support and they were baffled as well. Only thing I can gove as insight to the problem is this, I was on the Mac Mini which was backed up on Time Machine. about 4 or 5 months ago I had to completley restore the Mac Mini becasue of the never ending circle on the load screen. The Backup failed to work it kept loading the issue and 4 or 5 times the circle of death kept coming up I would subsequently wipe the Mini and go further back in the back up until I go a copy that worked.  I then loaded the Time Mache back up into my NEW iMac and wnet from there. It took about a month for this problem I am detailing above to start happening. It maybe a corrupt file loaded from the backup into the new iMac causing this problem. Best answer I can think of on my own???

  • How can I transfer a sound file from my "Voice Memos" app on my iPhone to my iPad?

    How can I transfer a sound file from my "Voice Memos" app on my iPhone to my iPad?

    In iTunes with your iPhone connected, click on the iPhone device, select the Apps tab, scroll down to the File Sharing section and pick an app that plays Quicktimes ("Files Connect" works in this example, but I'm open to suggestions of better apps for playing transferred Quicktimes) and drag your Quicktime from Finder to the Documents pane for the File Sharing app.   Once the file transfer is complete, go to the app on your iPhone to play the Quicktime.

  • Failed to read wsdl file from url

    Hi all,
    I am struggling with WL 9.2, consuming a WSRP enabled portlet at the following point:
    Having created a proxy portlet, refering to the WSDL of the WSRP producer, I did successfully deploy the portal. When accessing the portal and consuming the portlet the following exception is thrown:
    com.bea.wsrp.faults.TransportException: Failed to read wsdl file from url due to -- java.net.ConnectException: Tried all: '8' addresses, but could not connect over HTTP to server: 'www.w3.org', port: '80';
    The WSDL includes a schema (http://www.w3.org/2001/XMLSchema). The URL is definetely accessible by the server.
    I am open for any kind of support ;) Thanks in advance!
    Kind regards,
    Matthias

    Yes, they are all local schemas. The way ALSB works, even if the import path in the wsdl or parent schema doesn't exist, relative to the current directory, you can specify which schema resolves that reference. My WSDL imports several schemas, all of which import others. When I was done importing all the schemas and resolving references, all the references in WSDLs and XSDs were assigned and valid. However, after all of those imports and reference resolution, it still says the WSDL is invalid, with the following odd error message:
    The WSDL is not semantically valid: Failed to read wsdl file from url due to -- java.net.MalformedURLException: no protocol: /XMLSchema/PaymentServices/Resources/PaymentServices-200802.
    That path listed refers to one of the schemas imported by the WSDL. The reference to that schema in the WSDL was resolved, and it doesn't complain about that reference.

  • How can I read text files from LAN if I only know the hostname?

    I'm new in Java Developing, and dont know the written classes yet. I need help, how to do the following steps?
    <p>1. How can I read text files from LAN if I only know the hostname, or IP address?
    <p>2. How to read lines from text files without read all lines from the beginning of file, just seek to a position.
    (ex. how can I read the 120th line?)
    <p>Please help!
    <p>sorry for the bad english

    I'm new in Java Developing, and dont know the written classes yet. I need help, how to do the following steps?
    1. How can I read text files from LAN if I only know the hostname, or IP address?You need to know the URL of the file. You need to know the hostname, port, protocl and relative path.
    The hostname is server, not file.
    2. How to read lines from text files without read all lines from the beginning of file, just seek to a position.Use the seek() to get to a random byte.
    (ex. how can I read the 120th line?)The only way to find the 120th line is to read the first 120 lines. You can use other file formats to find the 120th line without reading the whole file but to need to be able to detremine where the 120th line is

  • How to view file from vss using java Commandline

    Hi To ALL,
    I wanted to view a file from vss through java code.
    By using the folowing code,i could able to get vss file in to local folder.
    Runtime.getRuntime().exec
    ("cmd /c ss Get $/Mywork/Myfile.java -GLC:/New");
    But i wanted to view file from vss using java code.
    any one please help me..
    Thanks in advance.........

    As always, Google is your friend.
    Follow the bouncing link.
    http://www.google.com/search?hl=en&q=VisualSourceSafe+%2B+Java+API
    PS.

  • Bug? iTunes 10 doesn't remove files from Disk sometimes

    Hi all.
    I think i figured out a bug in iTunes (10).
    Sometimes, when i select a file from library and press cmd+backspace to delete a file from disk to put it in trash, iTunes won't put the selected file into the Trash. Sometimes it does, sometimes it doesnt. Its going to be removed in the Library but its still on Filesystem so i can add it once again, and try it 2-3 times till its finally gets deleted.
    Any ideas?!
    EDIT:
    found another thread with same problem
    http://discussions.apple.com/thread.jspa?messageID=12530336&#12530336
    Message was edited by: koDiacc
    Message was edited by: koDiacc

    OK ... help myself with asking a friend ...
    Search for a few (approx. 20) files manually then iTunes found the rest itself!

  • How to import and play sound file from mxl link?

    I need to load different sound files dependent on which link you previously clicked in my app, but cannot figure out how to call the link to the sound file from my mxl file:
    <carRace>http://www.unisux.org/zik-car/lamborghini-diablo-gtr_standing-start.mp3</carRace>
    Can someone tell me what I am doing wrong in this code?
    <fx:Script>
       <![CDATA[
                                            private var req:URLRequest;
                                            private var context:SoundLoaderContext = new SoundLoaderContext(1000);
                                            private var bCall:Sound;
                                            private var bSong:Sound;
      private function playSong():void
                                                      var urlSong:String = "{carRace}";
                                                      var request:URLRequest = new URLRequest(urlSong);
                                                      bSong = new Sound(request, context);
                                                      bSong.play();
      ]]>
    </fx:Script>
    because this code does work:
    <fx:Script>
       <![CDATA[
      private var req:URLRequest;
      private var context:SoundLoaderContext = new SoundLoaderContext(1000);
      private var bCall:Sound;
      private var bSong:Sound;
      private function playSong():void
      var urlSong:String = "http://www.unisux.org/zik-car/lamborghini-diablo-gtr_standing-start.mp3";
                                                      var request:URLRequest = new URLRequest(urlSong);
                                                      bSong = new Sound(request, context);
                                                      bSong.play();
      ]]>
    </fx:Script>

    Visit: http://www.tools.de/solaris/
    you will love sound/audio programming.... source available.

  • How to delete a READ ONLY file from Directory

    Hi Friends,
    how to delete a READ ONLY file from Directory , file is in my system only.
    Please help me .
    note: its read only file.
    Thank you.
    Karthik.

    hI,
    try with this statement.
    delete dataset <datasetname>.
    this will definitely work.
    Regards,
    Nagaraj

  • How to read the file from ftp server

    Hi
    I need to read a file from a ftp server . Iam using apache lib common-net .jar .
    FTPClient ftp = new FTPClient();
    ftp.connect(server);
    ftp.login(username,password);
    FTPFile[] files = ftp.listFiles();
    for(int i=0 ;i<files.length;i++){
    System.out.println(" File : "+ i + " - " + files);     
    InputStream ip = ftp.retrieveFileStream(path);
    I got the inputstream from the ftp server. but iam not able to read the contents of the file ....
    help me plzzzzz

    Hi
    I have one more problem . first i try to read the file and write the file in local directory . then i try to read the data in the remote file .. iam getting the datas as null.
    InputStream ip = ftp.retrieveFileStream(path);                    
    File f = new File("D:\\ftp.txt");                    
    FileOutputStream fo = new FileOutputStream(f);
    byte[] buf = new byte[1024];
    while ((len = ip.read(buf)) > 0) {                         
    fo.write(buf,0,len);               
    fo.close();
    BufferedReader br = new BufferedReader(new InputStreamReader(ip));
    String line;
    do {
    line = br.readLine();
    System.out.println(" data " +line);
    }while (line != null);

Maybe you are looking for

  • Failed to Initialize the application 'soa-infra'

    Hi, During installation of SOA 11g, i am facing problem in starting the managed server. Iam using the following components with versions: *1. JDeveloper Studio Edition Version 11.1.1.2.0 (Base install)* *2. Weblogic Server 10.3.2.0* *3. SOA Suite 11.

  • Albums and Songs seems disappear in iTunes Music folder  (8.0.1)

    Before start a back up of my iTunes 8.0.1 I had curiosity to check the iTunes Library > iTunes Music There I notice some Artist folder became empty: no album(s) and no song(s) anymore !? I still can play them from the main iTunes window. But till whe

  • Exporting whole database (10GB) using Data Pump export utility

    Hi, I have a requirement that we have to export the whole database (10GB) using Data Pump export utility because it is not possible to send the 10GB dump in a CD/DVD to the system vendor of our application (to analyze few issues we have). Now when i

  • App Migration from 2.0 to 3.1

    Hi - Is it possible to migrate application from apex 2.0 directly to 3.1? Are there any watch-outs? Regards, Tom

  • Nepal Export Process from India

    Hi All, I want to map Exports to Nepal from India, In this case Excise duty is applicable and I want excise document to adopt Export number range. I suppose if I use - user exit - J_1I7_REDETERMINE_INVOICE_TYPE and define Nepal as domestic then it ma