Mixing audio files

How do you mix 2 audio files in a parallel fashion.
Example of parallel fashion for text files:-
file1 has data:- aaaaa
file2 has data:- bbbbb
output file has data ababababab
I hope i am clear with what i m trying to say. Awaiting for a solution

hi
There are no special methods in the Java Sound API to do this .
However, mixing is a trivial signal processing task, it can be accomplished with plain Java code .
So manually mixing the two or more audioinputstreams using some attitional api
already i tried and succeed . i got the sample source with api from
http://javasolution.blogspot.com/2007/05/mixing-two-audio-files-using-java-sound.html

Similar Messages

  • Playing DJ mixed audio files?

    It seems somehow that when I play downloaded audio files that are a DJ mix compilation, iTunes and my iPod seem to insert a momentary silence between songs when switching to the next song. I know for sure that this is not the case with windows media player. Anybody got a solution for this? It gets annoying because it ruins the transition between songs that are mixed back to back by a DJ...
    Reuben

    iTunes will convert wma to mp3 (or acc) format. Here are the instructions:
    To convert a song's file format:
    Choose iTunes > Preferences, then click the Advanced button at the top of the window and click Importing.
    From the Import Using pop-up menu, choose the encoding format that you want to convert the song to, then click OK to save the settings.
    Select one or more songs in your library, then choose Advanced > Convert Selection to MP3, Convert Selection to AAC, Convert Selection to Apple Lossless, Convert Selection to AIFF, or Convert Selection to WAV. (The menu item changes to show what's selected in your Importing preferences.)
    To convert all the songs in a folder or on a disk, hold down the Option key and choose Advanced > "Convert Selection to," then choose the folder or disk containing the songs you want to convert. All the songs in the folder or on the disk will be converted except songs you purchased from the iTunes Store. (Purchased songs are encoded using a protected AAC format that prevents them from being converted.)
    Glor

  • Apps to mix sound files in real time, using two soundcards?

    Can someone recommend some applications for linux to mix audio files (mp3, ogg) between two soundcards?
    in realtime... you know, like DJs do, etc...
    TIA, and sorry for the bad english
    luciano

    I think if you use more than one card at a time you're going to run into latency issues, since there is no guarantee that the output from two or more cards will be synchronized. If you really need more than two channels out, a better solution is to purchase a professional card with as many outputs as you need. Also, I don't think Jack (the standard for audio work in Linux) supports the use of more than one card at a time.
    I can't think of a reason you would need more than two channels (one left, one right) unless you're trying to DJ in surround sound. Don't DJs using traditional gear just run a pair of turntables through a crossfader?
    I haven't used the program, but Mixxx looks like the best Linux software for DJing. You might take a look at it first.

  • Mixing multiple audio files using Windows Azure Media Services

    Hi,
    I'm trying to "mix" multiple audio files on the server, e.g. I have 4 different .wav files for each instrument in my song: vocals, guitar, drums, bass.  I want to create a new stereo "mix" from these, but I want to change the relative
    volume of one of the tracks, say vocals, or mute it altogether.  I can use libraries such as NAudio to achieve this, but I'm wondering if Windows Media Services can do this, and if so, can it do it dynamically, i.e. create a live stereo stream and allow
    me to add/drop individual tracks on-the-fly.  I've been looking through documentation on Azure Media Services and Expression Encoder, but haven't found the answer.
    Thanks,
    Alan

    Hi Georgios,
    There is support for using audio overlays in our service - see http://azure.microsoft.com/blog/2014/08/21/advanced-encoding-features-in-azure-media-encoder/ for examples. It may be possible to perform pairwise overlays to implement your scenario.
    However, it's currently not possible for us to integrate customer-built processor code into our service.
    Cheers,
    Azure Media Services team

  • [UCCx] Change volume of an audio file (java code)

    Hello guys,
    Thanks to the many examples I compiled on the subject, I was able to create a script that mixes 2 audio wav files into a 3rd one. Basically the goal is to mix a first audio file containing some speech with a second one containing some music, these files being encoded identically (8 bits, 8KHz, mono wav files). The resulting file must be encoded in the same format than the initial ones.
    The mixing operation is performed thanks to the MixingAudioInputStream library found online (it can be found here).
    It is not the most beautiful Java code (I am no developer), but it works:
    Document doc1 = (Document) promptFlux1;
    Document doc2 = (Document) promptFlux2;
    Document docFinal = (Document) promptFinal;
    javax.sound.sampled.AudioFormat formatAudio = null;
    java.util.List audioInputStreamList = new java.util.ArrayList();
    javax.sound.sampled.AudioInputStream ais1 = null;
    javax.sound.sampled.AudioInputStream ais2 = null;
    javax.sound.sampled.AudioInputStream aisTemp = null;
    javax.sound.sampled.AudioFileFormat formatFichierAudio = javax.sound.sampled.AudioSystem.getAudioFileFormat(new java.io.BufferedInputStream(doc1.getInputStream()));
    java.io.File fichierTemp = java.io.File.createTempFile("wav", "tmp");
    ais1 = javax.sound.sampled.AudioSystem.getAudioInputStream(doc1.getInputStream());
    formatAudio = ais1.getFormat();
    aisTemp = javax.sound.sampled.AudioSystem.getAudioInputStream(doc2.getInputStream());
    byte[] bufferTemp = new byte[(int)ais1.getFrameLength()];
    int nbOctetsLus = aisTemp.read(bufferTemp, 0, bufferTemp.length);
    java.io.ByteArrayInputStream baisTemp = new java.io.ByteArrayInputStream(bufferTemp);
    ais2 = new javax.sound.sampled.AudioInputStream(baisTemp, formatAudio, bufferTemp.length/formatAudio.getFrameSize());
    audioInputStreamList.add(ais1);
    audioInputStreamList.add(ais2);
    MixingAudioInputStream mixer = new MixingAudioInputStream(formatAudio, audioInputStreamList);
    javax.sound.sampled.AudioSystem.write(mixer, formatFichierAudio.getType(), fichierTemp);
    return fichierTemp;
    The only downside to this is that the music can be a little loud comparing to the speech. So I am now trying to use the AmplitudeAudioInputStream library to adjust the volume of the second file (it can be found here).
    Here are the additional lines I wrote to do this:
    ais2 = new javax.sound.sampled.AudioInputStream(baisTemp, formatAudio, bufferTemp.length/formatAudio.getFrameSize());
    org.tritonus.dsp.ais.AmplitudeAudioInputStream amplifiedAudioInputStream = new org.tritonus.dsp.ais.AmplitudeAudioInputStream(ais2, formatAudio);
    amplifiedAudioInputStream.setAmplitudeLinear(0.2F);
    audioInputStreamList.add(ais1);
    audioInputStreamList.add(amplifiedAudioInputStream);
    MixingAudioInputStream mixer = new MixingAudioInputStream(formatAudio, audioInputStreamList);
    javax.sound.sampled.AudioSystem.write(mixer, formatFichierAudio.getType(), fichierTemp);
    return fichierTemp;
    The problem is I always get the following exception when executing the code:
    could not write audio file: file type not supported: WAVE; nested exception is: java.lang.IllegalArgumentException: could not write audio file: file type not supported: WAVE (line 30, col:2)
    The error is on the last line (the write method), but after many hours of tests and research I cannot understand why this is not working... so I have added some "debugging" information to the code:
    System.out.println("file1 audio file format: " + formatFichierAudio.toString());
    System.out.println("file1 file format: " + ais1.getFormat().toString());
    System.out.println("file2 file format: " + ais2.getFormat().toString());
    System.out.println("AIS with modified volume file format: " + amplifiedAudioInputStream.getFormat().toString());
    System.out.println("Mixed AIS (final) file format: " + mixer.getFormat().toString());
    AudioFileFormat.Type[] typesDeFichiers = AudioSystem.getAudioFileTypes(mixer);
    for (int i = 0; i < typesDeFichiers.length ; i++) {
    System.out.println("Mixed AIS (final) #" + i + " supported file format: " + typesDeFichiers[i].toString());
    System.out.println("Is WAVE format supported by Mixed AIS (final): " + AudioSystem.isFileTypeSupported(AudioFileFormat.Type.WAVE, mixer));
    System.out.println("Destination file format: " + (AudioSystem.getAudioFileFormat((java.io.File)f)).toString());
    AudioInputStream aisFinal = AudioSystem.getAudioInputStream(f);
    System.out.println("Is WAVE format supported by destination file: " + AudioSystem.isFileTypeSupported(AudioFileFormat.Type.WAVE, aisFinal));
    try {
    // Ecriture du flux résultant dans un fichier
    javax.sound.sampled.AudioSystem.write(mixer, formatFichierAudio.getType(), fichierTemp);
    return fichierTemp;
    catch (Exception e) {
    System.err.println("Caught Exception: " + e.getMessage());
    Which gives the following result during execution:
    file1 audio file format: WAVE (.wav) file, byte length: 146964, data format: ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame, , frame length: 146906
    file1 file format: ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame,
    file2 file format: ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame,
    AIS with modified volume file format: ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame,
    Mixed AIS (final) file format: ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame,
    Mixed AIS (final) #1 supported file format: WAVE
    Mixed AIS (final) #2 supported file format: AU
    Mixed AIS (final) #3 supported file format: AIFF
    Is WAVE format supported by Mixed AIS (final): true
    Destination file format: WAVE (.wav) file, byte length: 146952, data format: ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame, , frame length: 146906
    Is WAVE format supported by destination file: true
    So everything tends to show that the format should be supported and the mixed AIS should be written to the file... but I still get the error.
    I am really confused here, if someone could help it would be great.
    Thanks in advance!
    PS: I have attached print screens of the actual script, without the "volume adjustment" code.

    Hi,
    well I started writing a similar solution but it did not work either so I just put it on hold.
    I also tried to get hold of the streaming "device" abstraction of UCCX to adjust the volume while "playing" but that was a dead end, too, unfortunately.
    Sorry about my previous comment on your StackOverflow post, that time I thought it was kind of out of context but I believe you only wanted to ask about this issue on all available forums.
    G.

  • Adding an effect to a portion of an audio file?

    Hello,
    For years now I've been using FCP and when STP was first released it seemed wonderful, but very convoluted, so I ended up doing all my audio mixing within FCP.
    Recently I've decided to really nail STP and get it incorporated into my workflow, but the old frustrations have appeared immediately, which is why I never continued using it originally.
    One problem I'm encountering is this:
    I have a recording of a band, which when I open in STP appears on one long timeline. I've added markers where the songs stop/start etc, and deleted bits between the songs. When I save this file I can open it in a project file.
    I then use 'S' to split the main track, chopping up the songs and placing them in their own tracks.
    My confusion arises when I want to add a touch of reverb to one song.
    If i highlight one song on a track, and go to Process>Effects>Reverb/Delay, non of the options are selectable, so I double-click the audio clip/waveform on a track and it opens in the audio timeline (no separate tracks, just 2 large waveforms Left&Right), here I can apply the reverb to the audio file, but it applies the effect to the whole audio file (1 hour long) not the individual song I want.
    So... I can drag the playhead to make a selection with the master audio file, ie, select the individual song, and apply the reverb.
    Is this the correct workflow? It seems like quite a convoluted process just to add a touch of reverb to one song on my master timeline with all the different tracks.

    You shouldn't apply the process to the file, because as you've discovered it will affect all of the other regions of the file in your project.
    Either add a reverb to each individual track in the mixer, or better yet to save on resources Add a Bus. On the Bus insert a Reverb. Now on any of the audio tracks you can Add a Send. By adjusting the level of the send of the signal from any channel to the Bus with the reverb you can add as much or as little as you like to each individual track.
    !http://www.rdiv.com/screenshots/STP_reverbSetup.jpg!

  • How to export  sequence of  identical audio files?

    Adobe Premier Pro CC 7.2.1
    I have a big audio mix on the soundtrack consisting of many short different  same duration audio files. now I need to export a sequence of identical files into separate audio track for further processing in to the DAW. the best way to do it is change the color of each identical audio, but I have not found this function or mute from project or just see titles or set up so that when I add  new audio file  it created a separate channel in the mixer not available for other or something like this... otherwise I must push each audio to see title to drag sequence of identical audio file to separate channel and mute others. my mistake is that from  beginning I did not put the identical files to separate channel and now everything is mixed. is there any solution?

    Sorry, but the previous answers are not quite correct. Consolidate tracks will only merge all your edits and fades and make a new audio file out of it. It wont consolidate any automation or insert effects. The same is true for exporting audio from the regions pane. Therefore you still have to perform a "bounce to disk" in order to consolidate properly. So no it doesn't have the "Export All Tracks as Audio Files" option......
    Christian,
    When "exporting" from one DAW to another, it's generally understood that automation and plug-ins will not be included.
    Exporting from Pro Tools does indeed bounce the files to disk. We aren't talking about a stereo mix here. We're talking about exporting all the individual tracks. Are have I misunderstood you?
    .... which leads me on to this question. How long has logic had the "Export All..." function as I have been performing "track lays" (i.e. getting my logic stuff ready for a pro-tools mix) for films that can often take days to perform and am embarrassed to stumble across this option on this forum as I fear I may have cost myself several weeks of my life working the long way round!!!
    "Export All tracks as Audio Files" was introduced in version 7.0.
    Don't feel too ashamed though. I have a good friend, who has been using Logic daily as long as I have (8 years or so now), who only 3 months ago, saw me utilizing that feature, and his jaw dropped. He too, had been wasting "weeks" of his life, doing it the way you have been doing it. : )
    You're gonna absolutely LOVE using that feature from this day forward...!

  • Recorded audio files are gone after power outage during a concert

    Hello together,
    yesterday I used Logic Pro X to record a concert at our school. I had connected my MacBook Air to our mixer via FireWire, and everything went fine until two minutes before the concert's ending, the power went out. My MacBook was still working from battery, however, Logic Pro stopped recording and all recorded files except for one audio file are gone. I have already tried to recover the lost data by using a data recovery app, but it didn't find anything.
    Is there a way to recover the lost recordings? I mean, Logic must have written its audio files to the hard drive somewhere and even when everything crashed, I don't think the files got overwritten with zeros or something else that could have destroyed it...
    Many Regards,
    Leo Bernard

    hhaammrr wrote:
    I copied each track and pasted it into a new file.  I saved each new song file, and thought it would be safe to delete the tracks I had copied from the original file.
    http://www.bulletsandbones.com/GB/GBFAQ.html#saveasarchive
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • PSE 9 Organizer error codec trying to add an Elements audio file to slide show

    I am using PSE 9 to build a slide show. When I add audio, I can use mp3's  from my music library in the slide show without any issues ...
    but I am getting the following error when I try to add an Elements audio file (example " A _Taste_Of_Sicily.mp3)
    This is the Organizer error message:
    "Unable to add the audio file (C:\ProgramData\Adobe\ElementsOrganizer\8.0\Music\A_Taste_Of_Sicily.mp3).
    The selected file cannot be played because your system does not have the required compresser/decompresser(codec) installed."
    I had PSE 8 and upgraded to PSE 9 - I noticed the error file detail shows 8.0 - Is this my problem - maybe an incomplete upgrade ?  (I've made several slideshows mixing photos and music, on an older computer using PSE 8 and never ran into this issue.)
    Below is my system info in case that helps:
    OS=Windows 7 Home Premium 64-bit on an HP Pavillion dv7
    Intel(R) Core(TM) i5-430M Dual Core processor (2.26GHz, 3MB L2 Cache) with Turbo Boost up to 2.53GHz
    8GB DDR3 System Memory (2 Dimm)
    500GB 7200RPM SATA Hard Drive with HP ProtectSmart Hard Drive Protection
    512MB ATI Mobility Radeon(TM) HD 5470 switchable graphics
    IDT High Definition Audio CODEC
    Thanks for any help !

    beccarie1 wrote:
    This is the Organizer error message:
    "Unable to add the audio file (C:\ProgramData\Adobe\ElementsOrganizer\8.0\Music\A_Taste_Of_Sicily.m p3).
    The selected file cannot be played because your system does not have the required compresser/decompresser(codec) installed."
    Does that file extension really have a space in it?  If so, remove the space.
    Ken

  • Triggering midi with an audio file

    Hi,
    Ive recorded some live drums and unfortunately Im a bit disappointed with the snare sound and would like to use some sample snares I have instead.
    Is there anyway to record an audio instrument track using the recorded audio file of the snare so that the beats trigger the sample?
    Thanks.

    Solved the problem,
    First it was Ultrabeat as Sidechain trigger... I mixed with two techniques and looped the ultrabeat when it was already looping inside the ultrabeat...
    and other sound problems I guess are over cause of leveling the volume correctly,
    while side chaining...
    I guess I was too excited to start working with logic, didn't noticed that the audio engine is a bit different than cubase I guess...
    still having some minor problems in other logic stuff, but happy that I've solved that issue...

  • How to nudge audio file less than 1 tenth a second on time bar

    I'm using FCE 4.0.1
    I need to either move the video/audio file or the separate audio file brought in from Logic to line up with one another (they are the same audio, just denoised and EQed a bit in Logic. I've zoomed in to line the waveforms up, but they are just slightly off, and when I try to nudge one or the other into sync visually the file I'm moving jumps to the next point on the timebar and is off in the other direction. For example the section I'm trying to nudge jumps from 4:01:14 to 4:01:15, but the wave peak I'm attempting to sync it with is in between those two points, so it jumps past it. This will cause echoing and phasing issues.
    Is there a way to drag files in the timeline linearly rather than from arbitrary point to point? I've tried shortening and re-bouncing the audio file, but it lines up the same way.
    I'm new to FCE, and I'm trying to edit shots from 2 cameras at a concert along with the mixed audio? I'm trying to line the footage up with the audio by matching the waveforms by eye. What am I missing, is there an easier way to do this?
    Thanks

    See if this helps:
    https://discussions.apple.com/message/13372236#13372236
    Al

  • Is it Possible to Play More than 1 Audio File Parallelly ?

    Friends,
    Is it possible to run more than 1 audio file at a time using Player or Processor ???
    For example, i have
    Audio1.MP3, which play for 2 minutes (which has only music).
    Audio2.MP3, which play for 1 minute ( which has only voice).
    I want to start with Audio1.MP3 and when it reach 1 minute, Audio2.MP3 should parallelly run with Audio1.MP3, so that 2 audio file should finish at same time.
    I want my music and voice should be mixed... (i.e) i want to mix two audio tracks..
    Is it possible thru JMF ????
    Regards
    Senthil

    I dont know if its possible with JMF, but it is with javax.sound
    You write a method to play a file, and then you create two threads where each one plays a different sound file, and tell one of them to wait 60000 millis.
    R. Hollenstein

  • Exporting All Audio Files - Having Some Problems. . .

    Hi,
    Im trying to export all my audio and audio intrument files as audio files so that i can pass them over to someone for a remix. Im having a couple of problems:
    1. Automation does not bounce with the tracks
    2. The tracks that run though busses does not bounce
    3. Some of the exported files appear as clipping when we look at the waveform. The levels in logic appear as normal but the waveform is full, both when we view the region on the arrange and in the sample editor.
    Has anyone got any advice on exporting all tracks as audio files or any advice on what this problem could be?
    Thanks, Ben

    benjamingordon wrote:
    Whats PDC. Might seem like a silly question but im a bit lost.
    Plug-in Delay Compensation. It's in the audio preferences, General tab.
    If i want to have automation, then i have to bounce each track individually?
    Yes. As John stated, the export feature bounces the file at Unity gain, and ignores automation. Generally speaking, this is the preferred method for handing off files to a mix engineer. But there are times when the automation is part of the sound you want. In these instances, you'll need to bounce those files, not export them. But certainly automation isn't part of every track?
    I would suggest soloing each Aux track, or audio/innstrument track that needs to be bounced WITH automation, and then bounce offline. Bouncing offline will speed up the process of having to do these tracks one at a time.
    When you're done with the bounced tracks, delete them from your arrange page (but DON'T hit SAVE). Then, use the function "Export ALL tracks as audio files", and all your remaining tracks will export at one time.

  • BIzarre!? - Peaks of audio file higher in the negative side...

    I've just been recording some bass today through my Avalon 737 into a Metric Halo ULN-2....
    When i look at the audio file in sample editor it seems that the peaks are noticeably higher on the negative side of the waveform. - The file 'clipped' and reached (-100) many times but only (+100) on a handful of occasions...
    Is this normal or is there something wrong with the preamp or audio interface?
    many thanks
    J

    RoughIsland wrote:
    Hello again,
    Ok, I've done a quick test today for two things:
    1. DC offset - logic analysed the tracks and said 'no dc offset found'. Although the troughs seem to be noticeably bigger than the peaks at the start of the notes, towards the end of the notes (bass gtr) the peaks were higher than the troughs. - i suppose this cancels out over the duration of the full note?
    Then you do NOT have and DC voltage issues. From now on, IGNORE any and all comments on DC offset. You don't have any. This is a good thing.
    2. However, I've looked at every note and each one starts with a trough when first plucked - so assume i have -ve phase in my setup from what you previously said - this is the case with both the preamps in the ULN-2 and with the Avalon 737 as a pre and using the ULN2 as just an AD convertor.
    I suspect bad wiring. Check the wiring for your equipment, and FOLLOW what the mfr recommends you should use for their equipment.
    MOST (99%) of gear that has BALANCED wiring, is wired as follows:
    For an XLR connector :
    PIN 1 = GROUND
    PIN 2 = COLD voltage.
    PIN 3 = HOT voltage.
    For TRS (1/4" Tip-Ring-Sleeve) connectors:
    SLEEVE = GROUND
    RING = COLD voltage.
    TIP = HOT voltage.
    Cheers
    Is there anyway that I could reverse the phase that's coming from the ULN 2 going into the computer?
    Yes. Re-wire your setup. Someone is not playgin nice with the pinouts...
    I can only assume negative phase in the audio files would be a problem if the > software instruments produce positive phase audio when playing?
    Absolutely. this is probably why, when you mix, some notes sound thin, while others sound too big and boomy. And you have to do extreme EQing to correct the issue.
    Does that make any sense?!
    It does to me.
    thanks again for all your help,
    J
    Cheers

  • I am having trouble with my speakers not working while online in particular on windows.My audio works when playing audio files

    I am having trouble with my speakers not working while online particular on facebook. My audio works when playing audio files.

    Hi,
    Did it happen all the time or sometime?
    Please check online browser status:
    Click Volume icon in the taskbar, click Mixer link button as below:
    If it's fine, follow this guide to run troubleshooter to detect and fix the issue:
    Tips for fixing common sound problems
    http://windows.microsoft.com/en-in/windows/tips-fixing-common-sound-problems#tips-fixing-common-sound-problems=windows-7
    Meanwhile, this similar thread also could be referred:
    https://social.technet.microsoft.com/forums/ie/en-US/a4a1cfe5-93a5-4c0b-9bf6-f7db0304f2ba/no-sound-on-youtube-or-any-other-webpage
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

Maybe you are looking for

  • PO wise venodr payment status

    Hi Experts, Is there any report wherein I can see Purchase Order, Item wise vendor payment status, i.e. whether payment is cleared, Parked or open item. Suggest me if there is any transaction exist or on how to address development of this report. Tha

  • XML Namespace Question

    Hi folks, I'm new to XML, and have been trying to validate an XML document against a schema using an online validator. I have given ultra-simple examples of my schema and document below: Schema <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3

  • How to delete a discussion I just created?

    Oops I posted my # in my last post delete please!!!

  • Duplicates between Beta 4 and Lightroom 1.0

    Hi all, I started to build my photo database with beta 4.1 and I am now continuing with Lightroom 1.0. For unknown reason, the "ignore suspected duplicate" option doesn't catch duplicate image imported with beta 4.1 from the one imported with Lightro

  • Tables - Only want Outline Border not internal borders

    Hi Im using MX 2004. I'd like to add a coloured outside border to my table but when I select the table and choose a border colour it is automatically applied to all cell borders i.e including the inside borders. How do I remove the internal borders o