How to use virtual instruments with your digital piano

If you have a digital piano, electronic keyboard or MIDI controller, you can easily get access to many more sounds by hooking it up to the computer using a MIDI interface. Instead of being limited to just the on-board tone generator of your piano, you can now use an almost infinite number of “virtual” instruments.

In this article we will look at this quick and relatively inexpensive method to make your digital piano sound even better. Some of this software will cost money, but we’ll also look at free options.

In another article, I explain how to convert a MIDI recording to MP3 using software instruments. Although the idea is similar, the article you’re reading now focuses on live playing: you press keys on your piano and sound comes out of your computer in real-time. Of course, you can also record your live playing and we’ll talk about that too.

NOTE: The article was written with Windows in mind. If you use another operating system such as Mac OS X, the directions are similar but the software will be different.

What you need

A fast computer

Virtual instruments (also called software instruments) have fairly heavy hardware requirements. A fast processor (CPU), lots of memory (RAM), and a fast and large hard disk are not a luxury. If you bought your computer in the past two years you’ll probably be fine.

ASIO

Most importantly, you will need a good soundcard, preferably one with an ASIO driver. ASIO is a technology that allows for very low latency.

Latency is the time between pressing a note on your piano and hearing a sound come from the computer. If this is more than a few milliseconds, you’ll notice the delay and that can be very annoying when you’re playing live. A latency of about 10ms is bearable but more than that isn’t much fun. ASIO can bring down the latency to about 3ms, which is short enough for you not to notice.

Check the documentation for your soundcard and the web site of the manufacturer if an ASIO driver is available. If not, then you can install ASIO4ALL, which pretends that you do have ASIO capability. It won’t make your soundcard perform any better, but it will enable certain virtual instruments that require ASIO to function.

MIDI

MIDI, which stands for “Musical Instrument Digital Interface”, is the protocol that electronic instruments use to talk to each other. We will use MIDI to hook up your digital piano or keyboard to the computer.

Note that MIDI does not send actual sounds to the computer, but messages that let the computer know which keys you pressed and how hard you pressed them. It’s then up to the software instrument to interpret this data and convert it into actual sounds.

No doubt your digital piano or keyboard has at least one MIDI port (MIDI OUT) but typically also a MIDI IN and maybe even a MIDI THRU. Usually these are located at the back of your instrument, and look like this:

MIDI connectors

In recent years, manufacturers have added USB capability to their instruments. If you’re lucky, your piano or keyboard has a connector like this:

To HOST connector

In that case, you can hook up your instrument directly to a free USB port on your computer using a standard USB cable.

If your piano does not have USB but only the round 5-pin MIDI connectors, then you’ll need to invest in a USB-to-MIDI interface. You can get these at any computer store.

Another tutorial I wrote has more information on how to make your computer MIDI-ready, so check that out if you run into problems. Important: connect MIDI OUT to MIDI IN, and MIDI IN to MIDI OUT.

Using VST plugins

The most popular type of software instrument are VST plugins. VST, which stands for “Virtual Studio Technology”, is the protocol that software instruments use to talk to each other.

VST plugins can be considered software versions of fancy hardware sound modules and effects processors that you would find in a professional recording studio, and just like their hardware equivalents you can chain multiple effects together.

There are three types of VST plugins:

  1. Audio effects, which take an audio signal and transform it. Typical effects are reverbs and filters.
  2. MIDI effects, which process MIDI messages. An example would be a plugin that transposes all notes one octave higher.
  3. Instruments, also called VSTi‘s, which turn MIDI data into sounds. That’s what we will be using.

To use VST plugins you will need a “host” program. Most professional audio software can host VST’s but there are free options too. Below, I’ll use the free program Cantabile Lite. This program is limited in the number of plugins it allows you to use, but it’s sufficient for our purposes.

Using a piano plugin

1. Download and install Cantabile Lite.

Now we need to install one or more VST plugins. In order for host programs to find the plugins, they need to be installed in a common location. Typically this is C:Program FilesVSTPlugins. It doesn’t really matter where you install the plugins, but you will need to tell the host program where it can find them.

2. Download and install 4Front Piano Module (VSTi). This is a decent free piano VST.

