Table of Content
	Motion Works MediaShop [image] : Sound Annotator

Sound Annotator is a software tool that combines text and digitized speech to create text that is spoken as well as seen.  This tool consists of two components:

1) a Visual Basic Custom Control, called the Sound Annotation Control(SNDAN.VBX).

2) a stand-alone editor , called the Sound Annotation Editor (SANEDIT.EXE), that is provided for creating sound files used by the Sound Annotation Control.

To learn how to use help, press F1.

Contacting Motion Works

Sound Annotation Control

Sound Annotation Tool


Contacting Motion Works

If you have any questions, comments, or suggestions,  Motion Works would like to hear from you.  You can contact Motion Works at:

Motion Works USA,

524 Second Street, San Francisco,

CA  94107,

U. S. A.

Tel: 1-800-800-8476, Direct (415)-541-9333,

Fax: (415)-541-0555


Sound Annotation
	Sound Annotation Control
Properties	Events

Description	The Sound Annotation control  is a custom Visual Basic Control that allows users to create interactive text which is associated with sound (usually digitized speech).  When the Sound Annotation control is played, the text is hi-lighted as the associated sound is played.
Filename	SNDAN.VBX
Object Type	SndAn
Remarks	This control requires a sound file with extension .san.  Also see the sound annotator editor for methods of combining wave files and text to produce ".san" files.
__________________________________________________________________________________

Distribution Note   When you create and distribute applications that use the Sound Annotation Control, you should install the file SNDAN.VBX in the customer's Microsoft Windows \SYSTEM subdirectory . The setup kit included with the Professional Edition of Visual Basic provides tools to help you write setup programs that install your applications correctly.

__________________________________________________________________________________


Sound Annoator Properties
PROPERTIES
	There are a number of properties used to access the Sound Annotation control under Visual Basic.  The following is a list of available properties for this control. Asterisk(*) denotes properties that apply to this control only or that require special consideration when using.

Properties

*About	FontItalic	*PlayMode
*BackColor	FontName	*ScrollEnabled
BorderStyle	FontSize	TabIndex
*Clickable	FontStrike	TabStop
*CurWord	FontUnder	Tag
*CurWordIndex	Height	Top
DragIcon	*HiBackColor	Visible
DragMode	*HiForeColor	Width
*Enabled	Index
*Filename	Left
FontBold	Name
ForeColor	*Play


Sound Annotation Events
EVENTS
	The following is a list of available events for this control. Asterisk(*) denotes events that apply to this control only or that require special consideration when used with it.

Events

ClickIn	MouseMove	*PlayFinished
DragDrop	*PlayStart	*WordClickIn
DragOver


Sound Annotation property, ABOUT
About Property

Description	Displays an About box for the control which contains the name of the control, version number and the author.
Visual Basic	Not Applicable
Remarks	This property can only be used during development time and is activated by double clicking on the About property field which displays "Click here..."
Data Type	Not Applicable


Sound Annotation property, BACKCOLOR
BackColor Property

Description	Specifies the background color to be used by the control.
Visual Basic	[form.]SndAn.BackColor[=settings%]
Remarks	Double click on this property to see available colors during development time.  During runtime, this property can be set like a standard color property.
Data Type	Integer (Long)


Sound Annotation property, CLICKABLE
Clickable Property

Description	Determines if the user can interact with the Sound Annotation control.
Visual Basic	[form.]SndAn.Clickable[=settings%]
Remarks	The primary use for this property is to prevent the user from triggering any actions in the Sound Annotation control.   This allows all actions from the Sound Annotation control to be set by the program.
Setting	Description
True	(Default) User Interaction is enabled
False	User Interaction is disabled
Data Type	Integer(Boolean)


Sound Annotation property, CURWORD
CurWord Property

Description	Identifies a word when it has been clicked on.  When the user clicks on a word, the CurWord will contain the actual text of that word and the CurWordIndex property will contain the index of that word.
Visual Basic	[form.]SndAn.CurWord[=settings%]
Remarks	This is a run-time property which means that this property is only available during run-time.  The indexes start at zero for the first word and increment by one for each word thereafter. For example, Text :  The cow jumped over the moon Index:    0       1         2          3        4      5
Data Type	String


