Distortion from Mic!

I'm recording a new vocal track where I'm singing (nearly screaming) at very high amplitudes. I have a brand new Rode NTK and I run it through an apogee Duet into Logic9. I'm singing with my pop shield about 6" away from my mic. My software control for my Duet is set at 30 (goes all the way up to 75) and it hasn't been clipping even when I'm singing the loud parts.
Once I got the audio on my track when it plays back there will be an occasional subtle click or pop sound in the audio file. What is that? What am I doing wrong? Also, it sounds like some mild distortion happens at one part... again, no clipping.
I'm wondering if backing up away from the microphone is the answer but I don't know.

it's alright to scream into the microphone a little bit as long as it doesn't clip right?
Not at 6" (15cm?) This should be the minimum distance for a condenser. Try moving back from the microphone when you scream too loud. Some microphones produce audible distortion when the distance is to short.
Eddie

Similar Messages

  • Remove distortion from mic too close to mouth?

    Are there any recommended settings for removing the fuzziness from a tape recording (talking narration), where the person is has the mic too close or is too loud for it or both? The voice is pretty clear but the high pass filters aren't quite removing the fuzz from the maxing out of the levels.
    Thanks
    Jeff

    That's one of the hardest noises to eliminate, you'll have to try setting a noise print by isolating the noise alone in a segment and then reducing noise. The caveat is if the actual vocal pattern tails into distortion and it's not separate anything you do will generally just leave it sounding worse. But try reducing noise.

  • Is there an adaptor that can split the audio out from mic input?

    I'd like to use the iPhone on a mixer borad for conferencing.  I'm looking for an adaptor that will allow me to separate audio (out) from mic (in) on the iPhone.  Any ideas?

    Will this work for you?
    http://www.amazon.com/Headset-Buddy-01-PC35-PH35-Smartphone-Blackberry/dp/B002SK 66OY/ref=pd_cp_e_0/178-2348075-7189648

  • How do I minimize sound distortion from iTunes?

    I seem to get audio distortion from time to time while playing iTunes thru an external amp and speakers.
    when this happens, I shut everything down and then power up.
    Suggestions?
    Cheers,

    If you downloaded the book from iTunes via your computer, sync your iPod, iPad, or iPhone and it should transfer there automatically.  Just make sure you have checked the appropriate boxes (which books to sync etc.) before you click sync.
    If you downloaded the book from iTunes via your iPod, iPad, or iPhone, then it should appear right there at the iBooks app.

  • Distortion - from line out or interface

    Hi all,
    I keep getting a bit of distortion from itunes playback whether I out my line output or my focusrite interface from Itunes.
    is it becuase I have a fusion drive (late 2012 mini) ? My laptop's output is not distorted .

    I still have a proiblem iwth direct line in from guitar straight to computer.
    http://thehangtime.com/gb/gbfaq2.html#pluginguitar

  • I Want To Transmit Audio from Mic and Video from WebCam.....???????????????

    I Want To Transmit Audio from Mic and Video from WebCam on Another Computer. I have used AVTransmit2.java file and AVReceive2.java file for Transmission and Receiving but They Transmit Only Video On Another Computer on a network without any error. Any One Help me How Can i Transmit both Audio & Video at the Same time ????????
    i m using This Command for Transmittion
    java AVTransmit2 vfw://0 192.168.0.1 192.168.0.2 10000
    and this Command For Receiving
    java AVReceive2 192.168.0.1/10000 192.168.0.2/ 10002

    Excuse me foro my bad English but I speak English like Tarzan.
    To trasmit both video and audio I created a MergingDataSource wich incorporates video and audio data sources. Then I created a Processor with this DataSource and a RTPManager for each track of the processor. It works.
    Stupendoman

  • Can Hear From Mic through Speaker but cant capture in audacity

    Hi,
    I have the following Sound Card.
    05:08.0 Multimedia audio controller: C-Media Electronics Inc CM8738 (rev 10)
            Subsystem: C-Media Electronics Inc CMI8738/C3DX PCI Audio Device
            Flags: bus master, medium devsel, latency 64, IRQ 16
            I/O ports at e800 [size=256]
            Capabilities: [c0] Power Management version 2
            Kernel driver in use: C-Media PCI
            Kernel modules: snd-cmipci
    It is detected and I can hear the sound Sound from Mic Through the speaker.
    How ever I am not able to record it in audacity.
    Mic Does not work on Skype too :-(
    Could some one help me trouble shoot this?
    thanks :-)
    --Siju
    Simple mixer control 'Master',0
      Capabilities: pvolume penum
      Playback channels: Front Left - Front Right
      Limits: Playback 0 - 31
      Mono:
      Front Left: Playback 24 [77%]
      Front Right: Playback 24 [77%]
    Simple mixer control '3D Control - Switch',0
      Capabilities: pswitch pswitch-joined penum
      Playback channels: Mono
      Mono: Playback [on]
    Simple mixer control 'PCM',0
      Capabilities: pvolume pswitch pswitch-joined cswitch penum
      Playback channels: Front Left - Front Right
      Capture channels: Front Left - Front Right
      Limits: Playback 0 - 31
      Front Left: Playback 28 [90%] [on] Capture [off]
      Front Right: Playback 28 [90%] [on] Capture [off]
    Simple mixer control 'Synth',0
      Capabilities: pvolume pswitch pswitch-joined cswitch penum
      Playback channels: Front Left - Front Right
      Capture channels: Front Left - Front Right
      Limits: Playback 0 - 31
      Front Left: Playback 31 [100%] [on] Capture [off]
      Front Right: Playback 31 [100%] [on] Capture [off]
    Simple mixer control 'Line',0
      Capabilities: pvolume pswitch cswitch penum
      Playback channels: Front Left - Front Right
      Capture channels: Front Left - Front Right
      Limits: Playback 0 - 31
      Front Left: Playback 31 [100%] [on] Capture [off]
      Front Right: Playback 31 [100%] [on] Capture [off]
    Simple mixer control 'Line-In Mode',0
      Capabilities: enum
      Items: 'Line-In' 'Rear Output'
      Item0: 'Rear Output'
    Simple mixer control 'CD',0
      Capabilities: pvolume pswitch cswitch penum
      Playback channels: Front Left - Front Right
      Capture channels: Front Left - Front Right
      Limits: Playback 0 - 31
      Front Left: Playback 25 [81%] [on] Capture [off]
      Front Right: Playback 25 [81%] [on] Capture [off]
    Simple mixer control 'Mic',0
      Capabilities: pvolume pvolume-joined cvolume cvolume-joined pswitch pswitch-joined cswitch cswitch-joined penum
      Playback channels: Mono
      Capture channels: Mono
      Limits: Playback 0 - 31 Capture 0 - 7
      Mono: Playback 25 [81%] [on] Capture 6 [86%] [off]
    Simple mixer control 'Mic Boost',0
      Capabilities: pswitch pswitch-joined cswitch cswitch-joined penum
      Playback channels: Mono
      Capture channels: Mono
      Mono: Playback [on] Capture [off]
    Simple mixer control 'Phone',0
      Capabilities: pvolume pvolume-joined pswitch pswitch-joined penum
      Playback channels: Mono
      Limits: Playback 0 - 7
      Mono: Playback 5 [71%] [on]
    Simple mixer control 'IEC958 5V',0
      Capabilities: pswitch pswitch-joined penum
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'IEC958 Copyright',0
      Capabilities: pswitch pswitch-joined penum
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'IEC958 In Monitor',0
      Capabilities: pswitch pswitch-joined penum
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'IEC958 In Phase Inverse',0
      Capabilities: pswitch pswitch-joined penum
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'IEC958 In Select',0
      Capabilities: pswitch pswitch-joined penum
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'IEC958 In Valid',0
      Capabilities: pswitch pswitch-joined penum
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'IEC958 Loop',0
      Capabilities: pswitch pswitch-joined penum
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'IEC958 Mix Analog',0
      Capabilities: pswitch pswitch-joined penum
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'IEC958 Output',0
      Capabilities: pswitch pswitch-joined penum
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Beep',0
      Capabilities: pvolume pvolume-joined pswitch pswitch-joined penum
      Playback channels: Mono
      Limits: Playback 0 - 3
      Mono: Playback 2 [67%] [off]
    Simple mixer control 'Aux',0
      Capabilities: pvolume pswitch cswitch penum
      Playback channels: Front Left - Front Right
      Capture channels: Front Left - Front Right
      Limits: Playback 0 - 15
      Front Left: Playback 12 [80%] [off] Capture [off]
      Front Right: Playback 12 [80%] [off] Capture [off]
    Simple mixer control 'Exchange DAC',0
      Capabilities: pswitch pswitch-joined penum
      Playback channels: Mono
      Mono: Playback [off]
    Simple mixer control 'Four Channel Mode',0
      Capabilities: pswitch pswitch-joined penum
      Playback channels: Mono
      Mono: Playback [off]

    I had similar problems and could get nothing whatsoever when trying to record from the microphone or using it in Skype (it was obviously muted completely in some way). Tried everything I could in alsamixer, and installing PulseAudio didn't manage to get it working either.
    However I installed gnome-alsamixer, and ticked a few 'Rec.' check boxes and everything works now as it should! Sorry I can't pin down exactly what switched it on.

  • How to stream audio and video captured from mic and webcam in sync.

    I am working on a video chat project. I need to capture audio and video from mic and webcam and create rtp stream for them. How can I proceed for this. Any source code help will be highly appreciated. Otherwise just guide me how to do this and point to any good resource which is directly related to my need.
    Thanx.

    t.b.m
    As mentioned by you, i am doing exactly like that . I have coded transmitter class. But at the receiver side it is unable to play the stream. I am posting my code . Can you please help with me with any mistake i m making in my code ?? Or with way I should receive stream at receiver side. Plz see my code. I am streaming to ip address 172.31.80.67.
    package heyram;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.media.control.*;
    import javax.media.protocol.*;
    import javax.media.format.*;
    import java.io.IOException;
    import java.util.Vector;
    import java.net.InetAddress;
    import java.awt.*;
    import java.io.*;
    import java.net.InetAddress;
    import javax.media.*;
    import javax.media.protocol.*;
    import javax.media.protocol.DataSource;
    import javax.media.format.*;
    import javax.media.control.TrackControl;
    import javax.media.control.QualityControl;
    import javax.media.rtp.*;
    import javax.media.rtp.rtcp.*;
    import com.sun.media.rtp.*;
    import java.lang.Thread.*;
    public class HEYRAM{
    Format[] format=new Format[2];
    Vector[] devices=new Vector[2];
    CaptureDeviceInfo[] di=new CaptureDeviceInfo[2];
       SessionManager rtpsm = new com.sun.media.rtp.RTPSessionMgr();
    Processor p=null;
    Processor p1=null;
    boolean result;
    public HEYRAM(String address,int port,int ttl){
        try{
                InetAddress destaddr = InetAddress.getByName(address);
                SessionAddress sessaddr = new SessionAddress(destaddr,
                                                             port,
                                                             destaddr,
                                                             port + 1);
                String cname = rtpsm.generateCNAME();
                    String username = null;
                try {
                username = System.getProperty("user.name");
            } catch (SecurityException e){
                username = "jmf-user";
            // create our local Session Address
            SessionAddress localaddr = new SessionAddress();
                SourceDescription[] userdesclist= new SourceDescription[]
                    new SourceDescription(SourceDescription
                                          .SOURCE_DESC_EMAIL,
                                          "[email protected]",
                                                                     1,
                                          false),
                    new SourceDescription(SourceDescription
                                          .SOURCE_DESC_CNAME,
                                          cname,
                                          1,
                                          false),
                    new SourceDescription(SourceDescription
                                          .SOURCE_DESC_TOOL,
                                          "JMF RTP Player v2.0",
                                          1,
                                          false)
                rtpsm.initSession(localaddr,
                                userdesclist,
                                0.05,
                                0.25);
                rtpsm.startSession(sessaddr,ttl,null);
            } catch (Exception e) {
                System.err.println(e.getMessage());
                //return null;
        // rtpsm.initSession(localAddress, defaultUserDesc, rtcp_bw_fraction, rtcp_sender_bw_fraction);
            // rtpsm.startSession(...);
    public void createVideoSession()
        format[1] = new VideoFormat(VideoFormat.YUV);
        devices[1]= CaptureDeviceManager.getDeviceList( format[1]);
         di[1]= null;
            if (devices[1].size() > 0) {
                 di[1] = (CaptureDeviceInfo)devices[1].elementAt(0);
                  System.out.println(di[1].toString());
            else {
                // exit if we could not find the relevant capture device.
             System.out.println("1234jjfjsajfjasf1");
                System.exit(-1);
            // Create a processor for this capture device & exit if we
            // cannot create it
            try {
                p1 = Manager.createProcessor(di[1].getLocator());
            } catch (IOException e) {
                System.out.println("1234jjfjsajfjasf2");
                System.exit(-1);
            } catch (NoProcessorException e) {
                System.out.println("1234jjfjsajfjasf3");
                System.exit(-1);
            // at this point, we have succesfully created the processor.
            // Realize it and block until it is configured.
           // p1.configure();
         result = waitForState(p1, Processor.Configured);
         if (result == false)
         System.out.println("Couldn't realize processor");
            p1.setContentDescriptor(new ContentDescriptor( ContentDescriptor.RAW_RTP));
            // block until it has been configured
            TrackControl track[] = p1.getTrackControls();
            boolean encodingOk = false;
            // Go through the tracks and try to program one of them to
            // output ULAW_RTP data.
            for (int i = 0; i < track.length; i++) {
                if (!encodingOk && track[i] instanceof FormatControl) {
                    if (((FormatControl)track).
    setFormat( new VideoFormat(VideoFormat.YUV)) == null) {
    track[i].setEnabled(false);
    else {
    encodingOk = true;
    else {
    // we could not set this track to gsm, so disable it
    track[i].setEnabled(false);
    // Realize it and block until it is realized.
    p1.realize();
    result = waitForState(p1, Processor.Realized);
         if (result == false)
         System.out.println("Couldn't realize processor");
    // block until realized.
    // get the output datasource of the processor and exit
    // if we fail
    DataSource ds = null;
    try {
    ds = p1.getDataOutput();
    } catch (NotRealizedError e){
    //System.exit(-1);
    System.out.println("1234jjfjsajfjasf4");
    // Create a SessionManager and hand over the
    // datasource for SendStream creation.
    // The session manager then needs to be initialized and started:
    // rtpsm.initSession(...);
    // rtpsm.startSession(...);
    try {
    (rtpsm.createSendStream(ds, 0)).start();
    } catch (IOException e){
    System.out.println("1234jjfjsajfjasf6");
    e.printStackTrace();
    } catch( UnsupportedFormatException e) {
    System.out.println("1234jjfjsajfjasf7");
    e.printStackTrace();
    public void createAudioSession(){
    format[0] = new AudioFormat("linear",8000,8,1);
    devices[0]= CaptureDeviceManager.getDeviceList( format[0]);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Real Time - Capture sound signal from Mic then store to memory.

    Hi people,
    I wish to do a real time program that capture the data (+the ADC discrete digitized sound data+) from mic then store the data in memory...
    Then my program retrieve the data continuously from the memory (as long as there are captured data from mic)
    But i have no idea how JAVA deal with real time program that use memory to store the captured data.
    i do know that JAVA do have class INPUTSTREAM to deal the real time thing that fetch the byte of data to program. But still wish to get more reference from here (never use this class before).
    Please advise how can i start from "signal" the mic to store the captured data to memory and my program able to retrieve the data from memory then work my algorithm on it.
    Or can correct me how actually i should store the captured data... i should store the data in memory or store the data as a variable?
    MANY MANY MANY MANY thanks!!! Very appreciate for the advise and i will give my attempt :-).

    I m sorry..
    I was intend to ask the correct way to store the digitized data from microphone.
    As all my previous work were storing the keyboard input as an declared variable or store in local server database.
    But this time i wish to store the captured and quantized sound data from mic and no idea where should i start from...
    Please give me some advise please.
    I dun wish to save what i captured as a .wav file then only process the .wav file data.
    But wish to process the data that was captured at instant.
    I m very appreciate for your advise here.

  • How to compare input sound (from mic.) with sound on my database

    i want to campare sound (from mic.) with sound on my database
    ex:
    if i say "hello" it show message "hello"
    but if i say other word it will show message "try again"
    forgive for my english
    eak_

    Speech recognition is a whole area in its own right
    Lots of info and other references and the Java Speech APIs can be found here
    http://java.sun.com/products/java-media/speech/index.jsp

  • Remove distortion from too much mic gain

    Please help. I just recorded the perfect video of myself playing/singing a piece of original music I'd like to share on YouTube. Unfortunately, I was singing too loudly/positioned too close to the mic in several points in the song, and the audio is buzzing. Can the audio be repaired in any way? I have imported the audio clip into Audacity, but nothing I've tried with this software is helping.
    Thank you in advance!

    Nope. Time for a strong drink and Take 2!

  • Distortion - dynamic mic with audigy dr

    Hi all!
    I had my Audigy Platinum on a shelf since I bought my Audigy4, and yesterday I decided to install the card and the 5.25" dri've module in another PC so I can do some voice-over recording. The problem I'm having is that the sound that I input from my dynamic microphone is of poor quality. The bass is non-existant and I can hear some distortion. The gain range is very good, so it's not a problem with input impedance or gain. I can control the gain exactly the way I want... but that has no effect on sound quality from the mic.
    The problem is not the microphone, it's a rather expensi've Audio-Technica performance microphone (ATM4HE for those who know their stuff). Is the dynamic range of the mic too much to handle for the Audigy dri've?
    It is to be noted that my particular dri've doesn't have a JP jumper. I'm not comfortable playgin around with the jumpers on the dri've's board either... and I cannot see what this would accomplish anyway.
    This is clearly not a driver problem (or is it's)... so I'm out of options and I'd like some help if any of you can provide it.
    Thank you!

    I connected it using an XLR to /4" cable... and I'm beginning to think you're right, I may have to plug it in a mixer or small console first and then input it into the card (via analog RCA inputs probably). I don't have any of this stuff anymore though... so I think I'll have to hunt down an old mixer. Anything with XLR in will do the trick I guess.
    Thank you very much SoNic2367! All this knowledge dates back a lot in my case... I haven't picked up a mic in years. I used to be a stage technician... I find it rahter pathetic that I didn't think of this myself.
    I'll let you know if I find a way to rig this off properly...
    Message Edited by WoRkZ on <SPAN class=date_text>04-2-2006 <SPAN class=time_text>04:26 PM
    Message Edited by WoRkZ on 04-2-2006 04:26 PM

  • How can I remove high-pitched distortion from voice-over?

    Hi folks,
    I'm completely new to fixing audio. I am making a short film, and for a voice-over, I recently had to do an interview over the phone (the subject lives in a very remote location). Actually, I used GoToMeeting, we called into the conference call feature from our phones, and I recorded the meeting into a wmv file. Then I re-encoded it using Expression Encoder so I could pull it into Adobe Audition.
    I am attaching a short phrase (extracted as a .wav file) from the interview in the hope that someone can tell me how to improve the quality of the sound. I have Adobe Premiere Pro and Adobe Audition, both CS6 and CC versions.
    Short voice recording - Creative COW
    1. Can anyone tell me, please, how to get rid of the high-pitched "ringing" kind of distortion that we hear on each of her loudest syllables? Also, does this particular type of distortion have a name? I kept finding articles on fixing sound, but wasn't sure what I'm dealing with here, so I wasn't sure which techniques were likely to work. Tried a bunch, and the overall sound got better, but so far nothing has fixed that high-pitched distortion.
    2. After getting rid of that ringing distortion, what are your recommendations for making the voice recording sound as rich, smooth and full as possible? In real life, this woman has a BEAUTIFUL, rich voice. But the recording sounds like a flat telephone call (because it is).
    Thanks in advance,
    Mary

    Well, I don't think there's any miracles to be had here.  As you say, it's a telephone call and I fear that, since phone lines filter out anything above about 4k, there's no way of replacing it.
    I had a look at your file in spectral view and you can clearly see the original material going, as expected, up to about 4 kilohertz--but, above that, there's a generalised area of noise.  My suspicion--and it's only a suspicion--is that during your double conversions (to wmv then through a third party app to something else) one of them has added the extra noise as it your original was full bandwidth.
    Anyhow, best I could do was use the Marquee tool in Spectral View, draw a rectangle around the upper area (you can see a clear boundary between the programme content and the random extra frequencies) then just delete everything above just over 4 khz then delete.
    As for making a phone call sound full and rich, if there was a way to do it, when I was working in TV we could have saved hundreds of thousands a year by using phones instead of far more expensive circuits!

  • Process audio from mic and play it back. (What is wrong with my code?)

    Hi, I am trying to take the audio from the mic (at javasound://0), process it (add the JMF API sample plug in GainEffect.java) and then play the processed data source. The code I have so far is below.
    I am getting no errors - compiles fine - but nothing seems to be happening.
    The grand goal is to take the audio being captured from the mic and process it in real time using a plug in (not necessarily GainEffect) and also play it back (the processed audio) at the same time.
    Where am I going wrong? Thanks!
    import java.io.IOException;
    import java.util.Vector;
    import javax.media.*;
    import javax.media.control.TrackControl;
    import javax.media.format.AudioFormat;
    import javax.media.protocol.DataSource;
    public class audioProcess {
         public static void main(String[] args){
              CaptureDeviceInfo audioCapDevInfo = null;
              Vector audioCapDevList = null;
              Vector plugIn;
              Player p;
              Processor pro = null;
              TrackControl[] tracks;
              DataSource ds;
              Vector plug;
              TrackControl audioTrack = null;
              AudioFormat audFormat = new AudioFormat(
                   AudioFormat.LINEAR,
                   44100,
                   16,
                   2,
                   AudioFormat.LITTLE_ENDIAN,
                   AudioFormat.SIGNED,
                   16,
                   Format.NOT_SPECIFIED,
                   Format.byteArray);
              Format[] alinear=new AudioFormat[]{new AudioFormat(     AudioFormat.LINEAR,
                        44100,
                        16,
                        2,
                        AudioFormat.LITTLE_ENDIAN,
                        AudioFormat.SIGNED,
                        16,
                        Format.NOT_SPECIFIED,
                        Format.byteArray)};
            audioCapDevList = CaptureDeviceManager.getDeviceList(audFormat);        
            if ((audioCapDevList.size() > 0)) {
                 audioCapDevInfo = (CaptureDeviceInfo) audioCapDevList.elementAt(0);
                audioCapDevLoc = audioCapDevInfo.getLocator();
            MediaLocator dest = new MediaLocator("javasound://0");  //take sound captured directly from microphone
            try{             
                 PlugInManager.addPlugIn("GainEffect", alinear, alinear, 3);
                 plug = PlugInManager.getPlugInList(audFormat, audFormat, 3);
                 int vectorSize = plug.size();
                 if(plug.elementAt(vectorSize - 1).equals("GainEffect")){
                      plug.removeElementAt(vectorSize - 1);
                      plug.insertElementAt("GainEffect", 0);
                      PlugInManager.setPlugInList(plug, 3);
                      PlugInManager.commit();
                 pro = Manager.createProcessor(dest);
                 pro.configure(); //must configure before call getTrackControls
                 while(pro.getState() != Processor.Configured);
                 tracks = pro.getTrackControls();
                 for (int i = 0; i < tracks.length; i++){
                      if(tracks.getFormat() instanceof AudioFormat){
                   audioTrack = tracks[i];
                   break;
         //add plug in effect
         try{
              Codec codec[] = {new  GainEffect()};
              audioTrack.setCodecChain(codec);
         } catch (UnsupportedPlugInException e){
         pro.realize();
         while(pro.getState() != Processor.Realized);
         ds = pro.getDataOutput();
         p = Manager.createRealizedPlayer(ds);
         p.start();
    catch(NoPlayerException e){
         e.printStackTrace();
    } catch (IOException e) {
              e.printStackTrace();

    Ok, I narrowed my code down to this. There doesn't appear to be any infinite loops in the code now, but perhaps I'm wrong? The processor is realizing, and I am creating a player with the data source output from the processor, yet there still is nothing playing... which leads me to think that there is something wrong with my plug in implementation or my processor creation. Do you have any ideas or points in the right direction?
    import java.io.IOException;
    import java.util.Vector;
    import javax.media.*;
    import javax.media.control.TrackControl;
    import javax.media.format.AudioFormat;
    import javax.media.protocol.DataSource;
    public class audioCapture {
         public static void main(String[] args){
              MediaLocator audioCapDevLoc = null;
              CaptureDeviceInfo audioCapDevInfo = null;
              Vector audioCapDevList = null;
              Vector plugIn;
              Player p;
              Processor pro = null;
              TrackControl[] tracks;
              DataSource ds;
              Vector plug;
              TrackControl audioTrack = null;
              AudioFormat audFormat = new AudioFormat(
                   AudioFormat.LINEAR,
                   44100,
                   16,
                   2,
                   AudioFormat.LITTLE_ENDIAN,
                   AudioFormat.SIGNED,
                   16,
                   Format.NOT_SPECIFIED,
                   Format.byteArray);
              Format[] alinear=new AudioFormat[]{new AudioFormat(     AudioFormat.LINEAR,
                        44100,
                        16,
                        2,
                        AudioFormat.LITTLE_ENDIAN,
                        AudioFormat.SIGNED,
                        16,
                        Format.NOT_SPECIFIED,
                        Format.byteArray)};
            audioCapDevList = CaptureDeviceManager.getDeviceList(audFormat);        
            if ((audioCapDevList.size() > 0)) {
                 audioCapDevInfo = (CaptureDeviceInfo) audioCapDevList.elementAt(0);
                audioCapDevLoc = audioCapDevInfo.getLocator();
            try{
            MediaLocator dest = new MediaLocator("javasound://0"); //take signal from soundcard
                 PlugInManager.addPlugIn("GainEffect", alinear, alinear, 3); //register plug in
                 plug = PlugInManager.getPlugInList(audFormat, audFormat, 3);
                 int vectorSize = plug.size();
                 if(plug.elementAt(vectorSize - 1).equals("GainEffect")){ //take the last plug in
                      plug.removeElementAt(vectorSize - 1);
                      plug.insertElementAt("GainEffect", 0);
                      PlugInManager.setPlugInList(plug, 3);
                      PlugInManager.commit();
                 pro = Manager.createProcessor(dest);
                 pro.configure(); //must configure before call getTrackControls
                 while(pro.getState() != Processor.Configured);
                 tracks = pro.getTrackControls();
                 for (int i = 0; i < tracks.length; i++){
                      if(tracks.getFormat() instanceof AudioFormat){
                   audioTrack = tracks[i];
                   break;
    Codec codec[] = {new  GainEffect()}; //add plug in effect
         audioTrack.setCodecChain(codec);
         pro.realize();
         while(pro.getState() != Processor.Realized); //don't move on until realized
         ds = pro.getDataOutput();
         p = Manager.createRealizedPlayer(ds); //create a player using the data source from the processor
         p.start();
    catch (IOException e){
         e.printStackTrace();
    catch (CannotRealizeException e){
         e.printStackTrace();
    catch(NoPlayerException e){
         e.printStackTrace();
    catch(UnsupportedPlugInException e){
         e.printStackTrace();
    PS - sorry for the late reply.

  • Recording from Mic Truncated

    Hi,
    I'm recording from a mic into a memory buffer. All works fine, except that it always cuts off the last second even though I believe I'm properly draining the target data line before closing it.
    I've tested with the AudioRecorder and SimpleAudioRecorder from the [url http://www.jsresources.org/examples/audio_playing_recording.html]JResources examples and a few other [url http://www.quadmore.com/swingrecorder/]examples out there. They seems to suffer from the same issue.
    Is this just a matter of some sort of latency when the recording is shut down?
    Here are the controlling methods for my recorder.
    public void startRecording()
       state_ = State.RUNNING;
       line_.start();
       thread_ = new Thread()
          public void run()
             recordLoop();
       thread_.start();
    private void recordLoop()
       while(state_ != State.STOPPED)
          int bytesRecorded = line_.read(block_, 0, blockSize_);
          if(bytesRecorded != 0)
             out_.write(block_, 0, bytesRecorded);
    public void stopRecording() throws Exception
       line_.stop();
       line_.drain();
       state_ = State.STOPPED;
       thread_.join();
    }I'm running jdk 1.6.0_22-b04 on Windows XP.
    Thanks for any ideas!!!

    windroid wrote:
    Seems to work so I'm happy. Maybe its specific to my recording setup?Ummmm, the "one second" is probably specific to your recording setup... but I would imagine there is a delta_t associated with starting a recording and the recording starting.
    I'd imagine the TDL drain should handle that, but if there's like a hardware buffer on the soundcard that Java just doesn't have permission to flush... then you'd have to handle that yourself as you have. If the soundcare or the OS is doing some real-time transcoding to give JavaSound data in the format it wants, for instance, there could be a hidden unflushable buffer...

Maybe you are looking for

  • Deleting photos from iPad moments

    Does deleting photos from iPad "moments" delete them from all devices (like from Photo Stream) or only from the iPad?

  • STOK IN TRANSIT VALUE

    Hi, In MB5T report, its showing the stock in transit qty only. I want to know what is the amount for each item that is in transit. is there any standard report to know what is the transit value for a particular period of  time. Thanks Satya

  • Converting a Crystal Report with Many Sub-Reports into CF Report Builder

    I am trying to rewrite a Crystal Reports report which has 11 subreports in CF Report Builder. In the CR report, each subreport has it's own report footer seciton. I have not been able to find anything in CF Report Builder that allows me to do the sam

  • Storing shooting notes in lightroom catalog

    I've searched (both forum and google) for an answer to this question, but haven't found anything, so perhaps I am unique in my desires or I am just not using the right terminology. I like to keep my catalog organized by event, with all photos from a

  • Why won't Firefox let me add an exception?

    Firefox tells me that a site has an invalid security certificate, which I know. It asks if I want to Add an Exception and I click to add one. It pops up the Add Security Exception window and that window tells me that this site has a valid certificate