Chapter 3 —
The DECsound Application

> This chapter introduces the DECsound application. The chapter gives a brief overview of the application and basic concepts. The chapter also includes explanations on:

> - Launching the DECsound application from the command line and from the Common Desktop Environment (CDE).
> - Recording and playing a message using DECsound.
> - Editing and modifying DECsound recordings.
> - Modifying settings which define the DECsound environment.

DECsound — Overview, UI, and Step-by-Step

> > > This section gives a brief overview of the DECsound application and also discussesthe concepts of using DECsound. Topics include:

> > > > - What is DECsound?
> > > > - Launching DECsound
> > > > - About DECsound Files
> > > > - The DECsound Control Panel
> > > > - DECsound Settings Dialog Box
> > > > - DECsound Default Resources
> > > > - Making a Recording
> > > > - Playing a Recording
> > > > - Editing a Recording
> > > > - Performing Other Functions
> > > > - Getting Help

What is DECsound?

> DECsound records and plays audio messages.

> DECsound functions are similar to those of a tape recorder-you can play, record, fast-forward, and rewind recordings. You can also edit your recordings using the on-screen waveform display.

> With DECsound, you record messages using a microphone that you connect to your workstation. You can also use any other source connected to the selected port of your audio device. Select an audio port by using Audio Control. You can play back messages on your speakers or on headphones connected to your workstation. You can also use a headset that combines a microphone and headphones.

> You can perform basic editing tasks on your recordings. For example, you can use cut-and-paste operations on a DECsound recording in the same way as you would use them on a piece of text. DECsound also provides sample data (a library of sound effects) in the MMERTSMPLDAT240 subset that you can use separately or with your own recordings.

About DECsound Files

> DECsound supports reading and writing of files in WAVE, Sun AU, MPEG-1, and DDIF formats. Files can be written in the audio encoding formats listed in Table 3-1.

> Table 3-1 Supported Audio Encoding Formats

> Sample Rate | Channels | Sample Size | Encoding
> 8 kHz | Mono | 8 bit | Mulaw, DDIF
> 11.025 kHz | Mono and Stereo | 8 and 16 bit | Linear
> 22.05 kHz | Mono and Stereo | 8 and 16 bit | Linear
> 44.1 kHz | Mono and Stereo | 8 and 16 bit | Linear
> 44.1 kHz | Mono and Stereo | 16 bit | MPEG-1 Layer II

> RIFF is a file format developed by Microsoft and IBM, and is a very popular format on Microsoft Windows platforms. WAVE (.wav) files are types of RIFF files used for encoding audio.

> Files encoded in the Sun AU audio format usually have .au extensions. These files can be created on many UNIX workstations. They most often come in mono, 8 kHz 8-bit mulaw audio encoding.

> Files encoded in the MPEG-1 format can have an .mp2, .mpa, or .mpg extension. MPEG files written by DECsound come in mono and stereo, 44.1 kHz 16-bit MPEG-1 Layer II encoding.

> DDIF (Digital Document Interchange Format) is the standard document format used by CDA, a component of DIGITAL's Network Application Support (NAS) architecture that defines standards for compound documents and enables file interchange among all compliant applications. DDIF files have .aud extensions.

Launching DECsound

> You can start DECsound by clicking on the DECsound application CDE icon, by double clicking on a CDE data object or dragging the data object (audio file icon) onto the DECsound icon, or by typing a command line. The following step-by-step procedures describe all these methods:

Step-by-Step

Launching DECsound from CDE
Task/Location | Action | Result
CDE Environment | Click on the CDE DECsound Icon | The DECsound control panel is displayed.
Launching DECsound with an Audio file
Task/Location | Action | Result
CDE Environment | Double-click on an audio file or drag an audio file onto the DECsound icon. | The DECsound control panel is displayed and DECsound loads the audio file.
Launching DECsound From the UNIX Command Line
Task/Location | Action | Result
UNIX command line | Type decsound | The DECsound control panel is displayed.

The DECsound Control Panel