Sound Annotation property, CURWORDINDEX
CurWordIndex Property

Description	This property contains the index of the last word that was clicked on by the user.
Visual Basic	[form.]SndAn.CurWordIndex[=settings%]
Remarks	This is a run-time property which means that this property is only available during run-time.  The indexes start at zero for the first word and increment by one for each word thereafter. For example, Text :  The cow jumped over the moon Index:    0       1         2          3        4      5
Data Type	Integer


Sound Annotation property, ENABLED
Enabled Property

Description	Enable or disable the sound annotation control during run-time.
Visual Basic	[form.]SndAn.Enabled[=settings%]
Remarks	Setting this property will have the following affects.
Setting	Description
True	(Default) Enable
False	Disable
Data Type	Integer (Boolean)


Sound Annotation property, FILENAME
Filename Property

Description	Specifies the path of the sound annotation file to be used by this control.  Once the file has been specified, the text in the file will be displayed.
Visual Basic	[form.]SndAn.Filename[ = filename$]
Remarks	Changing the filename will automatically change the text that is displayed in the sound annotation window.  If the file is changed during runtime, playing is stopped.
Data Type	String


Sound Annotation property, HIBACKCOLOR
HiBackColor Property

Description	Specifies the background color of the highlighted text.
Visual Basic	[form.]SndAn.HiBackColor[ = color]
Remarks	Double click on this property to see available colors during development time.  During runtime, this property can be set like a standard color property.
Data Type	Integer (Long)


Sound Annotation property, HIFORECOLOR
HiForeColor Property

Description	Specifies the color of the highlighted text.
Visual Basic	[form.]SndAn.HiForeColor[ = color]
Remarks	Double click on this property to see available colors during development time.  During runtime, this property can be set like a standard color property.
Data Type	Integer (Long)


Sound Annotation property, PLAY
Play Property

Description	This property triggers playing of the Sound Annotation Control.
Visual Basic	[form.]SndAn.Play[=settings%]
Remarks	Setting this property will have the following affects.
Setting	Description
True	Play
False	(Default) Stop
Data Type	Integer (Boolean)


Sound Annotation property, PLAYMODE
PlayMode Property

Description	Setting this property will determine if an individual word or a whole sentence is played at a time.
Visual Basic	[form.]SndAn.PlayMode[ = settings%]
Remarks	The following table lists the PlayMode property settings for this control.
Setting	Description
0	(Default) Play a word
1	Play the complete sound annotation.
Data Type	Integer (Boolean)
Visual Basic	The following code tells the Sound Annotation control to play a word at a time.
	SndAn1.PlayMode = 0


Sound Annotation property, SCROLLENABLED
ScrollEnabled Property

Description	Enables or disables the Scrolling ability of the Sound Annotation Control.
Visual Basic	[form.]SndAn.ScrollEnabled[ = settings%]
Remarks	The following table lists the ScrollEnabled property settings for this control.
Setting	Description
True	(Default) Enabled
False	Disable
Data Type	Integer (Boolean)


Sound Annotation event, PLAYSTART

PlayStart Event

Description	Indicates that a sound has started to play in the sound annotation control.
Visual Basic	Sub SndAn_PlayStart()
Remarks	No parameters are passed into this event.


Sound Annotation event, PLAYFINISHED
PlayFinished Event

Description	Indicates that a sound has completed playing in the sound annotation control.
Visual Basic	Sub SndAn_PlayFinished()
Remarks	No parameters are passed into this event.


Sound Annotation event, WORDCLICKIN

WordClickIn Event

Description	Indicates a particular word or group of words is clickin during Run-time.
Visual Basic	Sub SndAn_WordClickIn()
Remarks	Parameters:
	X As Single
	Y As Single
	WordID As Integer
	WordText As String


	Sound Annotation Tool
Description:	The Sound Annotation Tool is an editor used to combine data from both wave and text files to produce an output file which will be used by the Sound Annotation Control within Visual Basic.  The Sound Annotation Control annotates each word or group of words that is read.

