Purple Hearts hpmusic

Cakewalk, Voices and Instrument Definitions

Thursday, 04 November 2004
We learn something about the techniques to display voices and other keyboard-specific names of Cakewalk.

1. Introduction

The aim of this article is to publish a description, how we can work with Cakewalk to get or manipulate the XG and the original voices (internal or panel voices) of YAMAHA keyboards. In the first part I give some basic information about MIDI voices; GM , XG , panel and percussion voices. A little knowledge is needed to work with Cakewalk. After this we get information how to assign voices to a MIDI song. In Cakewalk we should use a instrument definition file for the keyboard. This tool makes it easy to get the voices we want. I will explain, how install instrument definitions. After this I explain the structure of these files. We should be able to create such a file for our keyboard, only using an Windows editor and the voice definitions in the appendix of the keyboard's manual.

All modern YAMAHA-keyboards (I looked at the 540, 640, 740 and the 9000), have the same internal organisation of voices. I have published another article about the voices, special for the PSR-8000. Many of the statements are correct for the other models too. Some of these have to be repeated here to understand this article.

2. GM, XG, Panel and Percussion

All the PSR MIDI files have the format "Extended General MIDI" XG. XG was created 1994 by YAMAHA as an successor of the manufacturer-independent "General MIDI" GM, defined by a MIDI standardisation committee in 1991. GM supports 128 different voices for melody instruments only and only one drumkit with less than 128 drum instruments. The XG structure allows the definition of much more voices and percussion instruments.

In XG we have the so called voice banks; these are groups of different voices, each with voice numbers 0,1,...127 . A voice bank is addressed by a pair of numbers: the "most significant byte" MSB and the "less significant byte" LSB. All XG melody voices are in banks with MSB=0 and a LSB between 0 and 101. Not each pair MSB/LSB addresses an existing voice bank and only some voice numbers of a bank are connected with voices: XG has 480 voices in 43 banks in summary.

The panel voices of the YAMAHA keyboards are organized in voice banks too. Here we also have MSB=0 but LSB=112,113,...126. The keyboards have got between 215 (PSR-540), 331 (PSR-9000) and 403 panel voices (Tyros). Voices with same banks and voice numbers are denoted by same (or similar) voice names; we will get a similar sound almost. Sometimes there exist voices on smaller keyboards but not on more comfortable ones. For example: At the PSR-640 we have the voice Blues Organ (LSB=117/no.17) but the PSR-740 does not support this voice. The basic voice bank for panel voices is the bank 112 (MSB=0). All PSRs which I have examined, have the same voices in bank 112. If we try to play a non-existing panel-voice on the PSR, the keyboard plays a voice instead the same voice number of the XG voice bank 0 instead.

We do not get a bad sound mostly, if the synthesizer selects another voice as desired, because same voices numbers are assigned with voices of the same category in all voice banks.

An example: The voice-number 39 denotes the instrument Syn Bass 2 in XG bank 0, Mellow Syn Bass 1 in 6, Seq Bass in 12, Clk Syn Bass in 18, Syn Bass2 Dk in 19, Smooth Bass2 in 32, Modulr Bass in 40, DX Bass in 41, XWire Bass in 64, Analog Bass in panel-bank 112, Dance Bass in 113, Snap Bass in 114, Touch Bass in 115 and Dry Syn Bass in 116 - the last exists on PSR-9000 only. Therefore we will get a bass voice of a same family of bass instruments on all keyboards, if the keyboard does not support the selected voice.

The MIDI structure allows up to 16 different voices only, to be played at the same time. In other words: There are 16 voice channels in the keyboards, each of these can be assigned with an own voice. To do this, we have to insert in the MIDI files three events for each channel to get a special voice: the Bank Select MSB event (controller event 0), the Bank Select LSB (controller event 32) and the Program Change event with data=voice number.

In the elder General MIDI specification (GM), the 128 voices are not organized in banks. Therefore in GM MIDI files the program change event is needed only. We can play GM files with the keyboards and the synthesizer will map the GM-voices to voices of the basic XG bank 0.

Some words about percussion voices now.

The XG percussion voices are organised in the bank MSB=127/LSB=0, the Arabic Kit (only PSR-9000) in the bank MSB=126/LSB=0. Percussion voices are named "drum kits" usually, because there are different drum instruments at each panel key.

