WAV import

Gday,
I've recently used a flash mic(hhb Flashmic DRM85) to record some audio & my FCP cant recognize the .WAV file format and will not import it.
Basically, i want to get the audio onto the timeline without loosing too much quality. Do i need to convert it or would it be possible to get my hands on some import software for FCP?
Any help would be much appreciated, this problem has been driving me nuts all day!..
Cheers,
Mickey

FCP does work with WAV, but typically broadcast WAV. If FCP will not see your audio, then convert it to AIFF 16bit Stereo at 48Khz. That is the main format FCP likes....and is pretty lossless.
Shane

Similar Messages

  • Protools wav. import problem

    Hi
    I'm having some problems importing protools cosolidated wavs into logic. After consolidation the wavs appear on the desktop and open normally in quicktime (ie: sound exactly as they did in protools). When I import them into logic they sound as though they have been pitch-shifted down a semitone. Logic and protools are set at 24bit. Can anyone explain why this might be happening? Or what I'm doing wrong?
    thanks
    Norman

    I'll give the same answer I did over at Sonikmatter...
    The wave files were probably recorded in PT at 48k, and you have Logic (and your audio interface) set to playback at 44.1.
    Change the sample rate in Logic (and your audio interface) to 48k, and they should play back at the right speed and pitch.

  • 5.1 WAV Import Failure

    If I try to import a 5.1 Wav file into Premiere CS6 which was exported by Audition CS6, I get an Import Failure Error:
    The file will also not play in Windows Media Player.  Does this work for anyone else?
    Terry

    Hey Bill,
      It's a 5.1 .wav file and although I pasted  a screenshot of the error in my post, apparently those don't get through.  Premiere's message was that it has a header error.  Nothing more useful than that.
    Terry
    Sent from my iPad

  • Wav import - wavs displayed on stereo file appear identical.

    I import a wav file, stereo, with 2 instruments on it. One instrument is on the LEFT channel, the other is on the Right channel. Once GarageBand displays it, the wavs look identical. They sound different, as I can pan left and right and hear different instruments, but the wav graph is identical for each channel.
    What's up with this...?

    OK I got around to trying different formats, to see if that is the problem.
    I've converted them from CD (created with a CD burner as CD Audio Files),to all 5 formats that ITUNES converts to, making sure I choose stereo. (wav,mp3,lossless,aac,aiff).
    I've imported each into GB, and the same problem exists no matter the format.
    The wav form displayed for each channel is identical. Panning left or right isolates the instruments, verifying they should display differently.
    Difficult to trust anything GB displays I would think, until we know what it's doing and why.

  • Clipping on WAV import

    I have a WAV file that has been normalized to -1.5 dB.
    Playback is fine in e.g. Adoube SoundBooth. I import that file into
    Captivate and everything is clipped (sounds VERY bad - unusable).
    Even reducing the levels to e.g. 90 or 50% does not help, because
    the file is already clipped now. Captivate seems to manipulate the
    levels immediately on import, so that I cannot change that
    afterwards.
    Anybody experiencing the same?
    Michael

    Annotation from other thread: If one uses MP3 files for
    import (not WAV), they will be played back clipped in preview, but
    exported correctly.

  • Automating wav import, sample rate change, mp3 export

    I do radio spots, lots of them, and every day I have to take my spot that is a 48k wav, convert it to 44.1k, then convert it to a mp3, them distribute via email.
    Can I automate this task?

    Rather than trying to automate iTunes, it might be easier to do the conversion in one go with a utility such as Sound Converter or Switch.
    Hope this helps.

  • Encore 2.0 help importing!!

    So I am trying to import a premiere pro project. The video is a m2v file and the audio is a wav. I tried importing from my external harddrive and the WAV imports instantly. The m2v takes about an hour. but when the green bar is at 100% it will loop back down to about 80%. This went on for about 2 more hours until I canceled it. I then moved the files from the hard drive to the desktop. Encore said it couldn't find the file paths. But when I hook up my ahrd drive again and import from the desktop the files are found but it still loops with the m2v file. I moved both files into premiere and exported them as one AVI which worked however ALL of the chapter markers that were in the m2v are gone. How can I import the m2v?

    > I know how to solve but since 3 times my post was been deleted, i dont care anymore. i dont know why , but i didnt like. my solution is simple and not ilegal. just i cant explain here only by email.
    Your post was deleted more than 3 times.
    I deleted them.
    I have also tried to write to you off-list to explain why, but your given email address is not working as all messages are being bounced back as "no such user".
    If your answer is legal, or relevant - then
    i post it here.
    Otherwise - please just go away. Trying to get people to write to you offlist for a solution is simply not in the spirit of these
    i user to user
    support forums.
    Your posts were deleted as they were not relevant to the topics - not to mention, you were plastering them across every subforum here. This sort of "carpet bombing" will not be tolerated.

  • Import Quality Question

    Ok I don't know much about this but,
    How much audio quality do you lose when you import from a CD? Also, if the answer is lots, then does iTunes use that lossless audio encoder called apple lossless and if not where can I get and what do I need to use it? kinda 3 questions in one there...

    Choose iTunes > Preferences> General pane and click Import Settings.
    Choose an encoder from the Import Using pop-up menu.
    You can listen to songs encoded in AAC or Apple Lossless formats in iTunes and on iPod models that come with a dock connector. If you plan to listen to your music using a different program or MP3 player, choose MP3 Encoder.
    If you want to burn high-quality audio CDs with the songs you’re importing, without losing quality, choose Apple Lossless or AIFF. (Keep in mind that songs imported using this format use much more disc space.)
    If you’ll be playing your songs on a computer that does not have MP3 software, choose WAV.
    Choose a bit rate from the Setting pop-up menu (not available with Apple Lossless Encoder). In most cases, the default selection works well.
    Higher Quality: Choose if you chose MP3 Encoder and plan to create your own audio CDs or listen to your music with high-quality stereo speakers.
    High Quality: Choose if you play music in a noisy environment. This setting creates files that are about 1 MB in size per minute of music.
    Good Quality: Use to fit more songs on a portable MP3 player with limited storage capacity.
    Custom: Choose for greater control over the file size and sound quality.
    To choose AIFF and WAV import settings:
    Choose iTunes > Preferences>General pane and click Import Settings.
    Choose AIFF Encoder or WAV Encoder from the Import Using pop-up menu.
    Choose Custom from the Setting pop-up menu.
    In the dialog that appears, choose settings:
    Sample Rate: The number of times per second the music waveforms are captured digitally. The higher the sample rate, the higher the quality and the larger the file size. Don't choose a sample rate higher than the rate used to store the music originally or you'll waste space. CD quality, for example, is 44.100 kHz, so choosing a higher rate when you're encoding from a CD is unnecessary. In general, the best choice is Auto, which uses the same rate as the original music.
    Sample Size: The number of bits used to store each sample taken as the music is encoded. The higher the sample size, the better the quality and the larger the file size.
    Channels: If you don't have stereo speakers or if your audio files are monaural (mono files are about half the size of stereo files), choose Mono. If you'll be listening through headphones or a stereo system, choose Stereo or Auto. Auto converts monaural tracks into mono files and stereo tracks into stereo files.

  • Turning WAVs into MP3s -- simple right?

    There must be a simple way to do this that I'm missing.
    I have a bunch of songs in WAV that I want to turn into mp3s. I know I can burn a CD and then put the CD back into my computer and tell iTunes to import the songs as mp3s -- but there's got to be a way to omit burning the CD.
    Whenever I try I just get WAVs imported into iTunes.
    Thanks all.

    There is no need to do anything to your audio files to make them into an RSS feed. An RSS feed is simply a list of links and descriptions that people can subscribe to, written in xml language.
    You can use whatever type of audio files you might like, but you'll probably give a broader audiance access to the audio files if they are of the file type mp3.
    So store all your mp3s in a folder named "sermons" or whatever you may choose and then link to them in your .xml file.... this becomes the RSS feed. But be aware that viewers will need either a browser that can open RSS feed documents or some sort of New Reader like:
    http://email.about.com/od/rssreaderswin/tp/top_rss_windows.htm
    For a sample RSS feed:
    http://www.lynnjohnson.citradingcards.com/podcast.xml
    view the source code to see the structure.
    Or
    http://www.podcast411.com/howto_1.html
    .... tons of similar tutorials on line.
    But no... yuo don't do anything with the audio except perhaps make sure they are all mp3 files and stored in a separate folder.
    Best wishes,
    Adninjastrator

  • NOMADIIc not converting wav to

    I have the Nomad IIc unit, that when I choose to convert a .wav recording from the internet by selecting "convert wav to wma" from within the PlayCenter2 console, an error message pops up stating "there is not enough disk space to perform this operation".
    I am running XP Pro w/ 60gb of free space. Space is not the issue. I can convert from .wav to mp3 but a 2meg .wav file converts to a 40meg .mp3 file and this is not practical for use on this Nomad unit.
    Curious if anyone has seen this issue before and know of a fix. I cannot find any entries in the forum describing this problem. Thanks

    I HAVE SAME ISSUES; WAV IMPORT OR PLAYING ON ITUNES {WINDOWS XP or iMAC or G4}. IT DOES HOWEVER PLAY WELL IN QUICKTIME. I DONT UNDERSTANDS, NEITHER DOES APPLE. I FIRST REALIZED THIS WHEN BURNING A BIG DVD FROM iMOVIE to iDVD, IT WAS THE WAV FILE IT PLAYED. NOW I KNOW THAT LAST YEAR ALL MY WAV FILES PLAYED AND WAS ABLE TO BURN, AGAIN LAST YEAR I'M THINKING IT IS A iTUNES 7.0, ISSUE. I REPORTED TO IT TROUBLESHOOTERS. I HAVE NOT LOCATED iTUNES 6.0 TO TEST THIS. O BY THE WAY YES WE BURN IT FINE ONCE WE REMOVED THE WAV. FILE AND THEN HAD TO EXPORTED IT AND BURNED VIA DISK UTILITIES, IN FACT 15 DVD'S. I LIKE MY APPLES.

  • Plays fine in iMovie but the sound disappears once exported to Quick Time

    I read through all the little support things in the iMovie '06 help and nothing worked. No matter how many times I try to export my project to QuickTime everything works but the audio even though I've made sure the audio settings are correct. In iMovie the video plays and the imported song does as well but exporting loses the sound.
    What am I doing wrong?

    Some possibilities:
    Check out this thread for a possible solution: http://discussions.apple.com/thread.jspa?messageID=7305234&#7305234 Perhaps renaming the file would help.
    I don't know if ithis has an effect on the file, but why is it saved in documents rather than music or movies?
    Also, are you using iTunes to convert the file to .aiff? Here is the procedure from iTunes help:
    *Choosing AIFF and WAV custom import settings*
    If you use AIFF or WAV encoding, you can use custom settings for greater control over the quality and size of imported files.
    To choose AIFF and WAV import settings:
    1. Choose iTunes > Preferences, click Advanced, and then click Importing.
    2. Choose AIFF Encoder or WAV Encoder from the Import Using pop-up menu.
    3. Choose Custom from the Setting pop-up menu.
    4. In the dialog that appears, choose settings:
    Sample Rate: The number of times per second the music waveforms are captured digitally. The higher the sample rate, the higher the quality and the larger the file size. Don't choose a sample rate higher than the rate used to store the music originally or you'll waste space. CD quality, for example, is 44.100 kHz, so choosing a higher rate when you're encoding from a CD is unnecessary. In general, the best choice is Auto, which uses the same rate as the original music.
    Sample Size: The number of bits used to store each sample taken as the music is encoded. The higher the sample size, the better the quality and the larger the file size.
    Channels: If you don't have stereo speakers or if your audio files are monaural (mono files are about half the size of stereo files), choose Mono. If you'll be listening through headphones or a stereo system, choose Stereo or Auto. Auto converts monaural tracks into mono files and stereo tracks into stereo files.

  • Add variuos amplitudes to sound graph

    Hi
    I have the following code that computes a sound graph with a fixed amplitude for a number of waves. I need to be able to control the amplitude of each wave, but am not sure how to amend the following code to produce the effect. There is also an fft function that converts the amplitude time graph to frequency time graph, but I am not concerned for this now - only want to change the amplitude for n number of waves.
    import java.awt.*;
    import java.awt.event.*;
    public class FFTv1 extends Frame
       implements ActionListener, WindowListener
      final int maxDim = 1024;
      int width =400, height =300;
      Button b;
      Complex x[];
      drawPanel pdraw;
      //float sam[] = {5, 10, 1};
      public FFTv1() {
    // The title of the frame is "FFT".       
         super("FFT");
    // Use the BorderLayoutlayout manager.    
         setLayout(new BorderLayout());
         addWindowListener(this);
    // Instantiate a button with label "FFT" which when pressed takes the FT.
         b = new Button("FFT");
    // Instantiate a panel object p where the button will be placed.    
         Panel p = new Panel();
    // Place the panel p in the South position  of the frame.  
         add("South", p);
    // Add the button to the panel p    
         p.add(b);
    // The button listens for click events.    
         b.addActionListener(this);
    // Instantiate an array x of type Complex with a length of maxDim.
    // Loop over all the elements of the array setting them equal to the value of a test function
         x = new Complex[maxDim];
    // Initialise the value of test function to zero for all sampling points x[i] = (0,0) for i = 0 to N-1.     
         for (int i=0; i < maxDim; i++) {
            x=new Complex(0.0f, 0.0f);
    // The outer loop is over the N sample points.
    // The inner loop is over the n number of graphs - in this case 2
    // CAN AMPLITUDE BE ADDED BELOW??
         for (int i=0; i < maxDim; i++) {      
              for (int j=10; j < 30; j+=10) {               
         float arg = (float)(j*i * Math.PI/maxDim);
         x[i].setReal(x[i].getReal()+(float)Math.cos(arg));      
    // Instantiate a panel object pdraw where the graph will be drawn.
    pdraw = new drawPanel(x);
    // Place the panel pdraw in the Center position of the frame.
    add("Center", pdraw);
    setBounds(100,100, width, height);
    setVisible(true);
    public void actionPerformed(ActionEvent e) {
    // On clicking the button perform the FT on function contained in complex array x.
    //Instantiate object fft of type FFT passing the array x to the constructor.
    FFT fft = new FFT(x);
    // The FT input data x is overwritten.
    fft.Execute();
    // The drawing panel pdraw needs to be repainted.
    pdraw.repaint();
    static public void main(String argv[]) {
    // Instantiate an object of type FFTv1 which contains the GUI elements and thus drives the overall program.      
    new FFTv1();
    public void windowClosing(WindowEvent wEvt)
    System.exit(0); //exit on System exit box clicked
    public void windowClosed(WindowEvent wEvt){}
    public void windowOpened(WindowEvent wEvt){}
    public void windowIconified(WindowEvent wEvt){}
    public void windowDeiconified(WindowEvent wEvt){}
    public void windowActivated(WindowEvent wEvt){}
    public void windowDeactivated(WindowEvent wEvt){}
    To draw the graphs, we need drawPanel class
    import java.awt.*;
    class drawPanel extends Panel
       Complex x[];
       float ymin, ymax;
       float hscale, vscale;
       int ytop, ybot;
       float ampmax[] = {5, 10, 1};
       float ampmin[] = {-5, -10, -1};
       protected drawPanel(Complex xa[])
        x = xa;
        ymin = -1e9F;
        ymax = 1e9F;     
      public void paint(Graphics g)
          ymin = 1e9F;
          ymax = -1e9F;
           for (int i=0; i< x.length; i++)
              if (x.getReal() > ymax) {ymax = -2;}
         if (x[i].getReal() < ymin) {ymin = 2;}     
    Dimension d = getSize();
    hscale = (float)d.width/x.length;
    vscale = 0.9f*((float)(d.height))/(ymax - ymin);
    ytop = (int)(d.height*0.95);
    ybot = 0;// (int)(d.height*0.05);
    int x0 = calcx(0);
    int y0 = calcy(x[0].getReal());
    System.out.println(y0);
    for (int i = 0; i < x.length; i++)
         int x1 = calcx(i);
         int y1 = calcy(x[i].getReal());
         g.drawLine(x0, y0, x1, y1);
         x0 = x1;
         y0 = y1;
    private int calcx(int i)
    return (int) (i*hscale);
    private int calcy(float y)
         return ytop-(int)((y - ymin)*vscale)+ybot;     
    //=============================================
    I am hoping someone can help, as I have spent hours trying to change the amplitude - I thought it may be ymax and ymin of drawPanel - but then I cannt get n number of waves at the required frequency.
    Please help!
    Thanks
    sam

    Like this
    By the way, that Abort VI button is not for stopping your loops.  I just kills execution wherever it may be.  It should only be used as a last resort if your stopping code is not working properly.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Record_BD.png ‏88 KB

  • How to record sound with JMF?

    I just want to record a clip of sound and save it in a WAV file. I exhausted the web but just couldn't find a tutorial. Would someone be kind enough to give me a tutorial or a sample code? The simpler the better. Thanks.

    Hi there,
    The following lines of code will record sound for 5 sec and save it in file C:/test.wav.
    import java.io.IOException;
    import javax.media.CannotRealizeException;
    import javax.media.DataSink;
    import javax.media.Format;
    import javax.media.Manager;
    import javax.media.MediaLocator;
    import javax.media.NoDataSinkException;
    import javax.media.NoProcessorException;
    import javax.media.NotRealizedError;
    import javax.media.Processor;
    import javax.media.ProcessorModel;
    import javax.media.format.AudioFormat;
    import javax.media.protocol.FileTypeDescriptor;
    public class WAVWriter {
         public void record(){
              AudioFormat format = new AudioFormat(AudioFormat.LINEAR, 44100, 16, 1);
              ProcessorModel model = new ProcessorModel(new Format[]{format}, new FileTypeDescriptor(FileTypeDescriptor.WAVE));
              try {
                   Processor processor = Manager.createRealizedProcessor(model);
                   DataSink sink = Manager.createDataSink(processor.getDataOutput(), new MediaLocator("file:///C:/test.wav"));
                   processor.start();
                   sink.open();
                   sink.start();
                   Thread.sleep(5000);
                   sink.stop();
                   sink.close();
                   processor.stop();
                   processor.close();
              } catch (NoProcessorException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (CannotRealizeException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (NoDataSinkException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (NotRealizedError e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (InterruptedException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         public static void main(String[] args) {
              new WAVWriter().record();
    }I hope this will help. Don't forget to go through JMF guide (http://www.cdt.luth.se/~johank/smd151/jmf/jmf2_0-guide.pdf), especially page 81... it's not always helpfull, but sometimes, it may give you some good answers.
    Happy coding!!!

  • Using the 'java.sound.*' libraries and classes

    Hello,
    I am a complete noob to Java. So please forgive me if I seem a little stupid in the things I ask.
    I would like to know which development kit I should download to be able to gain access to the 'java.sound.*' and midi libraries and classes.
    I downloaded the Java SE 6 SDK but I could get access to these classes.
    I use JCreator as my compiler and I kept getting an error along the lines of 'java.sound.* package does not exist'. I have tried compiling the code with NetBeans and also wiuth Eclipse and I still have no luck and I get the same message. I am guessing the compiler is not the problem and it is the SDK as I can access other classes such as javax.swing and java.awt etc.
    If you could give me a link to the relevant SDK and maybe a good compiler, it would be greatly appreciated.
    Also I am using Windows XP and Windows Vista so if you could provide me with support for either of these operating systems then that would be great.
    Thank You
    Lee

    Here's the code for an SSCCE (Small Self Contained Compilable Example) of a working java sound application. If you don't provide a file name, It does expect you to have a wave file of Ballroom Blitz in your javatest directory, but doesn't everybody?
    To build and run it do:
    javac -cp . SoundPlayer.java
    java -cp . SoundPlayer  yourWaveFile.wav  
    import java.io.*;
    import javax.sound.sampled.*;
    import javax.sound.sampled.DataLine.*;
    public class SoundPlayer implements LineListener
         private float bufTime;
         private File soundFile;
         private SourceDataLine line;
         private AudioInputStream stream;
         private AudioFormat format;
         private Info info;
         private boolean opened;
         private int frameSize;
         private long frames;
         private int bufFrames;
         private int bufsize;
         private boolean running;
         private boolean shutdown;
         private long firstFrame, lastFrame;
         private float frameRate;
         private long currentFrame;
         private float currentTime;
         private Thread playThread;
         // constructor, take a path to an audio file
         public SoundPlayer(String path)
              this(path, 2);     // use 2 second buffer
         // or a path and a buffer size
         public SoundPlayer(String path, float bt)
              this(new File(path),bt);
         public SoundPlayer(File sf)
              this(sf, 2);  // use 2 second buffer
         public SoundPlayer(File sf, float bt)
              bufTime = bt;          // seconds per buffer
              soundFile = sf;
              openSound();
         private void openSound()
              System.out.println("Opening file"+soundFile.getName());
              try
                   firstFrame = 0;
                   currentFrame = 0;
                   shutdown = false;
                   running = false;
                   stream=AudioSystem.getAudioInputStream(soundFile);
                   format=stream.getFormat();
                   if(format.getEncoding() != AudioFormat.Encoding.PCM_SIGNED)
                        System.out.println("Converting Audio stream format");
                        stream = AudioSystem.getAudioInputStream(AudioFormat.Encoding.PCM_SIGNED,stream);
                        format = stream.getFormat();
                   frameSize = format.getFrameSize();
                   frames = stream.getFrameLength();
                   lastFrame = frames;
                   frameRate = format.getFrameRate();
                   bufFrames = (int)(frameRate*bufTime);
                   bufsize = frameSize * bufFrames;
                   System.out.println("frameRate="+frameRate);
                   System.out.println("frames="+frames+" frameSize="+frameSize+" bufFrames="+bufFrames+" bufsize="+bufsize);
                   info=new Info(SourceDataLine.class,format,bufsize);
                   line = (SourceDataLine)AudioSystem.getLine(info);
                   line.addLineListener(this);
                   line.open(format,bufsize);
                   opened = true;
              catch(Exception e)
                   e.printStackTrace();
         public void stop()
              System.out.println ("Stopping");
              if(running)
                   running = false;
                   shutdown = true;
                   if(playThread != null)
                        playThread.interrupt();
                        try{playThread.join();}
                        catch(Exception e){e.printStackTrace();}
              if (opened) close();
         private void close()
              System.out.println("close line");
              line.close();
              try{stream.close();}catch(Exception e){}
              line.removeLineListener(this);
              opened = false;
         // set the start and stop time
         public void setTimes(float t0, float tz)
              currentTime = t0;
              firstFrame = (long)(frameRate*t0);
              if(tz > 0)
                   lastFrame = (long)(frameRate*tz);
              else lastFrame = frames;
              if(lastFrame > frames)lastFrame = frames;
              if(firstFrame > lastFrame)firstFrame = lastFrame;
         public void playAsync(float start, float end)
              setTimes(start,end);
              playAsync();
         // play the sound asynchronously */
         public void playAsync()
              System.out.println("Play async");
              if(!opened)openSound();
              if(opened && !running)
                   playThread = new Thread(new Runnable(){public void run(){play();}});
                   playThread.start();
         public void play(float start, float end)
              setTimes(start,end);
              play();
         // play the sound in the calling thread
         public void play()
              if(!opened)openSound();
              if(opened && !running)
                   running = true;
                   int writeSize = frameSize*bufFrames/2; // amount we write at a time
                   byte buf[] = new byte[writeSize];     // our io buffer
                   int len;
                   long framesRemaining = lastFrame-firstFrame;
                   int framesRead;
                   currentFrame=firstFrame;
                   System.out.println("playing file, firstFrame="+firstFrame+" lastFrame="+lastFrame);
                   try
                        line.start();
                        if(firstFrame > 0)
                             long sa = firstFrame * frameSize;
                             System.out.println("Skipping "+firstFrame+" frames="+sa+" bytes");
                             while(sa > 0)sa -= stream.skip(sa);
                        while (running && framesRemaining > 0)
                             len = stream.read(buf,0,writeSize); // read our block
                             if(len > 0)
                                  framesRead = len/frameSize;
                                  framesRemaining -= framesRead;
                                  currentTime = currentFrame/frameRate;
                                  if(currentTime < 0)throw(new Exception("time too low"));
                                  System.out.println("time="+currentTime+" writing "+len+" bytes");
                                  line.write(buf,0,len);
                                  currentFrame+=framesRead;
                             else framesRemaining = 0;
                        if(running)
                             line.drain();                     // let it play out
                             while(line.isActive() && running)
                                  System.out.println("line active");
                                  Thread.sleep(100);
                             shutdown = true;
                        running = false;
                   catch(Exception e)
                        e.printStackTrace();
                        shutdown = true;
                        running = false;
                   if(shutdown)
                        close();
         // return current time relative to start of sound
         public float getTime()
              return ((float)line.getMicrosecondPosition())/1000000;
         // return total time
         public float getLength()
              return (float)frames / frameRate;
         // stop the sound playback, return time in seconds
         public float  pause()
              running = false;
              line.stop();
              return getTime();
         public void update(LineEvent le)
              System.out.println("Line event"+le.toString());
         // play a short simple PCM encoded clip
         public static void playShortClip(String fnm)
              java.applet.AudioClip clip=null;
              try
                   java.io.File file = new java.io.File(fnm);     // get a file for the name provided
                   if(file.exists())                    // only try to use a real file
                        clip = java.applet.Applet.newAudioClip(file.toURL()); // get the audio clip
                   else
                        System.out.println("file="+fnm+" not found");
              catch(Exception e)
                   System.out.println("Error building audio clip from file="+fnm);
                   e.printStackTrace();
              if(clip != null)     // we may not actually have a clip
                   final java.applet.AudioClip rclip = clip;
                   new Thread
                   (new Runnable()
                             public void run()
                                  rclip.play();
                   ).start();
         public boolean isOpened()
              return opened;
         public boolean isRunning()
              return running;
        public void showControls() {
            Control [] controls = line.getControls();
            for (Control c :controls) {
                System.out.println(c.toString());
        public void setGain(float gain) {
            FloatControl g = (FloatControl) line.getControl(FloatControl.Type.MASTER_GAIN);
            g.setValue(gain);
        public static void main(String [] args) {
            float gain = 0;
            String file = "c:\\javatest\\BallroomBlitz.wav";
              for(String arg : args) {
                for(int i = 0; i < arg.length(); i++) {
                    char c  = arg.charAt(i);
                    if (c == '-') {
                        gain -= 1;
                    } else if (c == '+') {
                        gain += 1;
                    } else {
                             file = arg;
            SoundPlayer sp = new SoundPlayer(file);
            sp.showControls();
            System.out.println("setting gain to " + gain);
            sp.setGain(gain);
            sp.play();
    }

  • Parts of my iMovie freeze (but the sound continues) once exported to iDVD

    After completing a movie on iMovie, I have exported it to iDVD and 'Movie' formats then burned them to disk, but both movies freeze in exactly the same place whilst the audio runs through as normal.
    When I play them in imovie they run as normal.
    Why is this?

    Some possibilities:
    Check out this thread for a possible solution: http://discussions.apple.com/thread.jspa?messageID=7305234&#7305234 Perhaps renaming the file would help.
    I don't know if ithis has an effect on the file, but why is it saved in documents rather than music or movies?
    Also, are you using iTunes to convert the file to .aiff? Here is the procedure from iTunes help:
    *Choosing AIFF and WAV custom import settings*
    If you use AIFF or WAV encoding, you can use custom settings for greater control over the quality and size of imported files.
    To choose AIFF and WAV import settings:
    1. Choose iTunes > Preferences, click Advanced, and then click Importing.
    2. Choose AIFF Encoder or WAV Encoder from the Import Using pop-up menu.
    3. Choose Custom from the Setting pop-up menu.
    4. In the dialog that appears, choose settings:
    Sample Rate: The number of times per second the music waveforms are captured digitally. The higher the sample rate, the higher the quality and the larger the file size. Don't choose a sample rate higher than the rate used to store the music originally or you'll waste space. CD quality, for example, is 44.100 kHz, so choosing a higher rate when you're encoding from a CD is unnecessary. In general, the best choice is Auto, which uses the same rate as the original music.
    Sample Size: The number of bits used to store each sample taken as the music is encoded. The higher the sample size, the better the quality and the larger the file size.
    Channels: If you don't have stereo speakers or if your audio files are monaural (mono files are about half the size of stereo files), choose Mono. If you'll be listening through headphones or a stereo system, choose Stereo or Auto. Auto converts monaural tracks into mono files and stereo tracks into stereo files.

Maybe you are looking for