3. In Cantabile, go to Tools, Settings, VST Plugins tab. If the folder where you installed the plugin isn’t in the list yet, add it now. Then click OK to go back to the main screen.

4. Click Tools, Quick Scan Plugin Folder. Now Cantabile will look for new plugins in the VSTPlugins folder.

5. On the main screen there are two labels that say Choose Plugin. Pick the top one and select your new piano plugin from the Instruments list.

A new window for the “4Front Piano Module” will open. Most plugins have settings that you can edit in this window, but this one doesn’t have any.

6. Unselect Input. This will disable your computer’s microphone. For some reason, Cantabile always turns this on automatically, but that only adds background noise to your playing and we don’t want that.

Play something on your instrument. You should hear sound coming out of your computer speakers. Congratulations, you are now using a virtual instrument!

Cantabile can record your playing directly to a MIDI file or to a WAV file. Check out the MIDI Recorder and Audio Recorder sections. You can tweak the sound level with the Output volume slider. You should always record as loudly as possible, but not so loud that the sound becomes distorted.

Adding an effect

I find that digital piano usually sounds better with a little reverb, so now we’ll download a reverb plugin and put it behind the piano in the effects chain.

1. Download and install Classic Reverb. You don’t have to close Cantabile while you’re doing this. After the installation is complete, simply click Quick Scan Plugin Folder to update the list of plugins.

2. In the Choose Plugin box under the piano plugin, pick Classic Reverb from the Room Effects list. A new window with a whole bunch of knobs appears.

3. If you play something on your instrument now, you should hear reverberation added to the piano sound. Not convinced? Uncheck the box in front of Classic Reverb to disable the reverb plugin and hear the difference.

4. To the right of Classic Reverb (in the main Cantabile window) is a column called Preset that now says “Default”. Many plugins come with a list of presets (also called “programs”). Play around a little with the presets until you find one you like.

Typically, you’ll find a preset that sounds close to the sound you want and then tweak it using the knobs and sliders. The settings window of the plugin also lets you step through the presets, and even lets you save your changes as a new preset.

As I mentioned, Cantabile Lite is limited in how many plugins you can use. If you want more, you can either buy the full version or use a different program such as VSTHost. This one is slightly more confusing than Cantabile, but you’ll find the process similar.

Many other audio programs have the ability to use VST instruments and MIDI. REAPER is an inexpensive but powerful multitrack audio application that you may find useful.

Recommended VST plugins

Here are some VST plugins that I personally like and use, or that come highly recommended by other musicians.

As usual: the better quality you want, the more you’ll have to pay for it. Some of the commercial products have trial downloads available, so you can try them out before you buy.

VST instruments can be roughly classified into two categories: samplers and simulations (the latter are often referred to as “synths”).

Some virtual piano products were made by painstakingly recording a real acoustic piano. When you press a note on your keyboard, these samplers will play back those recordings. The advantage of this approach is that the sound is excellent, but the samples take up a lot of disk space, and the sound isn’t very flexible.

Simulations, on the other hand, use mathematical formulas to produce the sound. As of this writing, there are no simulations that can exactly reproduce the sound of an acoustic piano, but they are getting close. The advantage is flexibility and low storage requirements, although more CPU power is needed to perform all the calculations.

  • TruePianos – This is the big brother of the free 4Front Piano we’ve used above. It uses a combination of sampling and simulation.
  • Pianoteq – This is a true piano simulation that doesn’t use samples but mathematics. It sounds very promising.
  • Ivory – Probably the king of sampled pianos. Other sampled piano products are Akoustik Piano, The Grand 2, and many others.
  • mda Piano – A pretty good free piano plugin.
  • The Classic Effects from Kjaerhus Audio – A set of pretty good effects plugins, all for free.

There are many more high quality virtual instruments available, often for free: electric pianos, synthesizers, drum modules, strings, you name it… Google is your friend!

NOTE: Some of these programs also have “standalone” players. That means you don’t need to use them as plugins in a VST host. Some of these standalone players already offer so much functionality that you may prefer to just use them like that.

Troubleshooting

This section goes into some common problems that arise when using software instruments.

CPU overload

If you are playing with a virtual instrument and you hear cracks and pops, then your processor may not be able to handle the load. Most audio software has a “CPU load” indicator that you should keep an eye on.

