All Packages Class Hierarchy This Package Previous Next Index
Class guinea.logic.TAFCTest
java.lang.Object
|
+----guinea.logic.Test
|
+----guinea.logic.GenericTest
|
+----guinea.logic.GenericABCTest
|
+----guinea.logic.TAFCTest
- public class TAFCTest
- extends GenericABCTest
- implements PropertyLoader
In an TAFC (Two alternatives forced choice) Test
two samples are compared. Two samples are played altering some
parameter until the subject can no longer hear the difference
between the samples.
The test uses the procedures and terms described in
Levitt H. (1971) Transformed Up-Down Methods in Psychoacoustics
- See Also:
- TAFCRule
Variable Index
- ·
answerName
- The question ID used to log the answer.
- ·
buttonPressed
- Did the subject press a button (indicates heard a difference,
etc.) within given time between TAFC trials.
- ·
initialLevel
- Initial level for signal B at the start of test item's test
procedure.
- ·
logTrial
- Whether to log the trials list of this item.
- ·
maxRuns
- The maximum number of runs for this TAFC test.
- ·
pauseLength
- Length of pause (in milliseconds) between TAFC trials.
- ·
rule
- The TAFC rule object for this test.
- ·
ruleType
- The rule type number.
- ·
sampleB
- The sample for signal B.
- ·
sampleRef
- The reference sample the sample B is compared with.
- ·
stepSize
- The step size of a step in a TAFC test.
- ·
trialAnswerName
- The question ID used to log the trial list (if trials logging
is enabled via
logTrial
variable.
Constructor Index
- ·
TAFCTest()
- Construct a new TAFC test object.
Method Index
- ·
endItem()
- Add the result of the TAFC procedure to the subject.
- ·
getRule(int)
- Get a TAFC rule object.
- ·
initItemSamples_base()
- Initialize samples for this item.
- ·
initTest()
- Initialize the TAFC rule object for use in this test.
- ·
propertyLoad(Properties, String)
- Read parameters for this test from the properties.
- ·
runSequence()
- Run the TAFC procedure for this item.
- ·
runSequence2()
- Play the sample sequence.
Variables
·
sampleB
protected transient Sample sampleB
- The sample for signal B. Sample B's level is controlled by
the current TAFC rule.
·
sampleRef
protected transient Sample sampleRef
- The reference sample the sample B is compared with.
·
initialLevel
protected Volume initialLevel
- Initial level for signal B at the start of test item's test
procedure. Default level is +0.0dB (1.0 linear).
·
stepSize
protected Volume stepSize
- The step size of a step in a TAFC test. Default is 3.0dB.
·
maxRuns
protected int maxRuns
- The maximum number of runs for this TAFC test.
·
rule
protected TAFCRule rule
- The TAFC rule object for this test.
·
ruleType
protected int ruleType
- The rule type number.
·
buttonPressed
protected boolean buttonPressed
- Did the subject press a button (indicates heard a difference,
etc.) within given time between TAFC trials.
·
pauseLength
protected long pauseLength
- Length of pause (in milliseconds) between TAFC trials.
Default is 2000ms (2 seconds).
·
answerName
protected String answerName
- The question ID used to log the answer.
·
logTrial
protected boolean logTrial
- Whether to log the trials list of this item. Default is
false
.
·
trialAnswerName
protected String trialAnswerName
- The question ID used to log the trial list (if trials logging
is enabled via
logTrial
variable.
Constructors
·
TAFCTest
public TAFCTest()
- Construct a new TAFC test object.
Methods
·
initTest
public void initTest() throws Exception
- Initialize the TAFC rule object for use in this test. It
calls super-classes initTest() method to do default stuff. In
addition it creates and initializes a TAFC rule object for the
test.
- Throws: Exception
- an exception is thrown if player
initialization fails for some reason.
- Overrides:
- initTest in class Test
·
getRule
protected TAFCRule getRule(int type)
- Get a TAFC rule object.
- Parameters:
- type - Type of rule. Only rule 1 is currently
implemented.
- Returns:
- A TAFC rule object.
- See Also:
- TAFCRule1
·
runSequence
protected void runSequence() throws InterruptedException
- Run the TAFC procedure for this item. It plays the selected
fixed sample sequence and waits for answer for a period. Then
the TAFC rule is called to record the result. Then rule
decides whether TAFC procedure should continue or finish.
- Throws: InterruptedException
- an exception is thrown if
sequence was interrupted for some reason .
- Overrides:
- runSequence in class GenericTest
- See Also:
- rule, TAFCRule
·
runSequence2
protected void runSequence2() throws InterruptedException
- Play the sample sequence. This is essentially the same as
superclasses
runSequence()
method. It has some
minor tuning for TAFC test.
- Throws: InterruptedException
- an exception is thrown if
sequence was interrupted for some reason .
- See Also:
- runSequence
·
initItemSamples_base
protected void initItemSamples_base() throws Exception
- Initialize samples for this item.
- Throws: Exception
- an exception is thrown if item samples
initialization fails for some reason.
- Overrides:
- initItemSamples_base in class GenericABCTest
·
endItem
protected void endItem()
- Add the result of the TAFC procedure to the subject. It is
done this way because there is no actual UI components that
could give this kind of answer directly. The answer is
calculated based of a series of answers from the subject.
Optionally, the procedure's trial list can also be logged.
- Overrides:
- endItem in class Test
·
propertyLoad
public void propertyLoad(Properties p,
String name) throws IllegalArgumentException
- Read parameters for this test from the properties.
- Parameters:
- p - the properties.
- name - the name of this object (not usually used)
- Throws: IllegalArgumentException
- thrown if parameters are
wrong.
- Overrides:
- propertyLoad in class GenericABCTest
All Packages Class Hierarchy This Package Previous Next Index