The AMOS Sound Effects Creator Written by John.K.Rutterford With AMOS version 1.2 Program Requirements: At least One Megabyte of memory A Mouse One Disk Drive A formatted disk for storing information At least a small knowledge of Waves and Envelopes Introduction This program will enable the user to design sound waves and volume envelopes which can be combined together to make sound effects. The sounds which are created can be used in any AMOS program with the aid of a special procedure (included on disk) or can be transported into other languages such as AmigaBasic (see Technical Reference). These instructions are not set out to teach you how to create sound effects but only as an aid to using the program to create them. If you don't understand how sound waves or envelopes are designed and what their purpose is, I suggest you read the relevant section in the AMOS user guide for an introduction. It is a good idea to print out these instructions if possible before continuing as it would aid in learning how to use the program. All icons are selected by pressing the left mouse button. When using certain functions the mouse pointer will turn white while you are using that function. To abort the function press the right mouse button. When the computer is busy the mouse icon will turn into a clock. All screen buttons and icons will be inoperative while the computer is busy. When the computer is finished the mouse pointer will return to its default and control will be returned back to you. IMPORTANT - Do not ERASE any banks manually from AMOS. You might end up erasing important memory banks that the program needs to run. Any unused banks are always deleted when you exit the program from the file screen. Plus, as a secondary check any banks created for saving or loading purposes are deleted after any disk operations. If the worst comes to the worst just reload the program. (WITHOUT SAVING IT!) Running The Program Load the program `SEC.AMOS" as you would any other AMOS program. You will be asked if you want to change the text buffer, answer yes to this question. Doing this sets the maximum amount of available memory for use with the program. It is also a good idea to load this program before any others when you first run AMOS. When the program has loaded just run it as you would any other AMOS program. If you have a lot of memory to spare you might like to load it in as an accessory. This will allow you to call it up when its needed when developing your program. (See the AMOS user guide for information on loading and running AMOS programs and accessories.) The Menu Screen When the program first runs the screen will go blank for a few moments and then you will be presented with four white horizontal bars. Each bar represents an option in the program. To select an option move the mouse pointer over the desired bar and press the left mouse button. To leave this option, again move the mouse pointer to the bar and this time press the right mouse button. The File Screen The top bar is the file screen. This screen lets you load and save sounds, waves and envelopes. At the top left of the screen is the INFO icon clicking on this with the left mouse button brings up a simple title screen. Directly to the right of this is the QUIT icon. Selecting this lets you exit the program. Any data in the program will be lost so be sure to save all important information before selecting this. As a security check you will be asked wether you really want to quit. Reply Y for yes or N for no (Use the keyboard!). Beneath the INFO and QUIT icons are the Sounds SAVE and LOAD icons. These as they suggest let you save or load your sounds as an AMOS bank. The bank is saved as FAST RAM (If enough fast ram is available). The bank is named as `AMOS-Snd'. The rest of the screen is made up of a table. The table lets you save either your sound waves or your envelopes as either an AMOS bank or as an ASCII file. When you save or load in waves from an AMOS bank or as an ASCii file all waves that are presently in memory are deleted even the ones which are used by the sounds in memory. When the new waves have loaded all the sounds in memory will use the first built in sound wave. The same thing goes for the Envelopes except that all the sounds in memory will use the first envelope definition. The purpose of being allowed to save and load your waves or envelopes independent of sounds is so that you can save your waves or envelopes for backup reasons or so that you can build up a library of either. When you save your sound waves as an ASCii file the names are omitted. Therefore if you should load in sound waves as an ASCii file the computer will generate names for you. The purpose of being allowed to save waves or envelopes as an ASCii file is so that you can transport these into other Basics or languages. (See the Technical Reference.) For program execution security the three built in sound waves will be saved with your sounds. Any unused waves or envelopes will be deleted before saving any sounds to disk. It is therefore advisable that you save your waves and envelopes before saving your sounds! The Sound Wave Screen Underneath the file screen is the Sound Wave screen. This screen lets you create your own sound waves. The majority of the screen is taken up by a large black box. This box holds a graphical read-out of the current wave. The yellow line in the middle represents zero, while above the line represents positive values (upto +127) and beneath the line represents negative values (down to -128). In the top right of the screen is a blue box. This holds the name of the current selected wave. To change the name of the wave select the WAVE icon directly above the wave name box. This will let you enter a new name of upto six characters. Press SHIFT for capital letters and return to enter. Underneath the wave name box are two green arrows. These icons let you select a different wave. Beneath the select arrows are the DUP, DEL and NEW WAVE icons. The DUP icon lets you duplicate the currently selected wave. The DEL icon deletes the current wave. The NEW WAVE icon creates a new sound wave with zero values. (The first three waves are built into the program and cannot be deleted are altered. These waves are TRIANGLE, RANDOM and SAW. If you want to alter these then you should duplicate them and edit the duplicated versions!) Underneath the Wave display box are four red icons. These icons move a vertical cursor across the wave display. The two outer icons move the cursor to either the beginning or the end of the wave while the middle two move it either left or right. To make the cursor move faster hold down the CTRL key on the keyboard while selecting one of the cursor move icons. Next to the cursor move icons is a read-out containing the current value under the cursor. To `fine tune' this value use the plus and minus icons directly to the right of the value box. A better way to alter this value is to select the value box. Upon doing so the mouse pointer will turn white. You can now alter the value easier with the plus and minus icons. To alter the value faster hold down the CTRL key on the keyboard while changing the value. When you have the value you want you can either select the value box again to move onto the next value or press the right mouse button to exit whereas the mouse will change back to its original colour. The next three icons perform a logical AND, logical OR, or a logical XOR (eXclusive OR) between two sound waves. First select the first wave and then press the desired icon. The mouse will again change white. Now select the second wave and press the desired icon again. The computer will now create a new wave and will store the result into it. When finished the mouse pointer will be restored to its original colour. Underneath are three bright blue icons these will create a new wave and either compress the currently selected wave to the right, left or all of the wave into itself. Beneath these are two wave generators, a pulse wave generator and sine wave generator. To use them select the one you require and a number will appear in the selected box and the mouse will again turn white. This value determines the result you will get.To change this value use the two blue arrow icons in the selected box. To speed up the value hold down the CTRL button on the keyboard while changing the value. When you have the value you require then press the left mouse button upon which the computer will create a new wave and create the values for it depending upon the value you entered. Again when finished the mouse will return to its original colour. The Sine Wave generator is only for you to play around with, wether you get any decent sound waves depends greatly upon the value you enter. Experimentation is the best way to find good waves. Try using values of 256, 511, 1024. The get a square pulse wave use the value 128. The very last icon is the TEST icon. Selecting this will play the note C (octave 3) with the currently selected wave. It is worth mentioning that some waves due to compression or their construction can only be heard at lower or higher octaves! The Envelope Definer Screen The third screen down lets you create volume envelopes. At the top of the screen is a graphical read-out of the envelope. The Y axis holds the volume (Max 63) while the X axis holds the duration value (Max 255). (To make the display easier to see, the inside of the envelope is filled in but in some extreme rare cases a part of the envelope may not be filled in. This is an unfortunate side effect but it does not alter the shape or the values of the envelope in any way.) Beneath the envelope display are seven sets of icons. Each set represents a stage in the envelope. To alter a stage select the green part of the icon. The mouse pointer will change white. Now by using the plus and minus icons in that stage you can change the value for the volume and the duration. The value is displayed underneath the icons in the relevant coloured box. To enter the values press the right mouse button. The envelope will be redrawn and the mouse pointer will be restored. Beneath the stages icons is the envelope selector. This works in the same way as the sound wave selector. Next to this is the NEW ENVELOPE, DUPLICATE ENVELOPE and DELETE ENVELOPE icons. These are self explanatory and perform on the currently selected envelope. (You can not have no less than one envelope in memory. If you try to delete the only envelope the delete button will not work!) Finally the last button on this screen is underneath the envelope display and is the TEST icon which will play the note C (octave 3) with the current envelope. (The sound wave used is the built in sine wave used by AMOS.) The Keyboard Screen The very last screen is the keyboard screen. This screen is used for testing out your sounds and defining them. The majority of the screen is occupied by a simple drawing of a 12 key keyboard. Each key has a number or letter drawn onto it. To play that key press the corresponding letter or number. The key `Q' is C. Next to the keyboard is the OCTAVE selector. The number displayed is the current octave of which there are eight (0 to 7). The two arrows on either side of the octave value will move the octave higher or lower. To the left of the screen, underneath the keyboard, is the SOUND selector. This works in exactly the same was as the octave selector. Next to the sound selector is the WAVE selector. The PLUS and MINUS icons will change the wave to be used with that sound. Next to the Wave selector is the ENVELOPE selector. This works the same way as the wave selector. The wave and envelopes displayed for the current sound are the ones used when that sound is played. To hear what it sounds like use the keyboard as this will always play the sound currently displayed. Again in some case you may have to either lower or higher the octave to get a sound because of the waves structure. Underneath the octave selector is the NEW WAVE and DELETE WAVE icons. These are self explanatory. You can have no less than one sound in memory. If you try to delete the only sound the delete wave icon will not work. Using The Sounds In Your Own AMOS Programs On the disk you will find an AMOS program called `SOUNDMOD.AMOS'. Merge this onto the end of your program which you want to use your sounds with. Full instructions are then given in a series of rem statements. Once you have completed the instructions delete the rems and you are ready to use the sounds at your will. The proc to define the sounds can be called at anytime in your program and all you have to do to hear your sound is to use the PLAY instruction from AMOS. The procedures have no error checking inside of them, so it is upto you to make sure that you follow the instructions carefully. If you get an out of memory when using any of the procedures then increase the variable buffer at the beginning of the program (section 1). Because the Sound Effects Creator is Public Domain, then so is the Sound Module. This means that any sounds you create can be used freely in your own software. It would be nice if you could credit me for it though. A line saying something like `Sounds Created With The AMOS Sound Effects Creator By J.K.Rutterford.' would be nice! Ta. Technical Reference If you would like to use the sound waves or envelopes in a different language other than AMOS just follow these steps... 1) Save the data you want from the File Screen in ASCii format 2) Reset the Amiga and load in your other language 3) Load in your ASCii data as a Sequential File. The format for Sound Waves is: i) Number of sound waves ii) Sound wave data in blocks of 256. Negative numbers are saved as ASCii characters above 128. To get the correct value subtract 256 from the ASCii value. The format for Envelopes is: i) Number of envelopes ii) Volume Value for stage 1 iii) Duration Value for stage 1 iv) And so on until stage 7 where the next set of envelope data starts The sounds are stored in AMOS Bank number 15. It can be identified with the name `AMOS-Snd". While the waves and envelopes are stored in banks 14 and 13 respectively. Problems With Using The Program If you have selected a function and the mouse pointer has turned white and you want to abort, press the right mouse button. If an error should occur in the program a small error window will be displayed. Just press the left mouse button. If an error should occur I suggest that you try and save any data you have stored in the program preferably under a new name. This way if any data is being corrupted you will at least have saved some of it. The error number displayed in the error box is the AMOS system error number. For a complete list of error numbers refer to the Handy Index which you received with AMOS. If any screen displays or information becomes corrupted after trying to load in some data then it could be the direct result of trying to load in data not compatible with the Program. In this case you should reload the program after saving any information you want to keep! If the computer stays busy for a long time when saving data you have nothing to worry about. The more information the program has to save the longer it will take to convert that information into an AMOS Bank. You will just have to wait until it is finished! If you cannot delete or alter a wave then check that you are not trying to delete one of the built in waves. These are TRIANG, RANDOM and SAW. If you cannot delete a wave (one which is not built in!) or you cannot delete an envelope (when there is more than one envelopes in memory) than check that you are not trying to delete a wave or envelope that is used by a sound. Any data used by a sound cannot be deleted. If none of the screen buttons or icons will work then first check that the mouse pointer is not white or in the shape of a clock. If the mouse pointer is in the shape of a clock then this indicates that the computer is busy. You will have to wait until it is finished. If the mouse pointer is white then this means that you have selected a special function. To abort this function and return to normal just press the right mouse button. If the screen buttons or icons are not working and none of the above applies then try to exit the screen by pressing the right mouse button while pointing to the screens header bar. This should return you to the main selection screen. From here select the screen which would not work and everything should be fine. If the mouse pointer will not move then this means that the computer has crashed. This happens through no fault of the program but happens if the program has not enough memory. It is best to load and run the program straight after loading in AMOS. As a further precaution turn the computer off for about ten seconds before loading in AMOS as advised in the AMOS user guide. The program is very GURU user-friendly, it has not crashed yet! Authors Note I hope you find this application useful. If you have any ideas for improvement or if you find any bugs please contact me. This is only version 1 of the program. I have a number of new features which I could incorporate into a new version but only if a new version is wanted. So if you would like to see a better version, tell me or the Amos users club about it! Thankyou. John.K.Rutterford 19/01/91 All Correspondence to me at: JKR Software 10 Pritchard Road Southside Gympie Qld Australia 4570 Any contributions will be gratefully accepted.