Description Usage Arguments Details Value Note Author(s) See Also Examples
Given one or two spikeTrain
object(s), trainWav
generates
a wav
file containing the result of the convolution of the spike
train(s) with the single period of a sine function.
1 2 3 |
leftCh |
a |
rightCh |
a |
filename |
see |
leftChFreq |
the frequency of the sine function convolved with
|
rightChFreq |
the frequency of the sine function convolved with
|
rate |
see |
bits |
see |
pan |
see |
overwrite |
see |
The spikeTrain
object(s) of leftCh
and rightCh
are viewed as sequence of Dirac delta function and are convovled with
a single period of a sine function of a given frequency.
Nothing is returned, the function is used for its side effect: a
wav
file is created.
You have to install the sound
package to use these functions.
Christophe Pouzat christophe.pouzat@gmail.com
as.spikeTrain
,
as.Sample
,
stereo
,
saveSample
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
## load spontaneous data of 4 putative projection neurons
## simultaneously recorded from the cockroach (Periplaneta
## americana) antennal lobe
data(CAL1S)
## convert data into spikeTrain objects
CAL1S <- lapply(CAL1S,as.spikeTrain)
## write train of neuron 1 to disk
trainWAV(CAL1S[[1]],,"n1spont.wav")
## write trains of neuron 1 and 2 to disk
trainWAV(CAL1S[[1]],CAL1S[[2]],"n1n2spont.wav")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.