center(sound)
center()所属R语言包:sound
Center a Sample Object.
中心示例对象。
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function adds a constant to a Sample object's waveform, so that its mean gets zero. This makes sense especially for sonification purposes, when (in general non-centered) data is transformed into sound.
此函数以及常数Sample对象的波形,所以,其平均得到零。特别是对超声处理(sonification)目的这是有意义的,当(在一般非中心的)的数据被转换成声音。
用法----------Usage----------
参数----------Arguments----------
参数:s
a Sample object, or a string giving the name of a wav file.
样品对象,或者一个字符串,给出一个wav文件的名称。
Details
详细信息----------Details----------
For a stereo Sample object, both channels are treated separately.
一个立体声采样对象,两个通道分别进行处理。
值----------Value----------
a Sample object with zero as the mean of each channel's waveform.
样品对象作为每个信道的波形的平均值为零。
(作者)----------Author(s)----------
Matthias Heymann
参见----------See Also----------
normalize
normalize
实例----------Examples----------
x <- seq(0,50*pi,length=10000)
waveform <- (sin(x))^2 + .6*cos(x/2)^2
s <- as.Sample(waveform,44100,16)
plot(s) # nice idea, but wrong range for a sample[不错的主意,但错误的样本]
play(s) # sounds ugly, too[听起来很丑陋,太]
s <- center(s)
plot(s) # now zero is the mean[现在零是平均]
play(s) # sounds good, but too quiet[听起来不错,但太安静了]
s <- normalize(s)
plot(s) # this looks like a perfect sample![这看起来像一个完美的样本!]
play(s) # e voila![Ë瞧!]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|