Figure I -3 The O Rule Table A quick glance over the table indicates that all of these rules, with the exception of number 70, define a sequence of letters in which O must be followed by one consonant. To the left of O no symbol or character exists. This means that the rule is not affected by what precedes O and this position is left unconstrained. So far any rule from 6 I to 69 could match Robert. Since it does not matter what precedes O and it is the only character within parentheses, we check for a consonant to the right and find B. To the right of B is the vowel E. Search the rules, starting with 61, for "E, ^+ or ^#. Rules 61 and 62 can be eliminated since A follows . Rule 63 matches the E. Since the rule boundary ends here, a match is made. / ROBERT / O^E This rule states that whenever an O is followed by any single consonant and the letter E, the O will be spoken as the O in "boat." If we try to change this particular rule so that Robert is pronounced correctly, we will find that this change affects other words, such as ROBE, ROPE, VOTE, and HOTEL. In order to avoid the possibility of such a side effect, let us create a rule just for Robert, since it appears to be an exception to this rule. 1-17 CREATE A NEW RULE In order to create a rule we first have to decide where to place it. the placement of a rule is very important, not only within a character table, but also among the rule tables. Always place your rule in the table represented by the first character to be pronounced (within the parentheses). Since the purpose of creating the rule is to insure that the name Robert will be pronounced correctly, we will enclose all the letters within the parentheses. This rule will be placed in the R Table. I, INSERT Type Control-Z ( ^Z) to select a new character table. Type R and the R rule table will appear on the screen. First, we must determine where this new rule should be inserted. The program will search through the tables sequentially in its conversion process, so it is important that all exceptions be listed before the general case. Otherwise, the search may end prematurely with a rule for a more general case. We could not, for example, place Robert at the end of the table after (R) = I D. If we tried to do so, our search would end with the above rule. This is a default rule which will match any word with an R since it does not specify what is to the left or right of R, the program would proceed to the next character search without ever reaching our Robert rule. In the event that you are working with a table of many exceptions, it is wise to alphabetize the exceptions without violating the exception to general case order. In this manner it is easier to locate and examine a particular rule. Since only the name Robert will match the rule we wish to create, it may be placed anywhere as long as it is before the last rule. For this example, let's place it in alphabetical order. Search through the table and find: 14 (RI)V = 1D07 15 TH(ROUGH) = 1D16 The Robert rule could be placed between these two rules. (Note: this is an example. These rules may not appear in this manner or consecutively.) Now 1-18 that we know where we would like to place the rule, let's write it. Type I for Insert. You will be prompted with the instruction. ENTER RULE TO INSERT AT PROMPT BELOW Type the first part of the rule as it appears below next to the > prompt. DO NOT PRESS RETURN! If you did press return, just press return again to display the Enter Command prompt, and begin once more by typing I for Insert. >!(ROBERT)! If while entering the rule, you make a typographical error, you may back space using the left arrow key and correct the error. However, if you type past the equal sign, you will not be permitted to back past it. If this happens, press the return. Press it again in response to the next prompt in order to cancel your entry. No rule will be inserted until you type in the location to insert. Now type the equal sign, DO NOT PRESS RETURN! The exclamation points in this rule represent spaces. In this way we may exclude the possibility of altering the pronunciation of the same sequence of letters which may happen to be contained in a larger word. If, for example, we write a rule for the name, ROB, and leave both sides of the word unspecified, it would affect the pronunciation of words such as stROBe. To avoid this, we may define a space to the left and right !(ROB)!, so that only these three letters would match this rule. Even ROBert would not match, since there are more letters to the right. Refer to the phoneme list on page A-1 and A-2 and look for the phoneme code for an /AH/ sound to pronounce Robert correctly. A portion of that table has been reproduced below. Sometimes there may be more than one possibility. The list of phonemes contains two /AH/ sounds, specified by the phoneme codes beginning with OE and OF. PHONEME LIST (PORTION) PHONEME CODE EXAMPLES 1 2 3 4 AE 0C 4C 8C CC dad AE1 0D 4D 8D CD laugh AH 0E 4E 8E CE top, about AH1 0F 4F 8F CF father AW l 0 50 90 D0 saw, caught 1-19 Notice, that for each sound in the phoneme list, there are four possible phoneme codes. As the value is changed from that of column 1 to columns 2, 3, or 4, the duration of the sound is shortened by approximately twenty-five percent, You may select the length which sounds best to you. If you wish to lengthen a sound, place two phoneme codes for the same sound together. Try the /AH1/ sound from the first column. Type the codes as indicated below, replacing only 11 and A3 with 0F for the 0 sound. The rule to be inserted should appear as follows: >!(ROBERT)! = I D0F645C68C0 All phoneme codes are comprised of two digits. Leading zeros are necessary. Should you make an error, you will be allowed to back space over the phoneme code. The back space works a little differently with phoneme codes. A single back space will move back and erase two digits rather than just one. This will prevent you from entering odd numbers of phoneme code digits. Please note that you will only be permitted numbers and the letters A-F on the right side of the equal sign. Now press return, if you have not already done so. The program will ask you where you would like to insert the rule: ENTER BEFORE RULE NUMBER: Insert the Robert rule before rule 15, TH(ROUGH) = 1D16. This new rule will now be part of the table. The Editor will return to the first page of the table after inserting the rule. Press the space bar and find the new rule 15. MAKE CORRECTIONS Now, let's hear it. Type T for the Test Mode. Type Robert after the question mark prompt and press return. How does it sound? It sounds much better, but let's try the other /AH/ sound, OE. Type N for New Entry and ^Z to return to the R table. E, EDIT To make changes to a rule, type E for edit. You will be prompted with the following: ENTER NUMBER OF RULE TO EDIT: Type in the number of the rule, 15. Press return, The Robert rule will now appear at the bottom of the screen above a prompt, so that you may refer 1-20 to it during the edit. The entire rule MUST be reentered, not just the corrections. Partially typed rules will replace the original rule, in the manner typed. The rule number is not necessary. As was the case for the Insert command, any typographical errors must be corrected before the equal sign is typed. You will not be permitted to back space beyond the equal sign. If you type the equal sign, complete the rule, press return and type E to begin again. The rule should be completed so that you will not have to reconstruct the entire rule from your memory. Typographical errors on the right hand side of the equal sign may also be corrected using the back space. Remember that in order to preserve the two digit code for a phoneme, a single back space will move back two digits, not one, and that you will only be allowed to type number s and the letters A-F. Retype the rule with 0E, in place of 0F. = !(ROBERT)! = ID0E645C68C0 Press return and the edited rule will replace the old one. The display will show the first ten rules. Press the space bar and make sure the rule was edited properly, Test it once more. It should sound better and more intelligible. Once you are satisfied that this new rule functions correctly, type U to Update the table, SAVE THE CHANGES U, UPDATE When you select a character table, this one table is copied into a "buffer" area. A buffer area is like a temporary work space or scratch pad. You may make additions, deletions and changes to the rules while they are in this area. Once you are satisfied that the character table is correct, the Update command replaces the old table with the new table. Eventually, all the character tables will be saved permanently to disk. The buffer area can only hold one character table at a time. if you select another character table, the current table in the buffer will be written over by the new table. Any changes made will be lost unless an update was performed. Therefore, if you would like to see another character table, and you are not sure if you updated the current table, type U to update. No harm will be done if you did update earlier or made no changes. 1-21 S, SAVE Once your work is updated, type Control-S to save the new table on your disk. The following prompt will appear at the bottom of the screen: ENTER FILE NAME: You have an option to save the corrections in the rule table you are currently working with or save them under another name and create a new rule table. If you would like to create a new table, enter any file name up to eight characters in length, beginning with a letter from A-Z and press return. If you want to save the corrections in the current rule table, type Control-N. No file name is necessary. The standard rule table, provided on the demonstration disk, is called MKB:RULE. After entering the name or N, the Rule Editor will respond with: PLEASE WAIT SAVING RULE TABLE FILES DELETE A RULE If you find that you have no use for a Robert rule, you may delete it. Any rule in any table may be deleted with the exception of the last rule. Each table must have at least one rule. D, DELETE Assuming that you are still in the R table, type D for Delete at the ENTER COMMAND prompt. The program will respond with: ENTER NUMBER OF RULE TO DELETE: Type 15 and press return. The screen will display the following prompt along with the rule you selected. The rule will appear near the bottom of the screen. CONTINUE WITH DELETION? (Y/N) Every attempt has been made to avoid mishaps, so you must confirm your intentions. if you respond Y, the deletion will proceed and all the rules following this rule will move up one position. The display will revert back to rules 1-10. Scroll through with the space bar to make sure the correct rule was deleted. Also check the last rule number to confirm the new rule count at the top of the screen display. If you do not want to delete this rule, respond N, and the ENTER COMMAND prompt will reappear. 1-22 OTHER USEFUL COMNANDS L, LOAD After you become more familiar with the Rule Editor, you may discover more interesting applications for the text to speech capabilities. For example, you may be interested in foreign languages and might like MOCKINGBOARD to speak, maybe German? Or perhaps, you are writing a program which could use some speech. The standard rule table may be too bulky to be used with your program. The solution is to create a new rule table for your application. You don't have to give this one up to get another. The demonstration disk contains a semi-blank rule table called MKB:EMPT. It contains the required one rule in each character table. If you do not wish to start from scratch, you may use the standard rule table (NKB:RULE), edit it and save it under another file name. This is done with the S, Save command. You may select a new rule table from any rule table. When you select the Rule Editor from the main menu, the standard rule table (MKB:RULE) will automatically be loaded. Select any character table and type Control-L (^L) at the ENTER COMMAND prompt. ENTER TABLE NAME Type the name of the rule table you wish to access. When a rule table is saved, three files are saved, the table itself, the total length of the table, and an index used to locate the character tables within the rule table. When a rule table is saved, .TABLE, .LENGTH, and .INDEX are appended to the file name automatically. The load command will automatically load the appropriate files, including the suffix. Therefore, when you load a table, you need only type its name PLEASE WAIT LOADING RULE TABLE FILES This prompt will appear, then the screen will clear and the initial select prompt will appear. You are all set to begin working with your new table. SELECT CHARACTER TABLE TO EDIT 1-22 P, PRINT The Rule Editor provides a simple to use print command to print out the individual character rule tables. Turn on your printer and type Control P. The following message will appear at the same time your printer begins to print. PLEASE WAIT – PRINTING CHARACTER TABLE The print out will look similar to the screen display, except that all the rules will be printed out in succession. When it is completed, the ENTER COMMAND prompt will reappear. X, HELP Control-X (^X) will display all the commands for the Rule Editor. It will also display the commands for the Test Mode when you are in that mode. Q, QUIT When you are finished with the Rule Editor and wish to exit the program, type Z to select a new character rule table and type Control-Q (^Q). ONE FINAL INSTRUCTION It is important to note that your idea of the correct pronunciation may not be that of your neighbors. Some will prefer to say tomahto, others tomato. The Rule Editor allows you to change rules to suit your listening pleasure. It's yours! Go ahead and make MOCKINGBOARD say your own name. 2-1 SOUND The MOCKINGBOARD sound system generates a remarkable array of sound effects and music. It is a natural addition to any program because it introduces real-life action and excitement to silent images and text. It fills time or sets moods with background music, and captivates the youngest of users with familiar and recognizable sounds. In a very short time, MOCKINGBOARD will be making interesting sound effects under your control. As a method of introducing each of the sound controls used to generate effects, we will create two different types of sound effects using the SOUND UTILITY program included on the demonstration disk. This step by step explanation will be followed by examples showing how to incorporate sound effects into BASIC programs. The programs are well documented with comments called REM (remark) statements to help you understand the purpose of each line, Just type in the code as written. A FEW WORDS ABOUT THE SOUND UTILITY The Sound Utility program, provided on the demonstration disk, will allow you to create sound effects without programming. In fact, all the sound effects on the demonstration disk were first developed with the utility, then saved and incorporated into the programs later. Please boot the demonstration disk and select Sound Utility. The monitor or TV screen will look similar to Figure 2-1. SPEAKER: 1, at the top left hand corner, refers to the speaker which is the source of the sound. Below this line are the parameters which generate the sound. At the bottom of the screen is a menu of commands. The cursor can be moved to different parameters using the arrow keys and/or Control-J for down and Control-K for up. Additional information about this utility will be presented as needed. 2-2 SPEAKER: 1 REGISTER MAX CHANNEL NAME VAL ALL A B C TONE PER FINE 255 0 0 0 0 ONE PER COARSE 15 0 0 0 0 NOISE PERIOD 31 0 ENABLE 63 0 AMPLITUDE 16 0 (FIX = 0- 15/VAR = 16) ENVL PER FINE 255 0 ENVL PER COARSE 255 0 ENVL SHAPE 15 0 P = PLAY B = SIMULTANEOUS L = LOAD X= CLEAR R=RESET C=SPEAKER S =SAVE Z=END Figure 2-1 Sound Utility Screen Display WHAT YOU NEED TO KNOW ABOUT SOUND Sound is a common phenomenon which we hear and feel every day, yet most of us have not given it much thought. What distinguishes one sound from another? How can a sound be duplicated? With MOCKINGBOARD, differentiating sounds is a natural process of developing them. Some sounds evolve into familiar, common sounds. Others become beautiful, exotic or mysterious. This process of developing MOCKINGBOARD sounds is comparable to adjusting your television set to get a clear picture. But instead of turning control knobs, you type in control adjustments to tune your sound. 2-3 MOCKINGBOARD "KNOBS" Sound Quality On/Off Switch Volume Volume Pattern Tone Period Enable Amplitude Envelope Period Noise Period Envelope Shape TONE PERIOD/NOISE PERIOD: Sound quality may be pure tone sounds, like musical notes, or noise, like rushing air. The Tone Period adjustment ranges from high to low pitch. The Noise Period adjustment also ranges from high to low, but not in terms of pitch. A high Noise Period sounds like the hissing of steam, while the low period sounds like the roar of rockets. ENABLE: Turns on or off the tone or noise generating capability. This is important, because MOCKINGBOARD is capable of producing up to six different sounds. AMPLITUDE: Controls the amplification or volume of the sound. There are two amplitude modes, fixed and variable. Fixed level amplitude provides 16 different levels of constant volume. Variable level amplitude passes the amplitude control to Envelope Period and Envelope Shape which generate amplitude patterns. ENVELOPE PERIOD/ENVELOPE SHAPE: Most sounds have a recognizable pattern which repeats, The pattern you hear is the change in volume. A sound may become loud, holds its level and then fade or soften. Envelope Period adjusts the length of one pattern by expanding or contracting it. With Envelope Shape you may select from 8 different shapes or patterns. GETTING ACQUAINTED The Sound Utility program is capable of loading and saving sounds you develop. The sounds found on the demonstration disk were created using this program. To get acquainted with both the Sound Utility and the sound parameters, let's load a few existing sounds and play them. Each sound effect may be identified as either a pure tone, pure noise or a combination of the two. 2-4 Type L for load. The following will appear in the area just above the commands: ENTER SOUND NAME OR ATALOG = > Let's listen to a pure tone sound, Type PING. The parameters for this sound effect are loaded into their respective fields or locations on the screen for evaluation and modification, The screen appears as follows: SPEAKER: 1 REGISTER MAX CHANNEL NAME VAL ALL A B C TONE PER FINE 255 0 20 0 0 TONE PER COARSE 15 0 0 0 0 NOISE PERIOD 31 0 ENABLE 63 62 AMPLITUDE 16 0 16 0 0 (FIX = 0-15/VAR = 16) ENVL PER FINE 255 0 ENVL PER COARSE 255 4 ENVL SHAPE 15 0 -end of part 3-