Mixing two midi files using j2me

I have build an application for playing the midi files and also concatinate midi files......i want to build an application for mixing the midi files using j2me....Can anyu one please help me in doing this..........
Thanks

This should help you on your way:
http://jedi.ks.uiuc.edu/~johns/links/music/midifile.html

Similar Messages

  • Playing two midi files at once using threads?

    Hi all, I have the following simple code here which plays a midi file, but I'm not sure how to use threads to play two midi files at once:
    import org.jfugue.*;
    import javax.sound.midi.*;
    import java.io.*;
    public class MidiPlayer {
    public static void main (String [] args) {
    try {
    Player player = new Player();
    player.playMidiDirectly(new File("C:\\Sounds\\bach.mid"));
    } catch (IOException e) {
    } catch (InvalidMidiDataException e) {
    Is there a way to use a thread for this class so that in another class I can call 'start' twice and have the parameters be the midi file locations (e.g. "C:\\Sounds\\bach.mid" & "C:\\Sounds\\bach2.mid").
    Any kind of help would be great, thank you!

    Something like the below.
    import org.jfugue.*;
    import javax.sound.midi.*;
    import java.io.*;
    public class MidiPlayer {
    public static void main (String [] args) {
    String fileName = "c:\\Sounds\\bach.mid";
    Thread t1 = new Thread(new MyRunable(fileName));
    t1.start();
    String fileName2 = "c:\\Sounds\\bach2.mid";
    Thread t2 = new Thread(new MyRunable(fileName2));
    t2.start();
    } // main
    class MyRunnable implements Runnable {
    private String fileName
    public MyRunnable( String fileName) {
      this.fileName = fileName;
       public void run() {
         Player player = new Player();
        player.playMidiDirectly(new File(fileName));
    } // MyRunnable
    } //

  • Mixing two audio files.......

    Hi
    I wanna mix two mp3 files and generate a new file using J2ME, so that the resultant file can play both the songs simultaniously......I have written an application for playing the indvidual files and playing the files one after the other and i also have a mp3 decoder in j2me....now i want to mix the two files and play them in a single player and listen to both the songs playing simultaniously .......(my requirement is not openning two players at the same time and play them simultaniously. I want to build an application to play both
    the songs simultaniously in a single player)
    Can any one please help me in this regard.......
    Thanks..........

    Hi there,
    Seems to me you'll have to decode the two files and then merge them into a new one to play - not easy! I think wav files are easier to deal with and more mobiles will play them in J2ME, though they are larger.
    See;
    http://www.dv.co.yu/mpgscript/mpeghdr.htm
    for details of mp3 format, and
    http://www.borg.com/~jglatt/tech/wave.htm
    for wav.
    Good luck!

  • Mixing two mp3 files and generating new mp3 file in java

    HI,
    I have problem, I have 2 mp3 files I have some defined times for both file. On particular time i want to mix both mp3 file sound and generate new mp3 file by mixing audio from both files.
    As i am new to mp3 in java , Please guide me from where should i start or any other good suggestion.
    Thanks & Regards
    Akhnukh

    Thanks a lot for ur reply....
    But my actual task is to mix two mp3 files and generate a new file where in i should be able to list the two mp3 files playing simultaniously......
    So can u please help me in writing the j2me code for mixing of two mp3 files.....
    Thank u very much
    Navya

  • Compare two pdf files using adobe acrobat through command line

    Does anyone know how to compare two pdf files using adobe acrobat through command line. I want to do this via command line because we want to compare hundreds of file every day through some automated windows tasks.
    If command line option is not available in acrobat, then is it feasible to make use of acrobat javascript API to do this task?
    Any kind of help will be greatly.

    Command-line: Not possible.
    JavaScript: Possible, but very limited. Basically the only thing you can do is simulate clicking the Compare Documents button. The rest has to be done manually.
    However, it *might* be possible to automate this process a bit more using a plugin. Ask over at the Acrobat SDK forum for more information...

  • How to read two text files using the Read from spreadsheet.vi and then plot it

    I need to read two text files using the read from spreadsheet function and then plot these files over time.
    The file with the .res extention is the RMS values (dt and df) and the second file contains the amplitude of a frequency spectrum.
    I really appreciate any help..thanks
    Attachments:
    RMS.txt ‏1 KB
    FREQUENCY.txt ‏1 KB

    From NI Example Finder:
    Write to Text File.vi
    Read from Text File.vi
    Jean-Marc
    LV2009 and LV2013
    Free PDF Report with iTextSharp

  • How to read a .pdb file using J2ME

    hi all,
    I am using J2ME to write a program that need to read a .pdb file.
    The .pdb file was generated by other application.
    The .pdb file could not be open using J2ME's RecordStore class.
    How can I open the .pdb file using RecordStore or use other approach?

    You'll need the FileConnection api in JSR-75. Note that your device needs to support this! And no, there is no code to read the file format. You'll need to do that yoursels.

  • How to compare content of two text file using StreamTokenizer

    hi....
    i have two text files...containg field like(name,number,scheme) and(number,date,value)... i want to create a third file containg field like (name,number,date,scheme,value) by using these two table. how to create

    I think this code can solve your problem.
    private static final String DELIM = ",";
    * Compile two files.
    * @param file1 String the input file 1
    * @param file2 String the input file 2
    * @param file3 String the output file
    * @throws IOException error in reading/writing
    public void compileFiles(String file1, String file2, String file3) throws
            IOException {
            BufferedReader reader1 = new BufferedReader(new InputStreamReader(
                new FileInputStream(file1)));
            BufferedReader reader2 = new BufferedReader(new InputStreamReader(
                new FileInputStream(file2)));
            BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(
                new FileOutputStream(file3)));
            String line1 = reader1.readLine();
            String line2 = reader2.readLine();
            while (line1 != null && line2 != null) {
                writer.write(compileLines(line1, line2));
                writer.newLine();
                line1 = reader1.readLine();
                line2 = reader2.readLine();
            reader1.close();
            reader2.close();
            writer.close();
        private String compileLines(String line1, String line2) {
            StringTokenizer tok1 = new StringTokenizer(line1, DELIM);
            StringTokenizer tok2 = new StringTokenizer(line2, DELIM);
            String name = tok1.nextToken();
            String number = tok1.nextToken();
            String scheme = tok1.nextToken();
            // ignore number
            tok2.nextToken();
            String date = tok2.nextToken();
            String value = tok2.nextToken();
            StringBuffer buffer = new StringBuffer();
            buffer.append(name);
            buffer.append(DELIM);
            buffer.append(number);
            buffer.append(DELIM);
            buffer.append(date);
            buffer.append(DELIM);
            buffer.append(scheme);
            buffer.append(DELIM);
            buffer.append(value);
            return buffer.toString();
        }

  • 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

  • How to append two CSV files using ftp

    Hi
    Please let me know the FTP command to append the two .CSV files into one .CSV file.
    e.g.
    Let me explain:
    one CSV file has the fields F1 , F2, F3 , F4 and has 5 records
    another CSV file has the same sequence of fields F1, F2, F3, F4 and has 10 records
    after appending both the files , I must get 15 records.
    Thanks
    Alok

    Ok I will try out.
    I am illustrating my requirement as follow
    File#1 (type .CSV)
    F1     F2     F3     F4
    100   566    89     86   
    235   256    56     12
    File#2 (type .CSV)
    F1     F2     F3     F4
    56     56     98     102
    12     23     36      523
    23      56     56    89
    Now we want to Append File#1 to File#2 as follow: 
    F1    F2    F3     F4
    100   566    89     86   
    235   256    56     12   
    56     56     98     102
    12     23     36      523
    23      56     56    89
    Please suggest now that which command would be appropiate.
    Alok

  • Sending log data to two different files using log4j

    Hi,
    Can some one please help me with my problem I have here?
    I want to send log data to two diffrent files depending on the logging level such as DEBUG and WARN.
    How can you configure this in log4j.properties.
    Please post sample code for log4j.properties to achieve this.
    Thanks in advance.
    rsreddych

    Hi,
    Finally, I found the solution to this problem my self.
    What you need to do is define two loggers in the application, and set two priority levels to these loggers and define two out put files to these loggers. Deploy the war file, restart application server and you are good to go.
    This seems to be working for me. Only glitch I found is, the out put in
    the second file is displaying one space character at the start of line starting from second line (First line don't have this problem). This is odd. It may be because of my faulty code. Any how thanks for you all.
    rsreddych

  • How to modify the contents of a configuration file using j2me

    Hi,
    I'm developing a Application in j2me wherein i need to overwrite the existing contents of the configuration file(settings.cfg) with the value's that i have entered thru the front end. I was able to open and read the contents of the configuration file as follow's
    InputStream is = getClass().getResourceAsStream("/settings.cfg");
    Now, i need to remove the existing and updte it with the new content, how do i do it.. Kindly please help me out..
    Thanks

    Didn't you hear me the first time?
    http://forum.java.sun.com/thread.jspa?threadID=701360&messageID=4068435#4068435

  • Creating MIDI File

    Could i create a midi file using j2me. if so how? I am interesting in Nokia 6010i

    I'm having exactly the same problem, could you please tell me if you solved it? I'm using netbeans 6.5.
    Edit:
    Figured it out, after hours of searching. It was a driver related problem. Downloaded an other driver and it works now. =)
    Edited by: NomenNescio on Jan 31, 2009 12:46 PM

  • Comparing two text files in a UNIX using shell programming

    Hi All,
    Sorry for posting a UNIX shell query on Database forums.
    I want to compare two text files using shell programming. The two text files are actually Business Objects output extracted in a text format. The two output files are not in a tabular format and are no way similar in looking. I want to take one file e.g. file1 as an input file and compare each line of file1 with the other file e.g. file2. During comparison I want to extract the differences found in another file and if possible the similar data as well.
    Below is how the files will look like
    File 1:
    BILL1000000 1111251 122222
    RMG1A2 023425100000000010001 11135 102650111100
    UHL1 *6999999* *454540001* Weekly *000*
    0544424556895PS DATA 01MPS100000/03 MR A A PERTH UTL1234567893106923455053106900000010000005
    File 2:
    AUTO
    APPLICATION=STARTPOINT
    START
    PROCESSING DATE=01012011
    1598301270320099TEST C E 00000031615 123456
    7854301276140499TES P 00000062943 234567
    UHL1 *6999999* *454540001* Weekly *000*
    5569931233333499/123456789 00000013396 345678
    4471931233333499ER K J 00000031835123456789012456789
    33652931233333499E J L 00000034729123456789012567890
    45783123333349921/123456789 00000039080 678901
    1452931233333499T R 00000040678123456789012789012
    59689312333334994/987654321 00000048614 890123
    4112931233333499/987654321 00000060631 901234
    1236931217836899 K S 00000043704 012345
    END
    As you can see above the file are not at all matching except for one record UHL1, but its just an example. As an output I would like to have a third file containing all these records, highlighting the differences, and a fourth file where in only the matched records should get populated.
    Please post any useful scripts related to the above scenario.
    Many Thanks.
    Edited by: 848265 on 06-Apr-2011 04:13

    Hi;
    For your issue i suggest close your thread here as changing thread status to answere and move it to Forum Home » Linux which you can get more quick response
    Regard
    Helios

  • MIDI files - opening vs importing and using templates

    I think I'm out of luck on this one, but I thought I'd put it out there anyway. I spent all morning building a new template with 50+ buses for internal recording of audio (Thank You APPLE!).
    I would like to be able to open MIDI files using that template. If I import, only the regions are imported not the tempo map, markers etc. If I open, then I can't have it use my template because it opens in an empty file.
    I've gone into the global preferences and assigned my template as the default template and still no love. Any thoughts?

    I can import the environment but all of the routing is gone. I've got like 50 buses or something and all of my tracks in the arrange are gone as well. No way to import those I imagine. It'll take me only like 10-15 mins to load them all up again, but still thats 1-150 mins each time. Thats why I built a template to begin with, to avoid routing stuff and inserting tracks over and over.
    We need an update on this one stat

Maybe you are looking for