channels(sound)
channels()所属R语言包:sound
Number of Channels of a Sample Object
样品对象的通道数
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Get or set the number of channels of a Sample object or a wav file.
获取或设置一个Sample对象的渠道或WAV文件的数量。
用法----------Usage----------
channels(s) <- value
setChannels(s,value)
参数----------Arguments----------
参数:s
a Sample object, or a string giving the name of a wav file.
样品对象,或者一个字符串,给出一个wav文件的名称。
参数:value
1 for mono, or 2 for stereo.
1的立体声为单声道,或2。
Details
详细信息----------Details----------
The replacement form can be used to reset the number of channels of a Sample object (here, filenames are not accepted).
替换形式可以被用来重置样品对象的信道的数目(在这里,文件名是不被接受)。
If a mono sample is transformed into a stereo sample, each channel of the stereo sample equals the waveform of the mono sample. If a stereo Sample is transformed to a mono sample, (left(s)+right(s))/2 is returned.
如果单样品转化成立体声采样,每个信道的立体声采样等于单样本的波形。如果立体声样品转化为单样品,(left(s)+right(s))/2被返回。
值----------Value----------
For channels, the number of channels of the sample (1 for mono, 2 for stereo).
对于channels,样本的信道的数目(对于单声道,立体声为2 1)。
For setChannels, a Sample object with the new channels parameter.
对于setChannels,一个新的channels参数的样本对象。
(作者)----------Author(s)----------
Matthias Heymann
参见----------See Also----------
fitSampleParameters
fitSampleParameters
实例----------Examples----------
s <- stereo(Sine(440,1),Sine(220,1))
channels(s) # 2[2]
play(s)
channels(s) <- 1 # now a mono sample[现在一个单样本]
play(s)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|