The sound that is produced by the virtual instruments is put in “buffers” (small chunks of memory) that are sent to the soundcard. If the CPU is taxed to its limits (i.e. 100% usage) then it does not have enough time to fill up the buffers. The soundcard will then send this incomplete data to your speakers, which isn’t a very pleasurable sound.

If this happens and you have more than one plugin enabled, you can shutdown one or more of them and try again.

Many instruments also have a setting for polyphony, which is the maximum number of tones that can be playing simultaneously. Higher polyphony means more accurate sound, especially when you’re playing lots of big arpeggios with the damper pedal down, but it also means more CPU power is needed to process everything. Lowering polyphony will increase performance.

You can also reduce the sample rate. On typical soundcards, audio consists of 44100 samples per second, which is equivalent to CD quality sound. If you reduce this to 22050 samples per second, then the software only has to work half as hard. The downside is that a lower sample rate will reduce the quality of the sound. It also increases the latency.

Of course, to get optimal performance you may want to shutdown all programs you are not currently using. That includes programs that run in the background, such as Skype, viruscheckers, a personal firewall, etc. Unplug the internet too.

Distortion

Loud cracks can also be caused by clipping distortion, which happens when the total volume exceeds the limits of the sound hardware. In that case, lower the output volume slider in your host software.

Latency

We already spoke about latency in the section on ASIO. Latency is a function of sound buffer size and sample rate. The smaller the buffers, the lower the latency (the formula is: latency = buffer size / sample rate).

Your host software might have an option for configuring the soundcard buffer size. Smaller is better. However, if the buffers are too small, the CPU may not have enough time to fill them, resulting in distorted output. You may want to experiment with different buffer sizes to see what works best.

There is no point in making the buffer size smaller than what your soundcard can handle, so if your soundcard won’t go lower than 512 bytes, your latency at a sample rate of 44100 Hz will never be lower than 11ms.

MIDI issues

MIDI can become pretty complex if you are chaining a lot of devices together. If you’re just playing digital piano with one VST plugin, you won’t really run into MIDI trouble. However, it’s good to be aware that MIDI transmits data on 16 different “channels” where each channel is assigned its own instrument.

If you want to layer multiple instruments, each one should get its own channel. To do so, you have to assign a channel number on your instrument (see your manual for details) and the same channel number in the software. So you might put piano on channel 1, strings on channel 2, drums on channel 10, and so on. Don’t put two different instruments on one channel!

Read more articles on Piano Clues:

Basic Theory


Chords and Harmony


The Circle of Fifths


Arrangement, Improvisation and Composition


Reading Music and Sheet Music


How to Record Piano


Software and Virtual Instruments


Scales and Exercises


Digital Pianos


Links and Other Stuff


