找回密码
 注册
查看: 323|回复: 0

R语言 sound包 Ops.Sample()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 12:04:22 | 显示全部楼层 |阅读模式
Ops.Sample(sound)
Ops.Sample()所属R语言包:sound

                                        Basic Operations for Sample Objects
                                         示例对象的基本操作

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

These functions apply the basic operations pointwise to the waveforms of the samples.
这些功能适用的逐点的样本的波形的基本操作。


用法----------Usage----------


\method{Ops}{Sample}(e1,e2)
\method{sum}{Sample}(e1,e2,...)
\method{prod}{Sample}(e1,e2,...)



用法----------Usage----------

e1 - e2
e1 * e2
const * s
s * const
s / const
## S3 method for class 'Sample':
sum(e1, e2, ...)
## S3 method for class 'Sample':
prod(e1, e2, ...)



参数----------Arguments----------

参数:s, e1, e2, ...
For +,-,*,/, Sample objects. For prod.Sample and sum.Sample, Sample objects or strings giving the names of wav files.
对于+,-,*,/,样品的对象。对于prod.Sample和sum.Sample,样本对象或给wav文件的名称的字符串。


参数:const
a double.
一个双。


Details

详细信息----------Details----------

The sum of two Sample objects corresponds to the sound when both samples are played at a time. The product of two samples causes an effect called ringmodulation, but it can also be used to add some vibrato to a sound (see the examples).
两个Sample对象的总和对应的声音播放两个样品时,在同一时间。两个样品的产物导致的效果称为ringmodulation,但它也可以被用于添加到声音一些颤音(见实施例)。

If the samples have different sample parameters (bits, rate and channels), the system uses the command fitSampleParameters to adjust them before the waveforms are combined.
如果样本有不同的采样参数(比特率和渠道),该系统使用命令fitSampleParameters调整前的波形相结合。

Be careful to make sure that the resulting waveform does not exceed the interval [-1,1] when it is played or saved to disk, otherwise you will lose information and hear cracks in the sound. To avoid this, you can use const * s or the normalize command.
要小心,以确保得到的波形不超过区间[-1,1]时,播放或保存到磁盘,否则你将失去信息和听到的声音裂缝。为了避免这种情况,你可以使用const * s或normalize命令。

In prod and sum also the names of wavefiles can be used. Other forms like e1+e2 do not accept filenames as arguments. If the first argument e1 is a filename, the explicit forms sum.Sample and prod.Sample must be used.
在prod和sum还名称wavefiles可以使用。其他形式,如e1+e2不接受文件名作为参数。如果第一个参数e1是一个文件名,明确的形式sum.Sample和prod.Sample使用。


值----------Value----------

a Sample object.
Sample对象。


(作者)----------Author(s)----------


Matthias Heymann



参见----------See Also----------

normalize, center
normalize,center


实例----------Examples----------


e1 <- Sine(440,1)
e2 <- Sine(220,1)
play((e1+e2)/2) # both samples at a time[这两种样品在一个时间]

play(Sine(440,1)*Sine(5,1)) # vibrato[颤音]


转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-6-9 18:16 , Processed in 0.033490 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表