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

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

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

                                        Bits per Sample
                                         每个采样位

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

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

Get or set the bits parameter (the sampling quality) of a Sample object or a wav file.
获取或设置bits参数(采样质量)的一个样本对象或一个wav文件。


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


bits(s) <- value
setBits(s,value)



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

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


参数:value
the number of bits per sample: 8, 16 or 24.
每个样本的比特数:8,16或24。


Details

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

The replacement form can be used to reset the sampling quality of a Sample object, that is the number of bits per sample (8 or 16). Here, filenames are not accepted.
替换形式可以被用来重置样品对象的取样质量,这是每个样本的位数(8或16)的数目。在这里,文件名是不能接受的。


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

For bits, the bits parameter (number of bits per sample) of the Sample object (8, 16 or 24).
对于bits,位Sample对象的参数(每个样本的比特数),(8,16或24)。

For setBits, a Sample object with the new bits parameter.
对于setBits,一个新的bits参数的样本对象。


注意----------Note----------

Changing the sampling quality of a Sample object does not affect its actual data but only its $bits flag. The sampling quality is only used when a Sample object is played or saved to disk. Internally, R always uses doubles for the waveform.
更改采样质量的一个Sample对象并不影响其实际的数据,但只有它的$bits标志。采样的质量时,只用了一个Sample对象播放或保存到磁盘。在内部,R总是双打的波形。

An 8 bit sample needs only half the disk space compared to a 16 bit sample, but it has a lower sound quality.
一个8位的样本需要只有一半的磁盘空间,一个16位的样品相比,但它具有较低的声音质量。

Note also that 24 bit samples cannot be played by every wav file player.
还要注意的是每一个WAV文件播放器无法播放的24位采样。


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


Matthias Heymann



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

fitSampleParameters
fitSampleParameters


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


s <- Sine(20000,1,rate=44100,bits=16)
play(s)
print(s)
bits(s) <- 8
play(s)  # now worse quality[现在质量差]
print(s) # but less disk space[但较少的磁盘空间]
play(setBits(s,16)) # now better quality again, since waveform data was not changed.[现在更好的质量再次,由于波形数据没有被更改。]


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-9 15:46 , Processed in 0.023891 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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