cobookman / HTML5.MicIO

WORK IN PROGRESS: HTML5 powered Hardware Communication Bus using a microphone and headphone port.
192 stars 7 forks source link

HTML5 Audio Modem or Everything Old is New Again #2

Open andrew-kzoo opened 10 years ago

andrew-kzoo commented 10 years ago

I stumbled on this project through a :star: from @zeMirco...

I'm curious if it is possible to port http://www.whence.com/minimodem/ (http://github.com/kamalmostafa/minimodem) from C to JavaScript (or some subset of functionality) to allow communication between a browser and a device connected to the browser's host system's hardware audio port.

Do you have any thoughts on this @kamalmostafa?

andrew-kzoo commented 10 years ago

Wow! It appears @NeoCat implemented something four years ago: https://github.com/NeoCat/FSK-Serial-Generator-in-JavaScript

andrew-kzoo commented 10 years ago

Also @sixteenmillimeter implemented https://github.com/sixteenmillimeter/Javascript-FSK-Serial-Generator-for-Mobile-Safari

And @SimonWaldherr implemented https://github.com/SimonWaldherr/FSK-Encoder.js

Incredible and impressive work!

cobookman commented 10 years ago

I did notice the FSK modem output through the headphone jack to a micro-controller. Hence why I have yet to add the 'output' aspect to the MicIO library.

However parsing FSK modem signals with javascript is very difficult due to its async nature.

Once I get the microController to HTML5 bus to a stable level, I'll probably fork and merge one of the FSK libraries.

kamalmostafa commented 10 years ago

@andrew-kzoo: Generating FSK is easy, but (as mentioned by @cobookman) decoding FSK is hard. This is why you'll find lots of implementations of FSK encoders, but no so many decoders. Minimodem's decoder relies on a Fourier transform library to prepare the audio data for spectrum analysis. This method enables some fancy functionality in minimodem, but it is probably not the easiest way to implement a basic FSK decoder. I have no plans to port minimodem to JavaScript.

andrew-kzoo commented 10 years ago

Thank you @cobookman and @kamalmostafa for your informative responses!