It is possible to connect each one of the 16 MIDI-Channels with a XG drum kit, but the automatic accompaniment of the keyboards use channel 9 and channel 10 only. In GM the channel 10 is the only percussion channel and no melody voice can use this channel. GM has one drum kit only, therefore a program change event is not needed to assign the drums on channel 10. This fact is the reason for bad sounds on channel 9, if we play a XG MIDI file with auto accompaniment by a synthesizer of an usual GM soundboard: We hear a strong piano sound most.

Only few remarks about the SFX kits with noises as "Phone Call" or "Foot Steps". There are the SFX kit 1 and SFX kit 2 with voice numbers 0 and 1 in the bank MSB=126/LSB=0. Alike the drum kits, we get different noises with each key.

3. How to assign voices with Cakewalk

In the last chapter we read, that there have to be three events for each channel: a Bank Select MSB event, a Bank Select LSB event and a Program Change event.

Cakewalk makes it easy to assign voices to the channels in the track view. Firstly Cakewalk does not use the two numbers MSB and LSB to address a voice-bank. With the formula 128*MSB+LSB we get an unique Cakewalk voice bank number. The melody voice bank numbers is the same as the LSB now, because of MSB = 0. The XG drum-bank MSB=127/LSB=0 has the Cakewalk number 16256, the SFX kits MSB=126/LSB=0 get the bank 16128 now. If we enter these numbers in the bank row and choose the normal modus for bank select, Cakewalk will insert two correct Bank Select events into the file.

Now the assignment of a voice in Cakewalk.

In the appendix of the keyboard manuals we find tables with all voices of the keyboard. There is a little problem to get the right number of a voice: Sometimes the voice numbers start with 0 and end with 127 - for example in Cakewalk. Sometimes these start with 1 and ends with 128 - for example in the voice tables of the PSR-8000. In Cakewalk the number 0 denotes the standard piano, in the voice list the same voice has the number 1.

Now the advantage of using a Cakewalk Instrument Definition File for a keyboard. If we associate an instrument definition, specially created for the model of our keyboard, to all channels in Cakewalk, we must not look into the manual to get the correct numbers of a voice bank and a voice, which we want to connect. In the instrument definition files there are all the information of the voice tables integrated: we can use names of the voice banks and voice names instead of numbers. For the drumkits we get all drum names instead of the note names of the panel keys. And some more: We can use names of controller events, RPN and NRPN events instead of numbers. We do not get any new voices, but we can edit the voices of the keyboard and recognize all, which the keyboard can or cannot play.

The Instrument Definition Files have the file-extension .ins. With the Cakewalk installation on the PC, we have got a lot of ins files for sound modules, for GM and XG, Roland GS and synthesizer of other manufacturers. Most of these are created by users of the synthesizers. There are no ins-files for the YAMAHA keyboards available from Cakewalk. We can get these files for some keyboards from some websites. The file for some Yamaha keyboards can be downloaded from this website (yamaha_kbds.ins). We can download the files for the PSR-740, PSR-640, PSR-630 and PSR-540 from the homepage of Jørgen Sørensen - look at my links.

How to install an ins-file? If we have got a Instrument Definition File suitable for the the model of our keyboard, we have to copy it into the Cakewalk directory, import the instrument definition into Cakewalk (Options or Extras -> Instruments -> Define -> Import) and connect the definition to all channels - look at Cakewalk's manual.

Last remarks. I am the owner of the manual of Cakewalk, because I have bought a licensed version. There is a lot of useful functions to create and tune MIDIs, which I would not have learned without any manual.

4. How to create an Instrument Definition File

An Instrument Definition File - I shortly name it ins-file - is a textfile with the file extension ".ins". The file contains one or more independent instrument definitions, each of these belongs to a special model of a MIDI synthesizer: a keyboard, a portatone, a sound-modul or a soundboard.

In the Cakewalk Manual we find a chapter how to create an instrument definition. There are special functions of Cakewalk to do this. I prefer another method. Looking inside an ins-file - we use the editor of Windows or Wordpad in textmodus to do this - I discovered that the texts are structured in a clear manner. Using some ins-file as pattern and the lists of a keyboard manual, it should be not difficult to edit a new one, but you have to spend some hours to do this.