Comments

  1. Wilson says:

    First, thanks for all the helpful info on your site. I’m a bit new to digital music, and I have the following questions:
    1. I’ll soon be getting a basic digital piano (Casio CDP200R). It’s a decent piece at an affordable price.
    2. Other than playing straight away on this digital piano, I wanna explore more musical possibilities, and so I will hook it up with my computer.
    3. So if I have the Casio linked with my computer which has been installed with a software such as TruePianos, does it mean that my Casio will simply be used as a MIDI keyboard to control music output by the software Truepianos?
    4. If I really go with TruePianos, do I need other plug-ins? (since TruePianos seems to be quite a powerful and versatile software)

    Would appreciate any othe helpful hints. Many thanks!

    Wilson

  2. admin says:

    Hi Wilson,

    The Casio will indeed become the controller for TruePianos. You don’t need any other plug-ins, but you do need a good sound card in your computer. Make sure it has a latency (i.e. the time between pressing a key on your piano and hearing an actual sound) of 10 milliseconds or less, or else it won’t be much fun to play!

  3. Stian says:

    Thank you for this tutorial! It really helped me getting started with my usb-connected midi-board!

    Thank you SO much! :)

  4. I suppose you were mentioning polyphony in terms of PC software, since the polyphonic capability of a digital piano shouldn’t have anything to do with using this type of instrument as MIDI controller.

  5. Idris says:

    Thank you for all your advice, I was recently given a Keystation 61es, and had no idea what to do with it until I stumbled accross your site, now it’s up and running (after a few hours fumbling and swearing at pc!) with Cantabile Lite thanks to your instructions.
    Diolch yn fawr,
    Idris

  6. Tim says:

    I have been able to plug my digital piano into a VST in my computer with a midi out cable. I was not able however to get the notes I play on my digital piano to come through the midi in cable and back in to my piano’s speakers. Is this possible? I could play the VST piano with my mouse on the computer and make it come through my digital piano, but not from my digital piano.

    If this is possible how do you do it? Or do I simply have to put the audio back in through the headphone out on my computer and in to an older digital piano I bought in 2000? Thank you.

    • admin says:

      Hi Tim,

      Sounds like you’re doing everything right, except for the MIDI bit. If you have the piano’s MIDI OUT connected to the computer’s MIDI IN (and vice versa), then that’s good. I don’t know what software you’re using for recording (or the VST), but you may have to tell it that you wish to record from MIDI first. Also make sure you have installed the latest drivers for your computer’s MIDI interface.

      If all else fails, try http://www.midiox.com/ to diagnose your incoming MIDI signal. That program will tell you if the computer is getting any MIDI notes.

      I hope that helps!

  7. marieke bult says:

    Hi, Firstly thank you for writing this article and simplifying it as you have . I just bought a Kawai MP5 stage digital piano. I have a Toshiba Satellite L-20 laptop and a mini Asusu eeepc laptop. I connected the piano from the USB out to my Laptops USB in , the laptop recognised it and i confirmed it in device manager. I connected an EP cable from the phones in the piano to the mic socket in my laptop, but i get no sound through the laptop when i play the piano, i also tried to connect the ep cable from the piano out (L mono) to my laptops but still no sound through the laptops , checked all configurations all ok, i can hear system sounds , music etc from my laptop speakers, but nothing when i play from my piano. When i connect external laptop speakers via the phones jack on the piano , i get sound out of these speakers when i strike the keys or play the piano. Why is the sound not coming through the laptop?
    Any help is appreciated.
    cheers
    Marieke

  8. marieke bult says:

    Hi sorry forgot to add that i tried both sockets mic and headphones.

  9. Annie says:

    Hey!
    I have trouble with connecting my Kawai KDP80 to my Windows 8 PC.
    The MIDI will not appear on my computer, is there a specific driver or program/software i have to install for using a MIDI cable?

  10. Peter D. says:

    Hi, and thanks for the article .. Lots of really complex forum discussions around but they mostly assume a lot of experience. My question: I have tried some DPs such as Yamaha Clavinova, Kawai CVP209 etc. With these I can improvise piano via the key board and select, for example, slow strings to follow me. It seems to pick up the key and harmonise really well. If I buy a digital piano-only keyboard and output midi to my iMac which will have, say, Hollywood Strings installed, can I achieve the same as the Clavinova and output the the result via an audio interface to some speakers? Can I record what I did as above in say, Cubase, then add more tracks? My method is really to improvise the piano part initially, then add sweeping strings etc, but for some straight forward pieces I would like the simplicity of the Clavinova approach.
    Hope my question is clear….. Thanks!

  11. edward says:

    Hello, does the original sound of the (digital) piano matter when using samples ? will it sound better on an expensive piano ( like 1500 euros ) ? great article by the way ! thank’s

    Edward

  12. Matthijs says:

    edward: With virtual instruments the sound comes from your computer, so the sounds of the piano itself do not matter. A cheap piano will produce the exact same sounds as an expensive one. What does matter, though, is the touch of the piano. A very cheap piano may only recognize 16 different velocities (sound levels), and that sounds a lot less lifelike than a piano that supports the full range of 255 velocities. Also, cheap pianos don’t tend to play as nicely as more expensive ones.

  13. ManJelL says:

    A great guide! Solved all my problems i had with my Midi Keyboard!

  14. Pingback: How To Learn Piano Using Synthesia | Boxing Khmer

Create a Free Band Website

Mp3, Photo Storage and Website. Free. iOS, Android and Desktop Join Free >>.

Leave a Reply

Your email address is required but will not be visible to others.

*
*