> When you launch DECsound, the Control Panel is displayed on the screen (See Figure 3-1).

> Figure 3-1 — DECsound Control Panel

> > Legend | Description
> > (1) | File Menu
> > | New : Clears current recording and begins new one
> > | Open: Opens existing file
> > | Save: Saves file under current file name and format
> > | Save As: Saves file under new name and format
> > | Exit: Closes DECsound
> > (2) | Edit Menu
> > | Cut: Removes selected portion of recording
> > | Copy: Copies selected part of recording to clipboard
> > | Paste: Pastes contents of clipboard into recording
> > | Clear: Deletes selected part of recording
> > | Select All: Selects entire waveform
> > (3) | View Menu
> > | Display Energy: Displays energy of the audio waveform
> > | Display Samples: Displays amplitude of the audio waveform
> > (4) | Options Menu
> > | Settings: Displays DECsound Settings Dialog Box
> > | Save Settings: Saves current settings in your home directory in sound_editor_resources.dat.
> > | Restore Saved Settings: Changes options from current to last saved settings
> > (5) | Help Menu:
> > | On Context: Offers context sensitive help
> > | On Window: Displays task information
> > | Index: Displays help library index
> > | Tutorial: Displays on-line tutorial
> > | On Help: Displays information on using help
> > | On Version: Displays version, date, and other product information
> > (6) | File Info area: Displays file name and audio format
> > (7) | Waveform: Displays waveform that represents audio in amplitude or energy
> > (8) | Zoom Slider: Allows you to view waveform in greater or lesser detail
> > (9) | Volume Slider: Allows you to control output volume when you play DECsound recordings
> > (10) | Line-In Slider: Indicates input volume level as a percentage of the full volume
> > (11) | Waveform Position Slider: Indicates current position in waveform display
> > (12) | Traditional "tape recorder" buttons: Stop, play, record, rewind, and fast forward
> > (13) | Status Area: The left side indicates current operation and the right side indicates length of the recording
> > (14) | Position Slider: Indicates the position you are in recording and playback time; lets you move to any position in the recording
> > (15) | Save Button: Saves a revised version of a DECsound file with the current name; if no current file name, DECsound displays the Save File Dialog Box
> > (16) | Exit Button: Closes DECsound

> When you try to exit from DECsound the application displays the Confirmation Dialog Box. Table 3-2 describes the different DECsound exit conditions and what to do in the Confirmation Dialog Box when these conditions occur.

> Table 3-2 DECsound Exit Conditions

> Condition | What to do
> You edited a recording or made a new recording, but you did not save the recording in a file. | Click on OK to exit from DECsound without saving the recording, or click on Cancel to cancel the Exit command and continue using DECsound.
> You made changes in the Settings dialog box, but you did not click on Save in the dialog box. | Click on OK to exit from DECsound without saving the changes to the dialog box settings, or click on Cancel to cancel the Exit command and continue using DECsound

DECsound Settings Dialog Box

> Figure 3-2 contains the DECsound Settings Dialog Box.

> Figure 3-2 DECsound Settings Dialog Box

> > > > Legend | Description
> > > > (1) | Maximum Recording Length Slider: Lets you specify the maximum length of a DECsound recording
> > > > (2) | Default Save File Format Selection Menu: Lets you specify the default file format for save file operations
> > > > (3) | Playback Auto Repeat Box (On/Off): Lets you enable DECsound to play a recording repeatedly when you click on Play; you can stop the playback by clicking on Stop
> > > > (4) | OK Button: Accepts settings but does not update resource file
> > > > (5) | Save Button: Saves settings and updates resource file
> > > > (6) | Cancel Button: Cancels operation. No changes made to settings
> > > > (7) | Help Button: Displays help on settings

DECsound Default Resources

> DECsound defaults (settings) are saved in your home directory in the sound_editor_resources.dat file. Table 3-3 describes the default resources used by DECsound:

> T able 3-3 DECsound Default Resources

