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:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|