How To...

(General Step by Step Tutorial )

The following are instruction steps of general and frequently used operations in the Sound Annotation Tool.  Various ways of performing each of the general operation will be discussed.  For a detail discussion of every features and operations of this editor, please refer to the Reference Section.

Invoke the Editor

Open an Annotated Sound File

Import a Wave File

Import Text File

Hi-light a Wave

Hi-light the Text

Link Wave with Text

Unlink Wave

Display Null Chunks

Delete Null Chunks

Play Sound

Test Results

Group Chunks

Ungroup Chunks

Zoom waves

Embed waves

Save

Exit the Editor

Link the Sound Data File to the Sound Annotation Visual Basic Control

Reference Section...

User Interface, Menu and Dialogs Explained:

The Main Editor Screen

The Sound Annotator Test


How to Invoke the Sound Annotation Editor
To Invoke the Editor

To use the Sound Annotation Tool simply select "Run..." from the File menu in Program Manager and then execute "SANEDIT.EXE" (*** Note: Remember to enter the correct path as well ***).  Another way is to create an icon in the Program Manager for the application and then double click on the icon [image].


To open a sound file

To open an Annotated Sound File

Annotated Sound Files for this editor have an extension of .SAN.  Annotated Sound Files combine both text and wave together to form a file that is recognized by the Sound Annotation Control in Visual Basic.

The following ways enable users to activate this function:

Menu:  Select "Open" under the File menu.

Toolbar: Right-single click the icon [image] to open the "Open Sound Annotator File" dialog box.


To import a Wave File

Raw sound wave files with extension .WAV can be imported into the Sound Annotation Editor to be used in creating Annotated Sound File.

The following ways enable users to activate this function:

Menu:  Select "Import Wave" under the File menu.

Toolbar:  Right-single click the icon [image] to open the "Open Wave" dialog box.


To import a text file

To import Text File

Raw text files with extension .TXT can be imported into the Sound Annotation Editor to be used in creating an Annotated Sound File.  Input text files should be less than 256 bytes.

The following ways enable users to activate this function:

Menu: Select "Import Text" under the File menu.

Toolbar: Right-single click the icon [image] to open the "Open Text File" dialog box.


To Hi-light a wave

Procedures:

1. Left single-click on the mouse on the starting location of the wave which is to be highlighted.

2. Drag the mouse from the starting location to the desired end of the wave (The hi-lighted area is colored black.).


To Hi-light the text

Assume that the user has imported text into the editing area.

Procedures:

1. Left double-click the mouse on the text editing area.  A text box would appear consisting of all the text being hi-lighted

2. To move to the front of the text, left single-click the mouse on the beginning of the text.

3. Simply hi-light the text of interest.  (The hi-lighted area is colored blue.).

Meaning of the text colors:-

BLUE - linked to wave

BLACK - not linked wave

RED - part of a group (linked or not linked).


To link wave with text

Procedures:

(The following procedures assume that the user has loaded a raw sound wave into the editor and that the text has been either inputted through the keyboard or from a raw text file.)

1. Hi-light section of the wave to be linked to text.

2. Left double-click the mouse on the text section to activate the input text area.

3. Hi-light portion of  the text  to be linked.

4. Click on the icon [image] to link the wave to the text or hit "enter" key.

Related Topic:

Text Editing and Wave Display Areas


Text Editing and Wave Display Areas

The following diagram indicates the hi-lighted wave and the text input area.

Click on an area to trigger the description dialog box.


To Unlink a wave

Procedures:

1. Left double-click the mouse on the hi-light text.  The associated section of the wave will also appear as a hi-lighted section.

2. Click on the icon [image] to unlink the text.


To display null chunks

To display null chucks

What is a NULL Chunk?

Null Chunk is a portion of the sound wave that do not produce any sound.  The purpose of having NULL chunk is to use as a medium to trigger events.

Null Chunk is not displayed by default.  In order to display a NULL chunk, do the following:

1. Left double-click the mouse on the text.

2. Toggle the "ShowLabel" checkbox.

3. Press "enter" key


To delete null chunks

To delete null chucks

