Multi-trial experiments using templates Most experiments consist of multiple trials, typically varying levels of a factor, e.g., whether or not the inflectional morpheme -s is present or not in our example experiment. So the last step in designing our experiment is to create an entire set of trials. We could copy and paste the newTrial(…) …
Post Type Archives: Wiki Pages
Audio, Text unfolding and Clicks
Audio PennController makes playing audio simple: just create an audio element in the cache using newAudio and play it using the command .play. the scripts on this page correspond to the content of the picture-selection newTrial(…) [js try=”true” new=”1-3″]newAudio(“2fishRoundTank.mp3”) .play() , newText(“The fish swim in a tank which is perfectly round”) .print() , newImage(“two”, “2fishRoundTank.png”) …
Participant information
Welcome/Instruction screen There are various good reasons to add a preface page (or even several) to your experiment, including: the page can describe and give instructions about the experiment to your participants the page can serve as a consent form the page can ask the participant to type an ID In PennController, every page corresponds …
Data collection basics
Collecting data PennController automatically logs when a trial starts and when it ends, but you have to explicitly tell it what other information you want to collect. In our case, we are interested in what is captured by the key element. PennController has a command that logs element-related events: .log. All we need to do …
Getting started
Setup Create a new experiment on the PCIbex Farm (create an account first if you don’t already have one). Open your project (click the name of your experiment) and find the text Update from git repo on the page: below it, you should see two input boxes and a Sync button—if you can’t see them, …
Text, Pictures and Keys
Elements Elements are the core pieces that PennController works with: they allow you to manipulate and present content such as text, images, audio or videos, but also to structure trials by inserting pauses and, crucially, collecting the participant’s input. The main parts of PennController trial scripts therefore consist of sequences of commands relating to an …
button.click
getButton(id).click() (since PennController 1.2) Simulates a click on the button. Example: [js highlight=”3,4″ try=”true”]newKey(” “) .settings.callback( getButton(“continue”) .click() ) , newButton(“continue”, “Continue”) .print() .wait()[/js] Creates a Key element associated with the spacebar which, whenever pressed, will simulate a click on the continue button added below it, then will wait until the button is clicked (or …
standard.settings.cssContainer
getElement(id).settings.cssContainer(“styleName”, “style”) or getElement(id).settings.cssContainer({“style name 1”: “style 1”, “style name 2”: “style 2″}) Applies the CSS style(s) to the container’s element. This will affect both the element itself and any element wrapping it as added via or . This command often more closely accomplishes what you want to achieve than the command. Example: [js highlight=”4″ …
scale.select
getScale(id).select(option) or getScale(id).select(index) or getScale(id).select(option, “log”) Selects the specified option on the scale. If you pass a second argument (e.g. “log”) then the selection will be treated as if it were a manual selection, and will be recorded in the results file if you called log. Example: [js highlight=”24″ try=”true”]newText(“What programming language is PennController based …
scale.settings.keys
getScale(id).settings.keys( “key1”, “key2”, … ) or getScale(id).settings.keys() Respectively associates the scale’s options with the specified keys for selection. If you pass no argument, will check whether your scale’s options are all single characters and, if so, will use them as keys. If not, will respectively associate the scale’s options with the numeric keys. Example: [js …