In the following I will explain the structure of ins-files in order to understand the lines of texts. I suggest that we have made a print of the ins-file yamaha_kbds.ins; we can download this file from my website.

The file is divided into several sections. Each of these start with a point, followed by a fixed text-key. We find the sections

  • .Patch Names
  • .Note Names
  • .Controller Names
  • .RPN Names
  • .NRPN Names
  • .Instrument Definitions

Each section is divided in several lists, these start with a text label [label name]. The last section ".Instrument Definitions" contains the roots to different instrument definitions. In the yamaha_kbds.ins we have some: The instrument definition of the PSR-8000 with the label [YAMAHA PSR8k], the definition of the PSR-9000 with the label [YAMAHA PSR9k], the Tyros with the label [ Tyros] and some more. The names of labels are free, these appear in the track list of Cakewalk. Lines starting with a semicolon ";" are comments and skipped by Cakewalk.

Now the structure of the list [YAMAHA PSR8k] for example. Each line of the list has the format

"keyword=textlabel"
"keyword[number,...]=textlabel" or
"keyword[number,...]=number"

keyword is a fixed name; textlabel is free.

The first line "Control=YAMAHA XG Controllers" has the meaning, that all about controller events can be found in a list beginning with the label [YAMAHA XG Controllers]. Now we look at this list in the section ".Controller Names". The structure of each line is "controller-number=text". The texts are displayed in Cakewalk, if we look at controller events. We see for example, that the controller 32 is named "32 Bank Select LSB" as described in the manual of the PSR-8000. Non existing controller numbers are omitted.

Back to the Instrument Definition list. The next two lines "RPN=Standard1" and "NRPN=PSR-8000 NRPN" have analog structures. We find the associated lists in the section ".RPN-Names" and ".NRPN-Names". The RPN- and NRPN-names are listed in the manual. We get the numbers by the formula 128*MSB+LSB. If MSB and LSB are denoted as hexadecimal, look at the dec/hex/bin table of the manual.

The next lines "Patch[banknumber]=bankname" deliver the information about the voice and percussion banks. We see the existing XG banks 0,1,3,...,100,101, after this the banks 112,113,...,125,126 of the panel-voices, the XG SFX Bank 8192 (MSB=64, LSB=0), the PSR Custom Voice bank 14208 (MSB=111, LSB=0); the XG SFX Kits 16128 (MSB=126, LSB=0) and the XG Drum Kits 16256 (MSB=127, LSB=0).

Now stop for a moment: We will look at one of the addressed lists now. With the line "Patch[113]=PSR8000 Bank 113" for example we find the associated list [PSR8000 Bank 113] in the section ".Patch Names". The lines "voice number=voice name" deliver the association of the voice numbers of panel bank 113 to its voice names. Non-existent voices are omitted.

The XG SFX Kits and the XG Drum Kits have another structure, because the voices are kits with different sound with each panel key. We look at the XG Drum Kits now. The list [XG Drum Kits] deliver the association between the voice-number and the kit-name. The kit-names are labels again to lists of the drums for each panel key. Look at the list [Hit Kit] with voice-number 4 for example. The lines "note number=drum name" give the information about the association of the panel-keys and its drum-instrument. [Hit Kit] starts with "BasedOn=Standard Kit 1". This means, that Cakewalk has to search in the list [Standard Kit 1], if it did not found a drum instrument in [Hit Kit] for the panel key. In the manual we find this property denoted by left arrows in the row of the Hit Kit drums. The BasedOn command is used in the same manner in other lists too.

With the following lines of the Instrument Definition "Key[drum bank,voice number]=drum kit name" the list of note names (drum names) is assigned to the kit: drum kit name. The meaning of the last line "Drum[16256,*]=1" gives the information to Cakewalk, that all (denoted by *) voices of the bank 16256 have the property to be percussion-banks with different drums for each note-value.

I have created the program InsFileChecker: Downloads -> InsFileChecker. I recommend to apply it for users who have created a new Instrument Definition File.

Pete Goodlife has analyzed the format of instrument definition files. Look at Good Links - International: "Petes interpretation of the Cakewalk .ins instrument file format".

End