Null Chunks are deleted by not checking the "Show Label" sign. In order to delete a NULL chunk, do the following (assuming the "ShowLabel" checkbox was checked):

1. Left double-click the mouse on the text.

2. Remove the checkmark on  the "ShowLabel" checkbox.

3. Press "enter" key


To Play Sound

The following ways enable the user to play wave sound or portions of the wave:

Menu: Select "Play Sound" under Test Menu.

Toolbar: Right-single click the icon [image].


To Test Results

The following ways enable the user to test the result of their sound annotation:

Menu: Select "Test SAN" under Test Menu.

Toolbar: Right-single click the icon


To group chunks
To Group Chunks [image] to start grouping

 to end grouping

There are two play modes available :-  WORD and SENTENCE modes.

Grouping only works in WORD Play mode. In short, Grouping functions by allowing association of text chunks to sound phrases.

Reason:

When you play the Annotated Sound file in sentence mode, the words are highlighted based on which word is linked to which portion of the wave.  However, there are cases where it is hard to get a clear sound for a specific word in a wave file, but you may wish to maintain the individual hi-lighting of the word in sentence play mode.  You would therefore group a few words together as a phrase which can be played under word mode. The end result is getting a clear meaning of the sound.


To Ungroup Chunks

Untie multiple text chunks to sound phrases.

Procedure:

1. Hi-light the text to be ungrouped.

2. Select option "Remove From Group" under the "Edit" menu.


To Zoom waves

Use the vertical scroll bar to zoom in or out of the wave.  The least level of zoom is on the top of the Scroll bar where as the highest level is at the bottom.


To Embed a wave

Embedding a wave file places the wave file inside the .SAN file so that the text from the SAN file is not dependent on any external files or whether they are places in the right path.


To Save

Choose 'Save' or 'Save As...' from the File Menu.  For the Save As option, you will be prompted with the Save As... dialog, where you will have the opportunity to specify a filename of your choice as the name of the to-be-saved annotated sound file.


Exit (File Menu)
Exit

Select "Exit" under the  File menu.


To Link the Sound DataFile to the Sound Annotation Visual Basic Control
To Link the Sound Data File to the Sound Annotation Visual Basic Control:

1. Add the SNDAN.VBX module to your Visual Basic project.  (Choose 'Add File...' from the the File Menu in Visual Basic).  The [image] icon will appear on the toolbox palette if the Sound Annotation custom control is loaded successfully.

2. Double-click on the [image] icon on the toolbox to create a Sound Annotation control on the Form you are working on.

3. double-click on the FileName property from the Property Window and choose the Sound Data File that you have just created and saved using the Sound Annotation Editor.  If the Sound Data file (extension .SAN) is loaded successfully, the Filename property should contain the path of Sound Data file created using the editor.


Main Editor Screen

The following is a sample picture of the interface:

Click anywhere on the picture to get context specific help on any of the interface elements.


Sound Annotator Test

Sound Annotator Dialog

To annotate the sound wave and text, use the following dialog:


General Text Display Field

All input text is displayed in this area.


Text Edit Field

Area to edit/add text to the exiting text field.

Double-click the left mouse button on the Text Field to activate.


Hi-Light Wave

The hi-lighted section of the sound wave is in black.


File Menu

New

Open

Close

Save

Save As

Import Text

Import Wave

Exit


Edit Menu

Link Data

Unlink Data

Mark Group Start

Mark Group End

Remove From Group

Edit Wave Path


Test Menu

Play Sound

Stop Sound

Test SAN


Help Menu

Index

About...


New (File Menu)

The New menu item will start a new sound editing session.  This command accomplishes this by saving and clearing any existing sound file in the session.


Close (File Menu)

The Close menu item will save and clear any existing sound file in the session.


Index (Help Menu)

This "index" option will show the table of content for the Sound Annotation Editor.


About (Help Menu)

This "About" option will show the logo for MediaShop's Sound Annotation Editor.


Title Bar

Main Menu Area


Wave Path

Wave Directory Path

Wave name and its directory path


Move Across - Horizontal Scroll Bar

Side movement of the wave.