MOLE Modifiable Language Experiments

moveAndTalk Instructions

Description

This function moves a character through a specified set of actions on the screen while a sound file plays.

General

This function is used to create a scene stimulus in which a character is moved around the screen in a specified set of actions while a corresponding sound file plays (e.g. what the character is saying).

For this function, order, shape, wordsound, action, and window must all be specified.
order specifies whether to display the images in sequential or random order,
shape specifies the image for the character,
wordsound specifies the sound file to be played,
action specifies which movements the character will make, and
window specifies where to display the stimuli.

folder and background can be left blank, and the function will fill in default values for these arguments.
folder specifies where MATLAB should pull the stimuli from, and
background specifies an image for the background should the user desire one.

Usage

moveAndTalk(order,shape,wordsound,action,window,folder,background)

Ex.  moveAndTalk(‘SEQUENTIAL’,norming{2},norming{3},norming{4},5,’CatExp/’,’NormingBG.jpg’)

OR (this is the same function as the one listed above, only using the defined variable names listed below in the Arguments section):

Ex.  moveAndTalk(arg1,arg2,arg3,arg4,arg5,arg6,arg7)

Arguments

order:  String value that specifies the order of actions to be displayed.  Can choose from ‘RANDOM’ or ‘SEQUENTIAL’ (there is no default).
Ex.  arg1 = ‘SEQUENTIAL’

shape:  1xn cell array of string values that specifies the .jpg image file of the character to be moved around the screen for each trial.
Ex.  arg2 = norming{2}

wordsound:  1xn cell array of string values that specifies the .wav file to be played while the image is moved around the screen for each trial.
Ex.  arg3 = norming{3}

action:  1xn cell array of string values that specifies the action for the character to do for each trial.  Currently can choose from ‘vbounce’, ‘lefthop’, ‘righthop’ (all bouncing motions), ‘leftstroll’, ‘rightstroll’ (walk-in moves), ‘leftpeep’, ‘rightpeep’,(peeping from behind L or R tree), ‘uppeep’ (peeping up from beneath the grass, center of screen), and ‘distractor’, which is a non-test trial action.
Ex.  arg4 = norming{4}

window:  Numerical value that specifies the window that the stimuli should be drawn to (window pointer).
Ex.  arg5 = wptr

folder:  String value that specifies the folder containing the image and sound stimuli.  If this is not specified, it defaults to the current folder being worked out of.
Ex.  arg6 = ‘CatExp/’

background:  String value that specifies the background of the scene.  Currently defaults to 0 (no background), but if it is specified, will read the background from the folder specified in the folder argument.
Ex. arg7 = ‘CatBG.jpg’

Notes

The specifications for arguments 2, 3, and 4 (shape, wordsound, action) are all contained in separate columns in the text file that the shell script loads.  Therefore, they are specified in the function by indexing the column within the cell array as shown with curly brackets ( {} ) above.

All arguments that are strings must be surrounded by single quotation marks ( ‘ ‘ ).

The shape argument should refer to a .jpg file that is 200×200 pixels in size, to avoid strange appearances.

The user could add their own hard code in the function (adding on to the large switch-case statement) to program for different actions.

All string inputs are case sensitive.

When specifying a folder to be worked out of, the name of the folder must be followed by a forward slash ( / ).

 

If you would like to download this read-me to your computer, you can do so below (right-click and ‘Save As’).

PDF
RTF

Comments are closed.

Post Navigation