> Resource | Description | Values
> DECsoundEditor.MaxRecordLength | Maximum recording length in seconds | Default is 120
> DECsoundEditor.AutoRepeat | Toggle autorepeat for playback | Values are 0(false) and 1 (true). Default is 0.
> DECsoundEditor.SaveFormat | Default file save format | Values are 0 (Sun AU) 1 (DDIF) 2 (WAVE) and 3 (MPEG-1). Default is 0.

Making a Recording

> You can use DECsound to make and save a recording. Be sure you have the audio device selected correctly and that your microphone (or other sound source) is properly connected; see Audio Control. If the DECsound window already contains a recording when you click on the Record button, DECsound adds the new recording to the end of the current recording. The following step-by-step procedure describes how to create and save a recording:

Step-by-Step

Recording a Sound File
Task/Location | Action | Result
DECsound Control Panel | Click on and pull down the File Menu. | DECsound displays a File Menu.
| Choose New from the File menu . | DECsound clears the current recording and begins a new one.
| If you have not saved the current recording, DECsound asks you if you want to save it before beginning the new recording. Before a new file can be created, you will be prompted to specify the sampling rate, number of channels, and sample size for the new file. |
| Click on the Record Button and speak into the microphone or headset. | DECsound begins to record your message and will display the message Recording... in the Status Area of the Control Panel. The length (in seconds) of the recording is also displayed in the Status Area. The position slider shows the current position in the recording.
| When you have finished recording, click on the Stop button. | DECsound displays the length of the recording in the bottom right corner of the Control Panel and updates the waveform display.
Saving a file as a Revised Version
Task/Location | Action | Result
DECsound Control Panel | Choose Save from the File menu or click on the Save Button. | DECsound saves a revised version of the file with the current file name. When you click on the Save Button and no current version of that file exists a Save as Box will be displayed.

Saving a File Under a New Name
Task/Location | Action | Result
DECsound Control Panel | Choose Save As... from the File menu. | DECsound displays the Save File dialog box, which lists all the DECsound files in your current directory.
| Select the file format for the file from the formats in the dialog box. For MPEG, choose the compression bit rate. Select a file name and click on OK. | DECsound saves the file.

Playing a Recording

> You play a file in DECsound similar to how you play a tape on a tape recorder. If you cannot get a device with the same playback rate, the file will be played at the closest rate available which will be shown in the File Info Area. Some formats, such as MPEG require additional loading time while the data is decompressed. If part of a recording is selected when you click on Play, DECsound plays only the selected part. The following step-by-step procedure describes how to play a file or a recording on DECsound:

Step-by-Step

Playing a Sound File
Task/Location | Action | Result
DECsound Control Panel | Pull down the File Menu and choose Open... | DECsound displays the Open File dialog box, which lists all the DECsound files in the current directory.
| Double-click on the file name of the file you want to play or enter the file name directly in the Selection text-entry field. |
| Click on OK | DECsound removes the Open File dialog box and loads the file you specified.
| Click the Play button | DECsound plays the file. While playing the recording, the display shows Playing... in the bottom left corner. The length (in seconds) of the recording is displayed in the bottom right corner. The position slider shows the current position in the recording.
| Click on the Stop button. | DECsound stops playing the file.

Moving within a DECsound file
Task/Location | Action | Result
DECsound Control Panel | Click on the Rewind button. | DECsound rewinds the recording by one second.
| Press and hold MB1. | DECsound continuously rewinds the file. DECsound displays the length (in seconds) in the Status Area in the bottom right corner of the DECsound window. The position slider shows the current position in the recording.
| Click on the Forward button. | DECsound advances the recording by one second.
| Press and hold MB1. | DECsound continuously advances the recording. DECsound displays the length of the recording in the bottom right of the DECsound window. The position slider shows the current position in the recording.

Editing a Recording

> You can edit your recording with DECsound. You can cut and paste parts of a recording in the same way that you would cut and paste parts of a text file. By using multiple DECsound sessions you can paste part of one recording into another recording. You can create interesting sound effects by experimenting with the cut-and-paste operations and with the sample files that are provided in the sample data subset.

