previous next Up Title Contents

PureTone_2:


File name
StP2Tone.[ch]


Description
This module generates a pure tone, preceeded and ended by periods of silence.


Example parameter file format
1000.0		Stimulus frequency (Hz).
20.0		Stimulus signal intensity (dB SPL).
10.0e-3		Stimulus signal duration (s).
2.0e-3		Stimulus silence period before the signal begins (s).
5.0e-3		Stimulus silence period after the signal ends (s).
0.1e-3		Stimulus sampling interval, dt (seconds).



Test program directory
Tests/Combinations

Generic Module Routines

This module has the standard Generic Module Routines (see 0 Basic Module Routines used in Generic Programming).

The GenerateSignal_PureTone_2(...) Process Routine

Syntax
BOOLN GenerateSignal_PureTone_2(EarObjectPtr theObject);


Returns
TRUE if the process is successful, otherwise it returns FALSE.

The SetBeginPeriodDuration_PureTone_2(...) Routine

Syntax
BOOLN SetBeginPeriodDuration_PureTone_2(double theBeginPeriodDuration);


Returns
TRUE if the function is successful, otherwise it returns FALSE.

The SetDuration_PureTone_2(...) Routine

Syntax
BOOLN SetDuration_PureTone_2(double theDuration);


Returns
TRUE if the function is successful, otherwise it returns FALSE.

The SetEndPeriodDuration_PureTone_2(...) Routine

Syntax
BOOLN SetEndPeriodDuration_PureTone_2(double theEndPeriodDuration);


Returns
TRUE if the function is successful, otherwise it returns FALSE.

The Set(...) Routine

Syntax
BOOLN SetFrequency_PureTone_2(double theFrequency);


Returns
TRUE if the function is successful, otherwise it returns FALSE.

The SetIntensity_PureTone_2(...) Routine

Syntax
BOOLN SetIntensity_PureTone_2(double theIntensity);


Returns
TRUE if the function is successful, otherwise it returns FALSE.

The SetPars_PureTone_2(...) Routine

Syntax
BOOLN SetPars_PureTone_2(double theFrequency, double theIntensity, double theDuration, double theSamplingInterval, double theBeginPeriodDuration, double theEndPeriodDuration);


Returns
TRUE if the function is successful, otherwise it returns FALSE.

The SetSamplingInterval_PureTone_2(...) Routine

Syntax
BOOLN SetSamplingInterval_PureTone_2(double theSamplingInterval);


Returns
TRUE if the function is successful, otherwise it returns FALSE.

Example: Tests/Combinations/StimulusResp.c

Parameter file: StimulusResp.par:
#
# Main Parameter file
#

output.dat	Name of output file.

# Module specifications
#Par. file				Name		Description
#---------				-----		-------------
ParFiles/St/P2Tone1.par		PureTone_2	Stimulus generation paradigm.
ParFiles/PE/PreEmph1.par	null		Outer-/middler-ear filter model.
ParFiles/BM/GammaT5k.par	null		Basilar membrane filter model.
ParFiles/IHC/CarneyRP1.par	null		IHC receptor potential model.
ParFiles/IHC/Meddis86.par	null		Inner hair cell (IHC) model.
ParFiles/AN/BinomSG1.par	null		Auditory nerve spike generation.
ParFiles/NC/Dendrite3.par	null		Dendritic filtering.
ParFiles/NC/MG92Stellate.par	null		Neural cell model.

# Miscellaneous parameters

2.5e-3	Ramp up rise time for signal (s).
Output

Figure [138] A stimulus generated by the PureTone_2 module. Note that the ramp interval has been applied to the start of the signal, not the start of the stimulus at t = 0 s.

Example: Tests/Segmented_Mode/SegModeResp.c

Parameter file: SegModeResp.par:
#
# SimulationSpec main parameter file.
#

output1.dat				Output file.
output2.dat				Output file.

# Module specifications.
#Par. file			Name				Description
#---------			-----				-------------
ParFiles/St/P2Tone1.par	PureTone_2			Stimulus generation paradigm.
SimSpecs/AN/Carney.sim	null				Simulation specification.

# Miscellaneous parameters
3		Number of repeated runs
10e-3	Single run duration (s or max. samples).
3e-3	Segment duration (s or max. samples).
2.5e-3	Ramp up rise time for signal (s).
Output

Figure [139] The PureTone_2 stimulus behaviour in segmented processing mode. The full stimulus is generated once in normal mode "output1.dat", then the stimulus is generated in segments in segment processing mode "output2.dat". Note that in segmented processing mode the stimulus repeats.


previous next Up Title Contents