rmf (beatnik)

Since the Java sound api supports that format directly, I thought I should take a look. Well, it’s small, sounds much better than midi (it’s somewhat tracker alike) and doesn’t need that much cpu power as ogg does.

[quote]RMF is Beatnik’s proprietary format for playing MIDI music simultaneously with digitally recorded audio samples. This format allows composers to combine the benefits of MIDI (high fidelity and small file size) with the customized sound of recorded audio while creating a file that can be used for polyphonic ringtones, interactive game audio and user alert tones. RMF contains a lightweight 40-bit encryption scheme and includes metadata fields for comments.
[/quote]
However, the biggest problem with that format is producing it. There is an editor over at beatnik, but it’s kinda expensive… ~300$ :-/

So, if there is another (cheaper) way to produce RMFs, I would like to hear about em.

Well, tried the demo version. It’s totally useless, you can’t do anything with it :-/

I’m wondering why Sun chose that format, xm would have been so nice :’(

I’m curious about rmf too. Do all rmf files end with rmf? I ask this, as you use classes from the midi packages and there is nothing explicitly mentioned about rmfs, other than java sound can play them.

When you query a midi file, you can get one of three return types: 0 - 2. But there isn’t any docs on what each one represents.

Any other info you’ve come across?

Regards,
Aaron R>

Well, there are just different midi types… and well they are just called 0, 1 and 2 (I mean outside Java). They aren’t much different and you can convert between those formats easily. However 2 (iirc) also supports embedding additional infos like the author and the like.

RMF is kinda similar to midi. You can also convert midi files to rmf, which are much smaller then.

If you’ve never heard rmf you can try this little demo application (installed soundbank required):


(the 3 songs are © beatnik and can be found somewere on their page)

I think it’s pretty impressive for that size (~96kb) and I really would like having RMF music in my game, but I guess that just won’t ever happen. You can license pre made RMF tracks (as you can do with any other format) unfortunately they are really expensive… usually around 400$(!) per track :-/

Hi,

I’m a mobile sound producer specialized in mobile sound production.
I would like to play a RMF file on targeted mobiles, using JAVA technology, but I can’t find any example of a *.java file.
I’ m using a “PlayWav.java” source file and I Have replaced, i the code, the “WAV informations” by “RMF ones” . I built the and packaged the .jar file using the Wireless Toolkit and all seems ok.
Naturally the file didn’t paly in the phone emulator because it’s not linked to RMF on PC.
It would play on tergeted phones but I have to test.

Could you tell me if the code below is ok or not: I have changed only the file name/extension and mime type (hilight in red).
if not, could you tell me what to do ?
/*--------------------------------------------------

  • PlayWav.java
    -------------------------------------------------/
    import javax.microedition.midlet.;
    import javax.microedition.lcdui.
    ;
    import javax.microedition.media.;
    import java.io.
    ;
    public class PlayWav extends MIDlet implements CommandListener
    {
    private Display display; // Reference to display object
    private Form fmMain; // Main form
    private Command cmExit; // Command to exit the MIDlet
    private Command cmPlay; // Command to play wav file
    public PlayWav()
    {
    display = Display.getDisplay(this);
    // Create commands
    cmExit = new Command(“Exit”, Command.EXIT, 1);
    cmPlay = new Command(“Play”, Command.SCREEN, 2);
    // Create Form, add components, listen for events
    fmMain = new Form(“Play WAV file”);
    fmMain.addCommand(cmExit);
    fmMain.addCommand(cmPlay);
    fmMain.setCommandListener(this);
    }
    public void startApp()
    {
    display.setCurrent(fmMain);
    }
    public void pauseApp()
    { }
    public void destroyApp(boolean unconditional)
    { }
    /*--------------------------------------------------
  • Event handling
    -------------------------------------------------/
    public void commandAction(Command c, Displayable s)
    {
    if (c == cmExit)
    {
    destroyApp(false);
    notifyDestroyed();
    }
    else if (c == cmPlay)
    playwavfile();
    }
    /*--------------------------------------------------
  • Play a wav file
    -------------------------------------------------/
    public void playwavfile()
    {
    try
    {
    // Read wav file, packaged in the jar file
    InputStream in = getClass().getResourceAsStream("/sexmachine.rmf");
    Player p = Manager.createPlayer(in, “audio/rmf”);
    p.start();
    }
    catch (Exception e)
    {
    // Display an alert
    Alert alr = new Alert(“Error”, “Unable to play WAV file!”, null, AlertType.ERROR);
    alr.setTimeout(Alert.FOREVER);
    display.setCurrent(alr, fmMain);
    }
    }
    }

Thank you very much

Jean luc Borla

From the documentation, it looks like an RMF file is just an archive containing a midi sequence and a general-midi sound bank. Unfortunately it appears the archive format is non-standard, otherwise it would have been possible to roll-your-own.