> Before using the DECsound editing operations, you must select the part of the recording that you want to modify. DECsound displays a waveform that represents the recording. You select parts of the recording by selecting parts of the waveform. When you select part of a recording, you can extend the selection by pressing the Shift key while dragging the leftmost mouse button (MB1). You can select an entire recording by choosing Select All from the Edit menu.

> Like many other windows-based applications DECsound has a clipboard, which is a temporary (invisible) storage area. When you cut or copy part of a DECsound recording, DECsound stores the selected part of the recording in the clipboard.You can cut and paste selected parts of a recording by using the DECsound edit menu. When you use the Paste menu item, DECsound pastes the contents of the clipboard into the recording. The clipboard stores only the most recently cut or copied part of a recording. When you cut or copy part of a recording to the clipboard, the recording overwrites the current contents of the clipboard.

> DECsound also provides a Quick Copy function, which allows you to copy the selected part of a recording from one point to another, bypassing the clipboard. The Quick Copy function copies the selected part of a recording to the current position in the waveform.

> All of the above editing methods are described in the following step-by-step procedures:

Step-by-Step

Selecting Parts of a Recording
Task/Location | Action | Result
DECsound Control Panel | Place the cursor on the section of the waveform display that you want to select. |
| Hold down the leftmost mouse button and drag the cursor across the waveform display section you want to select. | DECsound highlights the selected part of the recording.
Selecting an Entire Recording
Task/Location | Action | Result
DECsound Control Panel | Choose Select All from the Edit menu. | DECsound selects (and highlights) the entire recording. When you choose an edit operation after choosing Select All, the edit operation applies to the entire recording.
Cutting and Pasting Parts of a Recording
Task/Location | Action | Result
DECsound Control Panel | Select a part of the recording. |
| Choose Cut from the Edit menu to transfer the selected part of a recording to the clipboard or choose Copy from the Edit menu to copy the selected part of a recording to the clipboard. | DECsound deletes the selected part of the recording from the display area. The recording is unchanged.
| Reposition cursor. |
| Choose Paste from the Edit menu. | DECsound pastes the contents of the clipboard into the recording at the point indicated in the waveform displayed in the DECsound window.

Using Quick Copy
Task/Location | Action | Result
DECsound Control Panel | Select the part of the recording that you want to copy. | DECsound highlights the part of the recording you have selected.
| Position the pointer at the point in the waveform where you want to insert the selected part of the recording. |
| Click MB2. | DECsound copies the selected part of a recording to the current position in the waveform.
Deleting parts of a DECsound Recording
Task/Location | Action | Result
DECsound Control Panel | Select a part of a recording | DECsound highlights the selected part of the file.
| Choose Clear from the Edit menu | DECsound deletes the selected part of the recording from the display area. The Clear operation does not affect the contents of the clipboard. If you use the Clear operation without selecting part of the recording, the entire recording is cleared.
Inserting New Material in a Recording
Task/Location | Action | Result
DECsound Control Panel | Position the pointer at the point where you want to insert the new material and click MB1. |
| Drag MB1 to the end of the recording and choose the Cut item from the Edit menu. | DECsound removes the selected part of the recording from the display area.
| Click on the Record button and record the new material. |
| Position the pointer at the end of the recording and choose the Paste item from the Edit menu. | DECsound completes the new recording.

Performing Other Functions

> The DECsound Control Panel lets you perform many common tasks. Among these tasks are changing the volume, controlling the Waveform Display Area, and navigating within a DECsound file.

> DECsound displays the waveform in two formats:

> - Samples, which shows the values recorded by the DECsound software and hardware
> - Energy levels, which shows the variations in sound energy in the DECsound recording

> The zoom slider allows you to view the DECsound waveform in greater or lesser detail. The zoom slider has minimum and maximum settings. These settings may not allow the slider to move beyond these settings. The following step-by-step procedure describes these tasks:

Step-by-Step

