iPhone 音频和 AFSK
这里有一个问题要问所有 iPhone 专家:
如果你们还记得调制解调器过去发出的声音,或者当人们试图从盒式磁带加载节目时发出的声音,我正尝试在 iPhone 中复制这种声音,用于业余无线电应用程序。我有一个数据流 (ASCII),我需要将其编码为 1200 波特率的 AFSK。因此基本上流中的所有内容都会转换为一系列 1200 和 2200 Hz 音调。它需要听起来像这样:http://upload.wikimedia。 org/wikipedia/commons/2/27/AFSK_1200_baud.ogg
我成功地从字符串中构建了一个位数组,但是当我尝试为每个位分配音调时,我会在声音中出现间隙,因此它不会正确解调。
有没有想过应该如何解决这个问题?谢谢。
Here is a question for all you iPhone experts:
If you guys remember the sounds that modems used to make, or when one was trying to load a program from a cassette tape – I am trying to replicate this in an iPhone for a ham radio application. I have a stream of data (ASCII) and I need to encode it as AFSK at 1200 baud. So basically everything in the stream is converted to a series of 1200 and 2200 Hz tones. It needs to sound something like this: http://upload.wikimedia.org/wikipedia/commons/2/27/AFSK_1200_baud.ogg
I successfully built a bit array out of the string, but when I try to assign tones to each bit I get gaps in the sound, therefore it doesn’t demodulate correctly.
Any thought of how one should tackle this problem? Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
mobilesynth 项目是开源的。您也许可以扫描它以查找生成您需要的音调的代码。
The mobilesynth project is open-source. You might be able to scan that for code that generates the tones you need.
您如何为这些位分配音调?请记住,数字音频信号只是一个值介于 -1 和 1 之间的样本流。音调分配之间可能存在削波问题。如果信号低于 -1 或高于 1,就会发生这种情况。如果信号保持高于或低于该范围的恒定值,则不会有声音。也许您可以输出样本流来检查是否是这种情况。或者将输出插入示波器...
另请注意,信号的“不均匀”转换之间可能会发生喀哒声。例如,如果我输出值为 1 的样本,紧接着输出值为 -1 的样本,则会产生点击或弹出声。
How are you assigning tones to the bits? Remember, a digital audio signal is just a stream of samples with values between -1 and 1. Perhaps there is a clipping issue between tone assignments. This can happen if the signal dives below -1 or above 1. If it stays above or below this range at a constant value, there will be no sound. Maybe you could output your stream of samples to check if this is the case. Or plug the output into an oscilloscope...
Also note that clicking can occur between "uneven" transitions of signals. For example if i output a sample with value 1 followed immediately by a sample with value -1, a click or pop will be produced.