# Software for M-AUDIO KeyRig 49 keyboard?

**URL:** <https://boards.straightdope.com/t/software-for-m-audio-keyrig-49-keyboard/578360>\
**Category:** Cafe Society\
**Created:** [April 14, 2011, 1:11pm UTC](https://boards.straightdope.com/t/software-for-m-audio-keyrig-49-keyboard/578360 "2011-04-14T13:11:35Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ticker](https://avatars.discourse-cdn.com/v4/letter/t/d07c76/32.png) [@ticker](https://boards.straightdope.com/u/ticker)\
**Post date:** [April 14, 2011, 1:11pm UTC](https://boards.straightdope.com/t/software-for-m-audio-keyrig-49-keyboard/578360/1 "2011-04-14T13:11:35Z")

</div>

I have just been given an M-AUDIO KeyRig 49 usb music (midi?) keyboard. I want it because I am trying to teach myself piano from [this book](http://www.amazon.co.uk/gp/product/0739052055/ref=oss_product) and I wanted something to practice on when I can’t get to my girlfriend’s piano. What I don’t have is any software to go with it - the donor has lost the disc it came with :(. It seems to have installed a driver ok when plugged in to my Windows 7 64 pc but I need some software to use with it - cheap or ideally free. I don’t need anything fancy - just something which can make a reasonably piano-ish sound when I hit the keys. I have never used music software before so I don’t really know what to expect.

Any suggestions or advice?

---

<div class="post-metadata">

**Author:** ![mikews99](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@mikews99](https://boards.straightdope.com/u/mikews99)\
**Post date:** [April 15, 2011, 5:53am UTC](https://boards.straightdope.com/t/software-for-m-audio-keyrig-49-keyboard/578360/2 "2011-04-15T05:53:47Z")

</div>

There aren’t any few free or low cost stand-alone piano modules available. You will have to put together separate pieces of software and do some configuring and setup yourself, but once you’ve setup everything properly you should be able to load and go.

First, you’ll need something that contains a piano sound. [4Front Piano](http://www.yohng.com/piano.html) is a VST instrument (VSTi) that’s free and sounds good.

Next, you’ll need something that can load this VSTi. The simplest Windows VSTi host is [SAVIHost](http://www.hermannseib.com/english/savihost.htm). You rename the SAVIHost executable to match the VSTi plugin name (with the 4Front piano for instance, it’s “4Front Piano.exe”) and it will automatically load the plugin when launched.

Finally, if you don’t have a professional soundcard with ASIO drivers, go get [ASIO4All](http://www.asio4all.com/) which will create an ASIO driver wrapper around your Windows soundcard. This is necessary if you expect to play with low latency on your built-in-the-motherboard Windows soundcard.

Start the renamed SAVIHost, go to the Devices menu, select your keyboard for MIDI input, ASIO4All for Wave output, then select Asio Control Panel to bring up ASIO4All. Select only your main audio output (usually something like “High definition audio device”) and set your latency for as low as possible without getting clicks/pops/distortion.

Once you get everything working, just load the renamed SAVIHost whenever you want to play.

---

<div class="post-metadata">

**Author:** ![ticker](https://avatars.discourse-cdn.com/v4/letter/t/d07c76/32.png) [@ticker](https://boards.straightdope.com/u/ticker)\
**Post date:** [April 15, 2011, 9:22am UTC](https://boards.straightdope.com/t/software-for-m-audio-keyrig-49-keyboard/578360/3 "2011-04-15T09:22:17Z")

</div>

I found [Anvil Studio](http://www.anvilstudio.com/), a restricted freeware app which does much more than I need right now. Despite a clunky interface I managed to do what I originally wanted - get it to play a piano-like sound when I hit the Midi keyboard - without recourse to the documentation.

---

<div class="post-metadata">

**Author:** ![MC\_E](https://avatars.discourse-cdn.com/v4/letter/m/c77e96/32.png) [@MC\_E](https://boards.straightdope.com/u/MC_E)\
**Post date:** [April 15, 2011, 11:35am UTC](https://boards.straightdope.com/t/software-for-m-audio-keyrig-49-keyboard/578360/4 "2011-04-15T11:35:27Z")

</div>

I was about to ask this exact question, thank you!

---

<div class="post-metadata">

**Author:** ![Jaledin](https://avatars.discourse-cdn.com/v4/letter/j/f9ae1b/32.png) [@Jaledin](https://boards.straightdope.com/u/Jaledin)\
**Post date:** [April 16, 2011, 9:25pm UTC](https://boards.straightdope.com/t/software-for-m-audio-keyrig-49-keyboard/578360/5 "2011-04-16T21:25:44Z")

</div>

I used to love SAVIHost when I was trying out softsynths. At the time I was using it, it was the simplest way to test whatever you wanted without bothering to load a full audio sequencer.

IIRC, there’s a free VSTi called “MrRay73” (or once was) that was a pretty good Rhodes piano instrument.

If ASIO4All doesn’t work, you will need to pay for a soundcard with ASIO drivers, IMHO. I’ve used an inexpensive M-Audio USB 1.1 (can’t remember the model number – UA1EX I think) with good results, on an old box. Even slow USB worked fine for the audio for me on an ancient PC with under 200MB of RAM.

Gotta get that audio latency way down if you don’t want to play a fugue, sit back, and hear it come out of your monitors a second after finishing the entire piece.

ETA: didn’t see your update, **ticker**. Sounds like you’re all set!

---

<div class="post-metadata">

**Author:** ![ticker](https://avatars.discourse-cdn.com/v4/letter/t/d07c76/32.png) [@ticker](https://boards.straightdope.com/u/ticker)\
**Post date:** [April 17, 2011, 10:04am UTC](https://boards.straightdope.com/t/software-for-m-audio-keyrig-49-keyboard/578360/6 "2011-04-17T10:04:55Z")

</div>

I have found that the [Java sound API](http://download.oracle.com/javase/tutorial/sound/index.html) is quite straightforward for java programmers. I was able to create a very simple app which connects my keyboard to a basic software synth in just a handful of line of code. Easier to use than the Anvil Studio and it should be fairly easy to extend to play other instruments other than the default piano.

---

<div class="post-metadata">

**Author:** ![Anamorphic](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/anamorphic/32/3057_2.png) [@Anamorphic](https://boards.straightdope.com/u/Anamorphic)\
**Post date:** [April 18, 2011, 1:47am UTC](https://boards.straightdope.com/t/software-for-m-audio-keyrig-49-keyboard/578360/7 "2011-04-18T01:47:01Z")

</div>

> [@mikews99](#):
>
> There aren’t any few free or low cost stand-alone piano modules available. You will have to put together separate pieces of software and do some configuring and setup yourself, but once you’ve setup everything properly you should be able to load and go.

I’m seriously not trying to turn this into a Mac/Windows debate thread (I hate those), and I realize this piece of advice is no help to the OP… but in case anyone else stumbles on to the thread with the same question, GarageBand is a pretty great piece of software that comes with every new Mac and works well with the M-Audio KeyRig.

---

<div class="post-metadata">

**Author:** ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)\
**Post date:** [April 19, 2011, 5:11pm UTC](https://boards.straightdope.com/t/software-for-m-audio-keyrig-49-keyboard/578360/8 "2011-04-19T17:11:01Z")

</div>

> [@ticker](#):
>
> I have found that the [Java sound API](http://download.oracle.com/javase/tutorial/sound/index.html) is quite straightforward for java programmers. I was able to create a very simple app which connects my keyboard to a basic software synth in just a handful of line of code. Easier to use than the Anvil Studio and it should be fairly easy to extend to play other instruments other than the default piano.

Would you provide the source? I’d love to see it. I do better with working code than guides,

My dream is to have a program that can take my Midi input, make certain modifications and send it back. Seeing how a programming language handles midi would be useful if I wind up eventually having to roll my own.

I’m also bookmarking this thread for the sound font when I will eventually try hooking up my new (to me) keyboard to my new (to me) laptop. (Best birthday presents I’ve ever gotten.)

EDIT: PM me if you don’t want to share it with the Internet at large.

---

<div class="post-metadata">

**Author:** ![ticker](https://avatars.discourse-cdn.com/v4/letter/t/d07c76/32.png) [@ticker](https://boards.straightdope.com/u/ticker)\
**Post date:** [April 21, 2011, 6:38am UTC](https://boards.straightdope.com/t/software-for-m-audio-keyrig-49-keyboard/578360/9 "2011-04-21T06:38:04Z")

</div>

> [@BigT](#):
>
> Would you provide the source? I’d love to see it. I do better with working code than guides,

Embarrassingly crude Java code to use Midi keyboard as simple piano:

```auto

import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.sound.midi.MidiSystem;
import javax.sound.midi.MidiUnavailableException;
import javax.sound.midi.Synthesizer;
import javax.sound.midi.Transmitter;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class MiniMidi extends JFrame{
    
    private JLabel synthStatusText, transStatusText, connectionStatusText;
    private JButton connectButton, closeButton;

    private Synthesizer synth = null;
    private Transmitter transmitter = null;

    public MiniMidi(){
        super("Mini Midi Piano");
        buildWindow();
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        addWindowListener(new WindowAdapter(){
            @Override
            public void windowClosed(WindowEvent e) {
                tearDownMidi();
            }

        });

    }

    private void buildWindow(){

        setSize(200, 150);
        Container content = getContentPane();
        content.setLayout(new BorderLayout());

        // Buttons
        connectButton = new JButton("Connect");
        closeButton = new JButton("Close");
        JPanel buttonBar = new JPanel();
        buttonBar.setLayout(new FlowLayout());
        buttonBar.add(connectButton);
        buttonBar.add(closeButton);
        content.add(buttonBar, BorderLayout.SOUTH);

        closeButton.addActionListener(new ActionListener(){
            @Override
            public void actionPerformed(ActionEvent e) {
                MiniMidi.this.setVisible(false);
                MiniMidi.this.dispose();
            }
        });

        connectButton.addActionListener(new ActionListener(){
            @Override
            public void actionPerformed(ActionEvent e) {
                setupMidi();
            }
        });

        // Status display

        JPanel statusPanel = new JPanel();
        statusPanel.setLayout(new BoxLayout(statusPanel, BoxLayout.PAGE_AXIS));
        synthStatusText = new JLabel();
        transStatusText = new JLabel();
        connectionStatusText = new JLabel("no");
        statusPanel.add(statusLine("Synthesizer: ", synthStatusText));
        statusPanel.add(statusLine("Input device: ", transStatusText));
        statusPanel.add(statusLine("Connected: ", connectionStatusText));
        content.add(statusPanel, BorderLayout.CENTER);

    }

    private JPanel statusLine(String labelText, JLabel statusField){
        JPanel line = new JPanel();
        line.setLayout(new BoxLayout(line, BoxLayout.LINE_AXIS));
        line.add(new JLabel(labelText));
        line.add(statusField);
        return line;
    }

    private void setupMidi(){
        // Try to connect the keyboard to the default synth
        
        boolean devicesOk = true;

        // Check for a default synth
        try{
            synth = MidiSystem.getSynthesizer();
            synth.open();
            synthStatusText.setText("OK");
        }
        catch(MidiUnavailableException me){
            synthStatusText.setText("Not available");
            devicesOk = false;
        }

        // Check for a default transmitter - probably the keyboard
        try{
            transmitter = MidiSystem.getTransmitter();
            transStatusText.setText("OK");
        }
        catch(MidiUnavailableException me){
            transStatusText.setText("Not Available");
            devicesOk = false;
        }

        if(devicesOk){
            // Attempt to connect transmitter (keyboard) to synth
            try{
                transmitter.setReceiver(synth.getReceiver());
                connectionStatusText.setText("yes"); // That's it!!!
                connectButton.setEnabled(false);
            }
            catch(MidiUnavailableException me){
                connectionStatusText.setText("Unable to connect devices");
            }
        }
    }

    private void tearDownMidi(){
        if(synth != null)
            synth.close();
        if(transmitter != null)
            transmitter.close();
    }

    public static void main(String args[]){
        MiniMidi miniMidi = new MiniMidi();
        miniMidi.setVisible(true);
    }

}

```

Most of the code is concerned with the UI, only the functions **setupMidi** and **tearDownMidi** actually deal with the api at all. I am not sure how hardware dependant this is as it relies on there being a default synth available. Works on Windows 7 though.

There is fuller demo of the api - with source - here: [http://java.sun.com/products/java-media/sound/samples/JavaSoundDemo/](http://java.sun.com/products/java-media/sound/samples/JavaSoundDemo/)

---

<div class="post-metadata">

**Author:** ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)\
**Post date:** [April 21, 2011, 10:46pm UTC](https://boards.straightdope.com/t/software-for-m-audio-keyrig-49-keyboard/578360/10 "2011-04-21T22:46:13Z")

</div>

Thanks. I’ve got it saved to my computer. I’ll take a look at it later when I have the mind power to devote to it.

---

<div class="post-metadata">

**Author:** ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)\
**Post date:** [May 20, 2011, 12:48pm UTC](https://boards.straightdope.com/t/software-for-m-audio-keyrig-49-keyboard/578360/11 "2011-05-20T12:48:16Z")

</div>

\<oops\>