Changing the Volume
Task/Location | Action | Result
DECsound Control Panel | Place the cursor on the output slider and move the slider up. | DECsound increases the volume.
| Place the cursor on the slider and move the slider down. | DECsound decreases the volume.
Changing the Waveform Display
Task/Location | Action | Result
DECsound Control Panel | Place the cursor on the zoom slider and move the slider down (zoom in). | DECsound displays the waveform in greater detail.
| Place the cursor on the zoom slider and move the slider up (zoom out). | DECsound displays the waveform in lesser detail.

Changing the DECsound Display Area
Task/Location | Action | Result
DECsound Control Panel | Choose Display Energy from the View menu. | DECsound displays the energy of the waveform. The energy waveform shows the variations in audio energy levels in the waveform.
| Choose Display Samples (default) from the View menu. | DECsound displays the amplitude of the audio waveform.

Getting Help

> DECsound provides help that you can access by either:

> - Choosing an item from the help menu
> - Clicking on the Help button in a dialog box

> Help topics are displayed in a help topic window. If a topic is longer than the help window, use the scroll bars or resize the help window to display the rest of the topic. The following step-by-step procedure describes how to get on-line help for DECsound:

Step-by-Step

Using On Context
Task/Location | Action | Result
DECsound Control Panel | Choose On Context from the Help menu. | DECsound changes the pointer to a (?).
| Point to any object (including menus, window objects, dialog box fields, and so forth) in the application window or dialog box and click MB1. | DECsound displays information on the object and may also list additional topics that provide more information.

Using On Window
Task/Location | Action | Result
DECsound Control Panel | Choose On Window from the Help menu. | DECsound displays information about the tasks you can perform using the application.
Using Index
Task/Location | Action | Result
DECsound Control Panel | Choose Index from the Help menu. | DECsound displays index of the help library.
Using Tutorial
Task/Location | Action | Result
DECsound Control Panel | Choose Tutorial from the Help menu. | DECsound displays an on-line tutorial that teaches you the basic DECsound tasks.
Using On Help
Task/Location | Action | Result
DECsound Control Panel | Choose On Help from the Help menu. | DECsound displays information on how to use help.
Using On Version
Task/Location | Action | Result
DECsound Control Panel | Choose On Version from the Help menu. | DECsound displays the version, date, and additional trademark and product information for the application.

DECsound Command Line Syntax

> > > This section describes the DECsound command line syntax and its options.

> The syntax for DECsound is:

> > decsound [-file filespec] [-play filespec] [-file -] [-play -] [-file - -play]

> > > [-play - -file] [-device number] [-help]

> > where:

> > [-file filespec]

> > Specifies the file name to use for the DECsound session. If the file exists, the DECsound window displays the recording. If the file does not exist, DECsound creates a new recording. DECsound uses the default audio format.

> > [-play filespec]

> > Plays the specified file without displaying the DECsound window.

> > [-file -]

> > Outputs a recording to UNIX stdout. Data written to stdout is in mono 8 kHz mulaw raw audio format only. When you make a recording and choose Save from either the main screen or the File menu, the recording is written to stdout. There are some restrictions on functions that can be performed when DECsound is run in this mode, and the corresponding buttons and menu entries will be dimmed.

> > [-play -]

> > Plays audio data from UNIX stdin without bringing up the user interface. Data read from stdin must be in mono 8 kHz mulaw raw audio format only. For example, if an .aud-formatted file is read from stdin, the file header will be played as data, causing additional noise when data is played as audio.

> > [-file - -play] [-play - -file]

> > Brings up the DECsound user interface and loads audio data from UNIX stdin (instead of from a file). This audio data can then be played back, edited, or written to a file as usual. Data read from stdin must be in mono 8 kHz mulaw raw audio format only. There are some restrictions on the functions that can be performed when DECsound is run in this mode.

> > [-device number]

> > Specifies the number of the audio device on your system to be used for playback and recording, starting at device 0. The default is device 0. Use audiodevices to determine the device number for the device you want.

> > [-help]

> > Displays help information.