DRIVER CREATION Chapter 14 WhatÕs A Driver? So you want to create a Driver? You will need your synthesizerÕs manual and an adventurous attitude. If you are not an experienced ÒMIDI-phile,Ó be fair to yourself. Give yourself some time to understand exactly what it is that you are trying to do. ItÕs always fun to learn something new! Drivers are the very heart and soul of any Universal Librarian. They contain all of the MIDI commands needed to communicate with a given synthesizer. They also contain specific information about an instruments MIDI files, such as the number of patches in a Bank or the length of a patch name. If The PatchMeister does not include a Driver for your MIDI instrument, you will have to create one. Otherwise, The PatchMeister will not know how to retrieve, send and process your synthÕs SysEx files. The Create Driver Window - An Overview Before you actually try to build a Driver for your synth, grab a cup of coffee and lets take a high-level tour of the Create Driver window... WeÕll start by examining an exisiting driver. Select the Create Driver/ Open... command in the Driver menu. Select any driver from the file menu. To make your tour a little more useful, choose a driver for a synth you already have or the one most similar to your synth. Double-click on your choice in the file requester and the Create Driver indow should open. If you donÕt have the synth, you wonÕt be able to execute some of the commands. Just read on and weÕll follow with a tutorial in creating your own driver. Remember, as you study this window, if you are curious about any button, you can press the Help key, then dick on the button with the mouse to call up help text DonÕt be intimidated by the plethora of special purpose buttons and fields. Once you enter the tutorial and start to build your own driver, it will all make sense. SysEx Types Synthesizers may store more than one (1) type of information. For instance, your synth may contain Tones, Effects, Drum Kits, Performances, or Sequences. Each of these types of information (i.e., Tones, Effects) are stored and processed as a single unit or ÒpacketÓ You will have to enter information about each type of System Exclusive ÒpacketÓ that you want The PatchMeister to handle. The SYSEX TYPES box (located in the upper left-hand corner of the window) lists all of the SYStem EXclusive TYPES that have been entered into the Driver. This box really is the Driver. This concept is important to remember because any changes that you key into the Create Driver window arenÕt considered part of the Driver until you use the UP ARROW gadget to enter them into the SYSEX TYPES box. This should make those of you with weak stomachs feel more comfortable. Creating Drivers is an interactive process and The PatchMeister allows you to experiment freely without fear of permanent error. The entire window, with the exception of the SysEx TYPES box, is a playground. You can tweak to your heartÕs content, and when you find something that works use the UP ARROW to store it in the SYSEX TYPES box. You can keep pretty busy in this window. However, there are only two (2) ways to change the contents of the Driver you are editing 1. The UP ARROW button updates the DriverÕs SYSEX TYPES box with the current values that have been entered into the Create Driver window. 2. The ERASER button allows you to selectively delete SysEx types from the DriverÕs SYSEX TYPES box. ThatÕs it! All other activity takes place in non-destructive work areas! MID) <-> Info The TOGGLE switch in the top center part of the window causes the top center part of the window to TOGGLE between displaying information specific to MIDI commands and information more general in nature. Get -> Send -> Audition The parameters associated with a particular SysEx type can be sub-divided into three (3) categories: Getting SysEx data from your synth (GET FROM SYNTH), sending SysEx data to your synth (SEND TO SYNTH), and auditioning SysEx data (AUDITION) which only pertains to Banks. The cycle button found in the upper right-hand corner of the window can be used to cycle through each of these categories. If you want to see (or set) the MIDI commands used to SEND SysEx data, click on the cycle button in the upper right-hand corner until it reads SEND TO SYNTH. Now make sure the TOGGLE switch is set to MIDI, and the commands used to SEND SysEx data will appear in the center of the window. Work Area The WORK AREA is by far the most useful component of the Create Driver window. After you have entered a minimal amount of information detailing how to GET a SysEx type from your synth, you can click on the MIDI IN PORT (or MIDI ROUTE) button to actually GET the SysEx data from your synthesizer. The SysEx will be displayed in the WORK AREA. The WORK AREA is divided into two (2) parts. The left-hand side displays raw SysEx data in hexadecimal format and the right-hand side displays the corresponding ASCII characters. Once you are able to GET data into the WORK AREA, there are all kinds of features to help take the strain off your brain. For example, if you hold down the left mouse button while pointing at the SysEx data, the offset of the character you are pointing to will display in the center strip of the window. More noteworthy, the CH, D, Ni, N2, CK, and KEYBOARD gadgets can help automate the Driver creation process by deriving offsets and sizes from information you have highlighted in the WORK AREA! For tips on using the WORK AREA to its fullest advantage read the section entitled ÒHow To Create A Driver.Ó Create Driver Window Gadgets Now that you have a basic understanding of the windowÕs composition, letÕs begin a discussion of its individual gadgets. This section will discuss the gadgets that help you navigate through the window and build the Driver. SysEx Types As previously mentioned, the SYSEX TYPES box lists the contents of the Driver. To display the parameters associated with a particular SysEx type, click on that SysEx typeÕs name. To move the values displayed in the Create Driver window into the SYSEX TYPES box, click on the windowÕs UP ARROW button. Sysex Type Text Field The SysEx TYPE text field allows you to assign a name to a SysEx type. If you type in the name of an existing SysEx type, the Create Driver window will display the values associated with that SysEx type. If you type in a name that doesnÕt exist, that name will be associated with whatever values are displayed in the window. This means you can clone an existing type by keying in the name of an existing SysEx type, pressing , and then keying a new name into the SysEx TYPE text field. Up Arrow When you change parameters in the Create Driver window you are actually updating a scratch pad area of memory. When you are satisified with your changes, click on the UP ARROW button to move them into the DriverÕs SYSEX TYPES box and make them part of the Driver. Trashcan When you change parameters in this window, you are only altering a scratch pad. The TRASHCAN button resets the scratch pad work area to its default values. it in no way affects the contents of the Driver you are editing. Eraser The ERASER button allows you to delete specific items from the DriverÕs SYSEX TYPES list. Click the left mouse button while pointing over the ERASER button. The pointer will turn into an inverted penciL Press the left mouse button as you point to the SysEx type you want deleted. It will be deleted when you release the mouse button. Click on the ERASER button a second time to shut it off. Test Drive Click over the TEST DRIVE button when you are ready to give your Driver a test run in The PatchMeister. The Create Driver window will shrink, and the test Driver will be installed into The PatchMeister window with a name of TEST. Once you click on the installed TEST Driver, you can try out whatever you like with the following exceptions: 1. You cant Save or Export files using the TEST Driver. 2. You canÕt Remove the TEST driver from the The PatchMeister window. When you are finished with your test, click on the CONTINUE button located in the Create Driver window. All windows that were opened using the TEST Driver will automatically be closed, and the TEST driver will be removed from The PatchMeister window. MIDI Route The MIDI ROUTE button is only available when the window is displaying the GET FROM SYNTH MIDI protocols. This button invokes display of a requester which allows you to view and/or change the default MIDI route that will be associated with this Driver. After you have adjusted the route, you can click on the requesterÕs GET button to make an attempt to retrieve SysEx data from your synth. The SysEx file that is received will be displayed in the WORK AREA portion of the window. Before you can use the requesterÕs GET button, you must enter a MIDI command to GET data and fill in all of the text fields located on the far right-hand side of the window (CH OFST, CHAN MN, CHAN MX, SIZE.) PATCH # MN and MX may also be required if the command to GET data contains a Ò-P.Ó Midi In Port The MIDI IN PORT button is only available when the window is displaying the GET FROM SYNTH MIDI protocols. After you have set the route using the MIDI ROUTE button, you can use this button when you want to try and GET SysEx data from your synth. The MIDI IN PORT button does everything the MIDI route requesterÕs GET button does except bother you with the MIDI route requester. Toggle Switch Use this TOGGLE SWITCH to display either MIDI protocol information or general information. Category The parameters associated with a particular SysEx type can be sub-divided into three (3) categories: Getting SysEx data from your synth (GET FROM SYNTH), sending SysEx data to your synth (SEND TO SYNTH), and auditioning SysEx data (AUDITION.) Use this cycle button to select the category you want to view/edit in the Create Driver window. Question Mark Button Overview The CH, D, NI, N2, and CK gadgets allow you to highlight different components of the SysEx data being displaying within the WORK AREA. Once these components have been highlighted, you can click on the various QUESTION MARK gadgets located throughout the window. Each time you click on a QUESTION MARK, its associated string gadgets will be updated with offsets and counts based on the highlighted fields. Question Mark (Name Fields) Use this QUESTION MARK button AFTER using the D and Ni gadgets to highlight the Data and 1st Name portions of the SysEx file displaying in the windowÕs WORK AREA. If the SysEx data from your synth is NOT in the STANDARD FORMAT, you must ÒdecodeÓ it prior to using this button. For more information on this topic read about the KEYBOARD button. The following fields will be populated when you click on this QUESTION MARK: ¥ Name Ofst ¥ Name Size Question Mark (Bank Fields) Use this QUESTION MARK button AFTER using the D, N1 and N2 gadgets to highlight the Data, 1st Name and 2nd Name portions of the SysEx packet displaying in the windowÕs WORK AREA. If the SysEx data from your synth is NOT in the STANDARD FORMAT, you must ÒdecodeÓ it prior to using this button. For more information on this topic read about the KEYBOARD button. The following fields will be filled in when you click on this QUESTION MARK: ¥ Bank Number of Items ¥ Bank Item Size ¥ File Type cycle button will switch to BANK Question Mark (Check Sum And Data Offsets) Use this QUESTION MARK button AFTER using the CH, D, and CK gadgets to highlight the MIDI Channel, Data and Check Sum portions of the SysEx packet displayed in the windowÕs WORK AREA. This button will only work when the SysEx packet is being displayed in the same format that it was in when your synth sent it. For more information on this topic, read about the KEYBOARD button. The following fields will be populated when you click on this QUESTION MARK: ¥ Data Start ¥ MIDI Channel Ofst ¥ Data Stop ¥ SysEx File Size ¥ Check Sum Ofst Ch, D, N1, N2, Ck Overview The CH, D, NI, N2, and CK gadgets allow you to highlight different components of the SysEx data being displaying within the WORK AREA. After clicking on one of these buttons, the pointer will change and a prompt will appear in the center strip of the window. Hold down the left mouse button while you are pointing over the SysEx data that is displayed in the WORK AREA. As you move the mouse, the current offset will display. Release the mouse button when you are over the position (offset) that satisfies the promptÕs request. Each of these gadgets will prompt you to highlight a different part of the SysEx packet. Once the fields have been highlighted, you can click on the various QUESTION MARK gadgets located throughout the window. Each time you click on a QUESTION MARK, its associated string gadgets will be updated with offsets and counts based on the highlighted fields. CH The CH (MIDI Channel) button can be used to define the location of the MIDI channel. D The D (Data) button can be used to define the first and last characters of the Data portion of the SysEx file. If the SysEx packet has a checksum, the first character should be the first character induded in the checksum calculation and the second character should be the last character induded in the checksum calculation. NOTE > Remember, the file displayed in the WORK AREA will more than likely start with some header informatlon that Is NOT part of the actual SysEx data! Refer to your synth manual's System Exdusive charts for more Information. N1 The N1 (First Name) field can be used to define the first and last characters of the first Name in the SysEx data. Some SysEx files do not contain Names. Banks contain more than one Name. The N1 field is concerned with highlighting the first Name in a Bank, or the one and only Name in those files that contain a Name. First, if the data from your synth is NOT in the STANDARD FORMAT, use the FILE FORMAT cycle button to select the proper format. Then use the windowÕs KEYBOARD button to ÒdecodeÕ the SysEx packet that is displaying in the WORK AREA. You will be prompted to highlight the first and last characters of the name. It should be easy to find the name if you Icok at the ASCII (right-hand) side of the WORK AREA (unless the name is in D-50 or PACKED 7 format) If the name is in D-50 or PACKED 7 format, you will not be able to read the name and you will have to rely on offsets. N2 The N2 (Second Name) field can be used to define the first character of the 2nd Name in a SysEx packet. Only Banks contain more than one name. The N2 field is only concerned with highlighting the 2nd Name in a Bank. This field acts just like the Ni field with the exception that you will only be asked to highlight the first character of the name. CK The CK (Check Sum) field can be used to define the location of the SysEx packetÕs Check Sum. Keyboard Your synth just might send its SysEx data to your Amiga in a non-standard format. If this is the case, you must use the FILE FORMAT cycle button (at the top of the window) to specify the format it uses when transmitting files. This is necessary because its SysEx files will have to be ÒdecodedÓ before The PatchMeister can use them. The KEYBOARD button allows you to try out the different file format conversion routines. Whenever the KEYBOARD is displaying, you are looking at the raw SysEx data that was sent from your synth. Whenever the DECODED image is displaying, you are looking at the SysEx file after it has been ÒdecodedÓ by the routine specified in the FILE FORMAT cycle button. Use of the QUESTION MARK buttons which calc the NAME and BANK fields will require that the SysEx data be Òdecoded.Ó Use of the QUESTION MARK button which calcs the CHKSUM and DATA offsets will require that the SysEx data be ÒcodedÓ (in the format sent by your synth.) Cycle Button Parameters This section will discuss the various cycle buttons that are used to set the DriverÕs parameters. We will not attempt to provide a complete explanation for every setting of each cycle button. The on-line help system does that (See Chapter 5, ÒHelp!Ó). We will, however, discuss the purpose of each button and list its possible settings within parentheses. Commands Use this cycle button to indicate whether or not you must perform an action at your synth prior to sending or receiving SysEx data. Some synths require that SysEx dumps be initiated manually while others must be placed into a particular ÒmodeÓ before the communications can be successful. (COMMANDS, MANUAL, PROMPTS) Roland: Ami This cycle button is only available with Roland handshaking. Use it to designate whether Roland RQD handshaking is to be initiated by your Amiga or by your Roland synth. (AMI, ROL) File -or- Bank This cycle button must specify whether this SysEx type is a File or a Bank. A Bank will be subdivided into a fixed number of fixed length items and will be displayed using the Bank window. (FILE, BANK). RAM -or- ROM Use this cyde button to specify whether or not this SysEx type is retrieved from RAM or ROM. The more common setting of this cycle button will be RAM. (RAM, ROM). Handshake MIDI instruments communicate in different ways. Some synths are simple. If a computer sends them a SysEx packet they can readily receive it. Other instruments are very formal about the whole procedure. If a computer wants to send them data, the computer must initiate the whole process by saying, ÒHey, I want to send you something.Ó After the synth replies, ÒOkay, IÕm ready,Ó the computer sends the data. When the synth is finished receiving the SysEx packet, it replies, ÒThank you, would you like to send anything else?Ó The computer replies, ÒNo,Ó and the synth says, ÒOkay, good bye.Ó This process is called handshaking. Use this cycle button to indicate which handshaking protocols are used by your synth. (NO HANDSHAKE, ROLAND RQI OR RQD, CASIO CZ SHAKE, SIMPLE SHAKE) File Format Some synths store their SysEx packets in a compact way that cannot be transmitted over MIDI. When you request data from these instruments, they have to convert their SysEx data into a format that can be transmitted over MIDI prior to the send. When your Amiga receives these ÒcodedÓ packets they have to be ÒdecodedÓ before The PatchMeister can process them. Use this cycle button to indicate the data format being used when your synth sends SysEx files. (STANDARD FORMAT, NIBBLE HI/LO, NIBBLE LO/HI, KORG Ml, 8-BIT -> 7-BIT) NOTE > The System Exclusive layouts in your manual are based on Òdecoded" SysEx packets! Name Format SynthÕs may also store patch names in various formats. This cycle button should indicate the format being used by your synth. (ASCII, ADD NAMES, D-50, PACKED 7). Number Format Synths use different numbering schemes for the patches in their Banks. Use this cycle button to assign a numbering scheme to the patches in a particular Bank. The choice is purely cosmetic, so when in doubt just use the default of 1,2,3...! (1,2,3..., 0,1,2..., 1-1 ->14, A-1 -> A-8, A00->A99, A11->A18.) Checksum Method Check sums are used to validate the integrity of a SysEx packet. Synths use different algorithms to calculate their check sums. Use this cycle button to specify the check sum algorithm used by your synth. (2ÕS COMP, NONE, SUM BYTES, NIBBLE 1, NIBBLE 2, KAWAI KI). Checksum Place SysEx files usually contain one checksum per packet, but you may find that your synth requires that a separate check sum be calculated for each patch within a single packet Bank. Use this cycle button to indicate how your synth stores check sums. (FILE OFST, ITEM OFST) Fixed -or- Max Use this cycle button to indicate whether or not the size of this SysEx file is fixed or variable. If the size varies, the value entered into the file Size string button must be its maximum size. (FILE, MAX). FO. .. F7 Use this cycle button to indicate whether or not this SysEx file begins with a hex F0 and ends with a hex F7, (FO...F7,FO....F7...) Text Parameters This section will discuss the various text fields that are used to set the DriverÕs parameters. Many of these fields require that you enter offsets. All offsets are to be caculated from the first character of the SysEx file that is received from your synth unless otherwise noted. NOTE > When you are trying to figure out an offset, locate your starting pointing and begin counting with ZERO! Dont forget that if you click on a character in the WORK AREA, its offset (from the beginning of the SysEx file) will be dsplayed in the center strip of the window. The numeric string gadgets will always display a decimal number. If you wish to enter a hexadecimal value, simply key the letter H after the number. The hexadecimal number will automatically be converted to display in decimal; i.e., 1aH, 23h, 4FH will be considered hexadecimal values and will be converted into a decimal number. MIDI Commands The three (3) string gadgets in the center of the window store the MIDI commands that are to be used for the action specified by the GET FROM SYNTH - SEND TO SYNTH - AUDITION cycle button. The FIRST and LAST lines can be used to store additional MIDI commands that will be sent BEFORE and AFTER the command entered on the CENTER line. For example, you may need to enter a command on the FIRST line that will prepare your synth so that the command entered on the CENTER line will work properly. Or you may need to enter a Program Change command (CO 00) on the LAST line so that a patch sent by the CENTER line of an AUDITION command can be heard. All commands must be entered as hex bytes separated by spaces. For example, the command to retrieve a Voice Bank from a DX-7 would be entered as follows: ==>F0 43 20 09 F7. All commands must be entered with a MIDI channel of zero. The SysEx MIDI channel associated with the window will be substituted when the command is actually sent to your synth. There are four (4) special character combinations that you can use when entering MIDI commands: Ò-P,Ó Ò-D,Ó Ò-E,Ó and ÒPCÓ. A brief discussion follows. If the MIDI command you are entering must allow for PATCH NUMBER substitution, use a Ò-PÓ to show where the PATCH NUMBER should be placed. For example, the command to get a memory location from an SPX-90 would be ==> FO 43 20 7E 4C 4D 20 20 38 33 33 32 4D -P F7. The Ò-PÓ will later be replaced with the actual memory location (patch) you wish to receive. If a command contains a Ò-P,Ó you will be expected to enter the minimum and maximum values that can be used for the Ò-PÓ substitution (see PATCH # MN and MX string gadgets.) When entering the command to SEND DATA TO YOUR SYNTHI use a Ò-DÓ to show where the SysEx data must reside for the SEND, and use a Ò-EÓ to show where the checksum must be placed (if applicable.) For example, the command to send a Voice Bank to a DX-7 would be entered as follows ==> FO 43 00 09 20 00 -D -E F7. A value of ÒPCÓ entered on the CENTER line of the AUDITION command will cause Program Change commands to be used for the auditioning process. Roland: Inc A Roland synth may send its Banks one item at a time. When this is the case, the header portion of the MIDI command will store a target address (destination) which has to be incremented as each Bank item is sent. This text field is only available for Banks that use Roland handshaking, If the Roland Bank must send its items one at a time, use this field to store the Roland Address Increment value. The Roland: Inc must be entered as hex bytes separated by spaces: i.e., 00 02 00. In the previous example, 00 02 00 will be added to the target address after each Bank item is transmitted. If the first Bank item is sent to address 08 00 00, the second Bank item will be sent to address 08 02 00, the third to address 08 04 00, etc. Location: Loc (Offset And Size) If a Bank or a File can be sent to more than one destination in a given synth, use this text field to enter the OFFSET within the SEND command that is used to designate the DESTINATION. The text field on the right should contain the NUMBER OF BYTES used to specify the DESTINATION in the SEND command. Proper use of these fields will allow you to swap patches among like Banks that you have retrieved from different locations. It will also allow you to send a SysEx packet retrieved from one location to another. Patch #: Mn And Mx If the entered MIDI command must allow for patch number substitution it will contain a Ò-PÓ to show where the patch number should be placed. If a command contains a Ò-P,Ó you will be expected to use these text fields to enter the MINIMUM and MAXIMUM values that can be used for the Ò-PÓ PATCH NUMBER substitution. If the command dces not require a patch number, these fields should be setto ÒOff.Ó Checksum: Start And Stop These fields store the OFFSETs of the first and last characters which should be included in the Checksum calculation. In most cases, these OFFSETs will coincide with the first and last data bytes. If the SysEx does not contain a check sum, these fields should store the OFFSETs of the first and last characters of the data portion of the SysEx file. Check Sum: Ofst This field stores the OFFSET of the CHECKSUM in the SysEx file. The CHECKSUM will more than likely be found in the trailer portion of the file. If you have selected the ITEM OFST option (required by some Banks), the entered value should be an OFFSET within the first bank item. If your Bank item size is 100, 0 thru 99 will be considered valid values. File: Ch Ofst This field stores the OFFSET of the MIDI CHANNEL in the SysEx file. The MIDI CHANNEL will more than likely be found in the header portion of the file. If the SysEx command does not require a channel number, this field should be set to ÒOff.Ó Bank: Size This string gadget stores the SIZE (length) of each PATCH in a BANK. How To Create A Driver Please take the time to become familiar with the first few sections of this chapter. This tutorial assumes that you have a basic understanding of how the Create Driver window functions. We trust that you will refer to the previous sections if you need more information on a specific button. Since every synth is different, every Driver you aeate will have its own peculiarities. This tutorial could never cover all the possibilities. It will, however, suggest some basic guidelines that will help you take your first steps toward building your own Driver. Creating Drivers is an interactive process. DonÕt be intimidated! Try this, try that - you will be learning as you go. The PatchMeister will provide you with plenty of visual feedback to help you along the way! Now the fun begins... Look Through Your SynthÕs Manual Grab your synthesizer's manual and lcok for information on its ÒSystem ExclusiveÓ implementation. You might find this information within a section called ÒMIDI Specifications,Ó or ÒMIDI ImplementationÓ or ÒMIDI Data Formats.Ó Once you find the place in your synths manual that talks about MIDI, start looking for the word ÒExclusive.Ó Now read about your synth's ÒSystem Exclusives,Ó but donÕt expect to understand everything after one reading. Look for a command that will GET something from your synth and any information you can find on ÒSystem ExclusiveÓ MIDI channels. Inventory time... You need a command to GET data. You need to know where that command stores its MIDI channel. You need to know the range of values used for your synthÕs ÒSystem ExclusiveÓ MIDI channels. The MIDI channel range for most synths will be 1 thru 16, and the MIDI channel will more than likely be in the third position of the MIDI command. This means the channel will have an offset of two (2.) You can at least make intelligent guesses about the commandÕs MIDI channel if you have to. Once you have a complete inventory, you can proceed to the next step... Enter ÒRequiredÓ Parameters Select the Driver menu Create Driver - New option. A requester will open asking you to key in your synthÕs manufacturer and name. Of course you would normally want to choose the CREATE FROM COPY option so that you can use an existing Driver as a base, but for purposes of this tutorial click on the CREATE FROM DEFAULTS button. The Create Driver window will be opened. Make sure the cycle button in the upper right-hand corner reads GET FROM SYNTH and the windowÕs TOGGLE switch is set to MIDI. Your first goal is to get something (anything!) into the WORK AREA when you click on the MIDI IN PORT button. You will need to enter a minimal amount of information so that you can use the MIDI IN PORT button successfully. Let the cursor walk you through the required fields. Enter a name for this SysEx packet in the SysEx TYPES string gadget (i.e., Tone Bank, Drums), and then press twice. The cursor should be on the CENTER command line. Refer to your manual and key in the command that will GET data from your synth and press three (3) times. The cursor should be at the CH OFST field. Enter appropriate values in the CH OFST, CHAN MN, CHAN MX and SIZE fields. DonÕt be too concerned with entering the exact SIZE of the file that you will be receiving, you can adjust it later. Try a SIZE of 500. ThatÕs it! Now, we will have to establish a MIDI route to the synth that will be using this Driver. Click on the MIDI ROUTE button and then adjust the requesterÕs route to match the MIDI route of your synth. Click on the requesterÕs ROUTE button when you are finished. See What You ÒGetÓ Click on the MIDI IN PORT gadget. Skip to the next section if ANYTHING is displaying in the WORK AREA. If nothing has appeared in the WORK AREA its time to experiment. First letÕs check the hardware. Check your MIDI cables. If you have a serial pass thru make sure it is set to MIDI. Is your synth set up to receive and transmit SysEx? Some synths have MIDI disabled when they are shipped! Verify that your MIDI route has been set up correctly. Is your synth set up to expect SysEx messages on the S-CH channel that you have specified in your MIDI route? Can you hear anything when you type letters on your Amiga keyboard? (See Chapter 6, ÒAuditioning Sounds.Ó) Now its time to validate the fields that you have entered in the window. Has the command to GET data been entered properly? How about the MIDI channel offset? Once you are comfortable that everything has been set up properly, click on the MIDI IN PORT button once more. Skip to the next section if ANYTHING is displaying in the WORK AREA. Still nothing? Look through your synthÕs manual for clues. DonÕt ignore the footnotes that are usually written in very, very small print They usually contain the most useful information! Does your synth use handshaking? If yes, you will have to use the HANDSHAKE cycle button to specify which handshaking method is used. Does the GET command only work when your synth is in a specific mode? If so, can you use the FIRST command line to enter another MIDI command that will prepare your synth to receive the GET command? Do you have to push some buttons on your synth to get into the desired mode? Where thereÕs a will thereÕs a way! Keep trying until you get something to display in the WORK AREA. What Should I Do With The Work Area? Congratulations! You are probably scratching your head and looking at some pretty meaningless characters in your window. All synths have unique features. This tutorial would only confuse the issue if it were to begin discussing exceptions and quirks before you have developed a basic understanding of ÒstandardÓ SysEx communications. From this point forward, this tutorial will assume that you are dealing with the most common type of SysEx communications: ÒStandardÓ SysEx packets that begin with an F0 and end with an F7. Once you understand the principles outlined below, they can be applied to help you create Drivers for synths a bit different from the norm. Back To The Work Area... ¥ 1)FindTheSysexPacket Our first goal is to get the SysEx to display in the WORK AREA without the message ÔExpected SysEx not received!Õ. To do this we must figure out the correct file SIZE. First of all, you should be looking at the exact number of characters that you specified in the file SIZE field. To verify this, click on the very first character and an offset of 0 will display. Now use the scroll bar to get to the end of the SysEx data and click on the very last character. An offset of 499 will display. NOTE> Offsets begin counting with 0 (not 1) so you can expect that the last character will always have an offset that is 1 less than the file SIZE you have entered Try clicking on the MIDI IN PORT after changing the file SIZE to 300 and you will see that the last character has an offset of 299. If the SysEx packet you have retrieved is only 50 character long, you are obviously going to be looking at 250 extra characters (based on a file SIZE of 300.) If this is the case, the extra characters will show as 00s on the left and dots on the right. If the SysEx packet contains 1000 characters, your display will be missing its last 700 characters. Your synthÕs manual may contain the size of the SysEx packet you have just received. If so, you can certainly enter it into the SIZE string gadget. But if it is not clear to you what size to enter, read on... This is a visual explanation of what will be discussed. ¥ F04200009380472230004F700000000 ==> File SIZE is too large. ¥ F042000093804722300 ==> File SIZE is too small. ¥ F04200009380472230004F7 ==> File SIZE is perfect! ÒStandardÓ SysEx packets begin with a hex F0 and end with a hex F7. Look for the FOÕ and ~F7 in the left-hand side of the WORK AREA. The F0 should be the first character (offset 0.) Now look for the F7. Use the scroll bar to get to the end of the display. Are you staring at a bunch of 00s on the left and dots on the right? If so, the SysEx packet is probably smaller than the file SIZE you have entered. You can either enter a smaller file SIZE and click on the MIDI IN PORT button, or you can scroll backwards until you find the F7. The F7 should be the last non 00 character in the left-hand side of the WORK AREA. If the end of the SysEx packet is missing (i.e., no F7) you will have to experiment with larger file SIZES until you are able to capture the entire SysEx packet. Once you have found the F7 that marks the end of the packet, click on it to find out its offset. Add 1 to its offset and that is the value that you need to enter into the file SIZE string gadget! Now you should be able to use the MIDI IN PORT button without receiving any error messages. ¥ 2) Enter The Send Command Before you go any further you will have to enter the MIDI command that will SEND this SysEx packet back to your synth. When you request SysEx from a synth, it usually sends you a packet that you can immediately turn around and SEND back to your synth. Use this knowledge to your advantage. A ÒstandardÓ SysEx packet displaying in your WORK AREA is comprised of three (3) parts: Header Data Trailer F0?? ?? ?? -D -E F7 <Ñ=EnteredSEND command When you enter a SEND command you will key in the entire Header portion. The length of the Header will vary. You will use a -D to represent the Data portion, an -E (if applicable) to represent the fileÕs check sum, and of course you will end a ÒstandardÓ SEND command with an F7. When you look through your synthÕs manual for the SEND command, you can narrow the search by looking for a command whose Header portion matches the Header that is displayed in your WORK AREA. Your synthÕs manual can help you determine the header length and whether the packet contains a check sum. Make sure the cycle button in the upper-right hand corner of the window reads SEND TO SYNTH when you key in the SEND command. ¥ 3) Highlight The Data And Checksum Use the D and CK buttons to highlight the SysEx packetÕs Data portion and check sum (if present.) A complete explanation of these buttons can be found within the section entitled CREATE DRIVER WINDOW GADGETS. If the packet doesnÕt have a check sum, make sure the CHECK SUM METHOD cycle button is set to NONE. Now you can click on the QUESTION MARK button in the upper right-hand corner of the window and the check sum START, STOP and OFST fields will be filled in. ¥ 4) Determine The File Format To make a long story short, some synths store their SysEx packets in a compact way that cannot be transmitted over MIDI. When you request data from these instruments, they have to convert their SysEx data into a format that can be transmitted over MIDI prior to the send. When your Amiga receives these ÒcodedÓ packets they have to be ÒdecodedÓ before The PatchMeister can process them. The remainder of this section only applies to synths that send ÒcodedÓ packets!! If your synth sends files in the STANDARD FORMAT you can skip to the next section. The System Exclusive layouts in your manual are showing you ÒdecodedÓ SysEx packets; if you want to compare a ÒcodedÓ WORK AREA display to its manual layout you will have to ÒdecodeÓ it. Make sure the windowÕs TOGGLE switch is set to INFO. Click on the FILE FORMAT cycle button and you will cycle through the various ÒdecodeÓ routines. Select the ÒdecadeÓ routine used by your synth. Click on the KEYBOARD button to ÒdecodeÓ the SysEx packet. Click on the KEYBOARD buttonÕs alternate image to redisplay the ÒcodedÓ packet. The images chosen for this button are significant. When the keyboard image is displayed, you are looking at the actual SysEx packet received from your keyboard (Òcoded.Ó) When the buttonÕs alternate image is displayed, you are looking at a SysEx packet that has been processed through one of the FILE FORMAT routines (Òdecoded.Ó) If your SysEx packet really is Òcoded,Ó chances are that one of the ÒdecodeÓ routines will cause readable patch name(s) to suddenly appear on the right-hand side of the WORK AREA display. If this should happen, you have stumbled across the correct ÒdecodeÓ routine! Of course your synthÕs manual will contain clues to help you pick a ÒdecodeÓ routine, but sometimes a manual can be confusing and itÕs always nice to have visual confirmation. DonÕt forget to reset the FILE FORMAT cycle button to STANDARD FORMAT if your synth does not send ÒcodedÓ SysEx packets! ¥ 5) Highlight The Data And Name(S) If you like, you can use the D, N1 and N2 gadgets to help you fill in the Name and Bank string gadgets. If your synth is not sending its SysEx files in the STANDARD FORMAT, make sure you have ÒdecodedÓ the packet displaying in the WORK AREA before doing this! A complete explanation of these gadgets can be found within the section, CREATE DRIVER WINDOW GADGETS. If you are creating a Driver for a Bank which sends it items one at a time, the WORK AREA will only contain one patch. This means you will have to fill in the Bank string gadgets manually. Take A Test Drive Before you perform a full-fledged test on your Driver, make sure all of the cycle buttons have been set correctly. Use the Help System if you donÕt understand what some of the options mean. Pay particular attention to the HANDSHAKE, FILE FORMAT, NAME FORMAT, CHECK SUM METHOD and CHECK SUM PLACE cycle buttons. You wonÕt get very far if these gadgets are set incorrectly. Use the UP ARROW to move the values displayed in the window into the SYSEX TYPES box. NOTE > Until this point in time you have been updating a scratch pad area of memory. You must use the UP ARROW button to place the changes you have made into the Driver. Refer to Appendix B if you should happen to receive an error message when you try to use the UP ARROW button. Click on the TEST DRIVE button to try out your Driver! When you are finished with your test, click on the CONTINUE button. Save The Ddver When your Driver works the way you want it to, use the Project menu Save As... item to save it to disk.