我需要在Java中创建一个函数,该函数为音频添加特定频率和长度的音符。我的频率为双倍,音符长度以毫秒为单位。如何从帧的长度(以毫秒为单位)查找音符的帧长,字节和整数
全功能描述:
This method takes one AudioInputStream and adds the sound of a certain pure frequency to the FRONT of it, lasting a certain length of time. So the method takes two additional parameters: frequency and noteLengthInMilliseconds. The amplitude of the additional sound should be 64*256.
不过,我需要找到音符在帧的长度,以及在字节数和整数。
此外,关于如何创建笔记作为样本数据数组(使用java.sound.sampled包)的任何建议将会有所帮助。
FRAME &采样率:44100.0hz
编码:PCM_SIGNED
什么样的框架? PCM帧?采样率是多少?而且,“以及字节和Ints”是什么意思? – Brad
PCM_SIGNED编码,44,100.0赫兹采样率 – Markeazy