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

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

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

                                        Duration of a Sample Object
                                         时间的样品对象

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

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

Get or set the duration (in seconds) of a Sample object or a wav file.
获取或设置一个Sample对象或WAV文件的持续时间(以秒计)。


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


duration(s) <- value
setDuration(s,value)



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

参数:s
a Sample object, or a string giving the name of a wav file.
样品对象,或者一个字符串,给出一个wav文件的名称。


参数:value
a double giving the duration in seconds.
一个双给人以秒为单位的持续时间。


Details

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

The replacement form can be used to reset the duration of the Sample object (here, filenames are not accepted).
替换形式可以被用来重置Sample对象的持续时间(在此,文件名不被接受)。

If a Sample object is shortened, extra values are discarded. When a Sample object is lengthened, it is padded out to its new length with zeros (silence).
如果样本对象被缩短,多余的值将被丢弃。当一个Sample对象延长,它被填充到新的零长度(沉默)。


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

For duration, the duration of the sample in seconds.
对于duration,以秒为单位的持续时间的样品。

For setDuration, a Sample object with the new duration.
对于setDuration,一个Sample对象的新的持续时间。


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


Matthias Heymann



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

sampleLength
sampleLength


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


s <- Sine(440,3)
duration(s)  # 3[3]
duration(s) &lt;-.5  # sample is now .5 sec long[样品是现在的0.5秒长]
play(setDuration(s,1)) # plays a .5 sec sine wave and then .5 sec silence[扮演一个0.5秒的正弦波,然后0.5秒沉默]


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-10 04:08 , Processed in 0.023533 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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