═══ 1. Introduction ═══ PMsndX 1.36 by William S. Hiles copyright WiSHware Inc. Please see Known Problems with this release for important information before using this version of PMsndX. First off, what is PMsndX? PMsndX is the acronym that I created to mean Presentation Manager sound eXchange. PMsndX was written specifically for OS/2 to provide an editor for sound samples of many different formats. The editor goes beyond just a cut and paste tool like the Digital Audio applet provided with OS/2 by providing a rich set of tools for manipulating samples in memory. PMsndX utilizes a large set of features of OS/2 and if present, the MMPM/2 interface is used to allow playback of any of the supported formats from memory. Using dialog boxes, PMsndX provides an intuitive user interface for utilizing the clipboard, MMPM/2 AUDIO, and algorithms for adding special effects to samples. Everything is integrated together to make it easy to manage the process of extracting or building samples in many different formats. Wow, you are still reading! Well, now for some information on the user interface. There is nothing more frustrating than trying to use a program with a difficult or complex user interface. Twelve years ago I started programming a TI99/4A in assembly language and from the start I have put more effort into a clean user interface than anything. It wasn't till I ran across JOEVIEW that I realized that OS/2 had one of the most capable environments that I had seen. Presentation Manager programming has got to be one of the easiest environments to use and is a breeze compared to Microsoft Windows or the X environment. In any case, I spent more time on the user interface of this program than I ever thought possible. It is designed around a single coordinating window populated by bitmaps. Each bitmap has some sort of image that changes when the button is pushed. To make sure that the literate people out there (or the icon impaired) understand the buttons, I put a bit of text on them to describe the function. Now, I have used programs on a lot of platforms and I have my favorites along with those that annoy me too. My pet peeves are the applications like Procomm for Windows which just assumes that you want the darn thing to fill up your screen. Or something like Microsoft Word which has so many menus and submenus that it is hard to remember where a function is. So, taking this into account, I designed the interface such that the main functions of the program are accessible from the main panel. Pressing the button for the function will then bring up a dialog box which asks for the necessary information. Pushing the button again will remove the dialog box. I prefer this interface because it provides a single point of control. Well, you just need to play with it for a bit to get an understanding of what I am talking about here. ═══ 2. Conventions ═══ Throughout the documentation provided with PMsndX a number of terms are used which may be common to Presentation Manager programs but uncommon to conversational English. There are also terms which are specific to PMsndX which may be new to a user of this program. The intent of this section is not to recreate the OS/2 documentation; rather, it is intended to identify some basic terms necessary to understand the language used in this documentation. Presentation Manager: The Presentation Manager is the Graphical User Interface (GUI) for most OS/2 systems. There are other GUIs available for OS/2 but this is the most common and the one that comes with OS/2 out of the box. In general most people refer to the Presentation Manager by the acronym PM. SYSTEM MENU: Every PM program for OS/2 generally provides a SYSTEM MENU through an icon in the upper left corner of the window interface. By default, the system menu will contain the basic functions necessary to control the window on the OS/2 PM desktop. TITLE BAR: In order for a window to be moved about the desktop with the mouse, a window must have a titlebar. This is the thick bar at the top of the window. The titlebar provides another function in that it allows the program to display relevant messages to the user. MINIMIZE BUTTON: A PM program may provide various control buttons for a window in the top right corner of a window. One of these buttons is the MINIMIZE button. When the user selects this button, the window will be removed from the desktop and replaced by a small icon somewhere on the screen. In most cases, the icon is placed at the bottom of the screen. To restore the window the user can double click on the icon or can use a mouse button to bring up a menu and select Restore. MAIN CONTROL PANEL: The main control panel for PMsndX is the window that is initially displayed when the program is executed. This window is the main point of control for the program and provides access to all of the above mentioned controls as well as access to all of the functions of the program. ACCELERATOR KEYS: The buttons on the main control panel and many of the controls in the associated tools provide accelerator keys. These are marked on the displays by an underline. To access the particular item without using the mouse, hold down the ALT key and press the underlined key. As an example, to activate the OPEN button on the main control panel, hold down the ALT key and press the letter o. Dialog Pushbuttons: PMsndX uses a number of buttons to convey an action that can be selected to perform a process. In most cases, a common set of buttons are used; however, under special circumstances, a unique name may be used to convey the appropriate meaning. The following are buttons that are commonly used. Stop an active thread Reset the controls of the dialog box back to the way they were the last time the APPLY button was pressed Open the help window for the specific dialog that is currently active Display special information about the current dialog box. Start loading a file into memory Open up the registration dialog box to enter a password Redraw the display Undo the last operation or effect Save the current memory to a file ═══ 3. Mouse Pointer ═══ The mouse pointer is used as an indication of the state of the program. When the program is processing, the mouse pointer will be changed to a small dial with 10 markers on the dial. The percentage of work completed is then indicated by the hand of the dial. When the dial reaches the vertical position, the work has been completed. There is one exception to this operation. When the echo effect is used, the dial for the pointer will rotate more than once. This is because the results of the echo effect change the length of the data depending on the markers and volumes such that the resulting length is unpredictable. PMsndX uses multiple threads to accomplish many of its tasks. As a result, when a file is loaded the clock may turn more than once because each thread will run as the resources that it is waiting on complete. An example of this is opening a file when the AUDIO box is open. In this case, as soon as the file is completely loaded, the AUDIO task will immediately start copying it to the buffer for the playlist and the clock will turn around a second time. ═══ 4. Command Line Parameters ═══ Although PMsndX is primarily designed around a point and click user interface, it does accept parameters on the command line. The effect of command line parameters is dependent on the startup values set in the Properties dialog box. When Play on Load or Play on commandline load is selected, all command line parameters are treated as filenames and are automatically played through the audio device or run as a REXX script. The extension of the file to be loaded is use to determine the type of sample; therefore, samples loaded from the command line must contain a valid header. Only one REXX script may be run from the command line. All command line processing ends after the first rexx script encountered. PMsndX may be used to simply play samples from the command line by setting Exit after Play. When this option is set, if any samples are provided on the command line, PMsndX will exit after it completes playing each of the files. If no parameters are specified, the normal user interface is started regardless of the status of Exit after Play. After playing a rexx script, PMsndX will not exit regardless of the status of Exit after Play. To exit PMsndX after a rexx script, add the command PMSNDX EXIT to the end of the REXX script. ═══ 5. System Menu ═══ As with any OS/2 program written for the Presentation Manager, PMsndX has an icon in the top left corner of the control window. Pressing this icon will bring up a menu of system operations. The menu items provided in the system menu are: Restore Restore the windows after being minimized Move Move the control window Size Resize the main control panel Minimize Minimize all of the windows of PMsndX to an icon Close Close the all windows and exit About Display information about the author and version and registration Welcome Display information about what is new to this version Help Bring up the help system Reset Size Reset the size of the main control panel to the default Properties Change program operational parameters ═══ 5.1. Restore ═══ During the use of PMsndX, the user may select to Minimize the windows to an icon on the desktop. To restore the window from the icon the user may either double click on the icon or may press a mouse button while the pointer is over the icon to bring up the system menu and select the restore item. ═══ 5.2. Move ═══ PMsndX provides the standard controls for moving the windows around on the desktop. It is generally easiest to use the mouse to select the titlebar of the window and drag the window to the new location. If the user uses the system menu to move the window, the mouse will be centered in the control window and any movement of the mouse will move the window until a mouse button is pressed. ═══ 5.3. Size ═══ PMsndX provides the standard control for resizing the main control panel. When resizing, the main control panel will automatically adjust the vertical size of the window to maintain the aspect of the buttons. ═══ 5.4. Minimize ═══ All of the windows of PMsndX can be minimized quickly by either selecting the minimize button on the upper right corner of the control panel or by using the Minimize menu item of the system menu. Either action performs the same function. ═══ 5.5. Close ═══ To exit PMsndX the user can select the Close menu item from the system menu. This is the default selection of the menu which enables the user to double click on the PMsndX icon in the top left corner of the control panel to exit the program. When the EXIT button is pressed, the program terminates. If changes have been made to the Properties box, the data will be saved to the initialization file before the program exits. Before exiting, PMsndX requests verification that the user wants to exit to prevent accidentally exiting. All windows of PMsndX, including any dialog boxes, are removed from the screen when the program terminates. If the data in the memory buffers has been modified, PMsndX will warn the user that there are modified buffers and ask for verification that the user really wants to exit. ═══ 5.6. About ═══ To find out the current version and other information about PMsndX the About menu item can be selected from the system menu. This display also shows the current registration status of the program and the registration can be updated by pressing the REGISTER button. PMsndX is just one of the programs written by the Author for Intel based machines. All programs developed under the WiSHware Inc. name have been developed solely by the author (duhh, the Author is the sole member of the company) and are copyrighted by US Copyright laws. ═══ 5.7. Welcome ═══ The HISTORY.TXT file contains a very complete list of all the changes between each of the versions. When viewed as a whole, it also summarizes the total functionality of PMsndX. Each version has specific changes which are highlighted in the Welcome display. This display also shows the current registration status of the program and the registration can be updated by pressing the REGISTER button. ═══ 5.8. Help ═══ PMsndX is equipped with extensive on line help that can be accessed by selecting HELP from the system menu from the main control panel. When this item is selected a window will appear which will display the start of the help information. Help can also be accessed by pressing Alt-H or the F1 key. Links to other text is displayed in a blue-green color and can be selected to jump to that description in the text. When the control panel buttons appear in a tabular form, the buttons are active links in the help like the blue-green colored text. Pressing these buttons will jump to the respective text. ═══ 5.9. Reset Size ═══ The default button size for the display is 64x64. At any time, the user may select to reset the size of the main control panel so that it returns to the defaults. The main control panel may be resized, using the border of the window. ═══ 5.10. Program Properties ═══ PMsndX can store a number of properties (user options) that users commonly set in a file called pmsndx.ini. The location of this file may be specified only if PMsndX is registered; otherwise, the file will be located wherever the executable program is started. From the PROPERTIES dialog box the user may select to save the current window positions, open and save file path, maximum memory, MMPM/2 options, and REXX options. After the user has set all of the information in the PROPERTIES dialog box, the ACCEPT button must be used to save the changes. When this button is pressed, the changes are applied. Note: Changes to the maximum memory will be checked when a new sample is loaded or when an opertion that requires memory is attempted. To restore the PROPERTIES box to the settings the last time the APPLY button was pressed, the CANCEL button can be used. All information entered by the user is cleared and the PROPERTIES remain unchanged. The window positions and file paths are maintained as long as PMsndX is running. When PMsndX is terminated, it will not save the current positions and paths for file operations unless the boxes are checked in the PROPERTIES dialog box. Selecting these buttons has no effect on remembering the current window positions during a single session; rather, they only affect saving the information between sessions. Note: The information in the PROPERTIES dialog box is only saved when the program is terminated. If the SAVE CURRENT items are deselected, then the information will not be saved between sessions. Finally, to remove the Properties dialog box from the screen, select close from the system menu or double click on the system menu icon for the properties dialog. If the APPLY button has not been pressed, any changes made to the display will be lost. ═══ 5.10.1. Audio Properties ═══ Enable MMPM/2 Support PMsndX supports playing samples from memory directly to the MMPM/2 digital audio device of OS/2. This allows samples to be played without having to save the sample to disk in the native .WAV format. The PROPERTIES dialog box provides controls for disabling or enabling MMPM/2 support and for controlling the actions taken when a file is loaded (e.g. Play sample on load, convert to a standard rate when loaded, and exit after play from the command line). Additionally, the digital audio device may be specified. If the MMPM/2 capabilities of the program are not needed or if MMPM/2 support is not installed on a particular system, the MMPM/2 may be disabled from the PROPERTIES dialog box. By disabling the MMPM/2 support, the button on the main control panel for AUDIO is disabled. By default the program will enable MMPM/2 support. If MMPM/2 is available but disabled and the AUDIO button is selected, a message is displayed to the user to indicate that the setting should be turned on from the PROPERTIES dialog box. The controls for MMPM/2 and the ability to play the "playlist" using MMPM/2 utilize the files SW.DLL and MDM.DLL. These are part of the standard MMPM/2 distribution and must be present in the DLL path for the MMPM/2 portion of this program to operate. The MMPM/2 support is not linked into the executable of this program. Rather, it is only loaded when the user enables it. This allows the program to run on machines which do not have MMPM/2 installed. The MMPM/2 functionality of PMsndX has been implemented to share the audio device with other programs on the system. However, by disabling the MMPM/2 support, the audio device is freed up completely. Share audio device The audio device can be shared with the system such that while a sound is playing, it may be interrupted by system sounds. Play on commandline load When the Play on commandline load box is selected, a sample will be played when specified on the command line. The AUDIO dialog is opened after the file has been loaded to allow for user control. This feature can be used in conjunction with the Exit after commandline play to allow a sample to be played from the command line without bringing up the full user interface. Play sample on Load If the Play sample on load box is selected, a sample is immediately played when it is loaded into memory. To provide control during playback, the AUDIO dialog box is opened after the file has been loaded. When this feature is used in conjunction with the Exit after commandline play feature, PMsndX provides the ability to play any supported sample file format from the command line and have the program exit when it is finished. Note: This setting does not affect playback of REXX scripts. If a REXX script is specified on the command line, it will automatically start running. When a REXX script is run which contains the command AUDIO PLAY SYNC or AUDIO PLAY ASYNC the samples may start playing, and then restart. This is because the file starts playing as soon as it is loaded and then the AUDIO command starts it over. To avoid this, deselect the Play sample on load from the script prior to loading the file. If this parameter is not specified, the sample will still be loaded from the command line; however, it will not be played until the presses the play button on the AUDIO dialog. Exit after Play The Exit after Play option provides the ability for PMsndX to exit after playing the sample when the file is loaded from the command line. This is primarily intended to provide a means to play any of the supported formats from the command line. Play 16 bits on 8 bit audio The Play 16 bits on 8 bit audio option allows 16 bit samples to be played on 8 bit audio adaptor. Although most samples will produce square waves (resulting in noisy results), some will play (most notably .au files). Although the data is sent to the audio device in 8 bit format, it is still maintained in its original format and all manipulations including saving the file are performed in the original size of the file. Note: When this option is selected, all files are played as 8 bit samples regardless of what is supported by the audio adapter. Use this option only if you have an 8 bit card! Device Obviously not every machine has the same digital audio device. PMsndX provides a means to use a different audio device than the default digital audio interface. By default the device name is Waveaudio01. Any Waveaudio device may be selected by entering the device name in the Device entry field. Note: Setting the audio device to an invalid string will cause random errors. The worst case is the PMsndX will crash whenever the AUDIO dialog is opened. To reset the audio device back to Waveaudio01, clear this field and then exit PMsndX. When PMsndX is reloaded, it will reset the device to Waveaudio01. ═══ 5.10.2. Memory Properties ═══ Maximum Sample Memory PMsndX takes advantage of OS/2's advanced memory management facilities. When the program is started, it only takes up the memory required for the executable to load. PMsndX then only requests memory from OS/2 when an operation requires storage space for a sample. The maximum memory limitation is provided to avoid overcommitting the memory in the system and creating a large swap file. Memory is primarily used to hold samples for operations; however, whenever the sound is manipulated in such a way that either the output has a different number of samples or the operation requires the samples to remain in tact during the entire operation, additional memory is used to hold the new data. Once the operation has been completed, the memory is freed unless the UNDO feature is enabled. When setting the maximum memory, the user must take into account the size of the data in memory as well as the size of the results of any operations. With the exception of Sampling Rate changes, the maximum memory requirements will not exceed twice the size of a sample. When changing rate, the size is dependent on the new sampling rate. If the new rate is higher than the current rate, the memory requirements will increase. If the new rate is lower than the original rate, the memory requirements will shrink. If the user selects the AUTO mode for memory (the default), PMsndX will request as much memory as OS/2 will give it. If the user chooses to limit the memory to a specific value, the AUTO checkbox can be turned off and a value may be entered. Since the minimum OS/2 memory block size is 4096 (4k) bytes, the user may specify the number of 4k pages for the limit. The user may either use the up and down arrows to increment or decrement the amount of memory or may place the cursor in the window and type the specific value. ═══ 5.10.3. Misc Properties ═══ Enable UNDO When a sample file is changed through the editor or the tools or a new file is loaded, the sample before the change is maintained so that it can be retrieved by the user. To access the UNDO feature, selecting the UNDO button on the Edit dialog. The UNDO feature is only available when PMsndX is registered. Note: By default the UNDO feature is not enabled to conserve memory. Ignore unknown header blocks Many sound formats contain optional header blocks and user defined header blocks which PMsndX may not support. By default, PMsndX will warn the user when it encounters an unsupported header block. By selecting this option, PMsndX will not display the warning. Note: When the unsupported header block warning is displayed, PMsndX provides the option of disabling the warning by selecting YES. This is not the same as the Ignore unknown header blocks option and only disables the warning for the current session of PMsndX. Require header in .au files Samples taken from a Sun usually contain a header but there are files which do not. Typically a Sun file will not contain a header if the sample is recorded from the audio device as if it were a file (e.g. "cat < /dev/audio > sample.au"). By default, PMsndX will recognize the extension of .au and force a headerless file to be loaded as a sun file with a sampling rate of 8012 Hz. When this option is selected, headerless Sun files must be loaded using the format RAW .ul format. This method for loading headerless Sun files allows the user to specify the sampling rate for the file. Force all .AU to ULaw The format of a .AU file is fairly robust and rivals the capabilities of the RIFF (.WAV) format. PMsndX is capable of loading and saving .AU files formatted with ULAW, LINEAR 8 (signed 8 bit), and LINEAR 16 (signed 16 bit) samples. Since the ULAW format is a lossy compression technique, it is best to save data in its native 8 or 16 bit format. Some machines cannot play .AU files unless they are stored in ULaw format and PMsndX has settings which allow the user to control the action taken when a file is saved which is not ULaw. The Force all .AU to ULaw setting is a tri-state checkbox. When the box is cleared, PMsndX will save the data in the best format to match the current format. When the button is in the checked state (indiated by a checkmark in the box), PMsndX will always save the data in ULaw format regardless of the current format. When the box is set in the intermediate state (a greyed out box), PMsndX will present the user with the following message: The current data format is not ULAW. The .AU file format supports this dtaa type; however, some systems only support the ULAW format. At that time, the user may select to either force the file to become ULaw or to allow PMsndX to save in the most accurate format for that data. If you find that a .AU sample cannot be played on another platform and results in noise or an error, try saving the data in the ULaw format to correct the problem. Location of .INI By default, the file pmsndx.ini is stored at the location of the executable program. However, this location may be changed by modifying this field. The path is tested for validity when the parameters are applied; and, if the path is found to be invalid, and error is displayed and the current path is left unchanged. If the path is blank, the default path will be restored. Note: This option is only valid when the program is registered. The data for the path to the pmsndx.ini file is stored in the os2.ini file which is only modified if the program is registered to prevent storing data in the os2.ini when a user is just testing out the program. ═══ 5.10.4. REXX Properties ═══ STDIN color This defines the color of text read from STDIN in the REXX output window. By default, this is set to BLACK. STDOUT color This defines the color of text written to STDOUT in the REXX output window. By default, this is set to BLACK. STDERR color This defines the color of text written to STDERR in the REXX output window. By default, this is set to RED. COMMAND color This defines the color of the PMsndX commands written in the REXX output window. By default, this is set to GREEN. REXX display history Setting the number in the entry field for this item modifies the number of lines maintained by the REXX output window and may take on values between 64 and 0x7fff. The default is 64 Changes made to this value will be used on successive REXX command scripts. Each line of REXX output reserves 256 characters of data and as a result, the number of rexx lines maintained for history impacts the memory requirements of the program while REXX is running. Note: Changes to the REXX display history parameter does not take effect till the next command script. (i.e. If a REXX output window is open when this parameter is changed, the number of lines currently held is not changed.) ═══ 5.10.5. Startup Properties ═══ Show Footnote window PMsndX can display a window at the bottom of the main control panel with text indicating the action of each of the items under the mouse pointer. When this box is set, the window is displayed. Note: The effect of setting this item will not be seen until PMsndX is restarted. Save Window positions During a session, the user can move any of the dialog boxes around on the screen. If the WINDOW POSITIONS box is checked, these window positions will be saved when the program is terminated. If this button is deselected before the program is terminated, the next session will revert to the previous window positions saved by the program. By default, if no window position has been saved for a particular window, the window will be opened in the lower left corner of the desktop. Save file Open Path The file path for loading samples into memory may be saved between sessions by selecting the FILE OPEN PATH button. If this button is selected, the last file open path will be saved when PMsndX is terminated. If this button is deselected before the program is terminated, the next session will revert to the path from the previous session. If no information is saved for the program at any time, the current path will become the default path for open operations. Note: This box may be selected from either the PROPERTIES dialog box or from the OPEN DIRECTORY button on the OPEN dialog box. Save file Save Path The file path for saving samples to a file may be saved between sessions by selecting the FILE SAVE PATH button. If this button is selected, the last file save path will be saved when PMsndX is terminated. If this button is deselected before the program is terminated, the next session will revert to the path from the previous session. If no information has not been saved between sessions, the current path will become the default path for save operations. Note: This box may be selected from either the PROPERTIES dialog box or from the SAVE DIRECTORY button on the SAVE dialog box. ═══ 6. Resizing the main panel ═══ In accordance with the recommended Common User Access (CUA) guidelines, the main control panel may be resized using the border of the window. The horizontal and vertical proportions of the buttons is always fixed such that the overall window proportions will display the buttons properly. When the width of the main panel is changed, the height is automatically adjusted to maintain the proper shape of the buttons. Note: Note. To resize the window, either the corners or the vertical sides of the window must be used. The horizontal sides of the window have no effect when used alone. ═══ 7. Drag and Drop ═══ PMsndX supports Drag and Drop of all sound files other than the RAW formats and performs a COPY operation when a file is dropped ont PMsndX. To use this capability the sound samples must be stored in a file. If an application attempts to transfer data without specifying a filename, PMsndX will request that the application RENDER the file before transferring it to PMsndX. To drag a sample to PMsndX, use the second mouse button (usually the right mouse button) to select the file. While holding the second mouse button down, move the mouse pointer over the PMsndX control panel and lift the mouse button. PMsndX will then attempt to load the file using the same rules as the Open dialog function uses. ═══ 8. Buttons ═══ The main control panel provides the user with access to all tools and functions through a set of buttons. Each button contains an icon and a single word which describes the function of the button. The buttons have been designed as toggle type push buttons. To select a particular button, the mouse must be positioned over the button and the first mouse button pressed. This will depress the button and activate a dialog for the desired function. The dialogs present information to the user about the desired operation and request input from the user to complete the operation. The control panel is the main point of control for both activating and deactivating a particular function. The dialog boxes can be removed from the screen by positioning the mouse over a depressed button and pressing the first mouse button. The dialog box will be removed and the button will return to the non-depressed position. It is important to note that when a dialog box is removed through this means, any information in the dialog is ignored and the function is canceled. For each dialog box, the user must enter all of the information required and then select the appropriate action on the push buttons at the bottom of the dialog box. The Open and Save Dialog boxes may also be removed once the file operation has been completed. This is the default operation but may be changed so that the dialogs are not automatically dismissed by deselecting the "AUTO Dismiss" box in the lower right corner of the dialog window. Now for the buttons. There are five buttons on the main control panel. These are listed below with a brief explanation of their function. Opens and reads a new sample file Saves the current sample to a file Plays the current sample to an audio device Edit using the Clipboard Displays a notebook of tools ═══ 8.1. Open ═══ The dialog box for opening a file and reading the sample into memory is accessed from the OPEN button on the main control panel. When reading in a file, PMsndX will attempt to open the file as the type indicated by the extension on the filename. However, in the event that the file cannot be loaded by the extension, PMsndX will automatically try to determine the type of the file as it reads it based on any header that may be present. If the sample header does not match any of the known header types, PMsndX will refuse to load the file. When loading a file, the user may select to force PMsndX to load a file in a specific format. This is required to load headerless formats (i.e. the formats marked as RAW). To override the file format, select one of the buttons in the Format box. Note: If a Format override is specified, the file must still match the given format if it contains a header. PMsndX will automatically recognize the header format and load it using the correct format. Once a file has been selected, either double click on the file name or press the Load button. During the time that the file is being loaded, the user may press the Abort button to stop the loading process. All data which may have previously been loaded will be discarded. The File Type pulldown box works in combination with the File EA pulldown box. To select all files of a particular type based on the name of the file (e.g. *.wav, *.au, *.iff, etc.) first select the name extension from the File Type pulldown list, and then select from the File EA pulldown list. By default, the OPEN dialog box is automatically dismissed when the file has been loaded. If an error occurs during the loading process, the dialog will not automatically dismiss itself. To disable this feature (i.e. force the dialog box to remain visible even after a file has been loaded) deselect the AUTO Dismiss checkbox in the lower right corner of the window. ═══ 8.2. Save ═══ The dialog box for saving a file to disk is accessed from the SAVE button on the main control panel. When saving a file, the extension of the file will automatically determine the type of output to write for the file (e.g. if the extension entered by the user is .wav, then the file will be saved in WAVE format.) or the user may override the file type by selecting one of the buttons for the type of file. When saving a file, the extension of the file normally determines the format to save the file in. The primary use of this feature will be to promote the use of standard file name extensions for the various sample types. However, the user may specify that the information is stored in a particular format regardless of the file extension. In the event that no extension is specified for the file, the PMsndX will automatically save the file under the specified name under the format currently selected in the FORMAT field. The available formats for file operations are listed below. If the file type of Undefined is selected, then the extension of the file will be used to determine the file type. APPLE (.aif) Apple 8/16 bit unsigned multi-channel samples SUN (.au) Sun/DEC/NeXT 8 or 16 bit single channel signed data samples or 8 bit ULaw samples. RIFF (.avi) OS/2 movie format (PMsndX extracts the Audio and discards the video information) MAC (.hcm) Apple Macintosh 8 bit single channel samples RAW (.ub) Raw 8 bit single channel unsigned samples without header information RAW (.sb) Raw 8 bit single channel signed samples without header information RAW (.uw) Raw 16 bit single channel unsigned samples without header information RAW (.sw) Raw 16 bit single channel signed samples without header information RAW (.ul) Raw 16 bit U-Law single channel samples IRACAM (.sf) Software produced 16 bit signed samples PC (.voc) Creative Voice file format, 8 bit single channel unsigned samples SAMP (.smp) Turtle beach samplevision files PC (.wav) Windows or OS/2 8 bit unsigned/16 bit signed multi-channel data samples The Save Directory checkbox allows the user to save the current save path between sessions without having to open the Properties dialog box. when this box is selected, if the OK button is selected, the specified directory path will be saved when the program has is terminated. If the SAVE DIRECTORY is deselected before the program is terminated, the path will not be saved. All file paths are remembered during each session and the SAVE DIRECTORY box allows the user to store this path between sessions. Note: The file path is not saved until the program has been terminated. By default, the SAVE dialog box is automatically dismissed when the file has been loaded. If an error occurs during the saving process, the dialog will not automatically dismiss itself. To disable this feature (i.e. force the dialog box to remain visible even after a file has been loaded) deselect the AUTO Dismiss checkbox in the lower right corner of the window. ═══ 8.3. AUDIO ═══ So, you are interested in playing or recording some samples using my little program? Good. The ability to play and record a sample is not intended to provide the full capabilities of the digital audio player. It is intended to allow samples to be played or recorded without having to save to disk. Additionally, this feature allows the user to play a file of any format currently supported by PMsndX. The sample rates are limited to those supported by the audio device and if a sample is loaded with an unsupported sample rate, sample size (bits per sample), or channels, a warning will be displayed and the sample cannot be played. To play such a sample, the sample must be converted to a supported size, rate, or channls before it can be played. Note: Whenever a sample is loaded and the AUDIO dialog is open, PMsndX will attempt to load the audio buffers with the sound data. If the sample cannot be played (the number of channels or the sampling rate is not supported by the audio adapter) a warning is displayed. PMsndX will not attempt to play a file that the audio adapter does not support. PMsndX records all data directly to memory rather than to disk. If recording at high data rates for significant periods, this may require a great deal of memory. As a result, when a new recording is started, the swap file may grow significantly to hold the memory allocated by PMsndX. If you don't have MMPM/2 installed with your OS/2, don't worry. PMsndX has been written to provide as much of its capabilities as it can with or without MMPM/2 installed. None of the tools, nor the editor require MMPM/2 to perform. However, the AUDIO button will be marked out if MMPM/2 is not installed because there will be no means to play the sounds. When the AUDIO button is pressed, a dialog box is opened which contains a set of standard controls for playing and recording sounds. The controls for the AUDIO player are basically the same as those used on the digital audio player provided with the MMPM/2 package for OS/2. Starts recording. Stops playback or recording. Pauses playback or recording. Starts or continues playback. Samples can be recorded from either the LINE or the Microphone input of an audio adapter supported by MMPM/2 (CD support may be added at a later date). Before data can be recorded, information must be entered to control the recording operation. The controls for the recording are input through the Record Options item on the system menu of the MMPM Audio dialog. ═══ 8.3.1. Playback Options ═══ The system menu for the AUDIO dialog contains a menu item for playback options. From this menu a dialog box can be brought to select options that control the playback of samples. This dialog is not application modal and can remain open as long as the AUDIO dialog is open. When the AUDIO dialog is closed, the PLAYBACK OPTIONS will be closed too. The PLAYBACK OPTIONS dialog provides a checkbox to allow a sample to be looped such that it will continuously repeat. When this checkbox is selected, the repeat function is enabled. Playback can be stopped by deselecting the repeat checkbox (in which case, the sample will complete playback before stopping) or by pressing the button. The PLAYBACK OPTIONS dialog also has the capability of playing a selected range and/or a selected channel. If the edit dialog is active, the range and channels for manipulation may be used to select the part of a sample to be played. When the Use Channel Selection box is selected, the channels selected in the editor will be played. This allows the user to extract and play individual channels. Similarly, when the Use Range Selection box is selected, the range specified in the editor will be played. Note: If the edit dialog window is not open, the full sample (including all channels) is automatically used. ═══ 8.3.2. Record Options ═══ This dialog box is used to set the recording parameters for the AUDIO tool of PMsndX. Changes made to this dialog are saved between sessions and it is not necessary to open this dialog except to modify the recording options. When the Record Options dialog is opened, PMsndX tests the audio adapter and only enables the features which are supported by the adapter. PMsndX records all audio directly to memory; consequently, the most important control for recording is the limit to the amount of memory in which the data is stored. The limit on the memory requirements for recording audio is displayed and changed in three different ways. The first is to specify the amount of time for recording, the second is to specify the number of samples, and the third is to specify the amount of memory. Changes to each of the entry fields automatically updates the other fields when the focus is changed. The limit is stored internally as the number of samples to be recorded. For this reason, changes to the rate, quality, and channels affects the time and memory requirements to record the sample. These options should be set before establishing the limits. Note: The memory limit field specifies the amount of raw memory required to hold the recorded data and is synonymous with the amount of data that would be stored in a .WAV file. This limit should not be confused with the internal memory requirements of PMsndX. After the recording has been made, the data will be converted to the internal format. By default, PMsndX will warn the user when the recorder is started while a sample is in memory. This safeguard can be disabled by selecting the Overwrite checkbox on the Record Options dialog. Note: The CD selection is disabled in this version. Reading an AUDIO CD is more complicated than the normal input ports. I have not figured out how to make the MCI_AMP_SET_MONITOR work on my SB16. Setting or clearing Monitor Input has no effect on my system. If it does something for you, then let me know. I know what it is suppose to do. ═══ 8.4. Edit ═══ The editor is designed to be compatible with the format of data pasted to the clipboard using the OS/2 Digital Audio Application to allow bi-directional use of the clipboard between the two applications. To describe the use of the editor each of the categories of controls will be described. Most are very obvious, but some (particularly the operation buttons) have rules of operation). The editor is the central point of control for selecting the range and channels for all operations. As a result, when an operation is being performed (as indicated by the mouse pointer displayed as a clock face) if the range is changed or the channel to manipulate is changed, a warning beep will be produced; however, the display will indicate that the selection has been made. For the editor, the change will be made, but the rest of the tools and AUDIO will not be updated until another selection is made causing changes to the channels or range. Additionally, attempts to perform operations (i.e. Cut, Paste, Copy, Remove, and Zero) will result in a audible warning and the function will not be performed. As with other tools, operations which take a significant amount of time to accomplish will provide an indicator for the percentage of the task completed. Operations which copy data to the clipboard or delete data from memory utilize the DMA memory transfers and are fast enough that the indicator is not used. Operations which copy data from the clipboard use the indicator because the operation is much more complicated. Please be aware that all clipboard operations are accessed from the main execution thread. This is required because the thread accessing the clipboard must have a message queue; consequently, during long editing processes such as pasting or merging with large samples, the message queue will stop receiving input and the desktop may appear to freeze. Once the process has been completed, normal message processing will continue. Note: The editor has been written without the use of the MMPM/2 libraries. Although MMPM/2 has all the functions necessary to perform the clipboard operations, they can only be used if MMPM/2 is installed. Since this program has been written to do its core work on any OS/2 system (with or without MMPM/2), everything is done manually. This provided a bit more control over the PASTE operation and it is still very quick. The editor has been written to provide a robust method of manipulating parts (or all) of a sample. The functions are broken down into groups (marked by a box around the group). Channel Displayed: The edit dialog box allows the user to view a single channel at a time through the graphical display. The channel to be displayed is selected using radio buttons which are enabled based on the number of channels in the current sample in memory. Area: When using the Copy, Cut, Zero, and Remove operations, the user selects the area of the sample to be affected by either selecting the entire sample or selecting a part of the sample. When the radio button for the "Entire Sample" is selected, the start and end will be set to the beginning and end of the sample respectively. To select a part, the user may either select the Select Part radio button or use the left or right buttons to select the start and end respectively for the interval of the operation. Selection: The user may specify a specific time for the begin or end of the interval for the desired operation by typing the time directly. The editor will automatically adjust the time down to the nearest actual sample. To activate the Selection entry fields, select the Select Part radio button in the Area field. Manipulate: This is probably the one field to draw the most confusion. This group of buttons allows the user to specify which channel to operate on. By default the editor will operate on all channels of a sample. However, the user may select a specific channel for the operation by pressing the "Selected Chan" radio button and then selecting the channel for the operation. Once the operation is performed, the Manipulate group will default back to All Channels. The editor is integrated into the PMsndX such that the Tools and the AUDIO dialogs utilize the information from the editor. Each tool indicates that it uses the range or channels selected in the editor through a checkbox in the lower left corner of the tool. The AUDIO dialog provides checkboxes to enable or disable the usage of the channel and range selection. Each of the groups provides the user with a means to select the parameters of the various operations. Each operation has a set of rules defining how they behave under the various conditions. These are defined in the following text. Rules for cut: 1. If the channel to operate on is "ALL", the copy all of the data over the specified interval and shift all data over to the left. 2. If the channel to operate on is specified, then copy the data over the specified interval for that single channel to the clipboard, and shift the data after the interval over to the left while clearing the end of the data for the specified channel. Rules for paste: The PASTE button is used the paste the contents of the clipboard into memory. If the SHIFT key is pressed while the Editor has the window focus, the text on the PASTE button will change to MERGE. When the MERGE button is pushed, the editor will merge the data from the clipboard with the data in memory. When the merge function is used the rules for PASTE apply except that the data is averaged equally instead of being inserted. The paste operation varies depending on the number of channels in the current sample and the number of samples in the data on the clipboard. After the paste operation, the start marker will be set at the beginning of the sample pasted from the clipboard and the end marker will be set to the end of the new data. 1. If there is no current data, then just copy the clipboard directly to memory. 2. If the number of pasted channels is the same as the current data, then past the data in based on the selected channel for manipulation. Note: When merging, the data is averaged based on the selected channel for manipulation. Any excess difference between the length of the two will be left unafffected. 3. If the number of pasted channels is 1, then just copy the data to the channel(s) selected for manipulation and insert blank space for the corresponding channels which are not being manipulated. If the number of channels for manipulation is "ALL" then duplicate the data for the single channel across all channels of the current data. Note: If the number of merged channels is 1, then average the data from the clipboard to the channel(s) selected for manipulation. If the length of the samples does not match the data will be averaged for the common length of the two and excess will not be modified. 4. If the number of pasted/merged channels is less than the current number of channels (but greater than 1), then a) if the channels selected for manipulation is set to "ALL" then copy the channels from the clipboard directly into the current sample and zero out the non-existent channels. Note: When merging, average the data from the clipboard directly into the current sample and leave the non-existent channels unaffected. b) copy the first channel from the pasted sample into the selected channel for manipulation. Note: When merging, average the first channel from the clipboard with the selected channel for manipulation. 5. If the pasted/merged sample has more channels than the current sample, then a) if the channels selected for manipulation is set to "ALL" then create the new channels in the existing data and set all non-existent channels in the existing data to zero. Note: When merging, average the existing channels and copy the clipboard data directly to the channels that did not exist in memory. b) copy the first channel from the pasted sample into the selected channel for manipulation. Note: When merging, the first channel is merged into the selected channel for manipulation. 6. If all of this fails, then just warn the user and give up. Rules for Copy Operation: 1. If the channel to operate on is ALL, copy all of the data over the specified interval to the to the clipboard. 2. If the channel to operate on is specified, then copy that single channel to the clipboard. Rules for Zero operation: Set the data over the specified interval to 0 for the channels specified. Rules for Remove operation: 1. If the channel to operate on is "ALL", then remove the data over the interval specified and shift all data to the left. 2. if the channel to operate on is specified, then remove the data for that channel over the interval and shift the end of that channel to the left while zeroing out the end of the channel. Rules for Clear operation: This operation clears all data from the clipboard. It has no effect on data currently in memory. UNDO: PMsndX utilizes a lot of memory to ensure that the current data in memory is not lost if an operation fails. Normally the original data is deleted from memory once an operation is completed to reduce the long term memory requirements of the program. However, If the Enable UNDO checkbox is selected from the properties display, PMsndX will store a single buffer for performing one level of UNDO. After any operation from the toolbox, any of the manipulations from the editor, or after loading a new file, if the UNDO option is enabled, the current data will be stored in a buffer. Pressing the UNDO button from the editor will swap the current memory with the buffer. Pressing UNDO again will swap them back. With this setup, the UNDO functions as a redo button. Note: The UNDO capability is only available in the registered version of PMsndX. ═══ 8.5. Tools ═══ Using a notebook to display the TOOLS has some unique presentation advantages. Primarily the notebook allows the effects to be displayed in a single dialog window. Since each effect is mutually exclusive of any other tool this approach displays the maximum information that the user can utilize at any time. Another approach would have been to develop a dialog box for each tool. This approach has the disadvantage that it would require a second control panel to select the specific tools. This would violate the approach of providing a single control panel for the user and would necessitate managing a number of different windows which could potentially clutter the screen. The notebook is a clean and aesthetically pleasing means for managing the tools. The heart of manipulating the samples is accessed from the TOOLS notebook. Some of the pages of the notebook provide information while others let the user apply a particular effect on the current sound sample. The TOOLS notebook can be dismissed by pressing the TOOLS button on the main control panel or by pulling down the system menu for the toolbox and selecting CLOSE. The notebook is divided into sections such that functions with similar operations are grouped together. The tabs on the right of the notebook access the section and the tabs at the bottom of the page are used to access the individual functions of the grouping. The tabs on the notebook provide access to the Info, Type, Average, Duplicate, Band Pass, Low Pass, Rate, Speed, Echo, Invert, Reverse, Vibro, Limit, Fade, and Balance functions for manipulating the samples. The notebook may be navigated by either selecting the tab on the right of the book for the desired function or by using the small Plus and Minus buttons at the bottom of the notebook. Using the Plus and Minus buttons will move through the notebook a single page at a time. To select the tabs using the keyboard, the focus for the notebook must be set for the notebook container (by clicking the mouse outside of one of the tools or by pressing the ALT key and the UP arrow). Selecting any character that is underlined will bring that page to the top of the display. The notebook can be displayed regardless of the presence of sample data in memory. When no sample is present, the pages of the notebook will be invalidated but can still be viewed. ═══ 8.5.1. Info ═══ The Info page displays all of the relevant information about the samples currently in memory. This includes the following categories: Load Format One of the formats which the program can save or open Data Type The default extension for this file format. Data Style SIGNED, UNSIGNED, ULAW, or ALAW Channels Number of channels in the sample Sampling Rate The number of samples taken each second Data Size BYTE (8 bits), WORD (16 bits), LONG (32 bits) Samples The number of samples that make up each channel Comments Some sample files may contain comments. Any comments found are displayed in this window Byte Order The natural order of the bytes in each sample. This field can display either Big Endian or Little Endian ═══ 8.5.2. Type ═══ The type of the file is determined by the header written to the beginning of the file. See Save for information how the file type is determined when a file is saved to disk. Additionally, the user may use the this tool to change the Load Format (displayed in the Info page of the tools notebook). When the file is saved, the default file format will automatically be set to whatever has been chosen on this page of the notebook. Changing the file name extension or selecting a file format in the SAVE dialog will override this setting. Each file format utilizes different headers for the actual data. By selecting one of the standard formats on this page the Info page will show the user how the samples will be saved. The fields that are most likely to change are the Load Format, Data Type, Data Style, and Data Size. ═══ 8.5.3. Average ═══ A sample with an even number of channels may be averaged to produce a sample with half the initial number of channels. For example, a sample with four channels can be averaged to produce a sample with two channels and a sample with two samples can be averaged to produce a sample with one channel. Channels may be averaged in three ways. The simplest is to take the left or right channel data as the final data. A more complex method is to average the samples of the left and right to produce a center sample. The results of these operations are significantly different and can result in very different output samples. When a sample contains four channels, it is composed of four sound sources at 45 degrees in each quadrant. This corresponds to the Front Left, Front Right, Rear Left, or Rear Right. To average these into two channels the user can select to use any of the four channels or to average based on the left or right. To select or average any combination of the channels into either of the output channels, check the box for the channels from the source sample. To aid in this, two radio buttons have been provided which enable or disable the selection of check boxes in the second channel depending on the number of output channels selected. ═══ 8.5.4. Dupe ═══ Channels can be duplicated such that a single channel sample can be made to have two channels which are identical or two channels can be duplicated to form four channels. When copying two channels to 4, PMsndX allows the user to specify which of the input channels will be placed on the output channels. In this way, a single channel of a dual channel sample can be copied to any of the four output channels. ═══ 8.5.5. Band Pass ═══ This tool provides the ability to apply a band-pass filter to a sample. The frequency response for the filter is designed to drop logarithmically around a center frequency. The slope of the drop at the desired start (Wp) and end (Ws) of the filter varies with the distance between the Wp and Ws. This width is used to determine the slope of the dropoff at the edges of the filter. The frequencies at Wp and Ws will be approximately half of their original amplitudes and all frequencies outside of the Center - Wp and the Center + Ws will be eliminated. The bandpass filter can be mode oriented to pitched signals (i.e. voice, singing, or instrumental music) or can be modified by adding noise to the filter so that un-pitched signals can be effectively processed. Note: To aid the user in locating the maximum effective center frequency, a light blue vertical bar is placed at half the sampling rate for the data. The transformation for the Bandpass filter was derived from a a program called MUSIC56K (as documented in the MUSIC56K source code) and implemented in C++ for this program. Operation of the bandpass filter tool is probably one of the most complex interfaces in the toolbox. It is based on a simple principle. The entire display of the filter represents the frequency response of the filter and is operated like a slider. However, since the Start frequency and the Stop frequency are independent, the sliding bar is divided into identical controls for each filter edge. Before getting into the operation of the controls the display needs to be explained to establish the terms that will be used. As mentioned, the display is designed to illustrate the frequency response of the bandpass filter (independent of any added noise). The center of the Start (Wp) and End (Ws) of the filter are marked by vertical BLUE bars. The Center (Wc) of the filter is marked by a vertical RED bar. These three markers provide the means for the user to modify the filter. The region to the left of the RED center frequency is always the start of the filter. The user may click the mouse to the left of Wp to decrease Wp by 1000 Hz. Clicking between Wp and Wc increases Wp by 1000 Hz. Likewise, clicking between Wc and Ws decreases Ws by 1000 Hz and clicking to the right of Ws increases Ws by 1000 Hz. The user may also click the mouse near Ws or Wp to drag the respective ends of the filter quickly. To provide fine control of the filter, Right and Left arrows are provided for both Wp and Ws. Clicking on either the right or left arrow will increase the indicated filter edge by 1 Hz. To increase or decrease the filter edges by 10 Hz, the user may select the plus or minus corresponding to the filter edges. The left set of controls affects Wp and the right set of controls affects Ws. As the mouse is used to adjust Wp and Ws, the exact frequencies for Wp, Ws, Wc, and the filter Width are updated in the text input fields. The user can use the mouse to select one of the input fields and modify it directly. To accept a value in the entry field and recalculated the dependent frequencies select another window or click on another item which moves the focus from the notebook. The rules for the fields are as follows: 1. If the Center frequency is modified, new values for Wp and Ws are immediately calculated using the current Width. If Wp or Ws are outside of the possible ranges, then Wp or Ws are set to the limit of the acceptable range and the Width and Center are recalculated. 2. If the Width of the filter is modified, new values for Wp and Ws are immediately calculated using the current Center frequency. If Wp or Ws are then outside of the acceptable ranges, Wp or Ws is then set to its limit and the Center and Width are recalculated. 3. If Wp is changed, the Width and Center are automatically recalculated to reflect the new start of the filter. 4. If Ws is changed, the Width and Center are automatically recalculated to reflect the new end of the filter. The bandpass filter has been selected because of the desirable effect on typical sounds that will be processed by PMsndX such as voice or music. However, if other types of noise are to be filtered, noise can be added to the filter which results in a sharper peak of the filter. To add this noise, select the checkbox for "Add filter noise". Selecting the checkbox again will disable the filter noise. Note: The display of the frequency response for the filter does not reflect added noise. ═══ 8.5.6. Low Pass ═══ A Low Pass filter can be applied to a sample to eliminate high frequencies. Filtering is accomplished in the digital domain through the use of a very simple second order digital Fourier transform. Future implementation may have a more complex Fourier transform; however, the chosen function is desirable because it provides a smooth dropoff without significant ringing. The performance of the filter is determined by the cutoff frequency and the rate of drop. If the dropoff is made too quickly, the filter will exhibit a ringing effect at the begin and end of the dropoff. If the dropoff is performed too slowly, the filter will suppress more frequencies toward the end of the desired range. The more orders of the filter (more stages), the better the frequency response; however, more orders increase the time for filtering significantly. A two order filter works adequately. When performing the digital convolution of the sample with the step function a Gain factor is used to normalize the output data. This acts as a Volume control for the sample to prevent losses due to numerical overflow. Values for the gain range from 0 to 1 in increments of 0.01. A slider bar is used to set the gain of the low pass filter. When the low pass filter is first brought up, the Gain will default to a value of 0.8. If this is changed, it will remain at the new setting until the session is terminated. The Frequency response of the low pass filter is determined by a the centerpoint of the dropoff at the end of the step function. When performing a digital filter, it is not possible to prevent the gradual drop at the end of the step function due to the convolution of the samples used in the transformation. This is true for analog components also. The centerpoint of the dropoff can be set in three ways. The user may enter the specific frequency in the text entry box in the lower right corner or may use the filter display like a sliding bar. As is typical of a sliding bar, the mouse may be used to capture the cutoff frequency by pressing the mouse button while the mouse is near the cutoff frequency. By holding the button down, the user may drag the frequency to the desired range. Additionally, the user may click to the right or the left of the frequency cutoff to increase or decrease the frequency by 1000 Hz. The right and left arrows in the corners of the display may be used to increase or decrease the frequency by 1 Hz. The plus and minus buttons in the corners of the display may be used to increase or decrease the frequency by 10 Hz. The frequency response curve illustrates the dropoff that occurs at the end of the step function. ═══ 8.5.7. Rate ═══ Once a sample has been loaded into memory, the current rate information is displayed on the RATE page of the notebook. The user can change the rate of the sample using this page of the tools notebook. Note: Changing the sampling rate may degrade the quality of the sound. The user may select from a set of standard sampling rates for common computer formats or may specify a specific rate. OS/2 and Windows use standard rates which are multiples of 11025 Hz. Sun, DEC, and NeXT computers commonly use a sampling rate of 8000 Hz. Standard rates of 8000, 11025, 22050, and 44100 Hz have been provided for the user to select. If the user wishes to use a sampling rate which is not one of these, the button for Non-Standard should be pressed. This will activate the slider bar and user input windows to allow the user to specify the rate. The slider bar can be used to quickly change the rate in the input window or the user may select the input window and type in the desired rate. ═══ 8.5.8. Speed ═══ This function will change the playback speed of a sample. This is the same thing as setting a phonograph to a different speed such that the sound is played too fast or too slow. The controls for this effect simply specify the new playback speed. Once a new speed is selected, the sample is resampled to interpolate the new playback points. As a result, a sample is still played at the same rate, but the data is modified to play at the new rate. This allows the sample to be stored in a file which is of a standard rate. The user may select any of the standard rates including 8000 Hz, 11025 Hz, 22050 Hz, and 44100 Hz. Additionally, the user may specify the playback speed to be either double (x2) or half (x1/2) or may specify a specify playback speed by selecting the User button. If a speed other than the current speed is specified, the DOIT button will be activated which will allow the user to perform the change. ═══ 8.5.9. Echo ═══ The echo effect will modify a sample to provide attenuation at specific points in a sample. The operator must specify the points where the echo effects are to start and an attenuation or Volume for the echo. The attenuation determines the length of time that it takes for the echo to die away. If the Attenuation specified for all of the echo points is greater than 1, then the echo will "melt" rather than fading away and consequently may take a long time to complete. If an attenuation is set to 0 or less, the Echo point is ignored. The echo effect presents an interesting challenge to the user interface. How do you provide the user with an intuitive method to set the echo locations and the strength of the echo from a dialog box? Well, look at the ECHO notebook page and follow along in the explanation of the operation. This notebook page includes a graphical display of the current sample, a text entry field for editing (e.g. adding or deleting) time marks, and a volume control for setting the strength of the echo. The ECHO notebook is centered around the graph at the top of the page. This display is the primary point of control. However, to allow for a bit more direct control, the user may use the entry fields to add and delete echo points too. To explain it all, I will start with the graphical display first and then lead to the secondary controls. Once a sample has been loaded into memory, the graphical display will become active. The display is controlled through two slider bars for the position in the sample and for the magnification. The sample is normalized so that the largest sample value will hit the limit of the display. This makes the display volume independent but gives maximum clarity of the actual waveform in memory. Markers may be added or moved to set the echo points in the waveform. To aid the operator in locating the desired echo point, the display contains a status bar for the starting timemark for the sample in the window, the current timemark under the mouse, and the magnification factor. To move to the right or left in the display, the horizontal slider bar may be used. Pressing the end arrows moves the display one displayed sample to the left or right. When the slider bar is pressed, the display will move one half screen to the right or left. The user may move the display to a region quickly by selecting the slider button and dragging it to the appropriate position. The display is immediately updated to display the current position. The display area at the bottom of the graph provides a timemark indicator for the first sample appearing at the left of the graph. This provides a reference for moving through the data. The time marker is displayed in the form of m:ss.ssss where m is the number of minutes into the sample and ss.ssss is the number of seconds into the sample. Even the smallest sample contains more data than can fit on the graphical display. For this reason the vertical slider to the right of the graphical display is used to adjust the viewing magnification of the samples. The maximum magnification of the samples is determined by the length of the sample and is calculated by dividing the total sample length by the largest number of data points which may be scrolled through on the display. The display is limited to the maximum size of an signed 16 bit value due to the limitations of the signals for the horizontal slider bar. This results in a maximum of 32767 data points which can be displayed and scrolled through. Initially, the magnification is set for the maximum displayable. To decrease the magnification ( i.e. zoom out) on the sample, move the slider down the bar. The arrows on the ends of the bar can be used to increase or decrease the magnification in increments of 1. Selecting between the button and the arrows doubles or halves the magnification. If the button is selected, the magnification can be set immediately to a value. Markers are displayed for the nearest point in the zoom. However, markers can only be set on exact multiples of the zoom. Therefore, when trying to move a marker, if it is set at a different magnification, it may not be possible to move the marker without returning to that zoom. Essentially, the marker is displayed but cannot be selected because that exact sample point is not visible. I considered making the mouse select the nearest marker, but this is a point of confusion if many markers are displayed at the same location for a specific magnification. The current magnification is displayed in the status area of the display in the form of "x1/nnnnn" where "nnnnn" is replaced by the current magnification number (i.e. number of points represented by a single point on the display). If the display says that the zoom is x1/2, then the magnification of the display is halved. If this sounds confusing, then just play with the notebook page for a bit to get a feel for the operation of the zoom. Before going on, another area of the display needs to be described. The center number on the status area of the display indicates the timemark for the current (or last) mouse position. Whenever the mouse is moved into the display area, this number will be updated to indicate the time offset for that particular point. This takes into account the magnification. Now for the fun part. To add an echo point to the sample, move the mouse to the place where you desire the echo. The status display will provide a reference for the timemark. When the proper position has been selected, click the mouse and a blue marker will be placed. If the mouse is released, the marker will be set at that location in the sample. If the mouse is not released, the marker may be dragged across the display. This marker may be moved later if necessary by other means too. Note: If at any time the mouse pointer is moved outside of the display before the mouse button is released, the marker will not be set and the blue mark will be erased from the display. A echo marker may be moved by positioning the mouse pointer over the marker and pressing the mouse button. If the marker is on a multiple of the zoom level, it will be selected and will follow the mouse as long as the button is pressed. When the button is released, the marker will be placed at that position. A marker may be moved to another time delay by entering the desired delay directly through the Time Mark entry field. Note: If the mouse is moved off the display area, the marker will be restored to its original position. For each marker displayed, the timemark is stored in a Combo Box. This box is like an entry field in that the user can edit the time directly; however, it also has a drop down box that can scroll vertically through all of the different markers. This type of box provides a great deal of flexibility for the user. To add a marker at a specific time, position the cursor in the Timemark box and edit the time index. The format is the same as that used to display the time marks in the main display. Enter the number of minutes followed by the seconds. The granularity of the seconds is on the order of 1/10000 of a second. For example, entering 6:54.4253 would accept a time mark at 6 minutes, 54.4253 seconds. If a value is entered with is beyond the maximum sample of the file or less than 0, then the data is ignored. Once the desired time mark has been entered, the user may press the Add button to place the marker in the current database. All timemarks added to the display use the volume specified for the last timemark, or 0 if no volume has been set yet. When the listbox is pulled down for the timemarks, each of the timemarks that have been entered are displayed in a vertically and horizontally scrollable window. Up to 32 markers may be placed in the file and any markers which are unused are displayed with the word "EMPTY". The markers are placed in the database in the order that they are entered unless a free slot is open (from being deleted). The user may select any of the time marks using the combo box. If the selected timemark is not empty, the display will be updated to display the selected timemark in the center of the graph. In the event that the timemark is too close to the end or beginning of the sample to display in the center of the graph, the timemark will be displayed without being centered. Once a timemark has been selected, the Del button may be pressed to delete the marker from the database. The entry field is not cleared in order to allow the user to directly edit the timemark which was deleted and add it later. The volume for each timemark may be set by specifying a value in the volume entry field. This is a simple entry field in which the user can type or delete numbers. Since the volume (attenuation) for each timemark may range from 0 to infinity, the only method for entering the volume is through the keyboard. Sorry, no sliders here. As each character is typed, it is stored. The user does not have to press enter or any key to accept the value. I have not found a big use for numbers greater than 1, but I could not find any reason to limit the user to a specific range of numbers. Anyone who has experience with this effect and knows of a reason for a limitation should contact the author and I will be happy to set up something to make entry of the Volume easier. Note: The most common mistake for the echo effect is in forgetting to enter a value in the Volume field. Remember that you must provide an attenuation for the echo in the Volume entry field to make the echo point valid. ═══ 8.5.10. Invert ═══ A sample is composed of numbers which are digital snapshots of an analog wave at regular intervals. These numbers can take on positive and negative values which push or release the cone of a speaker to produce sound. The range and channels for this function are selected through the editor. Any series of samples may be inverted such that all positive values become negative and all negative values become positive. To the human ear, there is no difference in the sound produced; however, mathematically, the new wave is very different. An inverted wave may be added to a normal wave to mathematically subtract one from another. When this function is combined with the MERGE function of the editor, samples can be added together to eliminate common frequencies. ═══ 8.5.11. Reverse ═══ This effect allows the user to reverse a section (or all) of a sample. The range and channels for this function are selected through the editor. ═══ 8.5.12. Vibro ═══ This function performs the "world-famous" Fender Vibro-Champ sound effect to a sound sample by using a sine wave as the amplitude of the volume at each sample. This tool requires that the user set the Speed and the Depth of the sine wave. The speed setting gives the frequency of the sine wave in Hertz. The range of values for the slider are from 1 to 30 in increments of 1 Hertz. A value of 0 would be useless for a frequency and is not allowed. The depth setting gives the amount by which the volume will be cut into by the sine wave. The range of values for the slider are from 0.0 to 1.0 in increments of 0.01. The initial value of the slider is 0.5. ═══ 8.5.13. Fade ═══ This effect allows the user to either fade in or fade out the volume of a sample. Fading the data in a sample is produced by increasing or decreasing the volume of the sample over a period. To fade a sample in is to slowly increase the volume of the sample from 0 to the normal volume of the sample over a block of time. To fade the sound out is just the opposite in which the volume of the sample is slowly reduced over a period. The FADE tool provides three methods for fading which provide a robust means for controlling the volume of the data over the specified range of operation. These are Linear, Slow Geometric, and Fast Geometric. ═══ 8.5.14. Limit ═══ Most anyone who has received a sound sample from different sources has had the problem that the recorded volume is inconsistent between different samples. After all, there is no standard recording level for the different machines or different software. To allow the user to adjust the volume of a sample, PMsndX provides a tool which can either adjust the volume by multiplying every sample by a fixed amount or by multiplying the samples by a value based on the limit of the data that can held in memory. By specifying a maximum value for the sound sample, all sound samples can be set to have a similar maximum. The obvious use for this function is to allow a library of sounds to be set at the same volume. The value used for the maximum volume is based on a percentage of the maximum data that can be held in a single sample. As an example, a value of 100% for the volume represents a value of 127 for a signed byte sample. When the button for the Maximum is selected, the slider bar directly beneath the button is activated. Initially, this will be set to the current volume in terms of the percentage of the maximum value for the sample. The volume may be adjusted by setting the slider to a value between 0 and 100 percent of the maximum. Since the value is based on a percentage of the maximum value of the data that can be stored in a sample, clipping is not possible. When the button for the Fixed value is selected, the slider bar directly beneath the button is activated as well as the checkbox for clipping. The fixed bar provides the means to multiply all sound samples by a fixed value between 0 and 2 in increments of 0.1. A value of 1 makes no change. Any value greater than 1 increases the volume and any value less than 1 decreases the volume. A value of 2 doubles the volume of the sample. When using fixed sampling it is possible to exceed the maximum data that may be stored for a sample. The Allow Clipping checkbox may be selected to allow the data to be clipped. If the checkbox is not set and if the fixed multiple will result in clipping, then the multiple will be set to the maximum value that will not result in clipping. If the clipping box is set, data may exceed the maximum that may be stored for the sample which will result in noise. ═══ 8.5.15. Balance ═══ When a sample has more than one channel, the volume of the individual channels can be varied. The balance of the channels can be achieved either instantaneously or over a period of time. These are the same basic functions as used in the FADE and SWAP effects and are Linear, Slow Geometric, and Fast Geometric, and Step. The volume of a sample may vary by either starting at the specified percentage of the current volume for each channel and progressively approaching full volume. This is similar to fading in a sample and is achieved by selecting the "IN" button. The opposite effect is achieved when the volume starts at the current volume and progressively decreases to a percentage of the current volume. When balancing a sample, the user must specify a percentage for each channel. When fading in, this is the percentage that the volume will start at for each respective channel. When fading out, this is the final percentage of the original volume. The display at the top of this dialog varies depending on the number of channels in the current sample. ═══ 9. Command Scripts ═══ PMsndX integrates the features of REXX to provide a powerful command scripting capability. PMsndX provides the necessary extensions to REXX to provide full access to all of the features normally provided through the dialogs of the user interface. Any REXX command script can be run through any of the means for opening a file such as using the OPEN dialog box or through a DRAG/DROP operation. As with all REXX command scripts, the first line of the file must be a comment of the form /* ... */. PMsndX will automatically recognize a command script using the extension of .CMD or the OPEN dialog allows any file to be recognized as a command script by providing an override in the Format group of the OPEN dialog. As with any REXX script, the SAY command may be used to write to standard output (stdout); and, the PULL command may be used to retrieve information from standard input (stdin). When input is requested from the REXX window, the desktop focus will automatically be directed to the REXX window and it will be brought to the foreground. Note: Do not use CHARIN to retrieve input from the keyboard. The syntax of the language is divided up into groups associated with the buttons on the main control panel. Additionally, a few other controls are provided to enhance a script capability for enhancing the user interface. When a REXX command script is run, a REXX OUTPUT window is opened to display any outputs from the script. All standard outputs (e.g. output from SAY commands or commands echoed) are displayed in black. Outputs from PMsndX commands is written in blue, and any errors are written in red. A REXX script can be stopped at any time by closing the REXX OUTPUT window. If no errors occur while executing the REXX command script, the REXX OUTPUT window will automatically be dismissed. If errors occur, the window will remain open until the user closes it. Only one REXX OUTPUT window can be open at any one time so the window must be closed before another REXX script can be run. Note: As with REXX scripts, all commands can be entered in any combination of lower and upper case. For example, the following commands are equivalent: "file open tmp.au", "FILE open TMP.AU", "FiLe OpEn TmP.Au". ═══ 9.1. Syntax Conventions ═══ The extensions provided by PMsndX have been designed to utilize a consistent format. The extensions are divided into three groups: commands, functions, and arguments. REXX commands are those extensions provided by PMsndX which allow the REXX script to control execution of PMsndX. The command extensions use the arguments to modify the actions. REXX functions are those extensions provided by PMsndX which require that PMsndX return some value to the calling REXX script. The function extensions use the arguments to specify the information that is to be returned. REXX arguments are the keywords and parameters which are added to commands and functions to provide information about the specific task to be performed. All arguments follow a repetitive format which utilizes keywords and associated parameters. ═══ 9.1.1. Command Syntax ═══ REXX commands are indicated by a name, followed by keyword and parameter combinations separtated by spaces. Commands do not return data to the calling REXX scrip. Following is the general syntax of a command: COMMAND keyword Parameter ... [keyword Parameter ...] ═══ 9.1.2. Function Syntax ═══ REXX functions are composed of a name followed by keyword and parameter combinations separated by commas and enclosed in parenthesis. Functions are used to return data to the calling REXX script and so always appear on the right side of an = character. The general syntax of a function is: X=FUNCTION(keyword, Parameter, [,keyword, Parameter,...]) ═══ 9.1.3. Argument Syntax ═══ The Arguments used in PMsndX should be in order of a keyword followed immediately by a parameter (if one is necessary). All required keyword/parameter combinations must appear first, followed by any optional keyword/parameter combinations. To convey the syntax of the REXX extensions, the individual components are color keyed to indicate their use. The following legend should be referred to when reading the actual command and function syntax: COMMAND or FUNCTION: The name of the command or function is always first and is required. keyword: Special keywords are used to indicate that a parameter is being specified for a command. The keywords of a command may be entered in any order but must be followed by their corresponding parameter. Parameters: Portions of a command which are used as variable parameters can take on different formats and must be entered after the corresponding keyword. [...]: Parameters which are optional will appear between brackets ([]). Anything between the brackets is not required for the command but may be added to modify the operation. When numeric values are required, the format will be indicated as follows: 'mm:ss.hhhh' indicates that a time is to be entered. The format indicates that the time is to be given in minutes followed by a colon (:), the number of seconds followed by a period (.) and the fractions of seconds. For example, '10:58.0001' indicates 10 minutes, 58 seconds, and 1 ten-thousandth of a second. Note that the time must be enclosed between single quotes. #.# indicates that a decimal number is to be entered. The range for the number is provided in braces immediately following. For example, #.#{0.0-1.0} indicates that a number between 0.0 and 1.0 inclusive is requred. #{range} indicates that a numeric value is required and the range is specified in the braces. For example, #{1-8192} indicates that a numeric value between 1 and 8192 inclusive is required. 'text' indicates that a text string is required. The text must be enclosed in single quotes and must appear as the last parameter in the line. All data after the keyword TEXT will be treated as the text for the operation. {item1,item2,...} is used to indicate that a finite set of values are required. Note: The parameter YES is equivalent to setting a checkbox. The parameter NO is equivalent to clearing a checkbox. Descriptions: With each command group is a short description of the operation of the commands in that group. Additionally, every command may also have special information which is unique to the command or pertinent to the usage of the command. ═══ 9.2. File Operations ═══ All of the features of the OPEN and SAVE dialog boxes are available through the FILE operations. In addition to the standard items in the dialog box, the capability to set the default OPEN and SAVE paths is provided to simplify batch operations. The FILE operations are provided through functions and return the fully qualified path to the file or path provided to the command. There are two reasons that the FILE commands are implemented as functions instead of subcommands. The first is that the REXX script may provide a partially qualified filename and PMsndX will return a fully qualified name if it is valid. Additionally, the parameters of a subcommand are separated by spaces or other special parameters which PMsndX does not receive even if the parameters are in quotations. By using the function interface to REXX, PMsndX receives the necessary delimiters to allow filenames to contain special characters and spaces. x=FILE(OPENPATH, PATH) Filenames can be specified in any form (i.e. they may contain a drive letter, a file path, and the actual filename). However, to make batch operations simpler, the path and drive may be specified using this command and any filenames without paths or drives will use the OPENPATH to locate the file. By default, the current working directory will be used as the OPENPATH. x=FILE(SAVEPATH, PATH) When saving a file, a default path can be saved similar to the OPENPATH command. All save operations in which the drive and path are not specified will use the specified path. By default, the current working directory will be used as the SAVEPATH. x=FILE(OPEN, filename, [FORMAT, {AU, AIF, AVI, HCM, SF, VOC, SMP, WAV, IFF}]) x=FILE(OPEN, filename, [FORMAT, {UB, SB, UL}, RATE, #{1-65535}, CHANNELS, {1,2,4}]) x=FILE(OPEN, filename, [FORMAT, {UW, SW}, RATE, #{1-65535}, CHANNELS, {1,2,4}, ENDIAN, {BIG, LITTLE}]) Filenames must contain the name of a valid file and may optionally include a drive letter and a specific path. If the path and drive letter are not specified, PMsndX will use the current working directory or the path specified in the OPENPATH command. x=FILE(SAVE, filename, [FORMAT, {AU, AIF, HCM, SF, VOC, SMP, WAV, IFF, UB, SB, UL}]) x=FILE(SAVE, filename, [FORMAT, {UW, SW}, ENDIAN, {BIG, LITTLE}]) Filenames must contain the name of a valid file and may optionally include a drive letter and a specific path. If the path and drive letter are not specified, PMsndX will use the current working directory or the path specified in the SAVEPATH command. ═══ 9.3. Audio Operations ═══ All operations available through the AUDIO dialog are accessible through the AUDIO Operations group. When ever an AUDIO command is encountered, the AUDIO dialog is opened if it is not already open. In the event that the AUDIO file cannot be played, the REXX will hang. To continue the REXX script without playing the file, close the audio box. AUDIO VOLUME #{0-100} AUDIO PLAY {ASYNC, SYNC} The ASYNC option causes the sound to start playing and lets the REXX script continue. The SYNC option causes the REXX script to pause while waiting for the playback to complete. AUDIO RECORD {ASYNC, SYNC} TIME 'mm:ss.hhhh' INPUT {MIC, LINE} QUALITY {8, 16} CHANNELS {1, 2} RATE #{1-65535} [OVERWRITE {YES, NO}] [MONITOR {YES, NO}] AUDIO RECORD {ASYNC, SYNC} COUNT #{1-} INPUT {MIC, LINE} QUALITY {8, 16} CHANNELS {1, 2} RATE #{1-65535} [OVERWRITE {YES, NO}] [MONITOR {YES, NO}] AUDIO RECORD {ASYNC, SYNC} MEMORY #{1-} INPUT {MIC, LINE} QUALITY {8, 16} CHANNELS {1, 2} RATE #{1-65535} [OVERWRITE {YES, NO}] [MONITOR {YES, NO}] ═══ 9.3.1. Audio Playback Options ═══ AUDIO REPEAT {YES, NO} AUDIO CHANNEL_SELECTION {YES, NO} AUDIO RANGE_SELECTION {YES, NO} ═══ 9.4. Properties Operations ═══ PROPERTIES FOOTNOTES {YES, NO} PROPERTIES SAVE_POSITIONS {YES, NO} PROPERTIES SAVE_OPENPATH {YES, NO} PROPERTIES SAVE_SAVEPATH {YES, NO} PROPERTIES MEMORY AUTO PROPERTIES MEMORY #{1-8192} PROPERTIES ENABLE_MMPM {YES, NO} PROPERTIES SHARE_AUDIO {YES, NO} PROPERTIES PLAY_FROM_COMMANDLINE {YES, NO} PROPERTIES PLAY_ON_LOAD {YES, NO} PROPERTIES EXIT_AFTER_COMMANDLINE_PLAY {YES, NO} PROPERTIES PLAY_16ON8 {YES, NO} PROPERTIES DEVICE devicename PROPERTIES UNDO {YES, NO} PROPERTIES IGNORE_HEADER_STYLE {YES, NO} PROPERTIES REQUIRE_AU_HEADER {YES, NO} PROPERTIES FORCE_ULAW {YES, NO, MAYBE} PROPERTIES REXX_DISPLAY_HISTORY #{64-32767} PROPERTIES INI_PATH path ═══ 9.5. Edit Operations ═══ EDIT MANIPULATE {ALL, 1, 2, 3, 4} EDIT AREA ENTIRE_SAMPLE EDIT AREA PART START 'mm:ss.hhhh' END 'mm:ss.hhhh' EDIT OPERATION {COPY, CUT, PASTE, ZERO, REMOVE, CLEAR, MERGE} EDIT UNDO ═══ 9.6. Effects Operations ═══ TOOLS FORMAT {AU, AIF, HCM, SF, VOC, SMP, WAV, IFF, UB, SB, UL, UW, SW} TOOLS AVERAGE 2_TO_1 FROM {LEFT, CENTER, RIGHT} TOOLS AVERAGE 4_TO_1 FROM {FL, FR, RL, RR} [FROM {FL, FR, RL, RR}...] TOOLS AVERAGE 4_TO_2 FROM {FL, FR, RL, RR} TO {L, R} [FROM {FL, FR, RL, RR} TO {L, R}...] TOOLS DUPE {1_TO_2, 1_TO_4} TOOLS DUPE 2_TO_4 FROM {L, R} TO {FL, FR, RL, RR} [FROM {L, R} TO {FL, FR, RL, RR}...] TOOLS RATE #{1-65535} TOOLS SPEED #{1-65535} TOOLS SPEED {X2, X1/2} ═══ 9.6.1. Filter Effects Operations ═══ TOOLS FILTER BANDPASS START #{1-65535} CUTOFF #{1-65535} [ADD_NOISE {YES, NO}] TOOLS FILTER BANDPASS CENTER #{1-65535} WIDTH #{1-65535} [ADD_NOISE {YES, NO}] TOOLS FILTER LOWPASS CENTER #{1-65535} GAIN #.#{0.0-1.0} ═══ 9.6.2. Special Effects Operations ═══ TOOLS EFFECT ECHO MARK 'mm:ss.hhhh' VOLUME #.#{0.0-1.0} [MARK 'mm:ss.hhhh' VOLUME #.#{0.0-1.0} ...] TOOLS EFFECT INVERT TOOLS EFFECT REVERSE TOOLS EFFECT VIBRO SPEED #{0-30} DEPTH #.#{0.0-1.0} TOOLS EFFECT FADE DIRECTION {IN, OUT} METHOD {LINEAR, SLOW, FAST} TOOLS EFFECT LIMIT MAX #{0-100} TOOLS EFFECT LIMIT MULTIPLE #.#{0.0-2.0} TOOLS EFFECT BALANCE2 L #{0-100} R #{0-100} DIRECTION {IN, OUT} METHOD {LINEAR, SLOW, FAST, STEP} TOOLS EFFECT BALANCE4 FL #{0-100} FR #{0-100} RL #{0-100} RR #{0-100} DIRECTION {IN, OUT} METHOD {LINEAR, SLOW, FAST, STEP} ═══ 9.7. User Operations ═══ PMsndX also provides a dialog method of user input through standard OS/2 MESSAGE dialog boxes. A message dialog provides the user with a means to present text with a dialog containing a icon and standard buttons along with standard OS/2 system sounds to catch the attention of the user. Since a value is returned from the MESSAGE, it must be formatted as a function. x=MESSAGE(ASK, {OK, OKCANCEL, CANCEL, ENTER, ENTERCANCEL, RETRYCANCEL, ABORTRETRYIGNORE, YESNO, YESNOCANCEL}, ICON, {NOICON, ICONHAND, QUESTION, EXCLAMATION, ASTERISK, INFORMATION, QUERY, WARNING, ERROR}, [MODE, {APPLICATION, SYSTEM},] [MOVEABLE, {YES, NO},] TEXT, 'text', TITLE, 'text') The ASK parameter determines the possible return values. The data returned is a string representing the button pressed by the user. The possible return values are: ┌────────────────┬────────┐ │Type │Return │ │ │ │ │OK │OK │ │ │ │ │ │ERROR │ │ │ │ │OKCANCEL │OK │ │ │ │ │ │CANCEL │ │ │ │ │ │ERROR │ │ │ │ │CANCEL │CANCEL │ │ │ │ │ │ERROR │ │ │ │ │ENTER │ENTER │ │ │ │ │ │ERROR │ │ │ │ │ENTERCANCEL │ENTER │ │ │ │ │ │CANCEL │ │ │ │ │ │ERROR │ │ │ │ │RETRYCANCEL │RETRY │ │ │ │ │ │CANCEL │ │ │ │ │ │ERROR │ │ │ │ │ABORTRETRYIGNORE│ABORT │ │ │ │ │ │RETRY │ │ │ │ │ │IGNORE │ │ │ │ │ │ERROR │ │ │ │ │YESNO │YES │ │ │ │ │ │NO │ │ │ │ │ │ERROR │ │ │ │ │YESNOCANCEL │YES │ │ │ │ │ │NO │ │ │ │ │ │CANCEL │ │ │ │ │ │ERROR │ └────────────────┴────────┘ The following ICONs and the associated sounds for the dialog (from the System Events in the MMPM Sound setup): NOICON - () - NONE ICONHAND - () - Error sound QUESTION - () - Information sound EXCLAMATION - () - Warning sound ASTERISK - () - NONE INFORMATION - () - NONE QUERY - () - Information sound WARNING - () - Warning sound ERROR - () - Error sound The MODE specifies how the window is displayed with relation to other windows on the system. If no MODE keyword is specified or APPLICATION is specified, then the dialog window will can be covered by other windows from the desktop. If SYSTEM is specified, then the dialog box will prevent other windows on the desktop from covering it. The MOVEABLE keyword is used to determine if a titlebar is provided on the message dialog box. If the MOVEABLE keyword is not specified or if it is specified as NO, then there will be no titlebar on the message dialog and it cannot be moved around the screen. Specifying YES allows the user to move the message dialog box around the screen. ═══ 9.8. Miscellaneous Operations ═══ PMSNDX EXIT The EXIT keyword sends a message to PMsndX to exit. This is the same as clicking CLOSE on the system menu of the control panel. PMSNDX UPDATEWINDOWS The UPDATEWINDOWS keyword forces PMsndX to update all windows that are currently displayed. During the processing of a REXX script, most windows are not updated when they are open. Of course there are exceptions to this such as the EDITOR and the AUDIO dialogs in which updates are required to allow the user to maintain control over the current operation. PMSNDX CLOSE {YES,NO} If no errors occur during the execution of a REXX script, the REXX output window will automatically close itself. However, by specifying the CLOSE keyword and the parameter YES, the window can be forced to remain open. In the event that an error occurs in the REXX script, this command has no effect. PMSNDX IGNORE_SYNTAX_ERRORS {YES,NO} When writing REXX scripts for PMsndX, it may be desirable to pass the REXX through the interpreter to check the syntax of the commands without having PMsndX stop at each error. When this option is turned on, PMsndX will still display the errors in RED, but will not stop after the error. PMSNDX OUTPUT {YES,NO} By default, PMsndX displays each PMsndX command or function as it is executed. This output can be turned off with this command by specifying NO PMSNDX TEST_MODE {YES,NO} By setting PMsndX into REXX TEST_MODE, REXX scripts will be processed as usual except that the commands will not actually be executed. This option is primarily used during the testing of the REXX syntax parser during the development of PMsndX, and has been provided to allow scripts to be tested syntatically before using them. return 'text' ═══ 9.9. Query/Test Operations ═══ The functions which make up the QUERY group return values which are identical to the parameters expected by the indicated command. To determine the range of values that may be returned, see the corresponding command and keyword combinations. X=QUERY(FILE, OPENPATH) X=QUERY(FILE, SAVEPATH) X=QUERY(FILE, FILENAME) X=QUERY(INFO, FORMAT) X=QUERY(INFO, DATASTYLE) X=QUERY(INFO, CHANNELS) X=QUERY(INFO, RATE) X=QUERY(INFO, DATASIZE) X=QUERY(INFO, SAMPLES) X=QUERY(INFO, TIME) X=QUERY(INFO, MEMORY) X=QUERY(INFO, COMMENT) X=QUERY(INFO, BYTEORDER) X=QUERY(AUDIO, VOLUME) X=QUERY(AUDIO, REPEAT) X=QUERY(AUDIO, CHANNEL_SELECTION) X=QUERY(AUDIO, RANGE_SELECTION) X=QUERY(AUDIO, TIME) X=QUERY(AUDIO, COUNT) X=QUERY(AUDIO, MEMORY) X=QUERY(AUDIO, INPUT) X=QUERY(AUDIO, QUALITY) X=QUERY(AUDIO, CHANNELS) X=QUERY(AUDIO, RATE) X=QUERY(AUDIO, OVERWRITE) X=QUERY(AUDIO, MONITOR) X=QUERY(PROPERTIES, FOOTNOTES) X=QUERY(PROPERTIES, SAVE_POSITIONS) X=QUERY(PROPERTIES, SAVE_OPENPATH) X=QUERY(PROPERTIES, SAVE_SAVEPATH) X=QUERY(PROPERTIES, MEMORY) X=QUERY(PROPERTIES, ENABLE_MMPM) X=QUERY(PROPERTIES, SHARE_AUDIO) X=QUERY(PROPERTIES, PLAY_ON_LOAD) X=QUERY(PROPERTIES, EXIT_AFTER_COMMANDLINE_PLAY) X=QUERY(PROPERTIES, PLAY_16ON8) X=QUERY(PROPERTIES, DEVICE) X=QUERY(PROPERTIES, UNDO) X=QUERY(PROPERTIES, IGNORE_HEADER_STYLE) X=QUERY(PROPERTIES, REQUIRE_AU_HEADER) X=QUERY(PROPERTIES, FORCE_ULAW) X=QUERY(PROPERTIES, REXX_DISPLAY_HISTORY) X=QUERY(PROPERTIES, INI_PATH) x=QUERY(PMSNDX, VERSION) Returns the current version number. x=QUERY(PMSNDX, REGISTERED) Returns {YES,NO} to indicate whether PMsndX has been registered. x=QUERY(PMSNDX, ERROR_OCCURRED) Returns {YES,NO} indicating whether an error has occurred. If this is set to YES then the REXX output window will not close when the REXX script has completed execution. x=QUERY(PMSNDX, CLOSE) Returns {YES,NO} indicating whether the REXX script has told PMsndX not to close the REXX output window when the script completes. x=QUERY(PMSNDX, IGNORE_SYNTAX_ERRORS) Returns {YES,NO} indicating whether the PMsndX has been told to ignore errors. x=QUERY(PMSNDX, OUTPUT) Returns {YES,NO} indicating whether the PMsndX commands are echoed in the REXX output window. x=QUERY(PMSNDX, TEST_MODE) Returns {YES,NO} indicating that the PMsndX is in TEST_MODE. ═══ 9.10. Animation Operations ═══ During the processing of a REXX script, the various dialogs may be automatically opened and the user may wish to "clean up" the screen before completing the rexx script. A set of controls is provided to allow for user controlled animation of the desktop. DISPLAY EDITOR {YES, NO} [CHANNEL {1, 2, 3, 4}] If the optional CHANNEL keyword is specified, the editor will display the selected channel when it is opened. If the editor is already displayed, the channel displayed will change to that specified. If the new channel to display is larger than the number of channels in the sample, the displayed channel will remain unchanged. DISPLAY TOOLS {YES, NO} DISPLAY TOOLPAGE {INFO, FORMAT, CHANNELS, AVERAGE, DUPE, FILTER, BANDPASS, LOWPASS, SAMPLE, RATE, SPEED, EFFECT, ECHO, INVERT, REVERSE, VIBRO, VOLUME, FADE, LIMIT, BALANCE} DISPLAY OPEN {YES, NO} DISPLAY SAVE {YES, NO} DISPLAY PROPERTIES {YES, NO} DISPLAY PROPPAGE {AUDIO, MEMORY, MISC, REXX, STARTUP} DISPLAY AUDIO {YES, NO} ═══ 9.11. REXX return values ═══ Both FUNCTIONS and COMMANDS return error codes in the event that an error occurs when processing the commands. The error codes are composed of two 8 bit numbers logically ORed together. The upper 8 bits of the return code indicates the command command group which caused the error. The following table lists the possible values. ┌────────────────────┬────────────┐ │Group │Value │ │ │ │ │Unknown │0x00000100 │ │ │ │ │FILE │0x00000200 │ │ │ │ │AUDIO │0x00000300 │ │ │ │ │PROPERTIES │0x00000400 │ │ │ │ │EDIT │0x00000500 │ │ │ │ │TOOLS │0x00000600 │ │ │ │ │MESSAGE │0x00000700 │ │ │ │ │PMSNDX │0x00000800 │ │ │ │ │QUERY │0x00000900 │ │ │ │ │DISPLAY │0x00000a00 │ └────────────────────┴────────────┘ The lower 8 bits of the result indicate the reason for the error. The possible values are listed in the following table. ┌────────────────────┬────────────┐ │Error │Value │ │ │ │ │NOT IMPLEMENTED │0x00000001 │ │ │ │ │BAD VALUE │0x00000002 │ │ │ │ │UNKNOWN PARAMETER │0x00000003 │ │ │ │ │UNKNOWN KEYWORD │0x00000004 │ │ │ │ │UNKNOWN COMMAND │0x00000005 │ │ │ │ │UNKNOWN FUNCTION │0x00000006 │ │ │ │ │MISSING PARAMETER │0x00000007 │ │ │ │ │MISSING KEYWORD │0x00000008 │ │ │ │ │MISSING COMMAND │0X00000009 │ │ │ │ │MISSING FUNCTION │0X0000000a │ │ │ │ │UNBALANCED KEYWORD │0x0000000b │ │ │ │ │EXTRA DATA │0x0000000c │ │ │ │ │DUPLICATE KEYWORD │0x0000000d │ │ │ │ │INVALID PATH │0x00000010 │ │ │ │ │BAD FILE NAME │0x00000011 │ │ │ │ │NO SAMPLES │0x00000012 │ │ │ │ │CANNOT PLAYBACK │0x00000013 │ │ │ │ │CANNOT RECORD │0x00000014 │ │ │ │ │NO MMPM INSTALLED │0x00000020 │ │ │ │ │MMPM NOT ENABLED │0x00000021 │ │ │ │ │GENERAL FUNCTION │0x00000030 │ │ERROR │ │ │ │ │ │GENERAL COMMAND │0x00000031 │ │ERROR │ │ │ │ │ │PROGRAM NOT │0x000000ff │ │REGISTERED │ │ └────────────────────┴────────────┘ ═══ 10. Technical Issues ═══ Memory Usage: I have worked with means for storing and converting from one format to another efficiently. Initially I tried to store things in a data structure which was a union of all of the types of data that are used by the computers. However, converting from one format to another was difficult and each effect had to be able to understand the initial and final format. This became unwieldy considering that there can be either signed or unsigned samples of sizes byte or word. As new effects were added, it became unmanageable. At a sacrifice to memory efficiency, I have changed it to store all data as a signed SHORT (2 byte) sample. The effects then operate generically on the samples and the only time that the type of data is important is when reading or writing the samples. The savings in complexity justified the memory requirements. As a result, if a sample is 1k of bytes (.wav format), then in memory it will take up 2k. Currently the program will only read and write 8 and 16 bit samples. Since I don't know of any sound cards that can sample at greater bit sizes, this is the limit. In the future, this approach to memory usage can be easily extended to 32 bits without rewriting every part of the program. In fact, to change the storage sizes, two definitions have to be changed and then the proper input/output routines written. Simple? I think so. ═══ 10.1. Additional known faults ═══ There is a known problem with PMsndX and version 3.0 of MMPM/2 which affects the performance of the Audio playback. When running PMsndX under Warp, anything which interrupts the playback of a sample (such as a system sound or pressing Pause) will cause PMsndX to hang the next time playback is requested. I have tried to correct this but have found no solution at this time. For this reason, I have provided the option to have PMsndX open the Audio device without sharing it (the default). This problem does not appear to affect PMsndX on previous versions of OS/2 (i.e. 2.0, 2.1 and 2.11). From an OS/2 window run the command SYSLEVEL. If you receive the following output, then your system will probably exhibit the problem. E:\MMOS2\INSTALL\SYSLEVEL.MPM IBM Multimedia Presentation Manager/2 Version 3.00 Component ID 562137400 Type W Current CSD level: XR03000 Prior CSD level: XR03000 To test to see if your system will encounter this problem, open a sample file and select the AUDIO button on the main control panel. Start playback by pressing the PLAY button and then pressing the PAUSE button. Press the PAUSE button again to resume playback. If the PLAY button stops moving after the sample has finished playing, PMsndX will not lock up on your system. You should set PMsndX to share the audio device by going to the startup properties page (from the main control panel system menu). If the playback button does not stop moving after the sample has finished, then you should avoid using the PAUSE button and leave PMsndX set so that it does not share the AUDIO device. I apologize for this problem, and a new revision of MMPM/2 will correct this in the future. Minor limitations: 1. When recording a sample, the CD input cannot be used at this time. 2. There is no way to edit multiple sounds at the same time. ═══ 11. About the Author ═══ My name is William Scott Hiles but I usually go by the name Scott. I have a masters degree in signal processing and satellite communications. Unfortunately, my occupation utilizes very little of my formal education and takes more advantage of my less formally learned talents. I work as an electrical engineer for the Navy in the area of LAN and WAN research. My job is centered around promoting open systems in networking within the Navy and I am a Navy expert on fiber optic networking. I have worked with the ANSI X3 committees for the past 5 years and currently (1993-1994) am the chairman of the FDDI Repeater specification. Enough of that dribble...the point is that I don't use my education in my job. Which leads me into the purpose of this program. I am an electrical engineer, and my heart lies in hardware design and programming. Well, with this program I can at least satisfy my need to create software. So, this program came about because I was playing with sampling and recreating sound with my Sound Blaster 16 when I had the need to convert from the .wav format to the Sun .au format. After finding a little program that would convert Sun audio files to the PC format I found that it had problems with the new version of .WAV files. So, I set out to write something that worked with the latest versions. Well, from there it was not difficult to add other formats, and then I started playing with manipulations and so forth. Over about 11 months of very time consuming work, I came up with the present program called PMsndX. My resources are modest. I am 29 (1993) and have programmed everything from a PC to a 486 for the past 10 years. I dumped my 286 in February of 1993 and got me a nice 486. I decked the thing out and got OS/2. I had been playing with OS/2 since 1.3 on machines that I did not own, but this was the first time I had it at home to play with as I pleased. Programming under OS/2 provided a unique challenge with unlimited creative abilities. The company called WiSHware which is listed in the About box was formed as a shareware/freeware incorporated name for anything I write. I have a significant library of programs for DOS and even a couple for Windows. PMsndX is the second program for OS/2 that I have written. The first one was not well received as it did not provide a significant function to the community. Big deal. I use it at home and I don't care. So that is my history and my qualification. I am a bit surprised that you read this far. Congratulations. By the way, did you wonder why I chose a little blue motorcycle for the icon? Very simply put, the modern day sportsbike represents the art of functional integration while still maintaining the quality and sound of much more expensive motorcycles. I can easily be reached through US mail at: Scott Hiles 4421 Savannah St. King George, VA 22485 I can also be reached through email at: wishware@cais.com WiSHware is a sole Proprietorship and can be reached through the phone at (703) 663-0815. This is the author's home phone and should not be called unless the author cannot be contacted through any other means. ═══ 12. Registration ═══ PMsndX is shareware and as such requires a registration for all of the functions of the program to be used. Temporary registrations are available by contacting the Author. Paid registrations do not expire. The expiration feature is provided to allow trial periods for users. Licensing and registration fees apply to the user interface and style of the program but do not apply to the algorithms used to create the effects. These algorithms are public domain and may be copied and distributed freely. I have put a lot of effort into making this program robust and very pleasing. It has taken me more than nine months and 35,000 lines of code to get this program to where it is now, and I would hope that if you like the program and use it, you will appreciate it enough to send me a little cash to help fund future work. I don't expect much. Asking for money is a sticky thing. The big problem is to give people a program so that they can play with to see what it can do and yet hold back enough to get people to want to register the program. I put a lot of thought into this and have considered the many ways that authors achieve their goals. My solution was to disable the ability to read or write any formats other than the PC .WAV and the Sun .AU types, and disable the UNDO capibility. Additionally, the multi-channel capability of the program is disabled and the clipboard will not copy or cut anything less than the entire sample in memory. ═══ 13. Shareware ═══ I have three options which I can offer which seem to follow with common SHAREWARE practice. I have looked in stores for something that provides anything similar and found that a commercial product for Windows with half the functions cost considerably more. A registration form is provided and the following are the options for registration. 1. $15.00 will get you a password that will enable all of the functions of the current version. 2. $30.00 will get you a password that will enable all of the functions for all versions up to the next major release. If you chose to register using option 1 first and then want to upgrade, I will give you a $10 credit and you can get option 2 for $20.00. 3. $50.00 will get you a password that will enable all of the functions for all future versions. If you have chosen to register using option 2 first, I will give you a $20 credit and you can get the lifetime registration for $30.00. If you have registered with option 1 first, then I will give you $10 credit and you can get the lifetime registration for $40.00. Note: Please note. These prices cover just the registration. Shipping charges for the disks through the Postal service are extra. If you order the program through the mail, add $3.00 to cover the media and shipping costs. The section describing the Author provides my email and US postal mail addresses. Now, what do you get when you register. Well, you obviously get a password that will enable all functions of the program. The functions that are disabled for unregistered users are: Formats Only .AU and .WAV formats can be loaded and saved Editor The Cut and Paste operations of the editor only work for the full sample (i.e. will not work for ranges) Undo The UNDO function is disabled REXX The REXX functionality will allow the program to run a REXX script to automate repetitive tasks In addition to that, I can provide limited technical support through regular phone service, email, or the US Postal service. A number of people have contacted me to ask for special programs (e.g. programs that will just play any format without the overhead of the editor or a program that will just convert between formats). These will be fairly easy to create using the existing objects of PMsndX. If you are registered for PMsndX, these programs will automatically recognize the registration and work on your system. If and when you register, you will receive a password through whatever means that you prefer. If you choose the postal service, you will receive it via disk along with the latest copy of the program (remember to include an additional $3.00 to cover the shipping and media). If you choose to receive your registration through email, you will receive an email message that can be imported using the FILE button of the registration dialog. Registrations will be sent after your form of payment has cleared. Although not currently provided, credit cards will eventually be accepted if the program makes enough profit to afford the service. Please allow at least two weeks to receive your registration. Since PMsndX is provided as ShareWare, there is no provision for refunds. In the event that you are dissatisified with the operation of PMsndX due to an error in loading or saving a format, contact me and I will fix the program if you can provide me with a copy of the file that is causing the problem or enough detail that I can recreate the problem. ═══ 14. Entering Registration Info ═══ Once you receive your registration you have a couple of options for entering it into the program. First, pull up either the Welcome or About dialog box from the system menu of PMsndX. Press the REGISTER button to bring up the registration dialog box. You may enter the data directly into the entry fields or you may have the program scan a data file for your registration information. When entering data, enter it exactly as it is shown in the file or text for your registration. The Name field must not have any additional spaces and it must be entered in exact case. The password is 16 characters long and will never contain any space characters. It is case sensitive so be careful to get the case right. Passwords never contain the upper case letter O or the upper case letter I to avoid confusion with similar looking numbers. When PMsndX scans a file for the password information, it looks for the following keys: PMsndX Name: Through version: Expiration date: PMsndX Password: These lines can be anywhere in a file so there is no need to remove a mail header or extra information. PMsndX will search the file for the specific text that it is looking for and extract it. The registration information is stored in the file called os2.ini. This allows a copy of PMsndX to be run from a network and each machine can have it's own registration. This also allows the pmsndx.ini file to be copied form one machine to another without violating the licensing agreement. Five items are stored in the os2.ini and total about 100 bytes. Any .ini editor can be used to remove this information if the user wishes to delete PMsndX from the system. Note: The information in the os2.ini file is only written when the program is registered. This avoids adding stuff to the os2.ini file unless the user has chosen that the program is worth keeping. ═══ 15. Tradeoffs ═══ When PMsndX is operating on a sample for the clipboard, AUDIO, or the tools, it stores the entire sample in memory. This has the advantage that the program can double buffer the sample for faster operation; but, it has the disadvantage that it can take up a tremendous amount of memory to hold large samples. PMsndX provides the user with a simple interface at the expense of resources on the host computer. ═══ 16. Copyright ═══ The author makes NO WARRANTY or representation, either expressed or implied, with respect to PMsndX, its quality, accuracy, merchantability, or fitness for a particular purpose. This software is provided "AS IS" and you, its user, assume the entire risk as to its quality and accuracy. This software is copyright (C) 1994, William S. Hiles. All rights Reserved except as specified below. Permission is hereby granted to use, copy, and distribute this software (or portions thereof) for any purpose, without fee, subject to these conditions: (1) The seven files, pmsndx.exe, pmsndx.hlp, readme.txt, history.txt, license.txt, order.txt and file_id.diz must always be included during distribution. Any alterations to the files must be clearly documented. No changes may be made to the About screen or any of the copyright information. (2) Permission for use of this software is granted only if the user accepts full responsibility for any undesirable consequences. The author accepts NO LIABILITY for damages of any kind. (3) Permission is not granted for the use of the author's name or company name in advertising or publicity relating to this software or products derived from it. (4) Users are granted permission to collect fees for the distribution of PMsndX, (such as BBS's that have a membership fee or a downloading charge, or FTP sites that sell cdrom versions of their archives) but users are specifically prohibited from selling PMsndX as a product or bundling PMsndX with other products that are then sold. (5) Unless otherwise negotiated in writing with the Author, registration passwords for PMsndX may not be distributed in part or in whole. Registrations are provided to individuals (or for site licensing as negotiated at time of registration) and may not be distributed or transferred. ═══ 17. Acknowledgements ═══ Of course, IBM deserves a great deal of recognition for providing an operating system that is robust and stable and affordable enough for the general user. Many thanks to IBM for a fine job on creating OS/2. A special thanks is required for Linden deCarmo for his help in understanding the MMPM/2 portion of OS/2. Many thanks to the fine group of people who made suggestions for corrections and improvements in this program. This team of very patient individuals from around the world comprised the Beta Test team. Each and every one of them contributed in some way to the development of PMsndX. Their names are listed below (in alphabetical order). David Charlap Christopher W. Curtis Linden deCarmo Terrance L. Eck Scott E. Garfinkle Jesse Gearhart Nicole Greiber Christopher Hemmer Rick Huebner Mark R. Johnson Dov Nelkin Lara Olofsson Steve Patrick Rupa Schomaker Kamal Shakker Brett Sherron-Ferrell Jimmy Shaw Kent Williams And of course, that special person and the kids who took the many hours of clicking away at the keyboard in stride. They stuck by me throughout this entire thing, read all the documentation, tested the user interface, and actually began to understand how sound really works. Sounds like a Grammy award, huh. ═══ 18. Installation ═══ PMsndX includes a rudimentary installation program which copies the necessary files to the user specified destination directories. This program relies on the PATH and HELP variable to select the paths to copy the executable and help files to. From When the installation program is run, a window is displayed with a field which indicates where the source files are located. By default, this is filled in with the location of the installation program. If the installation program has been moved from a directory other than where it was originally unzipped to, specify the directory where the files pmsndx.exe, pmsndx.hlp, and smallhlp.hlp are located. Location of executable The paths specified in the system PATH variable are displayed in this window. In order for PMsndX to be run from the command line or used by other programs for playback, PMsndX must be in a directory specified in the PATH variable. The user may enter a different path in the editable window; however, PMsndX may not be able to be run from the command line without specifying a complete path. All directories must exist before running the installation program. Location of Help file The paths specifed in the system HELP variable are displayed in this window. When PMsndX is run, it will look in the directory from where the executable was started and then in the directories specified in the HELP variable. The user may specify a directory other than one that is listed in the window, but it must exist for the installation program to complete. Additionally, it is up to the user to add the new path to the help variable of the config.sys. Help Version PMsndX comes with two versions of the HELP file. The default version is called pmsndx.hlp and includes bitmaps of the various windows and is about three times the size of the other help file. The condensed help file does not include the bitmaps and is really intended for users who are tight on disk space. Create WPS Object The current revision of the installation program cannot create WPS objects. To create one by manually, open the Templates folder and drag a PROGRAM opject to the desired location. Open the SETUP for the object and specify the location of the executable that was specified in the installation program. You can then drag sound samples to the object for playback from the desktop. ═══ ═══ JoeView is an excellent program written by Joe Burkley. If you ever need to view a graphics image of virtually any format, this is the program for you!!! ═══ ═══ The .WAV format is actually defined as a RIFF file. The header and data are very robust and there are extensions for proprietary keywords and formats. PMsndX only supports the standard PCM format and will not load proprietary formats. You will receive a STYLE error if it contains an unsupported format. ═══ ═══ The bits in a word are stored such that the leftmost bit is stored first in the first byte and the rightmost bit is stored last in the last byte. If a word is composed of 16 bits, the word would be written to a file starting with bit 16 and ending in bit 0. The number 0x1234 (0001 0010 0011 0100) is actually stored as 0001 0010 0011 0100. ═══ ═══ The bits in a word are stored such that the leftmost bit is stored first in the last byte and the rightmost bit is stored last in the first byte. If a word is composed of 16 bits, the word would be written to a file starting with bit 7 and ending in bit 8. The number 0x1234 (0001 0010 0011 0100) is actually stored as 0011 0100 0001 0010. ═══ ═══ There are four methods of transitioning channels in a sample. These methods are used in various tools to provide a smooth transition from one end of a range to another. The four types of transitions are listed in the following text. The first method is linear. In this case, the increase or decrease in the volume is constant over time. This can be defined by the mathematical equation: volume(t) = volume(t) * t/interval A second method for adjusting the volume is to use a geometric expression so that the sample transitions slowly in the beginning of the range and then changes quickly toward the end of the range. To transition a sample out slowly over time a form of the function: volume(t) = volume(t) * (1 - (t/interval))¤ The third method is exactly the reverse of the slow transition in which the transition moves very quickly in the beginning of the range and then slowly reaches the end of the range. The equation for this is as follows: volume(t) = volume(t) * (t/interval)¤ Finally a fourth method is to have the samples make an immediate transition or a step. In this case, the transition is made immediately at the beginning of the range.