English 中文(简体)
Decoding Manchester biphase-mark in software (representing a SMPTE timecode audio stream)
原标题:

I ve never had to deal with signal/stream encoding or decoding before, at least not beyond fairly basic protocols like HTTP, so forgive me if I m making this harder than I should be.

Several of the systems we use at work rely on SMPTE timecode to operate, a Manchester biphase-mark system that occupies 1kHz of bandwidth between 1kHz and 2kHz.

Because this is right in the audio spectrum, and at line-level, it can be plugged straight into the soundcard s line input, accessible using the audio API of your choice (I plan on using Core Audio on a Mac).

I m fairly happy about decoding the digital bitstream itself to recover the time and parameters, but actually recovering the bitstream from the sampled analogue signal is less straight forward, and I m not sure what the best way to approach the problem is.

My current plan is to allow a short amount of time once a signal is detected (1 second or 24-30 frames) to measure the maximum and minimum number of samples between zero-crossing levels (using a moving average filter to prevent spikes/dropouts affecting decoding) and the maximum and minimum recorded voltages to determine the zero crossing point (DC level).

I should then be able to use this information to construct a digital bitstream from the incoming analogue signal. Am I headed in the right direction, or is there a better way of doing it?

Thanks

问题回答

Your sound card is almost certainly AC coupled. So you shouldn t get a DC offset.

interesting dissection of sound card inputs here

Running a moving average to calculate software automatic gain control is probably a good idea.

your zero crossings will probably be near zero. You can also blur the data at 4khz (2*2k)[aka low pass filter at 4khz] and then edge detect it to get the zero crossings.

When I have signal processing issues like this, I graph the captured data in a custom application, then try things semi-interactively in code.

As a suggestion, try capturing some and see how you go feeding stored data to your parsing routines. Try different things and see what works





相关问题
Playing a Sound With Monotouch

No matter what I try (build -> content, NSUrl, filename) I get a null exception : file not found when I try to play a .caf sound file in monotouch. //var path = NSBundle.MainBundle.PathForResource("...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

Play sound in iPhone web app with Javascript?

I m currently creating an iPhone web application for piano chords, and I wanted to add an option that would let the user press a Play button and play the selected chord. However, I m not sure how to ...

热门标签